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
java 8 + the same : or or or, even, use code of those guys who do God's work
public static <E, R> R foldLeft(Iterable<E> elems, R init, BiFunction<R, E, R> foldFun) { R acc = init; for (E elem : elems) { acc = foldFun.apply(acc, elem); } return acc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getOr_op();", "@Test\n public void testPredicateOr() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n Predicate<Integer> isDivSeven = (x) -> (x % 7) == 0;\n\n Predicate<Integer> evenOrDivSeven = isEven.or(isDivSeven);\n\n assertTrue(evenOrDivSeven.apply(14));\n assertTrue(evenOrDivSeven.apply(21));\n assertTrue(evenOrDivSeven.apply(8));\n assertFalse(evenOrDivSeven.apply(5));\n }", "default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }", "private Expr or() { // This uses the same recursive matching structure as other binary operators.\n Expr expr = and(); // OR takes precedence over AND.\n while(match(OR)) {\n Token operator = previous();\n Expr right = and();\n expr = new Expr.Logical(expr, operator, right);\n }\n return expr;\n }", "public Object visitLogicalOrExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a | (Long) b;\n }\n else {\n return parens(a) + \" || \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.orWith(b);\n \n return bdd;\n }\n }", "@Override\n\tpublic void visit(OrExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic void visit(OrExpression arg0) {\n\n\t}", "public String getAndOr();", "private void or() {\n // PROGRAM 1: Student must complete this method\n //loop through output array\n for (int i = 0; i < output.length; i++) {\n //take the or of index i of inputA and inputB and place result in output[i]\n output[i] = (inputA[i] | inputB[i]);\n }\n }", "@RepeatedTest(20)\n void logicalOperatorsTest() {\n assertEquals(bi.or(bot), new Binary(\"1\"));\n assertEquals(bi.or(bof), bi);\n assertEquals(bi.and(bot), bi);\n assertEquals(bi.and(bof), new Binary(\"0\"));\n assertEquals(bot.or(bi), new Binary(\"1\"));\n assertEquals(bof.or(bi), bi);\n assertEquals(bot.and(bi), bi);\n assertEquals(bof.and(bi), new Binary(\"0\"));\n assertEquals(bot.and(bot), bot);\n assertEquals(bot.and(bof),bof);\n assertEquals(bof.and(bot),bof);\n assertEquals(bof.and(bof),bof);\n assertEquals(bot.or(bot), bot);\n assertEquals(bot.or(bof),bot);\n assertEquals(bof.or(bot),bot);\n assertEquals(bof.or(bof),bof);\n Binary b1 = new Binary(\"10001\");\n Binary b2 = new Binary(\"1001011\");\n assertEquals(b1.or(b2), new Binary(\"1111011\"));\n assertEquals(b1.and(b2), new Binary(\"1000001\"));\n assertEquals(b1.or(b2), b2.or(b1));\n assertEquals(b1.and(b2),b2.and(b1));\n assertEquals(bi.or(bi), bi);\n assertEquals(bi.and(bi),bi);\n Binary notbi = bi.neg();\n assertEquals(bi.or(notbi), new Binary(\"1\"));\n assertEquals(bi.and(notbi), new Binary(\"0\"));\n\n //nulls\n //Bool or ITypes \\ {Logicals}\n assertEquals(bot.or(st),Null);\n assertEquals(bof.or(st),Null);\n assertEquals(bot.or(f), Null);\n assertEquals(bof.or(i), Null);\n //Float or ITypes\n assertEquals(f.or(st), Null);\n assertEquals(f.or(bot), Null);\n assertEquals(f.or(bof), Null);\n assertEquals(f.or(i), Null);\n assertEquals(f.or(g), Null);\n assertEquals(f.or(bi), Null);\n //Int or ITypes\n assertEquals(i.or(st), Null);\n assertEquals(i.or(bot),Null);\n assertEquals(i.or(bof), Null);\n assertEquals(i.or(j), Null);\n assertEquals(i.or(f), Null);\n assertEquals(i.or(bi), Null);\n //Binary or ITypes \\ {Logicals}\n assertEquals(bi.or(st), Null);\n assertEquals(bi.or(f), Null);\n assertEquals(bi.or(i), Null);\n //NullType or ITypes\n assertEquals(Null.or(st), Null);\n assertEquals(Null.or(bof), Null);\n assertEquals(Null.or(f), Null);\n assertEquals(Null.or(i), Null);\n assertEquals(Null.or(bi), Null);\n assertEquals(Null.or(Null), Null);\n assertEquals(st.or(Null), Null);\n assertEquals(bot.or(Null), Null);\n assertEquals(f.or(Null), Null);\n assertEquals(i.or(Null), Null);\n assertEquals(bi.or(Null), Null);\n\n //Bool and ITypes \\ {Logicals}\n assertEquals(bot.and(st),Null);\n assertEquals(bof.and(st),Null);\n assertEquals(bot.and(f), Null);\n assertEquals(bof.and(i), Null);\n //Float and ITypes\n assertEquals(f.and(st), Null);\n assertEquals(f.and(bot), Null);\n assertEquals(f.and(bof), Null);\n assertEquals(f.and(i), Null);\n assertEquals(f.and(g), Null);\n assertEquals(f.and(bi), Null);\n //Int and ITypes\n assertEquals(i.and(st), Null);\n assertEquals(i.and(bot),Null);\n assertEquals(i.and(bof), Null);\n assertEquals(i.and(j), Null);\n assertEquals(i.and(f), Null);\n assertEquals(i.and(bi), Null);\n //Binary and ITypes \\ {Logicals}\n assertEquals(bi.and(st), Null);\n assertEquals(bi.and(f), Null);\n assertEquals(bi.and(i), Null);\n //NullType and ITypes\n assertEquals(Null.and(st), Null);\n assertEquals(Null.and(bof), Null);\n assertEquals(Null.and(f), Null);\n assertEquals(Null.and(i), Null);\n assertEquals(Null.and(bi), Null);\n assertEquals(Null.and(Null), Null);\n assertEquals(st.and(Null), Null);\n assertEquals(bot.and(Null), Null);\n assertEquals(f.and(Null), Null);\n assertEquals(i.and(Null), Null);\n assertEquals(bi.and(Null), Null);\n\n }", "@Test\n public void testOr() {\n if (true || addValue()) {\n assertThat(flag, equalTo(0));\n }\n\n // first not satisfied, invoke second\n if (false || addValue()) {\n assertThat(flag, equalTo(1));\n }\n }", "Or createOr();", "Or createOr();", "IRequirement or(IRequirement constraint);", "@Override\n public ILogical or(ILogical operador) {\n return operador.orBinary(this);\n }", "public Object visitBitwiseOrExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a | (Long) b;\n }\n else {\n result = parens(a) + \" | \" + parens(b);\n }\n \n return result;\n }", "@Override\npublic final void accept(TreeVisitor visitor) {\n visitor.visitWord(OpCodes.OR_NAME);\n if (ops != null) {\n for (int i = 0; i < ops.length; i++) {\n ops[i].accept(visitor);\n }\n } else {\n visitor.visitConstant(null, \"?\");\n }\n visitor.visitEnd();\n }", "OrExpr createOrExpr();", "public static String punctuateOr(List<String> elements)\r\n/* 48: */ {\r\n/* 49: 47 */ return punctuateSequence(elements, \"or\");\r\n/* 50: */ }", "private static Edge or(Edge... edges) {\n List<Edge> e = Arrays.asList(edges);\n Preconditions.checkArgument(!e.contains(Edge.epsilon()), \"use 'opt()' for optional groups\");\n return Edge.disjunction(e);\n }", "StatementChain or(ProfileStatement... statements);", "private static boolean checkOrOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"or\")) {\n\t\t\tString[] arr = expression.split(\"or\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkEqualsToOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// check if the current word is a variable\n\t\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"or\");\n\t\t\t\t\t} else if (expression.endsWith(\"or\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"or\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkEqualsToOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public static BinaryExpression exclusiveOr(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "default CriteriaContainer or(Criteria... criteria) {\n return legacyOperation();\n }", "private Term parseLogicalOr(final boolean required) throws ParseException {\n Term t1 = parseLogicalAnd(required);\n while (t1 != null) {\n /*int tt =*/ _tokenizer.next();\n if (isSpecial(\"||\") || isKeyword(\"or\")) {\n Term t2 = parseLogicalAnd(true);\n if ((t1.isB() && t2.isB()) || !isTypeChecking()) {\n t1 = new Term.OrB(t1, t2);\n } else {\n reportTypeErrorB2(\"'||' or 'or'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "private static String or(String s, String t)\r\n\t{\r\n\t\tchar[] out = s.toCharArray();\r\n\t\tfor (int i = 0; i < out.length; i++)\r\n\t\t{\r\n\t\t\tif(out[i] == '0' && t.charAt(i) == '1')\r\n\t\t\t\tout[i] = '1';\r\n\t\t}\r\n\t\treturn new String(out);\r\n\t}", "default DoublePredicate or(DoublePredicate paramDoublePredicate) {\n/* 101 */ Objects.requireNonNull(paramDoublePredicate);\n/* 102 */ return paramDouble -> (test(paramDouble) || paramDoublePredicate.test(paramDouble));\n/* */ }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.OR)\n default IData or(IData other) {\n \n return notSupportedOperator(OperatorType.OR);\n }", "Expression orExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = andExpression();\r\n\t\twhile(isKind(OP_OR)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = andExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public boolean containsOrOperator() {\r\n\t\tfor (int n = 0; n < elements.size(); ++n) {\r\n\t\t\tObject ob = elements.get(n);\r\n\t\t\tif (ob instanceof Operator.OrOperator) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static Object or(Object val1, Object val2) {\n\t\tif (isBool(val1) && isBool(val2)) {\n\t\t\treturn ((Boolean) val1) | ((Boolean) val2);\n\t\t} else if (isInt(val1) && isInt(val2)) {\n\t\t\treturn ((BigInteger) val1).or((BigInteger) val2);\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in or\");\n\t}", "@FunctionalInterface\n/* */ public interface Predicate<T>\n/* */ {\n/* */ default Predicate<T> and(Predicate<? super T> paramPredicate) {\n/* 68 */ Objects.requireNonNull(paramPredicate);\n/* 69 */ return paramObject -> (test((T)paramObject) && paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> negate() {\n/* 80 */ return paramObject -> !test((T)paramObject);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ static <T> Predicate<T> isEqual(Object paramObject) {\n/* 115 */ return (null == paramObject) ? Objects::isNull : (paramObject2 -> paramObject1.equals(paramObject2));\n/* */ }\n/* */ \n/* */ boolean test(T paramT);\n/* */ }", "public T caseOr(Or object) {\n\t\treturn null;\n\t}", "public T caseOr(Or object)\n {\n return null;\n }", "public boolean getOR() {\n return OR;\n }", "private Term parseBitwiseOr(final boolean required) throws ParseException {\n Term t1 = parseBtwiseXOr(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '|') {\n Term t2 = parseBtwiseXOr(true);\n if ((t1.isI() && t2.isI()) || !isTypeChecking()) {\n t1 = new Term.OrI(t1, t2);\n } else {\n reportTypeErrorI2(\"'|'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "Expr bool() throws IOException {\n\t\tExpr e = join();\n\t\twhile (look.tag == Tag.OR) {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new Or(tok, e,join());\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tStream<String> stream = Stream.of(\"one\", \"two\",\"three\", \"four\");\n\t\t\n\t boolean match = stream.anyMatch(s -> s.contains(\"our\"));\n\t \n\t System.out.println(match);\n\n\t}", "public ExpressionSearch or(Search srch)\n\t{\n\t\treturn new ExpressionSearch(false).addOps(this, srch);\n\t}", "private void parseOr(Node node) {\r\n if (switchTest) return;\r\n int saveIn = in;\r\n parse(node.left());\r\n if (ok || in > saveIn) return;\r\n parse(node.right());\r\n }", "public static RuntimeValue or(RuntimeValue left, RuntimeValue right) throws RuntimeException {\n if (isDiscreteBoolSamples(left, right)) {\n return new RuntimeValue(\n RuntimeValue.Type.DISCRETE_BOOL_SAMPLE,\n Operators.or(left.getDiscreteBoolSample(), right.getDiscreteBoolSample())\n );\n }\n\n throw new RuntimeException(\"OR-ing incompatible types\");\n }", "private static void orify(Collection<ExternalizedStateComponent> inputs, ExternalizedStateComponent output, ExternalizedStateConstant falseProp) {\n\t\t//TODO: Look for already-existing ors with the same inputs?\n\t\t//Or can this be handled with a GDL transformation?\n\n\t\t//Special case: An input is the true constant\n\t\tfor(ExternalizedStateComponent in : inputs) {\n\t\t\tif(in instanceof ExternalizedStateConstant && ((ExternalizedStateConstant) in).getValue()) {\n\t\t\t\t//True constant: connect that to the component, done\n\t\t\t\tin.addOutput(output);\n\t\t\t\toutput.addInput(in);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//Special case: An input is \"or\"\n\t\t//I'm honestly not sure how to handle special cases here...\n\t\t//What if that \"or\" gate has multiple outputs? Could that happen?\n\n\t\t//For reals... just skip over any false constants\n\t\tExternalizedStateOr or = new ExternalizedStateOr();\n\t\tfor(ExternalizedStateComponent in : inputs) {\n\t\t\tif(!(in instanceof ExternalizedStateConstant)) {\n\t\t\t\tin.addOutput(or);\n\t\t\t\tor.addInput(in);\n\t\t\t}\n\t\t}\n\t\t//What if they're all false? (Or inputs is empty?) Then no inputs at this point...\n\t\tif(or.getInputs().isEmpty()) {\n\t\t\t//Hook up to \"false\"\n\t\t\tfalseProp.addOutput(output);\n\t\t\toutput.addInput(falseProp);\n\t\t\treturn;\n\t\t}\n\t\t//If there's just one, on the other hand, don't use the or gate\n\t\tif(or.getInputs().size() == 1) {\n\t\t\tExternalizedStateComponent in = or.getSingleInput();\n\t\t\tin.removeOutput(or);\n\t\t\tor.removeInput(in);\n\t\t\tin.addOutput(output);\n\t\t\toutput.addInput(in);\n\t\t\treturn;\n\t\t}\n\t\tor.addOutput(output);\n\t\toutput.addInput(or);\n\t}", "public void optional() {\n\n // .stream\n Stream<Optional<Employee>> emp = getEmployeeStream(\"Some employee ID\");\n Stream<Employee> empStream = emp.flatMap(Optional::stream);\n\n // .or\n Optional<Employee> or = getEmployee(\"123\").or(() -> Optional.of(new Employee(\"123\")));\n\n // .ifPresentOrElse\n or.ifPresentOrElse(employee -> {\n System.out.println(\"Present\");\n }, () -> {\n System.out.println(\"Else\");\n });\n\n }", "IRequirement and(IRequirement requirement);", "public static BinaryExpression exclusiveOr(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public boolean getOR() {\n return OR;\n }", "public void testOrNPE1() {\r\n try {\r\n validator.or(null);\r\n fail(\"an NPE is expected\");\r\n }\r\n catch (NullPointerException npe) {\r\n //pass\r\n }\r\n }", "private Object eval(OrExpr expr) {\n if (expr.getExpr().size() == 1) {\n return eval(expr.getExpr().get(0));\n }\n\n boolean result = false;\n for (AndExpr e : expr.getExpr()) {\n Object res = eval(e);\n if (res instanceof Boolean) {\n result = result || (Boolean) res;\n } else {\n throw new RaydenScriptException(\"Expression error: Part expression result is not a boolean. Type: '\" + res.getClass() + \"'\");\n }\n\n if (result) {\n return true;\n }\n }\n return false;\n }", "public void setOr(boolean or) {\n this.or = or;\n }", "public void testToString_OR() {\n assertEquals(\"Returns an incorrect string\", \"OR\", BinaryOperation.OR.toString());\n }", "public boolean hasOR() {\n return fieldSetFlags()[16];\n }", "@Override\n\tpublic void visit(BitwiseOr arg0) {\n\n\t}", "@Override\n\tpublic void visit(BitwiseOr arg0) {\n\t\t\n\t}", "public FluentExp<Boolean> or (SQLExpression<Boolean> expr)\n {\n return Ops.or(this, expr);\n }", "@Override\n public Possible<T> or(Possible<T> alternate) {\n AbstractDynamicPossible<T> self = this;\n return new AbstractDynamicPossible<T>() {\n @Override\n public boolean isPresent() {\n return self.isPresent() || alternate.isPresent();\n }\n\n @Override\n public T get() {\n if (self.isPresent()) {\n try {\n return self.get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent, fall through\n }\n }\n return alternate.get();\n }\n };\n }", "private Term parseBtwiseXOr(final boolean required) throws ParseException {\n Term t1 = parseBitwiseAnd(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '^') {\n Term t2 = parseBitwiseAnd(true);\n if ((t1.isI() && t2.isI()) || !isTypeChecking()) {\n t1 = new Term.XOrI(t1, t2);\n } else {\n reportTypeErrorI2(\"'^'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public static Predicate or(Predicate... predicates)\n {\n return new LogicPredicate(Type.OR, predicates);\n }", "@Test\n\tpublic void orGrepTest() throws Exception {\n\t\t// | for 'insane' and 'mistress'\n\t\tHashSet<String> grep1 = loadGrepResults(\"mistress\");\n\t\tHashSet<String> grepFound = loadGrepResults(\"insane\");\n\t\tgrepFound.addAll(grep1);\n\n\t\tCollection<Page> index = queryTest.query(\"mistress | insane\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\n\t\tassertEquals(indexFound, grepFound);\n\n\t}", "public static void main(String[] args) { , or , not\n // truth table -> t=1 f=0\n // a =t b= f c = a and b => a.b =0=>f\n\n // except 0 every no. is treated as true\n // int a=1 int b=2 a and b => a.b\n // and -> a=1 , b=2, a and b => a.b\n\n\n // and\n boolean a= false;\n boolean b= false;\n\n boolean c= a && b; // a.b\n System.out.println(c);\n\n //or\n boolean f= true;\n boolean d= true;\n\n boolean e= f || d; // a+b\n System.out.println(e);\n\n // not\n boolean g =true;\n boolean h= !g;\n System.out.println(h);\n\n }", "private static void validateChainingMethods(SelfPredicate<String> one , SelfPredicate<String> two) {\n\t\n\tSystem.out.println(\"final result \"+one.not().test(\"jai shree ram\")); // true\n\t\n\tSystem.out.println(\"final result \"+one.not().test(\"20\")); // false\n\t\n\tSystem.out.println(\"final result \"+one.not().test(\"23\")); // flase\n\t\nSystem.out.println(\"final result \"+two.not().test(\"jai shree ram\")); // true\n\t\n\tSystem.out.println(\"final result \"+two.not().test(\"20\")); // true\n\t\n\tSystem.out.println(\"final result \"+two.not().test(\"23\")); // false\n\t\n}", "@OperationMeta(opType = OperationType.INFIX)\n public static boolean or(boolean b1, boolean b2) {\n return b1 | b2;\n }", "@PortedFrom(file = \"tSignatureUpdater.h\", name = \"vOR\")\n private void vOR(ObjectRoleArg expr) {\n expr.getOR().accept(this);\n }", "Object findOperatorNeedCheck();", "String getOne_or_more();", "public static Object logicOr(Object val1, Object val2) {\n\t\tif (isBool(val1) && isBool(val2)) {\n\t\t\treturn ((Boolean) val1) || ((Boolean) val2);\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in logicOr\");\n\t}", "private Predicate buildOrPredicatesForWord(CriteriaBuilder builder, Root<Attendee> root, String word) {\n Predicate hasFirstName = builder.like(root.get(\"firstName\"), \"%\" + word + \"%\");\n Predicate hasLastName = builder.like(root.get(\"lastName\"), \"%\" + word + \"%\");\n Predicate hasFanName = builder.like(root.get(\"fanName\"), \"%\" + word + \"%\");\n Predicate hasLegalFirstName = builder.like(root.get(\"legalFirstName\"), \"%\" + word + \"%\");\n Predicate hasLegalLastName = builder.like(root.get(\"legalLastName\"), \"%\" + word + \"%\");\n return builder.or(hasFirstName, hasLastName, hasFanName, hasLegalFirstName, hasLegalLastName);\n }", "public void testX1andX2orNotX1() {\n \tCircuit circuit = new Circuit();\n \t\n \tBoolean b1 = Boolean.TRUE;\n \tBoolean b2 = Boolean.FALSE;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tOr or = (Or) circuit.getFactory().getGate(Gate.OR);\n\t\tand.setLeftInput(b1);\n\t\tand.setRightInput(b2);\n\t\tand.eval();\n\t\tnot.setInput(b1);\n\t\tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n\t\tassertEquals(Boolean.FALSE, or.eval());\n\t\tassertEquals(Boolean.FALSE, circuit.eval());\n//\t\t==========================================\n\t\tb1 = Boolean.FALSE;\n \tb2 = Boolean.TRUE;\n// \tand.eval();\n// \tnot.eval();\n \tassertEquals(Boolean.FALSE, circuit.eval());\n// \t============================================\n \tDouble d1 = 0.0;\n \tDouble d2 = 1.0;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n\t\tnot.setInput(d1);\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(1.0), or.eval());\n// \t============================================\n \td1 = 0.5;\n \td2 = 0.5;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n// \t============================================\n \ttry {\n \td1 = 0.5;\n \td2 = 2.0;\n \tand.setLeftInput(d1);\n \t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n \t\tor.setLeftInput(and.getOutput());\n \t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n \t} catch (IllegalArgumentException e) {\n \t\tSystem.err.println(\"IllegalArgumentException: \" + e.getMessage());\n \t}\n\n }", "static boolean binaryOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"binaryOperator\")) return false;\n boolean r;\n r = multiplicativeOperator(b, l + 1);\n if (!r) r = additiveOperator(b, l + 1);\n if (!r) r = shiftOperator(b, l + 1);\n if (!r) r = relationalOperator(b, l + 1);\n if (!r) r = consumeToken(b, EQ_EQ);\n if (!r) r = bitwiseOperator(b, l + 1);\n return r;\n }", "public static BinaryExpression andAlso(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static final int[] get_OR_OR(){\n\t\treturn get_AND_AND();\n\t}", "public Object visitLogicalAndExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a & (Long) b;\n }\n else {\n return parens(a) + \" && \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.andWith(b);\n \n return bdd;\n }\n }", "@Test\n public void testSetCodeExamples() {\n logger.info(\"Beginning testSetCodeExamples()...\");\n\n // Create some sets\n Set<Integer> emptySet = new Set<>();\n\n Integer[] first = { 1, 2, 3, 4 };\n Set<Integer> firstSet = new Set<>(first);\n\n Integer[] second = { 3, 4, 5, 6 };\n Set<Integer> secondSet = new Set<>(second);\n\n Integer[] third = { 3, 4 };\n Set<Integer> thirdSet = new Set<>(third);\n\n Integer[] fourth = { 1, 2 };\n Set<Integer> fourthSet = new Set<>(fourth);\n\n Integer[] fifth = { 1, 2, 3, 4, 5, 6 };\n Set<Integer> fifthSet = new Set<>(fifth);\n\n Integer[] sixth = { 1, 2, 5, 6 };\n Set<Integer> sixthSet = new Set<>(sixth);\n\n // Find the logical \"and\" with an empty set\n Set<Integer> set = Set.and(emptySet, firstSet);\n assert set.isEmpty();\n logger.info(\"{} and {} yields {}\", emptySet, firstSet, set);\n\n // Find the logical \"and\" with non-empty sets\n set = Set.and(firstSet, secondSet);\n assert set.equals(thirdSet);\n logger.info(\"{} and {} yields {}\", firstSet, secondSet, set);\n\n // Find the logical \"sans\" (same as \"a and not b\")\n set = Set.sans(firstSet, secondSet);\n assert set.equals(fourthSet);\n logger.info(\"{} sans {} yields {}\", firstSet, secondSet, set);\n\n // Find the logical \"or\" with an empty set\n set = Set.or(emptySet, firstSet);\n assert !set.isEmpty();\n logger.info(\"{} or {} yields {}\", emptySet, firstSet, set);\n\n // Find the logical \"or\" with non-empty sets\n set = Set.or(firstSet, secondSet);\n assert set.equals(fifthSet);\n logger.info(\"{} or {} yields {}\", firstSet, secondSet, set);\n\n // Find the logical \"xor\" (same as \"(a and not b) or (not a and b)\")\n set = Set.xor(firstSet, secondSet);\n assert set.equals(sixthSet);\n logger.info(\"{} xor {} yields {}\", firstSet, secondSet, set);\n\n logger.info(\"Completed testSetCodeExamples().\\n\");\n }", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "private OrList buildOrList() {\n\t\tOrList localOrList = new OrList();\n\t\tif (constraintSets.isEmpty()) {\n\t\t\treturn localOrList;\n\t\t}\n\n\t\tAndList currentAndList = new AndList();\n\t\tlocalOrList.addAndList(currentAndList);\n\t\tcurrentAndList.addConstraintSet(constraintSets.get(0));\n\n\t\tfor (int i = 1; i < constraintSets.size(); i++) {\n\t\t\tColumnConstraintSet<R, ?> columnConstraintSet = constraintSets.get(i);\n\t\t\t// if the logical operation is OR, start a new list of ANDed sets.\n\t\t\tif (columnConstraintSet.getLogicOperation() == LogicOperation.OR) {\n\t\t\t\tcurrentAndList = new AndList();\n\t\t\t\tlocalOrList.addAndList(currentAndList);\n\t\t\t}\n\t\t\tcurrentAndList.addConstraintSet(columnConstraintSet);\n\t\t}\n\t\treturn localOrList;\n\t}", "public static void main(String[] args) {\nboolean a, b, c;\na =true;\nb = false;\nc =a && b;\n\nSystem.out.println(\"c = a&&B:\" + c);\nc = a||b;\nSystem.out.println(\"c = a||b:\" + c);\nc = a==b;\nSystem.out.println(\"c = a==b:\" + c);\nc = a!=b;\nSystem.out.println(\"c = a!=b:\" + c);\n\n\n\n\t}", "public static <T> Optional<T> or(Optional<T> first, Optional<T> second) {\n return first.isPresent() ? first : second;\n }", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public static TreeNode makeOr(List<TreeNode> nodes) {\n return new OrNode(nodes);\n }", "@Test\n public void intermediateOperations() {\n Stream<Book> books = TestData.getBooks().stream();\n // filter\n Stream<Book> booksWithMultipleAuthors = books.filter(book -> book.hasMultipleAuthors());\n // map\n Stream<String> namesStream = booksWithMultipleAuthors.map(book -> book.getName());\n \n Set<String> expected = \n Sets.newHashSet(\"Design Patterns: Elements of Reusable Object-Oriented Software\",\n \"Structure and Interpretation of Computer Programs\");\n assertEquals(expected, namesStream.collect(Collectors.toSet()));\n }", "public void setOR(boolean value) {\n this.OR = value;\n }", "public Operation zCombinedAnd(Operation op)\r\n {\r\n if (op.equals(this))\r\n {\r\n return this;\r\n }\r\n return null;\r\n }", "public bit or(bit other)\n\t{\n\t\tbit orBit = new bit();\n\t\t\n\t\tif(bitHolder.getValue() == 1)\n\t\t{\n\t\t\torBit.setValue(1);\n\t\t}else if(other.getValue() == 1)\n\t\t{\n\t\t\torBit.setValue(1);\n\t\t}else\n\t\t{\n\t\t\torBit.setValue(0);\n\t\t}\n\t\t\n\t\treturn orBit;\n\t}", "@Test\n public void testPredicateAnd() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n Predicate<Integer> isDivSeven = (x) -> (x % 7) == 0;\n\n Predicate<Integer> evenOrDivSeven = isEven.and(isDivSeven);\n\n assertTrue(evenOrDivSeven.apply(14));\n assertFalse(evenOrDivSeven.apply(21));\n assertFalse(evenOrDivSeven.apply(8));\n assertFalse(evenOrDivSeven.apply(5));\n }", "@Test\n public void testOrWithBinding() throws Exception {\n final PackageDescr pkg = ((PackageDescr) (parseResource(\"compilationUnit\", \"or_binding.drl\")));\n TestCase.assertEquals(1, pkg.getRules().size());\n final RuleDescr rule = ((RuleDescr) (pkg.getRules().get(0)));\n TestCase.assertEquals(2, getDescrs().size());\n final OrDescr or = ((OrDescr) (getDescrs().get(0)));\n TestCase.assertEquals(2, or.getDescrs().size());\n final PatternDescr leftPattern = ((PatternDescr) (or.getDescrs().get(0)));\n TestCase.assertEquals(\"Person\", leftPattern.getObjectType());\n TestCase.assertEquals(\"foo\", leftPattern.getIdentifier());\n final PatternDescr rightPattern = ((PatternDescr) (or.getDescrs().get(1)));\n TestCase.assertEquals(\"Person\", rightPattern.getObjectType());\n TestCase.assertEquals(\"foo\", rightPattern.getIdentifier());\n final PatternDescr cheeseDescr = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"Cheese\", cheeseDescr.getObjectType());\n TestCase.assertEquals(null, cheeseDescr.getIdentifier());\n assertEqualsIgnoreWhitespace(\"System.out.println( \\\"Mark and Michael\\\" + bar );\", ((String) (rule.getConsequence())));\n }", "protected String comprobarConsumoEnergetico(Letra letra){\r\n if(getConsumoEnergetico() == Letra.A | getConsumoEnergetico() == Letra.B | getConsumoEnergetico() == Letra.C \r\n | getConsumoEnergetico() == Letra.D | getConsumoEnergetico() == Letra.E | getConsumoEnergetico() == Letra.F){\r\n return \"Consumo energetico correcto; letra correcta\";\r\n }\r\n else{\r\n return \"Consumo energetico incorrecto; letra erronea\";\r\n }\r\n}", "@Override \r\n\tpublic boolean apply(Object key, BinaryObject other) {\n \tif (this.matches(other, query)) {\r\n return true;\r\n }\r\n \treturn false;\r\n }", "@SafeVarargs\n public static OrSpecification or( Specification<Composite>... specs )\n {\n return new OrSpecification( Arrays.asList( specs ) );\n }" ]
[ "0.63316035", "0.6288207", "0.62427825", "0.62328535", "0.61083424", "0.5953674", "0.5937035", "0.5907061", "0.58002776", "0.57688814", "0.5762468", "0.57302904", "0.57302904", "0.57231504", "0.56890595", "0.5683334", "0.56766796", "0.5671523", "0.5588098", "0.55437595", "0.5533227", "0.55089396", "0.5487263", "0.5460028", "0.54482776", "0.5440729", "0.54353577", "0.54292053", "0.5414648", "0.5406988", "0.5390926", "0.53775823", "0.53626746", "0.5350194", "0.53080434", "0.53064615", "0.5295981", "0.52853036", "0.52834004", "0.5255728", "0.52522755", "0.52366817", "0.52362865", "0.52246404", "0.5222263", "0.5222189", "0.5197072", "0.5194017", "0.5152162", "0.5147753", "0.51475227", "0.51364356", "0.5130683", "0.5115262", "0.51136625", "0.51102036", "0.5108071", "0.50980103", "0.50777483", "0.5074673", "0.506201", "0.50590926", "0.5036653", "0.5034913", "0.5031098", "0.50247014", "0.5023105", "0.50170577", "0.5012337", "0.4986846", "0.49762535", "0.49527362", "0.49483064", "0.49483064", "0.49483064", "0.49483064", "0.49483064", "0.49468327", "0.49463725", "0.4937564", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49341255", "0.49281713", "0.49259338", "0.49250162", "0.4923652", "0.49032354", "0.48963597", "0.48791337", "0.4871115", "0.48672056", "0.4858646" ]
0.0
-1
select the next tab by index(1)
@Override public void handle(ActionEvent event) { InnerPaneCreator.getChildTabPanes()[2].getSelectionModel().select(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void switchNextTabulator() {\r\n\t\tCTabItem[] tabItems = this.displayTab.getItems();\r\n\t\tfor (int i = 0; i < tabItems.length; i++) {\r\n\t\t\tCTabItem tabItem = tabItems[i];\r\n\t\t\tif (tabItem.getControl().isVisible()) {\r\n\t\t\t\tif (i + 1 <= tabItems.length - 1)\r\n\t\t\t\t\ttabItem.getParent().setSelection(i + 1);\r\n\t\t\t\telse\r\n\t\t\t\t\ttabItem.getParent().setSelection(0);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private Tab getNextTab() {\n int pos = mTabControl.getCurrentPosition() + 1;\n if (pos >= mTabControl.getTabCount()) {\n pos = 0;\n }\n return mTabControl.getTab(pos);\n }", "public int getTabindex();", "void nextPage() throws IndexOutOfBoundsException;", "@Override\n public int nextIndex()\n {\n return idx+1; \n }", "protected void switchTab(int index) {\n\t\tCapabilities.getDriver().switchTo().window(new ArrayList<String>(Capabilities.getDriver().getWindowHandles()).get(index));\n\t}", "public native void selectTab(GInfoWindow self, int index)/*-{\r\n\t\tself.selectTab(index);\r\n\t}-*/;", "public void selectTab(int index) {\r\n\t\tthis.displayTab.setSelection(index);\r\n\t\tthis.displayTab.showSelection();\r\n\t}", "public IWizardPage getNextPage();", "public void switchPreviousTabulator() {\r\n\t\tCTabItem[] tabItems = this.displayTab.getItems();\r\n\t\tfor (int i = 0; i < tabItems.length; i++) {\r\n\t\t\tCTabItem tabItem = tabItems[i];\r\n\t\t\tif (tabItem.getControl().isVisible()) {\r\n\t\t\t\tif (i - 1 >= 0)\r\n\t\t\t\t\ttabItem.getParent().setSelection(i - 1);\r\n\t\t\t\telse\r\n\t\t\t\t\ttabItem.getParent().setSelection(tabItems.length - 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private int next(int index)\n\t{\n\t\tif (index == list.length - 1)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn index + 1;\n\t\t}\n\t}", "public int nextIndex() {\n return curIndex;\n }", "public void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tnextButton.setText(\"NEXT >> \");\n\t\t\tint index = tabbedPane.getSelectedIndex();\n\t\t\tif (index != 0)\n\t\t\t{\n\t\t\t\ttabbedPane.setSelectedIndex(index - 1);\n\t\t\t}\n\t\t\tif (index - 1 == 0)\n\t\t\t{\n\t\t\t\tbackButton.setEnabled(false);\n\t\t\t}\n\t\t}", "public Page next() {\n String[] nextPageInfo = pageName.split(\"#\");\n String newPageName = tableName + \"#\" + (Integer.parseInt(nextPageInfo[1]) + 1);\n try {\n return load(newPageName);\n } catch (Exception e) {\n return null;\n }\n }", "private void nextSelect() {\n\t\tif (selectionIndex + 1 > selections.size() - 1) {\n\t\t\tselectionIndex = 0;\n\t\t} else {\n\t\t\tselectionIndex++;\n\t\t}\n\t\tselected.setVisible(true);\n\t\tselected = selections.get(selectionIndex);\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n tabChangeInterface.switchToTheNextTab();\n }", "private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextButtonActionPerformed\n projectTree.setSelectionRow(projectTree.getSelectionRows()[0] + 1);\n }", "public int nextIndex() {\n\t\t\treturn cursor;\n\t\t}", "public void setTabindexPredecessor(IFormControl predecessor);", "public abstract int getStartIndex();", "void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic Tab getTabAt(int index) {\n\t\treturn null;\n\t}", "public int getFirstVisibleTab() {\n\t\treturn 0;\n\t}", "public void changeTab(int index) {\n\t\ttabsContainer.getSelectionModel().select(index);\n\t}", "public int nextIndex() {\r\n throw new UnsupportedOperationException();\r\n }", "void setTabindex(int tabindex);", "private void selectFirstTab() {\n Tab tab = view\n .getNationsTabPane()\n .getTabs().get(0);\n\n tabChanged(tab, tab);\n }", "protected final void moveToNextIndex() {\n\t\t\t// doing the assignment && < 0 in one line shaves\n\t\t\t// 3 opcodes...\n\t\t\tif ( (_index = nextIndex()) < 0 ) { throw new NoSuchElementException(); }\n\t\t}", "public int nextIndex()\n {\n // TODO: implement this method\n return -1;\n }", "@Override\n\t\tpublic int nextIndex() {\n\t\t\treturn 0;\n\t\t}", "public Index next() {\n return Index.valueOf(value + 1);\n }", "protected void tabToNext(FunctionEditor editor) {\n if (editor == paramEditor) {\n initEditor.getTable().requestFocusInWindow();\n } else super.tabToNext(editor);\n }", "private int getNextSectionIndex(int currentIndex) {\n boolean found = false;\n int index = -1;\n\n SubModule subModule = sections.get(currentIndex);\n\n for (int i = 0; i < leftPaneList.size(); i++) {\n if (leftPaneList.get(i) instanceof SubModule) {\n if (found) {\n index = ((SubModule) leftPaneList.get(i)).getIndex();\n break;\n }\n if (subModule.equals(leftPaneList.get(i))) {\n found = true;\n\n }\n\n }\n }\n Log.d(\"SectionsListFragment\", \"method: getNextSectionIndex called, index found = \" + index);\n return index;\n\n\n // find next in left pane list and get index\n\n\n }", "public float nextTabStop(float x, int tabOffset) {\n // If the text isn't left justified, offset by 10 pixels!\n if (getTabSet() == null &&\n StyleConstants.getAlignment(getAttributes()) ==\n StyleConstants.ALIGN_LEFT) {\n return getPreTab(x, tabOffset);\n }\n return super.nextTabStop(x, tabOffset);\n }", "public Tab getTab(int i)\n\t{\n\t\treturn tabs.size() <= i ? null : tabs.get(i); \n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif(mViewPager.getCurrentItem()==index){\n\t\t\t\t\t\tselectTab(index);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmViewPager.setCurrentItem(index, true);\n\t\t\t\t\t}\n\t\t\t\t}", "protected abstract void doTabSelectionChanged(int oldIndex, int newIndex);", "@Override\r\n\tpublic int getIndexStep() {\n\t\t\r\n\t\treturn 2;\r\n\t}", "public void setFirstVisibleTab(int arg0) {\n\n\t}", "private void next() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n if (currentWindowIndex < currentTimeline.getWindowCount() - 1) {\n player.seekTo(currentWindowIndex + 1, C.TIME_UNSET);\n } else if (currentTimeline.getWindow(currentWindowIndex, new Timeline.Window(), false).isDynamic) {\n player.seekTo(currentWindowIndex, C.TIME_UNSET);\n }\n }", "void previousPage() throws IndexOutOfBoundsException;", "WebElement getTableRecordAtIndex(int idx);", "public int getNextFieldIndex () {\n return labelStart;\n }", "public int nextIndex(int i) {\n\t\treturn (i + 1) % data.length;\n\t}", "public void incrementCurrentIndex() {\n currentIndex++;\n }", "private int next(int index) {\n return (index + 2) & mask;\n }", "public int nextOffset(int curr) {\n return curr + 1;\n }", "@Override\n \tpublic int getSelectedDetailsTab() {\n \t\treturn patientPanel.getSelectedIndex();\n \t\t//ScrolledTab Changes start\n \t}", "public void next()\n\t{\n\t\tif(this.curseur < this.listeTapis.size() - 1)\n\t\t{\n\t\t\tthis.curseur++;\n\t\t}\n\t}", "public void setSelectedTab(int arg0) {\n\n\t}", "static void setCurrentSettingTab(int currentIdx) {\n currentSettingTab = currentIdx;\n }", "private void nextFocusedField(KeyEvent ke) {\r\n Gui.sumFieldFocused(); //Aumenta el contador\r\n //Si el foco esta en algun nodo del formulario \r\n if(Gui.getFieldFocused() < Gui.getFieldsSize()){\r\n //Se Enfoca el nuevo nodo correspondiente\r\n Gui.getFields()[Gui.getFieldFocused()].requestFocus(); \r\n }else{ //Sino\r\n// botonGuardar(); //Guardar los datos\r\n } \r\n }", "public void jumpTo(int index)\n {\n assert(index >= 0);\n assert(index < _pattern.length);\n\n _index = index;\n }", "public ElementHeader getNextStep()\n {\n return nextStep;\n }", "public void next() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getNextMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getNextModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }", "public void setTab(int i) {\n TabLayout.Tab tab = mTabLayout.getTabAt(i);\n tab.select();\n }", "public void gotoNext(){\r\n if(curr == null){\r\n return;\r\n }\r\n prev = curr;\r\n curr = curr.link;\r\n }", "public void tabSelected();", "public void goToNextPage() {\n nextPageButton.click();\n }", "public Page getNextPageObject() {\n return getPageObject(this.currentIndex.viewIndex + 1);\n }", "java.lang.String getNextStep();", "private String nextIndex() {\n return ArrayElement.nameFor(myElements.size());\n }", "void setPage(int index) throws IndexOutOfBoundsException;", "@Override\r\n public int nextIndex() {\r\n if (next == null) {\r\n return size; \r\n }\r\n return nextIndex - 1;\r\n }", "public static void chartNext() {\n\t\tchartId = (chartId+(hsPage = 1)) % chary.length;\n\t}", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "void openNextFrameSet();", "public void moveTab(IPresentablePart part, int index) {\r\n\t\ttabs.move(part, index);\r\n\t\tfolder.layout(true);\r\n\t}", "Tab getTab();", "public void moveTo(int pageIndex);", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "public String nextStep();", "public static int getNextTabColumn(BaseDocument doc, int offset)\n throws BadLocationException {\n int col = getVisualColumn(doc, offset);\n int tabSize = doc.getFormatter().getSpacesPerTab();\n return (col + tabSize) / tabSize * tabSize;\n }", "public void next(){\n if(stageNum < (defineStageNum)) {\n stageNum++;\n }else {\n stageNum = startStageNum;\n }\n }", "@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}", "int getNext(int node_index) {\n\t\treturn m_list_nodes.getField(node_index, 2);\n\t}", "public int getSelectedTab() {\n return tabbedPane.getSelectedIndex();\n }", "public Tab getTab(String name)\n\t{\n\t\tTab tab = null;\n\t\tint i = 0;\n\t\t\n\t\t//find the tab\n\t\twhile(tab == null && tabs.size() < i)\n\t\t{\n\t\t\tif ( tabs.get(i).getName().equals(name) )\n\t\t\t\ttab = tabs.get(i);\n\t\t}\n\t\t\n\t\treturn tab;\n\t}", "Page getPage(int index);", "public void bukaTabAwal() {\n Intent i = getIntent();\n if (i != null) {\n int tab_number;\n if (JENIS_USER.equals(JENIS_USER_ALUMNI)) {\n tab_number = i.getIntExtra(INDEX_OPENED_TAB_KEY, 2);\n } else if (JENIS_USER.equals(JENIS_USER_PIMPINAN)) {\n tab_number = i.getIntExtra(INDEX_OPENED_TAB_KEY, 0);\n } else {\n tab_number = i.getIntExtra(INDEX_OPENED_TAB_KEY, 1);\n }\n\n if (tab_number == 0) {\n tabLayout.getTabAt(1).select();\n tabLayout.getTabAt(0).select();\n INDEX_OPENED_TAB = 0;\n } else {\n tabLayout.getTabAt(tab_number).select();\n INDEX_OPENED_TAB = tab_number;\n }\n }\n }", "public void selectNextInstance(String elementName) {\n\t\tif (elementName.equals(previous)) {\n\t\t\tinstance++;\n\t\t} else {\n\t\t\tprevious = elementName;\n\t\t\tinstance = 1;\n\t\t}\n\t\tactiveDisplay.setDocumentPosition(elementName, instance);\n\t}", "private void nextButtonActionPerformed(ActionEvent e) {\n // TODO add your code here\n int remainItem = this.list.size() - 6 * (this.page + 1);\n\n if(remainItem <= 0){\n Warning.run(\"No more page here.\");\n }\n else{\n this.page++;\n this.update();\n }\n }", "public static int GetNextDlgTabItem(int hwndDlg, int hwndCtrl, int fPrevious) {\n /* Undocumented but tested under Win2000 and WinME */\n if (hwndDlg == hwndCtrl) hwndCtrl = 0;\n\n /* Contrary to MSDN documentation, tested under Win2000 and WinME\n * NB GetLastError returns whatever was set before the function was\n * called.\n */\n if (hwndCtrl == 0 && fPrevious != 0) return 0;\n\n return DIALOG_GetNextTabItem(hwndDlg, hwndDlg, hwndCtrl, fPrevious);\n }", "void seekToFirst();", "public void nextButtonClicked()\r\n {\n manager = sond.getManager();\r\n String insertSearchDelete = sond.getInsertSearchDelete();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n // falls der Thread pausiert ist, wird er beim betätigen des\r\n // next-Buttons aufgeweckt\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n // Redo muss vor den weiteren if Anweisungen stehen, damit erst alle\r\n // Redo ausgeführt werden, bevor neue Aktionen dem manager hinzugefuegt\r\n // werden\r\n else if (manager.canRedo())\r\n {\r\n manager.redo();\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"insert\"))\r\n {\r\n sond.nextInsertPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"search\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"delete\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n }", "private Tab getPrevTab() {\n int pos = mTabControl.getCurrentPosition() - 1;\n if (pos < 0) {\n pos = mTabControl.getTabCount() - 1;\n }\n return mTabControl.getTab(pos);\n }", "public void nextTurn(){\n\t\tthis.setCurrentElement(this.getCurrentElement().getNext());\n\t}", "public void moveNext() {\n\t\tcurrentElement++;\n\t}", "private void nextHistoryEntry()\n {\n // get next history entry (into input text field)\n if (this.historyPos < this.history.size()) {\n this.historyPos++;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n // if last index => input text must be cleaned\n } else if (this.historyPos == this.history.size()) {\n this.textInput.setText(\"\"); //$NON-NLS-1$\n this.textInput.setSelection(0);\n }\n }", "public void next(){\n\t\tboundIndex = (boundIndex+1)%buttonBounds.length;\n\t\tupdateButtonBounds();\n\t}", "public E nextStep() {\r\n\t\tthis.current = this.values[Math.min(this.current.ordinal() + 1, this.values.length - 1)];\r\n\t\treturn this.current;\r\n\t}", "public TabItem getItem (int index) {\r\n\tcheckWidget();\r\n\tif (!(0 <= index && index < itemCount)) error (SWT.ERROR_INVALID_RANGE);\r\n\treturn items [index];\r\n}", "int index();", "@Override\n public void onNextPressed() {\n }", "public void keyTab(){\n\n try {\n driver.switchTo().activeElement().sendKeys(Keys.TAB);\n\t\t\tLOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass \");\n\n }catch(Exception e)\n {\n\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail \");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while clicking on Tab button\");\n\t\t\n }\n }", "private int getNext(int index) {\n return index + (index & -index);\n }", "private void nextQuestion() {\n mCurrentIndex = (mCurrentIndex + 1) % questions.length;\n int question = questions[mCurrentIndex].getTextResId();\n mText.setText(question);\n }", "@Override\n\tpublic void selectTab(Tab tab) {\n\t\t\n\t}", "public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}", "@Override\n public void onStepClick(int index) {\n }", "Split getNext();" ]
[ "0.7506087", "0.7183566", "0.6971282", "0.6475178", "0.6448749", "0.6233646", "0.62167925", "0.62073994", "0.6198597", "0.61924994", "0.6130105", "0.6107758", "0.6035242", "0.6032421", "0.5999061", "0.59900975", "0.5984373", "0.5968648", "0.59627014", "0.595345", "0.5925393", "0.5922353", "0.5903542", "0.58984464", "0.5896541", "0.58948153", "0.5889725", "0.58727425", "0.58673865", "0.58329755", "0.5824541", "0.5816704", "0.58156526", "0.5763158", "0.5746822", "0.57224613", "0.5713463", "0.5673629", "0.56688154", "0.5666911", "0.5660534", "0.56598556", "0.56383705", "0.5629756", "0.55915344", "0.55869734", "0.5575237", "0.5568885", "0.5556223", "0.55510545", "0.5542085", "0.5530596", "0.5528544", "0.5527658", "0.55269814", "0.5515212", "0.550383", "0.55010164", "0.55010015", "0.5494387", "0.54936475", "0.54864", "0.54765415", "0.5467318", "0.54613954", "0.5453533", "0.54452395", "0.54446274", "0.54443395", "0.5427367", "0.54209363", "0.54152614", "0.54072225", "0.5400203", "0.5396139", "0.5392542", "0.53924334", "0.53801095", "0.53781044", "0.5374313", "0.53708816", "0.53707933", "0.5363996", "0.53521264", "0.534831", "0.5347806", "0.5345178", "0.5330443", "0.53167", "0.5307302", "0.5306734", "0.52988726", "0.529351", "0.5292307", "0.52817124", "0.5278476", "0.52762324", "0.52603537", "0.52567333", "0.5251314", "0.5248554" ]
0.0
-1
TODO Autogenerated method stub
public void onNothingSelected(AdapterView<?> arg0) { }
{ "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
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); //comienza con la autentificacion que es acto 1 if("1".equals(request.getParameter("acto"))){ //verifica que no sean nullos o sin texto antes que nada los campos y en caso contrario mostrara un mensaje para que //el usuario ingrese su inicio de sesion if(!"".equals(request.getParameter("usuario")) && request.getParameter("usuario")!=null &&!"".equals(request.getParameter("clave")) && request.getParameter("clave")!=null){ //se conecta a la bdd con la consulta correspondiente en la tabla usuariosla cual de todos los usuarios registrados los //reccore para ver si coinciden que el que se ha ingresado try{ Class.forName("com.mysql.jdbc.Driver"); Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/requerimiento?zeroDateTimeBehavior=convertToNull","root",""); String query="select nick,contraseña from usuarios "; Statement st=conn.createStatement(); ResultSet rs=st.executeQuery(query); while(rs.next()){ //si el usuario ingresado coincide con los usuarios registrados accedera al menu principal if(request.getParameter("usuario").equals(rs.getString("nick")) &&request.getParameter("clave").equals(rs.getString("contraseña")) ){ request.getRequestDispatcher("Menu_principal.jsp").forward(request, response); } }{ //en caso que no encuentre registros coincidentes mandara el siguiente mensaje request.setAttribute("vacio","Su nombre de usuario y contraseña no coinciden con un usuario registrado"); request.getRequestDispatcher("index.jsp").forward(request, response);} //en caso que no este conectada la bdd mandara el siguiente mensaje y cargara la pagina otra vez //evitando que se caiga }catch(ClassNotFoundException | SQLException e){ request.setAttribute("vacio","No hay conexion"); request.getRequestDispatcher("index.jsp").forward(request, response);} } //manda el siguiente mensaje si no se ingresan datos en los campos y oprimen el submit else{ request.setAttribute("vacio","Ingrese su nombre de usuario y contraseña"); request.getRequestDispatcher("index.jsp").forward(request, response); } } //acto 2 ingresar requerimientos if("2".equals(request.getParameter("acto"))){ //se valida que los campos no tengan los valores por defecto de los option y el campo //descripcion verifica que no este vacio y sea menor a 300 caracteres if(!"1".equals(request.getParameter("gerencia")) && !"1".equals(request.getParameter("departamentog")) && !"1".equals(request.getParameter("departamentosm")) && !"1".equals(request.getParameter("encargados")) && !"".equals(request.getParameter("descripcion")) && 300>=request.getParameter("descripcion").length() ){ //conecta a la bdd cada valor a insertar sera los parametros pasados a travez de los option de cada campo mas el campo de texto //descripcion del requerimiento try{ int update; Class.forName("com.mysql.jdbc.Driver"); Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/requerimiento?zeroDateTimeBehavior=convertToNull","root",""); String query="INSERT INTO requerimientos VALUES('"+request.getParameter("gerencia")+"','"+request.getParameter("departamentog")+"','"+ request.getParameter("departamentosm")+"','"+request.getParameter("encargados")+"','"+request.getParameter("descripcion")+"','Abierto',null)"; Statement st=conn.createStatement(); update=st.executeUpdate(query); //confirma al usuario el registro del requerimiento if(update==1){ request.setAttribute("vacio1","El requerimiento se a registrado correctamente "); } request.getRequestDispatcher("Ingresar_requerimiento.jsp").forward(request, response); } //en caso de falla mandara el siguiente mensaje catch(ClassNotFoundException | SQLException e){ request.setAttribute("vacio1","El requerimiento que ingreso ya se encuentra registrado o no hay conexion con la base de datos"); request.getRequestDispatcher("Ingresar_requerimiento.jsp").forward(request, response); } //en caso que los campo no se ubieran ingresado valores o supere los 300 caracteres descripcion enviara el siguiente mensaje }else{ request.setAttribute("vacio1","Ingrese parametros validos, recuerde que la" + " descripcion del requerimiento solo puede contener maximo 300 caracateres "); request.getRequestDispatcher("Ingresar_requerimiento.jsp").forward(request, response); } } //consulta los requerimietos acto 3 if("3".equals(request.getParameter("acto"))){ //se crea la consulta predeterminada String query1="select*from requerimientos "; String p1=""; String p2=""; String p3=""; //si se selecciona una opcion de gerencia agrega la condicion del where para que muestre segun ese gerente se agrega a p1 que se concatenara //con las demas variables if(!"1".equals(request.getParameter("gerencia"))){ p1="where gerencia='"+request.getParameter("gerencia")+"' "; } //consulta si se ingreso un dato pregunta si se eligio un gerente estonces pasa a ser el else que pone el and en vez de where en caso que //se ubiera elegido un gerente y se concatenara con las demas if(!"1".equals(request.getParameter("departamentog"))){ if("".equals(p1)){ p2="where departamento='"+request.getParameter("departamentog")+"' "; }else{ p2="and departamento='"+request.getParameter("departamentog")+"' "; } } //pregunta si selecciono un dato de los departamentos de mantencion si se selecciono una opcion si los campos anteriores no se seleccionaron // opciones se asigna la condicion where y si se seleccionaron opciones añade el and if(!"1".equals(request.getParameter("departamentosm"))){ if("".equals(p1) || "".equals(p2)){ p3="where departamentom='"+request.getParameter("departamentosm")+"' "; }else{ p3="and departamentom='"+request.getParameter("departamentosm")+"' "; } } //se concatena tod para hacer la consulta completa segun las opciones que se eligieron String query2=query1+""+p1+""+p2+""+p3; //se envia el string concatenado request.setAttribute("query1",query2); request.getRequestDispatcher("Consultar_requerimientos.jsp").forward(request, response); } //lo mismo que acto 3 consultar requerimiento este hace la consulta para buscar requerimietnos a cerrar // en cerrar requerimientos acto 4 if("4".equals(request.getParameter("acto"))){ String query1="select*from requerimientos "; String p1=""; String p2=""; String p3=""; if(!"1".equals(request.getParameter("gerencia"))){ p1="where gerencia='"+request.getParameter("gerencia")+"' "; } if(!"1".equals(request.getParameter("departamentog"))){ if("".equals(p1)){ p2="where departamento='"+request.getParameter("departamentog")+"' "; }else{ p2="and departamento='"+request.getParameter("departamentog")+"' "; } } if(!"1".equals(request.getParameter("departamentosm"))){ if("".equals(p1) && "".equals(p2)){ p3="where departamentom='"+request.getParameter("departamentosm")+"' "; }else{ p3="and departamentom='"+request.getParameter("departamentosm")+"' "; } } String query2=query1+""+p1+""+p2+""+p3; request.setAttribute("query1",query2); request.getRequestDispatcher("Cerrar_requerimientos.jsp").forward(request, response); } //aqui este es el complemento de cerrar requerimiento acto 5 se envia el parametro del requerimiento a cerra //en la base de datos se les asigno un codigo unico autoincrementable que identifica los requerimientos //el cual aqui se utilizara para darle a ese requerimiento el estado de cerrado con el update if("5".equals(request.getParameter("acto"))){ try{ int update; Class.forName("com.mysql.jdbc.Driver"); Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/requerimiento?zeroDateTimeBehavior=convertToNull","root",""); String query="update requerimientos set estado='Cerrado' where codigo="+request.getParameter("codigo")+""; Statement st=conn.createStatement(); update=st.executeUpdate(query); //envia el siguiente mensaje si cambio el requerimiento correctamente if(update==1){ request.setAttribute("vacio","El requerimiento se cerro correctamente"); } request.getRequestDispatcher("Cerrar_requerimientos.jsp").forward(request, response); } //en caso de error enviara el siguiente mensaje catch(ClassNotFoundException | SQLException e){ request.setAttribute("vacio","se a perdido la conexion"); request.getRequestDispatcher("Cerrar_requerimientos.jsp").forward(request, response); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\nSystem.err.println(\"=====================>>>>>123\");\n\t\tString key=req.getParameter(\"method\");\n\t\tswitch (key) {\n\t\tcase \"1\":\n\t\t\tgetProvinces(req,resp);\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\tgetCities(req,resp);\t\t\t\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\tgetAreas(req,resp);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }" ]
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.639271", "0.63919044", "0.63919044", "0.63903785", "0.63903785", "0.63903785", "0.63903785", "0.63887113", "0.63887113", "0.6380285", "0.63783026", "0.63781637", "0.637677", "0.63761306", "0.6370491", "0.63626", "0.63626", "0.63614637", "0.6355308", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896" ]
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }", "public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}", "public Result get(Get get) throws IOException;", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }", "@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "@Override\npublic void get(String url) {\n\t\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}", "@NonNull\n public String getAction() {\n return \"GET\";\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }", "@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }", "@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }", "public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}", "public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}", "public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}", "private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}", "private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}" ]
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234", "0.6754993", "0.6754993", "0.67394847", "0.6719924", "0.6716244", "0.67054695", "0.67054695", "0.67012346", "0.6684415", "0.6676695", "0.6675696", "0.6675696", "0.66747975", "0.66747975", "0.6669016", "0.66621476", "0.66621476", "0.66476154", "0.66365504", "0.6615004", "0.66130257", "0.6604073", "0.6570195", "0.6551141", "0.65378064", "0.6536579", "0.65357745", "0.64957607", "0.64672184", "0.6453189", "0.6450501", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.64067316", "0.6395873", "0.6379907", "0.63737476", "0.636021", "0.6356937", "0.63410467", "0.6309468", "0.630619", "0.630263", "0.63014317", "0.6283933", "0.62738425", "0.62680805", "0.62585783", "0.62553537", "0.6249043", "0.62457556", "0.6239428", "0.6239428", "0.62376446", "0.62359244", "0.6215947", "0.62125194", "0.6207376", "0.62067443", "0.6204527", "0.6200444", "0.6199078", "0.61876005", "0.6182614", "0.61762017", "0.61755335", "0.61716276", "0.6170575", "0.6170397", "0.616901" ]
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public String post();", "@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "public void postData() {\n\n\t}", "@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public abstract boolean handlePost(FORM form, BindException errors) throws Exception;", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}", "@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }", "@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.7328622", "0.71362936", "0.71159834", "0.7105317", "0.71003336", "0.7023263", "0.7016442", "0.6963624", "0.6888417", "0.6782968", "0.6774532", "0.6746133", "0.66671413", "0.65574837", "0.65565485", "0.65244085", "0.65239", "0.65239", "0.65239", "0.6521753", "0.6519228", "0.6515058", "0.65121967", "0.65112555", "0.6492198", "0.6480631", "0.64764833", "0.64714515", "0.64710224", "0.6469313", "0.6455641", "0.6450838", "0.6450838", "0.6450838", "0.6448186", "0.6448186", "0.64376336", "0.6436408", "0.64331496", "0.6423428", "0.6421734", "0.64191663", "0.64191663", "0.64191663", "0.64064515", "0.640315", "0.640315", "0.6395586", "0.63942254", "0.6353895", "0.6332632", "0.6322217", "0.62973875", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.62877333", "0.6278687", "0.6270119", "0.6270119", "0.62691796", "0.625914", "0.6255377", "0.6252885", "0.62255883", "0.6212708", "0.6212201", "0.62110066", "0.6207231", "0.6200249", "0.6175447", "0.6175447", "0.6175447", "0.6175447", "0.6175447", "0.6175447", "0.6175447", "0.61622554", "0.61581784", "0.6147339", "0.61455727", "0.61455727", "0.6144346", "0.6139721", "0.6135046", "0.6131085", "0.61285967", "0.6123182", "0.6116872", "0.61163014", "0.6107218", "0.6097511", "0.6096528", "0.60948676" ]
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }", "@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }" ]
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", "0.85282224", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8516995", "0.8512296", "0.8511239", "0.8510324", "0.84964365", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599", "0.8492599" ]
0.0
-1
FearGreed feerGreed = new FearGreed();
public static JSONObject load() throws Exception { JSONObject json; try { clbHttpClient = HttpClients.createDefault(); HttpGet httpGet = new HttpGet("https://api.alternative.me/fng/"); httpGet.setHeader(USER_AGENT, HEADER); response = clbHttpClient.execute(httpGet); StatusLine sl = response.getStatusLine(); if (sl.getStatusCode() == HttpStatus.SC_OK) { json = new JSONObject(EntityUtils.toString(response.getEntity(), "ISO8859_1")); } else { throw new Exception("Erro na captura do Fear And Greed Index"); } } finally { clbHttpClient.close(); } return json; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FruitStand() {}", "static Football getFootBall(){\n return new Football();\n }", "public foodRecommended() {\n\n }", "private Fight() { }", "public God() {}", "public Sad() {\n }", "public GameMain()\n {\n allenBad = new AllenSucks(this);\n }", "public Gov() {\n }", "public Good() {\n }", "FighterInfo() {\r\n\t}", "static Grandson getGrandson() {\n\t\treturn new Grandson();\r\n\t}", "BruceScore() {}", "public EspressoDrink(){\t\n\t}", "public Villager() {\n faction = 0;\n }", "private static Dog createGolderRetriver(){\n try {\n UtilityMethods.print(\"Creating golden retriver for you...!\"); \n DogGenerator dogGenerator = new DogGenerator();\n DogBuilder goldenRetriver = new GoldenRetriverBuilder();\n dogGenerator.setDogBuilder(goldenRetriver);\n dogGenerator.constructDog(\n \"Animal\", \n \"Male\",\n 20,\n \"Carnivores\"\n );\n Dog goldenRetriverdog = dogGenerator.getDog();\n UtilityMethods.print(\"\\n\"); \n goldenRetriverdog.eat();\n UtilityMethods.print(\"\\n\"); \n goldenRetriverdog.speak();\n UtilityMethods.print(\"\\n\"); \n goldenRetriverdog.walk();\n UtilityMethods.print(\"\\n\"); \n return goldenRetriverdog; \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }", "private TweetRiver() { }", "public Ball(Game game) { // constructor that initializes the class Game\r\n this.game = game; // initializes the class Game\r\n }", "public Glow() {}", "public FighterLife life();", "public HotDogStand(int standId,int noHDS)//constructor that initializes both instance variables\n{\n\tsuper();//super constructor\n\tthis.standId = standId;//refers to this stand id\n\tthis.noHDS = noHDS;// refers to this stands number of hot dogs sold\n}", "public TrackCoach(HappyFortune happyFortune) {\n\t\tsuper();\n\t\tthis.happyFortune = happyFortune;\n\t}", "public BaseBallCoach(FortuneService theFortuneSerive) {\n\t\t\tfortuneService= theFortuneSerive;\n\t\t\t\n\t\t}", "public Fish() {\r\n\t}", "public Genetic() {\r\n }", "Hurt createHurt();", "public Eat(Game game){\n this.game = game;\n }", "public Frog() {\n frogCount += 1; // Modify the value in the constructor\n }", "public YellowTea() {\n super();\n this.setName(\"Yellow Tea\");\n this.setPrice(3.50);\n\n this.brewFirstLiquid = new BrewHotWater();\n this.brewSecondLiquid = new BrewNoLiquid();\n this.brewThirdLiquid = new BrewNoLiquid();\n\n System.out.println(\"Brewing Yellow Tea...\");\n }", "public FishingRod getBestRod();", "public EatTime() {\n }", "public Trening() {\n }", "public GameOfLifeTest()\n {\n }", "public Leagues() {\n }", "@Test\n\tpublic void testCreateFreightCar() throws TrainException {\n\t\tInteger grossWeight = 1;\n\t\tString goodsType = \"G\";\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock freightCarUnderTest = \n\t\t\tnew asgn2RollingStock.FreightCar((Integer)grossWeight, (String)goodsType);\n\t\t\n\t}", "public Aggressive(){\r\n\t\tsuper();\r\n\t\t\r\n\t}", "public Goodsinfo() {\n super();\n }", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "public Draw_Winners_Winner() {\n }", "public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }", "public Match(Team home, Team away)\n {\n // initialise instance variables\n setsWonHT = 0; \n setsWonAT = 0;\n home = home;\n away = away;\n }", "public Naive() {\n\n }", "public Supermarket()\n {\n }", "public AppsFlyerTracker() {}", "public static FireFighting newInstance() {\n FireFighting fragment = new FireFighting();\n return fragment;\n }", "public Sandwich getSandwich(){\n return new Sandwich();\n }", "public void hungry()\r\n {\r\n \tSystem.out.println(\"I'm hungry!! Feed me!!\");\r\n \tbarking();\r\n }", "public BaseballCoach(FortuneService theFortuneService)\r\n {\r\n fortuneService = theFortuneService;\r\n }", "public Cheese() {\n\n }", "public Game2(Starter starter){\r\n chromaticManager = starter.chromaticManager;\r\n this.starter=starter;\r\n }", "public Greetings() {\n }", "public Surgeon() {\n }", "public static DarthSidious getInstance(){\n return darthVader;\n }", "public MountainBike() {\n super();\n }", "public Greeter() {\n\n\t}", "public Challenger() {\r\n\t\tname = \"TBD\";\r\n\t\trank = -1;\r\n\t}", "public Forecastday() {\n }", "public static Object suggest(Customer c)\n{\n\treturn new Firework(\"demo\", 1);\n}", "public FGDistanceStats()\r\n {\r\n \r\n }", "public Family(){\n super();\n }", "public DefensivePlayers(){}", "public OrchardGame() {\n\t\t\n\t}", "public Foret(){\n super(\"Foret\");\n }", "public static void main(String[] args) {\n RatingRegister ratings = new RatingRegister();\n\n Film goneWithTheWind = new Film(\"Gone with the Wind\");\n Film theBridgesOfMadisonCounty = new Film(\"The Bridges of Madison County\");\n Film eraserhead = new Film(\"Eraserhead\");\n// Film saksiKasi = new Film(\"saksiKasi\");\n// Film haifisch = new Film(\"haifisch\");\n\n Person matti = new Person(\"Matti\");\n Person pekka = new Person(\"Pekka\");\n Person mikke = new Person(\"Mikke\");\n \n// Person jukka = new Person(\"Jukka\");\n\n ratings.addRating(matti, goneWithTheWind, Rating.BAD);\n ratings.addRating(matti, theBridgesOfMadisonCounty, Rating.GOOD);\n ratings.addRating(matti, eraserhead, Rating.FINE);\n\n ratings.addRating(pekka, goneWithTheWind, Rating.FINE);\n ratings.addRating(pekka, theBridgesOfMadisonCounty, Rating.BAD);\n ratings.addRating(pekka, eraserhead, Rating.MEDIOCRE);\n\n// ratings.addRating(pekka, eraserhead, Rating.FINE);\n// ratings.addRating(pekka, saksiKasi, Rating.FINE);\n// ratings.addRating(saksiKasi, Rating.FINE);\n// ratings.addRating(saksiKasi, Rating.GOOD);\n// ratings.addRating(haifisch, Rating.BAD);\n// ratings.addRating(haifisch, Rating.BAD);\n\n Reference ref = new Reference(ratings);\n \n Film recommended = ref.recommendFilm(mikke);\n System.out.println(\"The film recommended to Michael is: \" + recommended);\n//*/\n }", "public Golfer() \n {\n name = \"__\";\n homeCourse = \"__\";\n idNum = 9999;\n this.name = name;\n this.homeCourse = homeCourse;\n this.idNum = idNum;\n final int LENGTH = 20;\n Score[] values = new Score[LENGTH];\n values = this.scores;\n }", "public Staff()\n\t{\n\t\tsuper();\n\t\thourlyRate = 0.0;\n\t}", "public Dealer()\n {\n\n\n }", "public void gameOver ()\n {\n Greenfoot.delay (50);\n if (gameOver)\n {\n fader = new Fader (); // create a new fader\n addObject (fader, 400, 300); // add the fader object to the world\n if (UserInfo.isStorageAvailable()) {\n HighScore highScore = new HighScore (score);\n addObject (highScore, 300, 170);\n }\n Greenfoot.stop();\n }\n }", "public static void main(String[] args) {\n Hero hero1 = new Hero(500,30,\"Bob\");\n hero1.getInfo();\n\n\n\n\n\n\n Boss boss = new Boss(700,50,null);\n\n\n\n\n\n\n }", "public BirdFoodTest()\r\n {\r\n }", "public BattleShipGame(){\n ui = new UserInterface();\n played = false;\n highestScore = 0;\n }", "public Monster() {\n\t\t\n\t}", "public void Fight() \n\t{\n\n\t}", "@Test\n\tpublic void testGetGrossWeightOfFreightCar() throws TrainException\n\t{\n\t\tInteger grossWeight = 1;\n\t\tString goodsType = \"G\";\n\t\t\n\t\tasgn2RollingStock.RollingStock freightCarUnderTest = \n\t\t\t\tnew asgn2RollingStock.FreightCar(grossWeight, goodsType);\n\t\t\n\t\tassertEquals(grossWeight, freightCarUnderTest.getGrossWeight());\n\t}", "private DarthSidious(){\n }", "public Cab() {\r\n fare = 50;\r\n }", "public Rook()\n {\n super();\n }", "public Loyalty() {}", "@Bean\n\t\tpublic Coach greatCoach() {\n\t\t\tGreatCoach myGreatCoach = new GreatCoach(happyFortuneService());\n\t\t\treturn myGreatCoach;\n\t\t}", "protected float getFitness()\t\t\t{\treturn fitness;\t\t}", "public Higiene(){\n\t\t\n\t}", "public static GFG getInstance() \n { \n if (instance == null) \n { \n // if instance is null, initialize \n instance = new GFG();\n } \n return instance; \n }", "public TweetCorrected() {}", "public Supermarket() {\n }", "public TeamCoach(){\n }", "public EngineClass()\n {\n cyl = 10;\n fuel = new String( BATT );\n }", "public Forecasting() {\n }", "public Boat() {\n }", "public BaseballCoach(FortuneService theFortuneService)\n {\n this.fortuneService = theFortuneService;\n }", "public Sad(){\n\t\tthis.date = new Date(System.currentTimeMillis());\n\t}", "public Supermarket() {\n }", "private Recommendation() {\r\n }", "public Tigre() {\r\n }", "public WaiterAgent(String name, RestaurantGui gui, AStarTraversal aStar,\n\t\t Restaurant restaurant, Table[] tables) {\n\tsuper();\n\tthis.gui = gui;//main gui\n\tthis.name = name;\n\tthis.aStar = aStar;\n\tthis.restaurant = restaurant;//the layout for astar\n\twaiter = new Waiter(name.substring(0,2), new Color(255, 0, 0), restaurant);\n\t//currentPosition = new Position(3,13);\n\tcurrentPosition = new Position(waiter.getX(), waiter.getY());\n\tcurrentPosition.moveInto(aStar.getGrid());\n\toriginalPosition = currentPosition;//save this for moving into\n\tthis.tables = tables;\n\n\tString query =\n \"1 (?person)(and (person ?person)(hasname ?person \\\"\" + name+\"\\\"))\";\n loomInstance = PowerloomHelper.retrieve1(query);\n if (loomInstance!=null){\n PowerloomHelper.getloomMap().put(loomInstance, this);\n System.out.println(\"Found person in knowledge base: \" + loomInstance);\n }\n else {\n System.out.println(\"No waiter found. Instantiating...\");\n loomInstance = PowerloomHelper.instantiate(\"person\",this);//puts it in map\n\n String h = PowerloomHelper.instantiate(\"home\",null);\n query = \"(and (workingWaiter \" + loomInstance + \")\"\n +\"(haslocation \" +h+\" \"+gui.getneighborhoodInstance()\n +\") (lives \"+ loomInstance+\" \"+h+\")(hasname \"\n + loomInstance+\" \\\"\"+name+\"\\\"))\";\n print(\"asserting facts about new instance:\"+query);\n PLI.sAssertProposition(query, PowerloomHelper.getWorkingModule(), null);\n }\n\n }", "public Restaurant() { }", "public static void WorkAtCompany(Player gamer){\r\n gamer.zen = gamer.zen-30;\r\n gamer.money = gamer.money+10;\r\n gamer.turn = gamer.turn+1; \r\n }", "public void newGame(){\n fireRecord.clear(); //Clear all arrays\n hearts.clear(); \n waters.clear();\n player = new Player();\n fireRecord.add(new Fire());\n \n delay = false;\n initScore= 0; //reset all variables\n moveCount = 0;\n heartScore = 1;\n waterCap = 0;\n }", "public Dwarf(Object own){\n\t\tsuper(\"Dwarf\", own);\n\t\tthis.rank = 3;\n\t}", "@Test\r\n public void test_weapon_more() {\r\n Weapon weapon1 = new Weapon(\"gun\", \"that a weapon for sure\", 16);\r\n assertEquals(1, weapon1.getDamage());\r\n }", "public TennisCoach () {\n\t\tSystem.out.println(\">> inside default constructor.\");\n\t}", "public Bike(){\n\t}", "public Mannschaft() {\n }" ]
[ "0.628613", "0.6194183", "0.6119459", "0.61021733", "0.6081575", "0.6056434", "0.595632", "0.59529096", "0.59176755", "0.58517087", "0.58483064", "0.5832169", "0.5740572", "0.5662949", "0.5647712", "0.56468797", "0.56315565", "0.5621757", "0.5615774", "0.5610501", "0.5600902", "0.5599875", "0.5599491", "0.5589903", "0.5583952", "0.55637044", "0.55601233", "0.5557184", "0.5547681", "0.55284345", "0.55267924", "0.55195045", "0.5517385", "0.55153453", "0.55103004", "0.5507669", "0.55046016", "0.55036914", "0.54978216", "0.5487951", "0.5469338", "0.5463858", "0.54611045", "0.5457833", "0.54560745", "0.5445574", "0.5434148", "0.54269654", "0.54268706", "0.54222393", "0.5421939", "0.5421329", "0.54144675", "0.54138243", "0.5399144", "0.5393484", "0.5389693", "0.5388548", "0.538279", "0.538159", "0.5380839", "0.5376833", "0.5374805", "0.537097", "0.53689045", "0.5361724", "0.5360439", "0.5356865", "0.5356322", "0.5352868", "0.5350874", "0.5347528", "0.53430617", "0.53428644", "0.5340695", "0.53375983", "0.533501", "0.5328083", "0.5325832", "0.5322127", "0.53189343", "0.5318199", "0.5315003", "0.5312962", "0.53089076", "0.5307731", "0.53019434", "0.53006536", "0.5296729", "0.5286817", "0.528667", "0.5285812", "0.52840245", "0.5283731", "0.5280536", "0.5278479", "0.5277407", "0.52764803", "0.5271785", "0.5271714", "0.52710974" ]
0.0
-1
Common interface for client and server to implement to construct the Netty versions of the request objects.
public interface NettyHttpRequestBuilder { /** * Converts this object to a full http request. * * @return a full http request */ @NonNull FullHttpRequest toFullHttpRequest(); /** * Converts this object to a streamed http request. * @return The streamed request */ @NonNull StreamedHttpRequest toStreamHttpRequest(); /** * Converts this object to the most appropriate http request type. * @return The http request */ @NonNull HttpRequest toHttpRequest(); /** * @return Is the request a stream. */ boolean isStream(); /** * Convert the given request to a full http request. * @param request The request * @return The full request. */ static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) { Objects.requireNonNull(request, "The request cannot be null"); while (request instanceof HttpRequestWrapper) { request = ((HttpRequestWrapper<?>) request).getDelegate(); } if (request instanceof NettyHttpRequestBuilder) { return ((NettyHttpRequestBuilder) request).toHttpRequest(); } // manual conversion HttpRequest nettyRequest; ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null); if (byteBuf != null) { nettyRequest = new DefaultFullHttpRequest( HttpVersion.HTTP_1_1, HttpMethod.valueOf(request.getMethodName()), request.getUri().toString(), byteBuf ); } else { nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.valueOf(request.getMethodName()), request.getUri().toString() ); } request.getHeaders() .forEach((s, strings) -> nettyRequest.headers().add(s, strings)); return nettyRequest; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "netty.framework.messages.TestMessage.TestRequest getRequest();", "public interface NettyTransportRequestProcessor {\n\n /**\n * process transport request\n *\n * @param ctx context\n * @param request request\n * @return response packet\n */\n Packet process(final ChannelHandlerContext ctx, final Packet request);\n}", "public interface TorrentServerRequest {\n\n\t/**\n\t * Sends a GET request to the torrent server\n\t * @param url URL for the GET request\n\t * @return GET request response\n\t */\n\tString getRequest(String url);\n\t\n\t/**\n\t * Sends a POST request to the torrent server\n\t * @param url URL for the POST request\n\t * @return POST request response\n\t */\n\tString postRequest(String url);\t\n\t\n\t/**\n\t * Gets a Json parser\n\t * @return Json parser\n\t */\n\tTorrentJsonParser getJsonParser();\n}", "public interface RequestModifier {\n\n /**\n * Set HTTP request method, only support get, post,put , delete method.\n *\n * @param method\n *\n */\n public void setMethod(HTTPMethod method);\n\n /**\n * Set HTTP Protocol.\n *\n * @param protocol\n *\n */\n public void setProtocol(String protocol);\n\n /**\n * Set HTTP version , such as HTTP1.1.\n *\n * @param version\n *\n */\n public void setVersion(String version);\n\n /**\n * Set HTTP domain.\n *\n * @param domain\n *\n */\n public void setDomain(String domain);\n\n /**\n * Set path in the url.\n *\n * @param path\n *\n */\n public void setPath(String path);\n\n /**\n * Set web server port\n *\n * @param port\n *\n */\n public void setPort(int port);\n\n /**\n * Set HTTP url\n *\n * @param url\n *\n */\n public void setUrl(URL url);\n\n /**\n * Set HTTP url string\n *\n * @param url\n *\n */\n public void setUrl(String url);\n\n /**\n * Modify the exist argument in url.\n *\n * @param urlArg\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyURIArgContent(URLArg urlArg);\n\n /**\n * Modify the exist header in HTTP request headers.\n *\n * @param header\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyHeaderContent(Header header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void addHeader(String key, String header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void delHeader(String key);\n\n /**\n * Add the post arg in request header, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addPostArg(String key, String value);\n\n /**\n * Add the url arg in request url, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addUrlArg(String key, String value);\n}", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "public interface HttpRequestFactory\n{\n\n\tpublic abstract HttpRequest buildHttpRequest(HttpMethod httpmethod, String s);\n\n\tpublic abstract HttpRequest buildHttpRequest(HttpMethod httpmethod, String s, Map map);\n\n\tpublic abstract PinningInfoProvider getPinningInfoProvider();\n\n\tpublic abstract void setPinningInfoProvider(PinningInfoProvider pinninginfoprovider);\n}", "public interface HttpChannel extends NettyChannel, HttpOutbound, HttpInbound {\n\n\t/**\n\t * add the passed cookie\n\t * @return this\n\t */\n\tHttpChannel addResponseCookie(Cookie cookie);\n\n\t/**\n\t *\n\t * @param name\n\t * @param value\n\t * @return\n\t */\n\tHttpChannel addResponseHeader(CharSequence name, CharSequence value);\n\n\t/**\n\t *\n\t * @param key\n\t * @return\n\t */\n\tObject param(CharSequence key);\n\n\t/**\n\t *\n\t * @return\n\t */\n\tMap<String, Object> params();\n\n\t/**\n\t *\n\t * @param headerResolver\n\t * @return\n\t */\n\tHttpChannel paramsResolver(Function<? super String, Map<String, Object>> headerResolver);\n\n\t/**\n\t *\n\t */\n\tHttpChannel responseTransfer(boolean chunked);\n\n\t/**\n\t *\n\t * @param name\n\t * @param value\n\t * @return\n\t */\n\tHttpChannel responseHeader(CharSequence name, CharSequence value);\n\n\t/**\n\t *\n\t * @return\n\t */\n\tHttpChannel sse();\n\n\t/**\n\t *\n\t * @param status\n\t * @return\n\t */\n\tHttpChannel status(HttpResponseStatus status);\n\n\t/**\n\t *\n\t * @param status\n\t * @return\n\t */\n\tdefault HttpChannel status(int status){\n\t\treturn status(HttpResponseStatus.valueOf(status));\n\t}\n\n\n}", "public interface IRequest<T, O> {\r\n /**\r\n * Call back interface method for processing the Server Request\r\n *\r\n * @param requestInfo - RequestInfo Object which holds all the required Request Details\r\n */\r\n void processRequest(RequestInfo<T, O> requestInfo, Class<T> TClass, Class<O> OClass, boolean invalidateCache);\r\n\r\n void registerListener(INetworkListener networkListener);\r\n\r\n boolean cancelRequest();\r\n}", "@Override\n\tpublic void initRequest() {\n\n\t}", "public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}", "private Request() {}", "private Request() {}", "public interface Request {\n public String toXml();\n\n\n public String getHandlerId();\n\n\n public String getRequestId();\n}", "static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }", "org.spin.grpc.util.ClientRequest getClientRequest();", "private Request() {\n initFields();\n }", "public interface Request {\n}", "public interface RequestHandler {\n\tpublic Map<String,Object> handleRequest(Map<String,Object> request,\n\t\t\t InetAddress client);\n}", "public ServerRequestProcessor(Socket s, String[] input,\n Server server) {\n super(s, input, server);\n }", "static HttpRequestInitializer getRequestInitializer() {\n return new HttpRequestInitializer() {\n @Override\n public void initialize(final HttpRequest arg0) {\n }\n };\n }", "public interface Requestable {\n\n /**\n * In our TicTacToe game server sends get methods\n *\n * @return an json sting of the request\n */\n public String post();\n\n /**\n * In TicTacToe game client sends post methods\n *\n * @return an json string of the request;\n */\n public String get();\n\n}", "public Request<E, T> buildHttpGet ()\n\t{\n\t\treturn new HttpGetRequest<E,T>(this);\n\t}", "public interface IRequest {\n\t/**\n\t * This method creates request based on operationType and parameter object.\n\t * @param opType operation type of the request to be created.\n\t * @param params List of parameters to be sent along with the request.\n\t */\n\tvoid createRequest(EnumOperationType opType, IParameter parameter);\n\t\n\t/**\n\t * This method retrieves operation type of the the request.\n\t * \n\t * @return operation type\n\t */\n\tEnumOperationType getOperationType();\n\t\n\t/**\n\t * This method retrieves the parameters object configured for the request.\n\t */\n\tIParameter getParameter();\n\t\n\t/**\n\t * This method allows user to get configured request in XML.\n\t * \n\t * @return\n\t * @throws Exception \n\t */\n\tpublic String getRequestInXML() throws Exception;\n\t\n\t/**\n\t * This method parses XML and creates a request object out of it. \n\t */\n\tpublic void parseXML(String XML);\n\t\n\tpublic void setId(String id);\n\t\n\tpublic String getId();\n}", "public interface NettyProxyService {\n /**\n * 心跳\n *\n * @param msg\n * @throws Exception\n */\n void processHeartbeatMsg(HeartbeatMsg msg) throws Exception;\n\n /**\n * 上传位置\n *\n * @param msg\n * @throws Exception\n */\n void processLocationMsg(LocationMsg msg) throws Exception;\n\n /**\n * 离线\n *\n * @param deviceNumber\n */\n void processInactive(String deviceNumber);\n}", "public Request getRequest() throws IOException {\n\t\tString message = underlying.readStringLine();\n\t\tif(message != null && message.startsWith(\"!compute \"))\t\t\n\t\t\treturn new NodeRequest(message.substring(9).split(\"\\\\s\"));\t\t\n\t\tif(message != null && message.equals(\"!getLogs\"))\t\t\n\t\t\treturn new LogRequest();\n\t\tif(message != null && message.startsWith(\"!share \"))\t\t\n\t\t\treturn new ShareRequest(message.substring(7).trim());\n\t\tif(message != null && (message.startsWith(\"!commit \") || message.equals(\"!rollback\")))\t\t\n\t\t\treturn new CommitRequest(message);\n\t\treturn null;\n\t}", "public interface HttpRequestService {\n\n String get(String url,HashMap<String,String> params) throws IOException;\n\n String get(String url) throws IOException;\n\n String post(String url,HashMap<String,String> params) throws Exception;\n\n}", "@Override\n\tprotected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {\n\t\treturn null;\n\t}", "public JsonHttpChannel() {\n this.defaultConstructor = new JsonHttpEventFactory();\n }", "public interface RequestServer {\n\n @GET(\"caseplatform/mobile/system-eventapp!register.action\")\n Call<StringResult> register(@Query(\"account\") String account, @Query(\"password\") String password, @Query(\"name\") String name,\n @Query(\"mobilephone\") String mobilephone, @Query(\"identityNum\") String identityNum);\n\n @GET(\"caseplatform/mobile/login-app!login.action\")\n Call<String> login(@Query(\"name\") String username, @Query(\"password\") String password);\n\n @GET(\"caseplatform/mobile/system-eventapp!setUserPassword.action\")\n Call<StringResult> setPassword(@Query(\"account\") String account,\n @Query(\"newPassword\") String newPassword,\n @Query(\"oldPassword\") String oldPassword);\n\n @GET(\"caseplatform/mobile/system-eventapp!getEventInfo.action\")\n Call<Event> getEvents(@Query(\"account\") String account, @Query(\"eventType\") String eventType);\n\n @GET(\"caseplatform/mobile/system-eventapp!reportEventInfo.action \")\n Call<EventUpload> reportEvent(\n @Query(\"account\") String account,\n @Query(\"eventType\") String eventType,\n @Query(\"address\") String address,\n @Query(\"eventX\") String eventX,\n @Query(\"eventY\") String eventY,\n @Query(\"eventMs\") String eventMs,\n @Query(\"eventMc\") String eventMc,\n @Query(\"eventId\") String eventId,\n @Query(\"eventClyj\") String eventClyj,\n @Query(\"eventImg\") String eventImg,\n @Query(\"eventVideo\") String eventVideo,\n @Query(\"eventVoice\") String eventVoice\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!getUserInfo.action\")\n Call<UserInfo> getUserInfo(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @GET(\"caseplatform/mobile/system-eventapp!getOrgDataInfo.action\")\n Call<OrgDataInfo> getOrgData(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @Multipart\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Part(\"video\") File video, @Part(\"videoFileName\") String videoFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Query(\"audio\") File audio, @Query(\"audioFileName\") String audioFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Query(\"img\") File img, @Query(\"imgFileName\") String imgFileName);\n\n @POST(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/system-eventapp!jobgps.action\")\n Call<StringResult> setCoordinate(@Query(\"account\") String account,\n @Query(\"address\") String address,\n @Query(\"x\") String x,\n @Query(\"y\") String y,\n @Query(\"coordsType\") String coordsType,\n @Query(\"device_id\") String device_id\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!Mbtrajectory.action\")\n Call<Task> getTask(@Query(\"account\") String account);\n\n}", "public abstract Builder methods(RequestMethod... paramVarArgs);", "public interface IHttpRequest {\n Map<String, String> getHeaders();\n\n Map<String, String> getBodyParams();\n\n Map<String, String> getCookies();\n\n String getMethod();\n\n void setMethod(String method);\n\n String getUrl();\n\n void setUrl(String url);\n\n void addHeader(String header, String value);\n\n void addBodyParam(String bodyParam, String value);\n\n boolean isResource();\n}", "private CustomRequest getCustomRequestFor(HttpRequest aRequest,\n Handler aHandler) {\n int lRequestMapped = mapToVolleyMethodCode(aRequest.getMethod());\n RequestComposite lMap = new RequestComposite();\n lMap.setHttpReq(aRequest);\n Handler lHandler = aHandler == null ? mainHandler : aHandler;\n Listener<String> lListener = getListenerForRequest(lMap, lHandler);\n Response.ErrorListener lErrorListener = getErrorListenerForRequest(lMap,\n lHandler);\n CustomRequest lReq = new CustomRequest(lRequestMapped,\n aRequest.getUrl(), lListener, lErrorListener, aRequest);\n // update the reference in the map.\n lMap.setVolleyReq(lReq);\n return lReq;\n }", "public interface ZmoteHTTPDRequestHandler{\n\tpublic String getURI();\n\tpublic Response serve(String uri, String method, Properties header, Properties parms, Properties files, ZmoteHTTPD httpd);\t\n\tpublic ZmoteHTTPDRequestHandler clone();\n}", "@Override\r\n\tpublic Object request(Invocation invocation) throws Exception {\n\t\tRpcRequest req=new RpcRequest();\r\n\t\treq.setId(UUID.randomUUID().toString());\r\n\t\treq.setArgs(invocation.getAgrs());\r\n\t\treq.setMethod(invocation.getMethod().getName());\r\n\t\treq.setParameterTypes(invocation.getMethod().getParameterTypes());\r\n\t\treq.setType(invocation.getInterface());\r\n\t\treq.setAsyn(invocation.isAsyn());\r\n\t\tCompletableFuture<Object> result=new CompletableFuture<>();\r\n\t\tclientPool.borrowObject().request(req,result);\r\n\t\tif(invocation.isAsyn()){\r\n\t\t\treturn result;\r\n\t\t}else{\r\n\t\t\treturn result.get();\r\n\t\t}\r\n\r\n\r\n\t}", "@UnstableApi\npublic interface FullRequest extends Request {}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public interface IClient {\n\n public <E> NetConfig<E> buildStringRequest(NetConfig<E> config);\n\n public <E> NetConfig<E> buildJsonRequest(NetConfig<E> config);\n\n public <E> NetConfig<E> buildStandardJsonRequest(NetConfig<E> config);\n\n public<E> NetConfig<E> buildDownloadRequest(NetConfig<E> config);\n\n <E> NetConfig<E> buildUpLoadRequest(NetConfig<E> config);\n\n <E> NetConfig<E> start(NetConfig<E> config);\n\n <E> NetConfig<E> cancel(NetConfig<E> config);\n\n}", "@Override\n protected void encode(ChannelHandlerContext channelHandlerContext, RequestMessage msg, ByteBuf out) throws Exception {\n byte[] bytes = REQUEST_MESSAGE_CODEC.encode(msg);\n out.writeBytes(REQUEST_HEADER);\n out.writeBytes(Integer.toString(bytes.length).getBytes(StandardCharsets.US_ASCII));\n out.writeBytes(CRLF);\n out.writeBytes(bytes);\n }", "public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}", "public interface IMailboxUsageMailboxCountsRequest extends IHttpRequest {\n\n /**\n * Gets the MailboxUsageMailboxCounts from the service\n *\n * @param callback the callback to be called after success or failure\n */\n void get(final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Gets the MailboxUsageMailboxCounts from the service\n *\n * @return the MailboxUsageMailboxCounts from the request\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts get() throws ClientException;\n\n /**\n * Delete this item from the service\n *\n * @param callback the callback when the deletion action has completed\n */\n void delete(final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Delete this item from the service\n *\n * @throws ClientException if there was an exception during the delete operation\n */\n void delete() throws ClientException;\n\n /**\n * Patches this MailboxUsageMailboxCounts with a source\n *\n * @param sourceMailboxUsageMailboxCounts the source object with updates\n * @param callback the callback to be called after success or failure\n */\n void patch(final MailboxUsageMailboxCounts sourceMailboxUsageMailboxCounts, final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Patches this MailboxUsageMailboxCounts with a source\n *\n * @param sourceMailboxUsageMailboxCounts the source object with updates\n * @return the updated MailboxUsageMailboxCounts\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts patch(final MailboxUsageMailboxCounts sourceMailboxUsageMailboxCounts) throws ClientException;\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the new object to create\n * @param callback the callback to be called after success or failure\n */\n void post(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts, final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the new object to create\n * @return the created MailboxUsageMailboxCounts\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts post(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts) throws ClientException;\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the object to create/update\n * @param callback the callback to be called after success or failure\n */\n void put(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts, final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the object to create/update\n * @return the created MailboxUsageMailboxCounts\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts put(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts) throws ClientException;\n\n /**\n * Sets the select clause for the request\n *\n * @param value the select clause\n * @return the updated request\n */\n IMailboxUsageMailboxCountsRequest select(final String value);\n\n /**\n * Sets the expand clause for the request\n *\n * @param value the expand clause\n * @return the updated request\n */\n IMailboxUsageMailboxCountsRequest expand(final String value);\n\n}", "public SubRequestFacade(Request request) {\n super(request);\n }", "public interface Router {\n\n interface Message {\n /**\n * The reply-to header\n *\n * @return the reply-to header\n */\n default String replyTo() {\n return (String) metadata().get(\"reply-to\");\n }\n\n /**\n * The host header\n *\n * @return the host header\n */\n default String host() {\n return (String) metadata().get(\"x-host\");\n }\n\n /**\n * Get the name of the reply queue to send the message to\n *\n * @return the reply queue\n */\n default String replyQueue() {\n return (String) metadata().get(\"x-reply-queue\");\n }\n\n\n /**\n * The uri header\n *\n * @return the uri header\n */\n default String uri() {\n\n return (String) metadata().get(\"x-uri\");\n }\n\n /**\n * The scheme header\n *\n * @return the scheme header\n */\n default String scheme() {\n return (String) metadata().get(\"x-scheme\");\n }\n\n /**\n * The method header\n *\n * @return the method header\n */\n default String method() {\n String m = (String) metadata().get(\"x-method\");\n if (null == m) {\n m = \"get\";\n }\n return m.toLowerCase();\n }\n\n /**\n * Get the port... may be String, Number, or null\n *\n * @return get the port\n */\n default Object port() {\n return metadata().get(\"server-port\");\n }\n\n /**\n * get the protocol for the request\n *\n * @return\n */\n default String protocol() {\n return (String) metadata().get(\"x-server-protocol\");\n }\n\n /**\n * Get the uri args for the request\n *\n * @return the uri args for the request\n */\n default String args() {\n return (String) metadata().get(\"x-uri-args\");\n }\n\n /**\n * The content-type header\n *\n * @return the content-type header\n */\n default String contentType() {\n return (String) metadata().get(\"content-type\");\n }\n\n /**\n * The remote address of the client\n *\n * @return remote address\n */\n default String remoteAddr() {\n return (String) metadata().get(\"x-remote-addr\");\n }\n\n /**\n * The\n *\n * @return\n */\n Map<String, Object> metadata();\n\n Object body();\n\n byte[] rawBody();\n\n MessageBroker.ReceivedMessage underlyingMessage();\n }\n\n /**\n * Convert the message from the more generic one from the MessageBroker into\n * something that can be routed\n *\n * @param message\n * @return\n */\n default Message brokerMessageToRouterMessage(MessageBroker.ReceivedMessage message) {\n return new Message() {\n\n @Override\n public Map<String, Object> metadata() {\n return message.metadata();\n }\n\n @Override\n public Object body() {\n return message.body();\n }\n\n @Override\n public byte[] rawBody() {\n return message.rawBody();\n }\n\n @Override\n public MessageBroker.ReceivedMessage underlyingMessage() {\n return message;\n }\n };\n }\n\n /**\n * Route the message. This may cause the message to be queued to the next handler (Runner)\n * or route it to the handler Func.\n *\n * @param message the Message to route\n * @return the result of the Message application or void if this Router forwards the message\n */\n Object routeMessage(Message message) throws IOException;\n\n\n /**\n * Release any resources that the Router has... for example, any database pool connections\n */\n void endLife();\n\n /**\n * Get the host that this Router is listening for\n *\n * @return the name of the host. May be null\n */\n String host();\n\n /**\n * Get the base path for this Router\n *\n * @return the base path for the router\n */\n String basePath();\n\n /**\n * Return the name of the queue that is associated with the host/path combination\n *\n * @return the name of the queue associated with the host/path combination\n */\n String nameOfListenQueue();\n\n /**\n * Get the swagger for this Router\n *\n * @return the Swagger information for the router\n */\n Map<String, Object> swagger();\n\n}", "private static byte[] createRequest(String name, String requestType) {\n\n // Creates the header for the request\n byte[] header = createHeader();\n\n // Creates the query for the request\n byte[] query = createQuery(name, requestType);\n\n // Final Packet.\n byte[] request = new byte[header.length + query.length];\n\n // Byte Buffers provide useful utilities.\n ByteBuffer rqBuf = ByteBuffer.wrap(request);\n\n // Combine header and query\n rqBuf.put(header);\n rqBuf.put(query);\n\n return request;\n }", "public interface Request{\n public Response execute(Library library);\n public String getTextString();\n public String[] getParams();\n public boolean isPartial();\n}", "@Override\r\n\t\t\tprotected Vector prepareRequests(ACLMessage request) {\n\t\t\t\tString incomingRequestKey = (String) ((AchieveREResponder) parent).REQUEST_KEY;\r\n\t\t\t\tACLMessage incomingRequest = (ACLMessage) getDataStore().get(incomingRequestKey);\r\n\t\t\t\t// Prepare the request to forward to the responder\r\n\t\t\t\tSystem.out.println(\"Agent \"+getLocalName()+\": Forward the request to \"+bestOffer.getName());\r\n\t\t\t\tACLMessage outgoingRequest = new ACLMessage(ACLMessage.REQUEST);\r\n\t\t\t\toutgoingRequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\t\toutgoingRequest.addReceiver(bestOffer);\r\n\t\t\t\toutgoingRequest.setContent(incomingRequest.getContent());\r\n\t\t\t\toutgoingRequest.setReplyByDate(incomingRequest.getReplyByDate());\r\n\t\t\t\tVector v = new Vector(1);\r\n\t\t\t\tv.addElement(outgoingRequest);\r\n\t\t\t\treturn v;\r\n\t\t\t}", "protected RequestLine createRequestLine(String method, String uri, ProtocolVersion ver) {\n/* 337 */ return new BasicRequestLine(method, uri, ver);\n/* */ }", "org.spin.grpc.util.ClientRequestOrBuilder getClientRequestOrBuilder();", "public interface HttpClientable {\n\n void get(String url);\n\n void get(String url, ParamStore params);\n\n void get(String url, ParamStore params, String tag);\n\n void post(String url, SparseArray<String> params);\n\n void post(String url, SparseArray<String> params, String tag);\n\n void upload(String url, HashMap<String, Object> params);\n\n void upload(String url, HashMap<String, Object> params, String tag);\n\n void download(String url);\n\n void download(String url, String tag);\n\n void cancelAll();\n\n void cancel(String tag);\n\n}", "public interface UrlConnector {\n /**\n * Obtains an HTTP GET request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpGet getRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PUT request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPut putRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP POST request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPost postRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP DELETE request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpDelete deleteRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PATCH request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPatch patchRequest(HttpServletRequest request, String address) throws IOException;\n}", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "public interface Requestor {\r\n \r\n /**\r\n * Marshal the given operation and its parameters into a request object, send\r\n * it to the remote component, and interpret the answer and convert it back\r\n * into the return type of generic type T\r\n * \r\n * @param <T>\r\n * generic type of the return value\r\n * @param objectId\r\n * the object that this request relates to; not that this may not\r\n * necessarily just be the object that the method is called upon\r\n * @param operationName\r\n * the operation (=method) to invoke\r\n * @param typeOfReturnValue\r\n * the java reflection type of the returned type\r\n * @param argument\r\n * the arguments to the method call\r\n * @return the return value of the type given by typeOfReturnValue\r\n */\r\n <T> T sendRequestAndAwaitReply(String objectId, String operationName, Type typeOfReturnValue, String accessToken, Object... argument);\r\n\r\n}", "public void build() {\n\t\t\tRequest request = new Request();\n request.context = context;\n\t\t\trequest.requestType = requestType;\n\t\t\trequest.url = url;\n\t\t\trequest.envelope = envelope;\n\t\t\trequest.headers = headers;\n\n\t\t\trequest.responseListener = responseListener;\n\t\t\trequest.onValidateResponseListener = validateResponseListener;\n\n\t\t\trequest.isDebug = isDebug;\n\n\t\t\trequest.start();\n\t\t}", "public abstract Client getClient();", "public abstract Response create(Request request, Response response);", "public interface HttpData extends HttpObject, Bytes {\n\n /**\n * Returns an empty {@link HttpData}.\n */\n static HttpData empty() {\n return ByteArrayHttpData.EMPTY;\n }\n\n /**\n * Creates a new instance from the specified byte array. The array is not copied; any changes made in the\n * array later will be visible to {@link HttpData}.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0.\n */\n static HttpData wrap(byte[] data) {\n requireNonNull(data, \"data\");\n if (data.length == 0) {\n return empty();\n }\n\n return new ByteArrayHttpData(data);\n }\n\n /**\n * Creates a new instance from the specified byte array, {@code offset} and {@code length}.\n * The array is not copied; any changes made in the array later will be visible to {@link HttpData}.\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code length} is 0.\n *\n * @throws IndexOutOfBoundsException if {@code offset} and {@code length} are out of bounds\n */\n static HttpData wrap(byte[] data, int offset, int length) {\n requireNonNull(data, \"data\");\n if (offset < 0 || length < 0 || offset > data.length - length) {\n throw new IndexOutOfBoundsException(\n \"offset: \" + offset + \", length: \" + length + \", data.length: \" + data.length);\n }\n if (length == 0) {\n return empty();\n }\n\n if (data.length == length) {\n return new ByteArrayHttpData(data);\n }\n\n return new ByteBufHttpData(Unpooled.wrappedBuffer(data, offset, length), false);\n }\n\n /**\n * (Advanced users only) Converts the specified Netty {@link ByteBuf} into a pooled {@link HttpData}.\n * The buffer is not copied; any changes made to it will be visible to {@link HttpData}. The ownership of\n * the buffer is transferred to the {@link HttpData}. If you still need to use it after calling this method,\n * make sure to call {@link ByteBuf#retain()} first.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the readable bytes of {@code buf} is 0.\n *\n * @see PooledObjects\n */\n @UnstableApi\n static HttpData wrap(ByteBuf buf) {\n requireNonNull(buf, \"buf\");\n final int length = buf.readableBytes();\n if (length == 0) {\n buf.release();\n return empty();\n }\n\n final HttpData data = new ByteBufHttpData(buf, true);\n buf.touch(data);\n return data;\n }\n\n /**\n * Creates a new instance from the specified byte array by first copying it.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0.\n */\n static HttpData copyOf(byte[] data) {\n requireNonNull(data, \"data\");\n if (data.length == 0) {\n return empty();\n }\n\n return new ByteArrayHttpData(data.clone());\n }\n\n /**\n * Creates a new instance from the specified byte array, {@code offset} and {@code length} by first copying\n * it.\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code length} is 0.\n *\n * @throws ArrayIndexOutOfBoundsException if {@code offset} and {@code length} are out of bounds\n */\n static HttpData copyOf(byte[] data, int offset, int length) {\n requireNonNull(data);\n if (offset < 0 || length < 0 || offset > data.length - length) {\n throw new ArrayIndexOutOfBoundsException(\n \"offset: \" + offset + \", length: \" + length + \", data.length: \" + data.length);\n }\n if (length == 0) {\n return empty();\n }\n\n return new ByteArrayHttpData(Arrays.copyOfRange(data, offset, offset + length));\n }\n\n /**\n * Creates a new instance from the specified {@link ByteBuf} by first copying its content. The reference\n * count of {@link ByteBuf} will not be changed.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0.\n */\n static HttpData copyOf(ByteBuf data) {\n requireNonNull(data, \"data\");\n\n data.touch(data);\n\n if (!data.isReadable()) {\n return empty();\n }\n\n return wrap(ByteBufUtil.getBytes(data));\n }\n\n /**\n * Converts the specified {@code text} into an {@link HttpData}.\n *\n * @param charset the {@link Charset} to use for encoding {@code text}\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData of(Charset charset, CharSequence text) {\n requireNonNull(charset, \"charset\");\n requireNonNull(text, \"text\");\n\n if (text instanceof String) {\n return of(charset, (String) text);\n }\n\n if (text.length() == 0) {\n return empty();\n }\n\n final CharBuffer cb = CharBuffer.wrap(text);\n final ByteBuffer buf = charset.encode(cb);\n if (buf.arrayOffset() == 0 && buf.remaining() == buf.array().length) {\n return wrap(buf.array());\n } else {\n return copyOf(buf.array(), buf.arrayOffset(), buf.remaining());\n }\n }\n\n /**\n * Converts the specified {@code text} into an {@link HttpData}.\n *\n * @param charset the {@link Charset} to use for encoding {@code text}\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData of(Charset charset, String text) {\n requireNonNull(charset, \"charset\");\n requireNonNull(text, \"text\");\n if (text.isEmpty()) {\n return empty();\n }\n\n return wrap(text.getBytes(charset));\n }\n\n /**\n * Converts the specified formatted string into an {@link HttpData}. The string is formatted by\n * {@link String#format(Locale, String, Object...)} with {@linkplain Locale#ENGLISH English locale}.\n *\n * @param charset the {@link Charset} to use for encoding string\n * @param format {@linkplain Formatter the format string} of the response content\n * @param args the arguments referenced by the format specifiers in the format string\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code format} is empty.\n */\n @FormatMethod\n static HttpData of(Charset charset, @FormatString String format, Object... args) {\n requireNonNull(charset, \"charset\");\n requireNonNull(format, \"format\");\n requireNonNull(args, \"args\");\n\n if (format.isEmpty()) {\n return empty();\n }\n\n return wrap(String.format(Locale.ENGLISH, format, args).getBytes(charset));\n }\n\n /**\n * Converts the specified {@code text} into a UTF-8 {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofUtf8(CharSequence text) {\n return of(StandardCharsets.UTF_8, text);\n }\n\n /**\n * Converts the specified {@code text} into a UTF-8 {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofUtf8(String text) {\n return of(StandardCharsets.UTF_8, text);\n }\n\n /**\n * Converts the specified formatted string into a UTF-8 {@link HttpData}. The string is formatted by\n * {@link String#format(Locale, String, Object...)} with {@linkplain Locale#ENGLISH English locale}.\n *\n * @param format {@linkplain Formatter the format string} of the response content\n * @param args the arguments referenced by the format specifiers in the format string\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code format} is empty.\n */\n @FormatMethod\n static HttpData ofUtf8(@FormatString String format, Object... args) {\n return of(StandardCharsets.UTF_8, format, args);\n }\n\n /**\n * Converts the specified {@code text} into a US-ASCII {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofAscii(CharSequence text) {\n return of(StandardCharsets.US_ASCII, text);\n }\n\n /**\n * Converts the specified {@code text} into a US-ASCII {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofAscii(String text) {\n return of(StandardCharsets.US_ASCII, text);\n }\n\n /**\n * Converts the specified formatted string into a US-ASCII {@link HttpData}. The string is formatted by\n * {@link String#format(Locale, String, Object...)} with {@linkplain Locale#ENGLISH English locale}.\n *\n * @param format {@linkplain Formatter the format string} of the response content\n * @param args the arguments referenced by the format specifiers in the format string\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code format} is empty.\n */\n @FormatMethod\n static HttpData ofAscii(@FormatString String format, Object... args) {\n return of(StandardCharsets.US_ASCII, format, args);\n }\n\n /**\n * Returns the {@link HttpData} that has the same content with this data and its HTTP/2 {@code endOfStream}\n * flag set. If this data already has {@code endOfStream} set, {@code this} will be returned.\n */\n default HttpData withEndOfStream() {\n return withEndOfStream(true);\n }\n\n /**\n * Returns the {@link HttpData} that has the same content with this data and its HTTP/2 {@code endOfStream}\n * flag set with the specified value. If this data already has the same {@code endOfStream} value set,\n * {@code this} will be returned.\n */\n HttpData withEndOfStream(boolean endOfStream);\n}", "TypedRequest createTypedRequest();", "@Override\n public void receiveRequest(final Request request) {\n\n }", "public interface RequestManager {\n \n\tpublic Request submitRequest(Request request) throws RequestCreationException;\n\t\n\tpublic void submitRequest(SuspendUserRequest suspendUserRequest) throws RequestCreationException;\n\t\n\tpublic void submitRequest(ResumeUserRequest resumeUserRequest) throws RequestCreationException;\n\t\n\tpublic SelfServiceAccessRequest submitRequest(SelfServiceAccessRequest selfServiceAccessRequest) throws RequestCreationException;\n\t\n\tpublic void submitRequest(AccountsRequest request) throws RequestCreationException;\n\t\n\tpublic CreateUserRequest submitRequest(CreateUserRequest request) throws RequestCreationException;\n\t\n\tpublic Request findRequest(Long requestId);\n\t\n\tpublic void process(Request request) throws OperationException;\n\t\n\tpublic void process(SuspendUserRequest request) throws OperationException;\n\t\n\tpublic void process(ResumeUserRequest request) throws OperationException;\n\t\n\tpublic void process(AccountsRequest request) throws OperationException;\n\t\n\tpublic void process(CreateUserRequest request) throws OperationException;\n\t\n\t\n\t\n\t\n\t\n\t\n\tpublic void finalApproveRequest(Request request, User approver) throws OperationException;\n\tpublic void finalRejectRequest(Request request, User rejecter);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t//request scanner methods\n public void changeRequestScannerMode() throws OperationException;\n public boolean isRequestScannerActivate();\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t@Deprecated\n public void mergeRequestEntity(Request request);\n \n \n /**\n Create a new request entity\n @param request A request entity to persist\n @throws RequestAttributeValidationException\n */\n\t@Deprecated\n public Request createRequestEntity(Request request) throws RequestCreationException;\n \n \n /**\n Execute a request\n @param request The request entity to execute\n */\n\t@Deprecated\n public void executeRequest(Request request) throws RequestExecutionException;\n \n \n /**\n Approve the specified request entity\n @param requrest The request entity to approve\n @throws OperationException\n */\n\t@Deprecated\n public void processRequest(Request request) throws OperationException;\n \n \n \n\t@Deprecated\n public void createTimerScanner(long initialDuration, long intervalDuration);\n \n\t@Deprecated\n public void createTimerScanner() throws OperationException;\n}", "public Request(Request other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.isSetUrl()) {\n this.url = other.url;\n }\n if (other.isSetMethod()) {\n this.method = other.method;\n }\n if (other.isSetMeta()) {\n Map<String,String> __this__meta = new HashMap<String,String>();\n for (Map.Entry<String, String> other_element : other.meta.entrySet()) {\n\n String other_element_key = other_element.getKey();\n String other_element_value = other_element.getValue();\n\n String __this__meta_copy_key = other_element_key;\n\n String __this__meta_copy_value = other_element_value;\n\n __this__meta.put(__this__meta_copy_key, __this__meta_copy_value);\n }\n this.meta = __this__meta;\n }\n if (other.isSetBody()) {\n this.body = other.body;\n }\n if (other.isSetHeaders()) {\n Map<String,String> __this__headers = new HashMap<String,String>();\n for (Map.Entry<String, String> other_element : other.headers.entrySet()) {\n\n String other_element_key = other_element.getKey();\n String other_element_value = other_element.getValue();\n\n String __this__headers_copy_key = other_element_key;\n\n String __this__headers_copy_value = other_element_value;\n\n __this__headers.put(__this__headers_copy_key, __this__headers_copy_value);\n }\n this.headers = __this__headers;\n }\n if (other.isSetCookies()) {\n Map<String,String> __this__cookies = new HashMap<String,String>();\n for (Map.Entry<String, String> other_element : other.cookies.entrySet()) {\n\n String other_element_key = other_element.getKey();\n String other_element_value = other_element.getValue();\n\n String __this__cookies_copy_key = other_element_key;\n\n String __this__cookies_copy_value = other_element_value;\n\n __this__cookies.put(__this__cookies_copy_key, __this__cookies_copy_value);\n }\n this.cookies = __this__cookies;\n }\n if (other.isSetEncoding()) {\n this.encoding = other.encoding;\n }\n this.priority = other.priority;\n }", "public interface ClientApi extends Api {\n\n\t/**\n\t * To parse client request\n\t * \n\t * @param message\n\t * the request message from client to be parsed\n\t * @return IsoBuffer object the implementation of {@link ConcurrentHashMap}\n\t * @throws PosException\n\t * thrown when an exception occurs during parsing\n\t */\n\tpublic IsoBuffer parse(String message) throws PosException;\n\n\t/**\n\t * To parse emv data\n\t * \n\t * @param isoBuffer\n\t * the parsed buffer containing emv data\n\t * @return Map object containing tags and data as key value pair\n\t */\n\tpublic Map<EmvTags, String> parseEmvData(IsoBuffer isoBuffer);\n\n\t/**\n\t * To modify the {@link IsoBuffer} object for client response.\n\t * \n\t * @param isoBuffer\n\t * the buffer need to modified for response\n\t */\n\tpublic void modifyBits4Response(IsoBuffer isoBuffer, Data data);\n\n\t/**\n\t * To build the client message\n\t * \n\t * @param isoBuffer\n\t * the buffer holding all fields and data need to be formed as\n\t * response\n\t * @return response formed response {@link String} object need to responded\n\t * to client\n\t */\n\tpublic String build(IsoBuffer isoBuffer);\n\n\tpublic String getStoredProcedure();\n\t\n\tpublic Boolean checkHostToHost();\n\n\tpublic boolean errorDescriptionRequired();\n\n}", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "ChatWithServer.Req getChatWithServerReq();", "public Request(){\n\t\tthis(null, null, null);\n\t}", "private void handleHttpRequest(ChannelHandlerContext ctx, FullHttpRequest req) throws Exception {\n if (!req.getDecoderResult().isSuccess()) {\n sendHttpResponse(ctx, req, new DefaultFullHttpResponse(HTTP_1_1, BAD_REQUEST));\n return;\n }\n\n // Allow only GET methods.\n if (req.getMethod() != GET) {\n sendHttpResponse(ctx, req, new DefaultFullHttpResponse(HTTP_1_1, FORBIDDEN));\n return;\n }\n\n // Send the demo page and favicon.ico\n if (\"/\".equals(req.getUri())) {\n ByteBuf content = getContent(getWebSocketLocation(req));\n FullHttpResponse res = new DefaultFullHttpResponse(HTTP_1_1, OK, content);\n res.headers().set(CONTENT_TYPE, \"text/html; charset=UTF-8\");\n setContentLength(res, content.readableBytes());\n sendHttpResponse(ctx, req, res);\n return;\n }\n if (\"/favicon.ico\".equals(req.getUri())) {\n FullHttpResponse res = new DefaultFullHttpResponse(HTTP_1_1, NOT_FOUND);\n sendHttpResponse(ctx, req, res);\n return;\n }\n\n Channel channel = ctx.channel();\n\n QueryStringDecoder dec = new QueryStringDecoder(req.getUri());\n String username = dec.parameters().get(\"username\").get(0);\n String page = dec.parameters().get(\"page\").get(0);\n channel.attr(WebSocketServer.USERNAME).set(username);\n Archon.getInstance().getLogger().warning(Thread.currentThread().getName() + \" [WS] channel username for \" + channel + \": \" + username + \" - page=\" + page);\n\n // Handshake\n WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(getWebSocketLocation(req), null, false);\n handshaker = wsFactory.newHandshaker(req);\n if (handshaker == null) {\n WebSocketServerHandshakerFactory.sendUnsupportedWebSocketVersionResponse(ctx.channel());\n } else {\n handshaker.handshake(ctx.channel(), req).addListener((ChannelFutureListener) future -> {\n Channel channel1 = future.channel();\n if (future.isSuccess()) {\n channel1.attr(WebSocketServer.REGISTERED).set(true);\n server.addChannel(channel1);\n } else {\n future.channel().attr(WebSocketServer.REGISTERED).set(false);\n Archon.getInstance().getLogger().log(Level.WARNING, Thread.currentThread().getName() + \" [WS] Failed to register channel (handshake): \" + channel1, future.cause());\n }\n });\n }\n }", "KijiDataRequest getClientRequest();", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "public interface Client {\n\n\t/**\n\t * @throws Http2Exception\n\t */\n\tvoid init() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean start() throws Http2Exception;\n\n\t/**\n\t * @param request\n\t * @return\n\t * @throws Http2Exception\n\t */\n\t Http2Response request(Http2Request request) throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean isRuning() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean shutdown() throws Http2Exception;\n\n}", "public DefaultHttpRequest() {\n }", "public Request() {\n\n }", "@Override\n\tpublic void receiveRequest() {\n\n\t}", "public interface OServerAware {\n\n void init(OServer server);\n\n void coordinatedRequest(\n OClientConnection connection, int requestType, int clientTxId, OChannelBinary channel)\n throws IOException;\n\n ODistributedServerManager getDistributedManager();\n}", "public interface DataStreamClient {\n\n Logger LOG = LoggerFactory.getLogger(DataStreamClient.class);\n\n /** Return Client id. */\n ClientId getId();\n\n /** Return Streamer Api instance. */\n DataStreamApi getDataStreamApi();\n\n /**\n * send to server via streaming.\n * Return a completable future.\n */\n\n /** To build {@link DataStreamClient} objects */\n class Builder {\n private ClientId clientId;\n private DataStreamClientRpc dataStreamClientRpc;\n private RaftProperties properties;\n private Parameters parameters;\n\n private Builder() {}\n\n public DataStreamClientImpl build(){\n if (clientId == null) {\n clientId = ClientId.randomId();\n }\n if (properties != null) {\n if (dataStreamClientRpc == null) {\n final SupportedDataStreamType type = RaftConfigKeys.DataStream.type(properties, LOG::info);\n dataStreamClientRpc = DataStreamClientFactory.cast(type.newFactory(parameters))\n .newDataStreamClientRpc(clientId, properties);\n }\n }\n return new DataStreamClientImpl(clientId, properties, dataStreamClientRpc);\n }\n\n public Builder setClientId(ClientId clientId) {\n this.clientId = clientId;\n return this;\n }\n\n public Builder setParameters(Parameters parameters) {\n this.parameters = parameters;\n return this;\n }\n\n public Builder setDataStreamClientRpc(DataStreamClientRpc dataStreamClientRpc){\n this.dataStreamClientRpc = dataStreamClientRpc;\n return this;\n }\n\n public Builder setProperties(RaftProperties properties) {\n this.properties = properties;\n return this;\n }\n }\n\n}", "TransmissionProtocol.Request getRequest(int index);", "abstract void request() throws IOException;", "public Request(final FullHttpRequest request) {\n this.request = request;\n }", "public interface IRequestManager\n{\n Request createRequest(Request created);\n\n Request vote(IClan requester, IClanPlayer requested, String requestName, IClanPlayer voter, VoteResult voteResult) throws RequestNonExistentException, HasVotedException;\n\n Request vote(IClan requester, IClanPlayer requested, IClanPlayer voter, VoteResult voteResult) throws TooManyRequestsException, NotInClanException, RequestNonExistentException, HasVotedException;\n\n Request getOnlyRequest(IClan requester, IClanPlayer requested) throws TooManyRequestsException, NotInClanException, RequestNonExistentException;\n\n void clearRequests(IClan clan);\n\n void clearRequests(IClanPlayer clanPlayer);\n}", "@Override\n public void handleClientRequest(User sender, ISFSObject params) {\n }", "public interface ServiceRequest<T> extends Serializable {\r\n\t\r\n\t/**\r\n\t * Gets the service name for this request\r\n\t * @return the valid service name\r\n\t */\r\n\tpublic String getServiceName();\r\n\t\r\n\t/**\r\n\t * Gets the service version.\r\n\t * @return the service version as string\r\n\t */\r\n\tpublic String getServiceVersion();\r\n\t\r\n\t/**\r\n\t * Set the version of the service for this request.\r\n\t * @param serviceVersion\r\n\t */\r\n\tpublic void setServiceVersion(String serviceVersion);\r\n\t \r\n\t/**\r\n\t * Gets the request body data aka paylod for the request\r\n\t * @return the request data\r\n\t */\r\n\tpublic T getRequestData();\r\n\t\r\n\t/**\r\n\t * Returns the security context around this request.\r\n\t * @return the security context for this request\r\n\t */\r\n\tpublic SecurityContext getSecurityContext();\r\n\t\r\n\t/**\r\n\t * Returns all headers.\r\n\t * @return the array of headers\r\n\t */\r\n\tpublic Header[] getHeaders();\r\n\t\r\n\t/**\r\n\t * Returns the header object if the header with a specified key is present.\r\n\t * @param key The key for which value has to be returned\r\n\t * @return the value of the specified key\r\n\t */\r\n\tpublic Header getHeaderByKey(String key);\t\r\n}", "@Override\n protected void initChannel(SocketChannel ch) throws Exception {\n NettyCodecAdapter adapter = new NettyCodecAdapter();\n\n ch.pipeline()\n .addLast(\"logging\", new LoggingHandler(LogLevel.INFO))//for debug\n .addLast(\"decoder\", adapter.getDecoder())\n// .addLast(\"http-aggregator\", new HttpObjectAggregator(65536))\n .addLast(\"encoder\", adapter.getEncoder())\n// .addLast(\"http-chunked\", new ChunkedWriteHandler())\n// .addLast(\"server-idle-handler\", new IdleStateHandler(0, 0, 60 * 1000, MILLISECONDS))\n .addLast(\"handler\", nettyServerHandler);\n }", "public void handleRequest(Request req) {\n\n }", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public UBERequest() {\r\n }", "public interface IDelivery {\n /**\n * Distribution request response result\n * \n * @param request\n * @param response\n */\n public void postRequestResponse(Request<?> request, Response<?> response);\n\n /**\n * Distribute Failure events\n * \n * @param request\n * @param error\n */\n public void postError(Request<?> request, HttpException error);\n\n /**\n * Distribution to read the cached results response\n * @param request\n * @param cacheData\n */\n public <T>void postCacheResponse(Request<?> request, T cacheData);\n \n /**\n * Prepare events at the start of the request\n * @param request\n */\n public void postRequestPrepare(Request<?> request);\n \n /**\n * Distribution to retry event\n * @param request\n * @param previousError An exception before\n */\n public void postRequestRetry(Request<?> request, int currentRetryCount, HttpException previousError);\n \n /**\n * Delivered current progress for request\n * @param request\n * @param transferredBytesSize\n * @param totalSize\n */\n public void postRequestDownloadProgress(Request<?> request, long transferredBytesSize, long totalSize);\n \n /**\n * Delivered upload progress for request\n * @param request\n * @param transferredBytesSize\n * @param totalSize\n * @param currentFileIndex The subscript is currently being uploaded file\n * @param currentFile Is currently being uploaded files\n */\n\tpublic void postRequestUploadProgress(Request<?> request, long transferredBytesSize, long totalSize, int currentFileIndex, File currentFile);\n\n}", "public Request() {\n }", "public Client(Client client) {\n\n }", "public void addRequest(Request req) {\n\n }", "public Request<E, T> buildHttpMultiPartRequest (E model)\n\t{\n\t\tthis.model = model;\n\t\treturn new HttpMultiPartRequest <E,T>(this);\n\t}", "public JwtRequest() {\n\t}", "public interface SerializationRequest extends Serializable {\n String getMethodName();\n\n Object[] getArgs();\n}", "public interface RequestFunction {}", "public interface RequestInterface {\n\n @POST(\"server/index.php\")\n Call<ServerResponse> operation(@Body ServerRequest request);\n}", "private RestRequest createRestRequest(final Client jerseyClient) {\n String uri = getServiceEndpointAddress();\n WebResource webResource = buildWebResource(jerseyClient, uri);\n return new RestRequest(webResource);\n }", "@Override\n protected ServerBuilder<?> getServerBuilder() {\n try {\n ServerCredentials serverCreds = TlsServerCredentials.create(\n TlsTesting.loadCert(\"server1.pem\"), TlsTesting.loadCert(\"server1.key\"));\n NettyServerBuilder builder = NettyServerBuilder.forPort(0, serverCreds)\n .flowControlWindow(AbstractInteropTest.TEST_FLOW_CONTROL_WINDOW)\n .maxInboundMessageSize(AbstractInteropTest.MAX_MESSAGE_SIZE);\n // Disable the default census stats tracer, use testing tracer instead.\n InternalNettyServerBuilder.setStatsEnabled(builder, false);\n return builder.addStreamTracerFactory(createCustomCensusTracerFactory());\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }", "public interface RequestInfo {\n\n /**\n * Sets status for the request\n * @param status\n */\n void setStatus(STATUS status);\n\n /**\n * @return status of the request\n */\n STATUS getStatus();\n\n /**\n * @return unique id of the request\n */\n Long getId();\n\n /**\n * @return list of errors for this request if any\n */\n List<? extends ErrorInfo> getErrorInfo();\n\n /**\n * @return number of retries available for this request\n */\n int getRetries();\n\n /**\n * @return number of already executed attempts\n */\n int getExecutions();\n\n /**\n * @return command name for this request\n */\n String getCommandName();\n\n /**\n * @return business key assigned to this request\n */\n String getKey();\n\n /**\n * @return descriptive message assigned to this request\n */\n String getMessage();\n\n /**\n * @return time that this request shall be executed (for the first attempt)\n */\n Date getTime();\n\n /**\n * @return serialized bytes of the contextual request data\n */\n byte[] getRequestData();\n\n /**\n * @return serialized bytes of the response data\n */\n byte[] getResponseData();\n \n /**\n * @return optional deployment id in case this job is scheduled from within process context\n */\n String getDeploymentId();\n \n /**\n * @return optional process instance id in case this job is scheduled from within process context\n */\n Long getProcessInstanceId();\n \n /**\n * @return get priority assigned to this job request\n */\n int getPriority();\n}", "Client getClient();", "public interface AriaClient {\n\n @GET(\"bands\")\n Observable<BandModel[]> getbands();\n\n @GET(\"getusers\")\n Observable<FacebookUserModel[]> getUsers();\n\n @GET(\"getusers\")\n Observable<UserModel[]> getUsers2();\n\n @POST(\"saveUser\")\n Observable<FacebookUserModel> createAccount(@Body FacebookUserModel facebookUserModel);\n\n @POST(\"createBand\")\n Observable<BandMemberModel> createBand(@Body BandCreationModel bandCreationModel);\n\n @Multipart\n @POST(\"editbandPic\")\n Observable<ResponseBody> editBandPic(\n @Part(\"bandId\") RequestBody bandId,\n @Part MultipartBody.Part pic\n );\n\n @Multipart\n @POST(\"addAlbum\")\n Observable<AlbumModel> addAlbum(\n @Part(\"band_id\") RequestBody bandId,\n @Part(\"album_name\") RequestBody albumName,\n @Part(\"album_desc\") RequestBody albumDesc,\n @Part(\"released_date\") RequestBody releaseDate,\n @Part MultipartBody.Part albumImage\n );\n\n @Multipart\n @POST(\"addSongs\")\n Observable<SongModel> addSong(\n @Part(\"album_id\") RequestBody albumId,\n @Part(\"song_title\") RequestBody songTitle,\n @Part(\"song_desc\") RequestBody songDesc,\n @Part(\"genre_id\") RequestBody genreId,\n @Part(\"band_id\") RequestBody bandId,\n @Part MultipartBody.Part song\n );\n\n\n @POST(\"addSongToPlaylist\")\n @FormUrlEncoded\n Observable<ResponseBody> addSongToPlaylist(@Field(\"genre_id\") String genre,\n @Field(\"song_id\") String songId,\n @Field(\"pl_id\") String playlistId);\n\n @Multipart\n @POST(\"addVideo\")\n Observable<VideoModel> addVideo(\n @Part(\"band_id\") RequestBody bandId,\n @Part(\"video_title\") RequestBody vidTitle,\n @Part(\"video_desc\") RequestBody vidDesc,\n @Part MultipartBody.Part video\n );\n\n @GET(\"getAllPlaylist\")\n Observable<PlaylistModel[]> getPlaylists();\n\n @POST(\"getPlistById\")\n @FormUrlEncoded\n Observable<PlistModel[]> getPlaylistSongsByPlaylistId(@Field(\"pl_id\") String playlistId);\n\n @GET(\"songs\")\n Observable<SongModel[]> getAllSongs();\n\n @GET(\"AllAlbums\")\n Observable<AlbumModel[]> getAllAlbums();\n\n @GET(\"videos\")\n Observable<VideoModel[]> getAllVideos();\n\n @POST(\"bandvideos\")\n @FormUrlEncoded\n Observable<VideoModel[]> getBandVideos(@Field(\"band_id\") String bandId);\n\n @GET(\"members\")\n Observable<MemberModel[]> getBandMembers();\n\n @GET(\"getEvents\")\n Observable<EventModel[]> getEvents();\n\n @Multipart\n @POST(\"addBandCoverPhoto\")\n Observable<ResponseBody> addBandCoverPhoto(@Part(\"bandId\") RequestBody bandId,\n @Part MultipartBody.Part pic);\n\n @POST(\"addEvent\")\n @FormUrlEncoded\n Observable<EventModel> addEvent(@Field(\"band_id\") String bandId,\n @Field(\"event_name\") String eventName,\n @Field(\"event_date\") String eventDate,\n @Field(\"event_time\") String eventTime,\n @Field(\"event_venue\") String eventVenue,\n @Field(\"event_location\") String eventLocation);\n @Multipart\n @POST(\"AddPlayList\")\n Observable<PlaylistModel> addPlaylist(@Part(\"user_id\") RequestBody userId,\n @Part(\"pl_title\") RequestBody plTitle,\n @Part MultipartBody.Part pic);\n\n @POST(\"bandsongs\")\n @FormUrlEncoded\n Observable<CustomModelForAlbum> getAlbumSongs(@Field(\"album_id\") String albumId);\n\n @POST(\"followPlaylist\")\n @FormUrlEncoded\n Observable<Integer> followPlaylist(@Field(\"user_id\") String userId,\n @Field(\"pid\") String pl_id);\n\n @POST(\"unFollowPlaylist\")\n @FormUrlEncoded\n Observable<Integer> unFollowPlaylist(@Field(\"user_id\") String userId,\n @Field(\"pid\") String pl_id);\n\n @POST(\"preferences\")\n @FormUrlEncoded\n Observable<PreferenceModel[]> getUserPreferences(@Field(\"user_id\") String userId);\n\n @POST(\"followBand\")\n @FormUrlEncoded\n Observable<Integer> followBand(@Field(\"user_id\") String userId,\n @Field(\"band_id\") String bandId);\n\n @POST(\"unfollowBand\")\n @FormUrlEncoded\n Observable<Integer> unFollowBand(@Field(\"user_id\") String userId,\n @Field(\"band_id\") String bandId);\n\n @POST(\"likeAlbum\")\n @FormUrlEncoded\n Observable<PreferenceModel> likeAlbum(@Field(\"user_id\") String userId,\n @Field(\"album_id\") String albumId);\n\n @POST(\"unLikeAlbum\")\n @FormUrlEncoded\n Observable<ResponseBody> unLikeAlbum(@Field(\"user_id\") String userId,\n @Field(\"album_id\") String albumId);\n\n @GET(\"getBandGenres\")\n Observable<BandGenreModel[]> getBandGenre();\n\n @GET(\"searchFunction\")\n Observable<CustomSearchModel> searchResults(@Query(\"term\") String text);\n\n @POST(\"inviteUser\")\n @FormUrlEncoded\n Observable<String> inviteUser(@Field(\"band_id\") String bandId,\n @Field(\"user_id\") String userId,\n @Field(\"band_role\") String bandRole,\n @Field(\"invitor_id\") String invitorId);\n\n @POST(\"visitCount\")\n @FormUrlEncoded\n Observable<String> visitPage(@Field(\"band_id\") String bandId);\n\n @GET(\"getUserNotification\")\n Observable<NotificationModel[]> getUserNotifications(@Query(\"user_id\") String userId);\n\n @POST(\"declineInvitation\")\n Observable<String> declineInvitation(@Body NotificationModel notificationModel);\n\n @POST(\"addmember\")\n @FormUrlEncoded\n Observable<ResponseBody> addBandMember(@Field(\"add-band-member-id\") String userId,\n @Field(\"add-band-member-band-id\") int bandId,\n @Field(\"add-band-member-role\") String bandRole);\n @GET(\"scoringfunc\")\n Observable<ResponseBody> scoringFunc();\n\n @POST(\"songPlayed\")\n @FormUrlEncoded\n Observable<String> songPlayed(@Field(\"user_id\") String userId,\n @Field(\"song_id\") String songId,\n @Field(\"category\") String category);\n\n}", "public DefaultNashRequestImpl() {\n\t\t\n\t}", "public interface Mit {\n Request<?, Web3ClientVersion> web3ClientVersion();\n\n Request<?, Web3Sha3> web3Sha3(String data);\n\n Request<?, NetVersion> netVersion();\n\n Request<?, NetListening> netListening();\n\n Request<?, NetPeerCount> netPeerCount();\n\n Request<?, MitProtocolVersion> mitProtocolVersion();\n\n Request<?, MitCoinbase> mitCoinbase();\n\n Request<?, MitSyncing> mitSyncing();\n\n Request<?, MitMining> mitMining();\n\n Request<?, MitHashrate> mitHashrate();\n\n Request<?, MitGasPrice> mitGasPrice();\n\n Request<?, MitAccounts> mitAccounts();\n\n Request<?, MitBlockNumber> mitBlockNumber();\n\n Request<?, MitGetBalance> mitGetBalance(\n String address, DefaultBlockParameter defaultBlockParameter);\n\n Request<?, MitGetStorageAt> mitGetStorageAt(\n String address, BigInteger position,\n DefaultBlockParameter defaultBlockParameter);\n\n Request<?, MitGetTransactionCount> mitGetTransactionCount(\n String address, DefaultBlockParameter defaultBlockParameter);\n\n Request<?, MitGetBlockTransactionCountByHash> mitGetBlockTransactionCountByHash(\n String blockHash);\n\n Request<?, MitGetBlockTransactionCountByNumber> mitGetBlockTransactionCountByNumber(\n DefaultBlockParameter defaultBlockParameter);\n\n Request<?, MitGetUncleCountByBlockHash> mitGetUncleCountByBlockHash(String blockHash);\n\n Request<?, MitGetUncleCountByBlockNumber> mitGetUncleCountByBlockNumber(\n DefaultBlockParameter defaultBlockParameter);\n\n Request<?, MitGetCode> mitGetCode(String address, DefaultBlockParameter defaultBlockParameter);\n\n Request<?, MitSign> mitSign(String address, String sha3HashOfDataToSign);\n\n Request<?, mit.core.protocol.core.methods.response.MitSendTransaction> mitSendTransaction(\n mit.core.protocol.core.methods.request.Transaction transaction);\n\n Request<?, mit.core.protocol.core.methods.response.MitSendTransaction> mitSendRawTransaction(\n String signedTransactionData);\n\n Request<?, mit.core.protocol.core.methods.response.MitCall> mitCall(\n mit.core.protocol.core.methods.request.Transaction transaction,\n DefaultBlockParameter defaultBlockParameter);\n\n Request<?, MitEstimateGas> mitEstimateGas(\n mit.core.protocol.core.methods.request.Transaction transaction);\n\n Request<?, MitBlock> mitGetBlockByHash(String blockHash, boolean returnFullTransactionObjects);\n\n Request<?, MitBlock> mitGetBlockByNumber(\n DefaultBlockParameter defaultBlockParameter,\n boolean returnFullTransactionObjects);\n\n Request<?, MitTransaction> mitGetTransactionByHash(String transactionHash);\n\n Request<?, MitTransaction> mitGetTransactionByBlockHashAndIndex(\n String blockHash, BigInteger transactionIndex);\n\n Request<?, MitTransaction> mitGetTransactionByBlockNumberAndIndex(\n DefaultBlockParameter defaultBlockParameter, BigInteger transactionIndex);\n\n Request<?, MitGetTransactionReceipt> mitGetTransactionReceipt(String transactionHash);\n\n Request<?, MitBlock> mitGetUncleByBlockHashAndIndex(\n String blockHash, BigInteger transactionIndex);\n\n Request<?, MitBlock> mitGetUncleByBlockNumberAndIndex(\n DefaultBlockParameter defaultBlockParameter, BigInteger transactionIndex);\n\n Request<?, MitGetCompilers> mitGetCompilers();\n\n Request<?, MitCompileLLL> mitCompileLLL(String sourceCode);\n\n Request<?, MitCompileSolidity> mitCompileSolidity(String sourceCode);\n\n Request<?, MitCompileSerpent> mitCompileSerpent(String sourceCode);\n\n Request<?, MitFilter> mitNewFilter(mit.core.protocol.core.methods.request.EthFilter ethFilter);\n\n Request<?, MitFilter> mitNewBlockFilter();\n\n Request<?, MitFilter> mitNewPendingTransactionFilter();\n\n Request<?, MitUninstallFilter> mitUninstallFilter(BigInteger filterId);\n\n Request<?, MitLog> mitGetFilterChanges(BigInteger filterId);\n\n Request<?, MitLog> mitGetFilterLogs(BigInteger filterId);\n\n Request<?, MitLog> mitGetLogs(mit.core.protocol.core.methods.request.EthFilter ethFilter);\n\n Request<?, MitGetWork> mitGetWork();\n\n Request<?, MitSubmitWork> mitSubmitWork(String nonce, String headerPowHash, String mixDigest);\n\n Request<?, MitSubmitHashrate> mitSubmitHashrate(String hashrate, String clientId);\n\n Request<?, DbPutString> dbPutString(String databaseName, String keyName, String stringToStore);\n\n Request<?, DbGetString> dbGetString(String databaseName, String keyName);\n\n Request<?, DbPutHex> dbPutHex(String databaseName, String keyName, String dataToStore);\n\n Request<?, DbGetHex> dbGetHex(String databaseName, String keyName);\n\n Request<?, mit.core.protocol.core.methods.response.ShhPost> shhPost(\n mit.core.protocol.core.methods.request.ShhPost shhPost);\n\n Request<?, ShhVersion> shhVersion();\n\n Request<?, ShhNewIdentity> shhNewIdentity();\n\n Request<?, ShhHasIdentity> shhHasIdentity(String identityAddress);\n\n Request<?, ShhNewGroup> shhNewGroup();\n\n Request<?, ShhAddToGroup> shhAddToGroup(String identityAddress);\n\n Request<?, ShhNewFilter> shhNewFilter(ShhFilter shhFilter);\n\n Request<?, ShhUninstallFilter> shhUninstallFilter(BigInteger filterId);\n\n Request<?, ShhMessages> shhGetFilterChanges(BigInteger filterId);\n\n Request<?, ShhMessages> shhGetMessages(BigInteger filterId);\n}", "public interface IHttpRequestHandler extends INamedObject\r\n{\t\r\n public HandlerResponse handleRequest( HttpRequestData httpRequest ) throws IOException;\r\n}", "protected void buildProtocols() {\n\n if (httpProtocol == null) {\n\n RESTProtocol p = new RESTProtocol(validator, protocolListener,\n connectTimeout, readTimeout);\n\n p.setSkipHostnameChecks(skipHostnameChecks);\n\n httpProtocol = p;\n\n }\n\n if (legacyProtocol == null) {\n\n LegacyProtocol p = new LegacyProtocol(validator, protocolListener,\n connectTimeout, readTimeout);\n\n p.setSkipHostnameChecks(skipHostnameChecks);\n\n legacyProtocol = p;\n\n }\n }" ]
[ "0.63511443", "0.63472855", "0.6286391", "0.61373216", "0.60865533", "0.6062335", "0.59952146", "0.5951587", "0.5927217", "0.5903787", "0.59005415", "0.59005415", "0.5899705", "0.5892534", "0.57969755", "0.5743186", "0.56979465", "0.5693503", "0.56781685", "0.56567985", "0.56270456", "0.5601358", "0.5583816", "0.5577327", "0.55758744", "0.55704397", "0.5562601", "0.5544963", "0.5541081", "0.5538418", "0.5535525", "0.5532708", "0.55296236", "0.55237395", "0.55039674", "0.5485552", "0.5476458", "0.54760647", "0.5473327", "0.5471752", "0.5469534", "0.5457198", "0.545153", "0.5450912", "0.54465246", "0.5444673", "0.54375345", "0.54249424", "0.54150414", "0.5414269", "0.5410768", "0.53947246", "0.53916925", "0.5379261", "0.5377556", "0.53714496", "0.53569984", "0.53534174", "0.5347731", "0.53457665", "0.5341377", "0.5340096", "0.5336291", "0.5326984", "0.5320711", "0.5318932", "0.53189135", "0.53164154", "0.53062", "0.5303188", "0.5301007", "0.5297343", "0.5295611", "0.52914256", "0.5288062", "0.52802706", "0.5274664", "0.52654326", "0.5264475", "0.52640057", "0.52585745", "0.5250315", "0.52496946", "0.5246336", "0.52341056", "0.5228657", "0.5225428", "0.5222027", "0.5217467", "0.5210047", "0.5205121", "0.5203081", "0.5194962", "0.5190541", "0.51831585", "0.51801574", "0.5174402", "0.5170594", "0.51625645", "0.51577276" ]
0.6791244
0
Converts this object to a full http request.
@NonNull FullHttpRequest toFullHttpRequest();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NonNull\n HttpRequest toHttpRequest();", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "public Request <String, ArrayList<Connection>> buildHttpContactRequest ()\n\t{\n\t\tHttpBuilder<String, ArrayList<Connection>> builder = new HttpBuilder<String, ArrayList<Connection>>(null, getApiKey());\n\t\t\n\t\tif (this.getAuthInfo() != null)\n\t\t\tbuilder.setAuthInfo(this.getAuthInfo().getBytes());\n\t\t\n\t\tif (this.getPath() != null)\n\t\t\tbuilder.setPath(this.getPath());\n\t\t\n\t\treturn new HttpContactRequest(builder);\n\t}", "public Request<E, T> buildHttpGet ()\n\t{\n\t\treturn new HttpGetRequest<E,T>(this);\n\t}", "private Request build() {\n Request.Builder builder =\n new Request.Builder().cacheControl(new CacheControl.Builder().noCache().build());\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();\n for (Map.Entry<String, String> entry : queryParams.entrySet()) {\n urlBuilder = urlBuilder.addEncodedQueryParameter(entry.getKey(), entry.getValue());\n }\n builder = builder.url(urlBuilder.build());\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder = builder.header(entry.getKey(), entry.getValue());\n }\n\n RequestBody body = (bodyBuilder == null) ? null : bodyBuilder.build();\n builder = builder.method(method.name(), body);\n\n return builder.build();\n }", "static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }", "public Request<E, T> buildHttpPost ()\n\t{\n\t\treturn new HttpPostRequest<E, T>(this);\n\t}", "public Request<E, T> buildHttpPut ()\n\t{\n\t\treturn new HttpPutRequest<E, T>(this);\n\t}", "@Override\n\tpublic WebApiRequest getRequest() {\n\t\tString category = \"\";\n\t\tString destination = \"\";\n\t\tJSONObject para = new JSONObject();\n\t\tif (taskFlag == GET_BALANCE_DETAIL_FLAG) {\n\t\t\tcategory = CATEGORY_NAME;\n\t\t\tdestination = GET_BALANCE_Detail;\n\t\t\ttry {\n\t\t\t\tpara.put(\"ID\", getIntent().getIntExtra(\"BalanceID\", 0));\n\t\t\t\tpara.put(\"CardType\", getIntent().getIntExtra(\"CardType\", 1));\n\t\t\t\tpara.put(\"ChangeType\", getIntent().getIntExtra(\"ChangeType\", 0));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tWebApiHttpHead header = mApp.createNeededCheckingWebConnectHead(category, destination, para.toString());\n\t\tWebApiRequest request = new WebApiRequest(category, destination,para.toString(), header);\n\t\treturn request;\n\t}", "@NonNull\n StreamedHttpRequest toStreamHttpRequest();", "public interface NettyHttpRequestBuilder {\n /**\n * Converts this object to a full http request.\n *\n * @return a full http request\n */\n @NonNull\n FullHttpRequest toFullHttpRequest();\n\n /**\n * Converts this object to a streamed http request.\n * @return The streamed request\n */\n @NonNull\n StreamedHttpRequest toStreamHttpRequest();\n\n /**\n * Converts this object to the most appropriate http request type.\n * @return The http request\n */\n @NonNull\n HttpRequest toHttpRequest();\n\n /**\n * @return Is the request a stream.\n */\n boolean isStream();\n\n /**\n * Convert the given request to a full http request.\n * @param request The request\n * @return The full request.\n */\n static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }\n\n}", "public void build() {\n\t\t\tRequest request = new Request();\n request.context = context;\n\t\t\trequest.requestType = requestType;\n\t\t\trequest.url = url;\n\t\t\trequest.envelope = envelope;\n\t\t\trequest.headers = headers;\n\n\t\t\trequest.responseListener = responseListener;\n\t\t\trequest.onValidateResponseListener = validateResponseListener;\n\n\t\t\trequest.isDebug = isDebug;\n\n\t\t\trequest.start();\n\t\t}", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}", "protected abstract HttpUriRequest getHttpUriRequest();", "public Request(final FullHttpRequest request) {\n this.request = request;\n }", "public Request buildHttpRequest(Method method, Object args) {\n return post(method, args);\n }", "public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}", "public ResponseFromHTTP makeRequest() throws CustomRuntimeException\n\t{\n\t\tResponseFromHTTP result=null;\n\t\tCloseableHttpClient httpclient=null;\n\t\tCloseableHttpResponse response=null;\n\t\tboolean needAuth=false;\n\t\tboolean viaProxy=httpTransportInfo.isUseProxy() && StringUtils.isNotBlank(httpTransportInfo.getProxyHost());\n\n\t\tHttpHost target = new HttpHost(httpTransportInfo.getHost(), httpTransportInfo.getPort(),httpTransportInfo.getProtocol());\n\t\t//basic auth for request\n\t\tCredentialsProvider credsProvider = new BasicCredentialsProvider();\n\t\tif(StringUtils.isNotBlank(httpTransportInfo.getLogin()) && \n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getPassword()))\n\t\t{\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(target.getHostName(), target.getPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getLogin(), httpTransportInfo.getPassword()));\n\t\t\tneedAuth=true;\n\t\t}\n\n\t\t//proxy auth?\n\t\tif(viaProxy && StringUtils.isNotBlank(httpTransportInfo.getProxyLogin()) &&\n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getProxyPassword()))\n\t\t{\n\t\t\t//proxy auth setting\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(httpTransportInfo.getProxyHost(), httpTransportInfo.getProxyPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getProxyLogin(), httpTransportInfo.getProxyPassword()));\n\t\t}\n\n\t\ttry\n\t\t{\n\n\t\t\tHttpClientBuilder httpclientBuilder = HttpClients.custom()\n\t\t\t\t\t.setDefaultCredentialsProvider(credsProvider);\n\t\t\t//https\n\t\t\tif(\"https\".equalsIgnoreCase(httpTransportInfo.getProtocol()))\n\t\t\t{\n\t\t\t\t//A.K. - Set stub for check certificate - deprecated from 4.4.1\n\t\t\t\tSSLContextBuilder sslContextBuilder=SSLContexts.custom();\n\t\t\t\tTrustStrategyLZ trustStrategyLZ=new TrustStrategyLZ();\n\t\t\t\tsslContextBuilder.loadTrustMaterial(null,trustStrategyLZ);\n\t\t\t\tSSLContext sslContext = sslContextBuilder.build();\n\t\t\t\tSSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n\t\t\t\thttpclientBuilder.setSSLSocketFactory(sslsf);\n\t\t\t}\n\n\t\t\thttpclient=httpclientBuilder.build();\n\n\t\t\t//timeouts\n\t\t\tBuilder builder = RequestConfig.custom()\n\t\t\t\t\t.setSocketTimeout(httpTransportInfo.getSocketTimeoutSec()*1000)\n\t\t\t\t\t.setConnectTimeout(httpTransportInfo.getConnectTimeoutSec()*1000);\n\n\t\t\t//via proxy?\n\t\t\tif(viaProxy)\n\t\t\t{\n\t\t\t\t//proxy setting\n\t\t\t\tHttpHost proxy = new HttpHost(httpTransportInfo.getProxyHost(),httpTransportInfo.getProxyPort(),httpTransportInfo.getProxyProtocol());\n\t\t\t\tbuilder.setProxy(proxy);\n\t\t\t}\n\n\t\t\tRequestConfig requestConfig=builder.build();\n\n\t\t\t// Create AuthCache instance\n\t\t\tAuthCache authCache = new BasicAuthCache();\n\t\t\t// Generate BASIC scheme object and add it to the local\n\t\t\t// auth cache\n\t\t\tBasicScheme basicAuth = new BasicScheme();\n\t\t\tauthCache.put(target, basicAuth);\n\n\t\t\t// Add AuthCache to the execution context\n\t\t\tHttpClientContext localContext = HttpClientContext.create();\n\t\t\tlocalContext.setAuthCache(authCache);\n\n\t\t\tPathParser parsedPath=new PathParser(getUri());\n\t\t\tif(restMethodDef.isUseOriginalURI())\n\t\t\t{\n\t\t\t\t//in this case params from URI will not add to all params\n\t\t\t\tparsedPath.getParams().clear();\n\t\t\t}\n\t\t\tparsedPath.getParams().addAll(getRequestDefinition().getParams());\n\t\t\t//prepare URI\n\t\t\tURIBuilder uriBuilder = new URIBuilder().setPath(parsedPath.getUri());\n\t\t\tif(!getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\t//form's parameters - GET/DELETE/OPTIONS/PUT\n\t\t\t\tfor(NameValuePair nameValuePair : parsedPath.getParams())\n\t\t\t\t{\n\t\t\t\t\turiBuilder.setParameter(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tURI resultUri =(restMethodDef.isUseOriginalURI())?new URI(getUri()):uriBuilder.build();\n\n\t\t\t//\t\t\tHttpRequestBase httpPostOrGet=(getRequestDefinition().isHttpMethodPost())?\n\t\t\t//\t\t\t\t\tnew HttpPost(resultUri):\n\t\t\t//\t\t\t\t\tnew HttpGet(resultUri);\n\n\t\t\tHttpRequestBase httpPostOrGetEtc=null;\n\t\t\t//\n\t\t\tswitch(getRequestDefinition().getHttpMethod())\n\t\t\t{\n\t\t\t\tcase POST: httpPostOrGetEtc=new HttpPost(resultUri);break;\n\t\t\t\tcase DELETE: httpPostOrGetEtc=new HttpDelete(resultUri);break;\n\t\t\t\tcase OPTIONS: httpPostOrGetEtc=new HttpOptions(resultUri);break;\n\t\t\t\tcase PUT: httpPostOrGetEtc=new HttpPut(resultUri);break;\n\n\t\t\t\tdefault: httpPostOrGetEtc=new HttpGet(resultUri);break;\n\t\t\t}\n\n\t\t\t//Specifie protocol version\n\t\t\tif(httpTransportInfo.isVersionHttp10())\n\t\t\t\thttpPostOrGetEtc.setProtocolVersion(HttpVersion.HTTP_1_0);\n\n\t\t\t//user agent\n\t\t\thttpPostOrGetEtc.setHeader(HttpHeaders.USER_AGENT,httpTransportInfo.getUserAgent());\n\t\t\t//заголовки из запроса\n\t\t\tif(getRequestDefinition().getHeaders().size()>0)\n\t\t\t{\n\t\t\t\tfor(NameValuePair nameValuePair : getRequestDefinition().getHeaders())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getName()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Additional HTTP headers from httpTransportInfo\n\t\t\tif(httpTransportInfo.getAddHeaders()!=null)\n\t\t\t{\n\t\t\t\tfor(Map.Entry<String, String> entry:httpTransportInfo.getAddHeaders().entrySet())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(entry.getKey()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(entry.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(entry.getKey(),entry.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\thttpPostOrGetEtc.setConfig(requestConfig);\n\t\t\t//Form's parameters, request POST\n\t\t\tif(getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t\telse if(parsedPath.getParams().size()>0)\n\t\t\t\t{\n\t\t\t\t\tUrlEncodedFormEntity entityForm = new UrlEncodedFormEntity(parsedPath.getParams(), httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(entityForm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Body for PUT\n\t\t\tif(getRequestDefinition().getHttpMethod()==HttpMethod.PUT)\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPut) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresponse = httpclient.execute(target, httpPostOrGetEtc, (needAuth)?localContext:null);\n\t\t\t//response.\n\t\t\tHttpEntity entity = response.getEntity();\n\t\t\tif(entity!=null)\n\t\t\t{\n\t\t\t\t//charset\n\t\t\t\tContentType contentType = ContentType.get(entity);\n\t\t\t\tString currentCharSet=httpTransportInfo.getCharset();\n\t\t\t\tif(contentType!=null)\n\t\t\t\t{\n\t\t\t\t\t//String mimeType = contentType.getMimeType();\n\t\t\t\t\tif(contentType.getCharset()!=null)\n\t\t\t\t\t\tcurrentCharSet=contentType.getCharset().name();\n\t\t\t\t}\n\t\t\t\tInputStream inputStream=entity.getContent();\n\t\t\t\tif(getRequestDefinition().isBinaryResponseBody())\n\t\t\t\t{\n\t\t\t\t\t//binary content\n\t\t\t\t\tbyte[] bodyBin = IOUtils.toByteArray(inputStream);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),bodyBin,response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//copy content to string\n\t\t\t\t\tStringWriter writer = new StringWriter();\n\t\t\t\t\tIOUtils.copy(inputStream, writer, currentCharSet);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),writer.toString(),response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\tinputStream.close();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new CustomRuntimeException(\"fetchData over http uri: \"+getUri(),e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(response!=null)\n\t\t\t\t\tresponse.close();\n\t\t\t\tif(httpclient!=null)\n\t\t\t\t\thttpclient.close();\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t} \t\n\t\t}\t\t\n\t\treturn result;\n\n\t}", "private HttpUriRequest createHttpRequest(String url, String method,\n\t\t\tList<NameValuePair> params) throws UnsupportedEncodingException {\n\t\tHttpUriRequest request;\n\t\tif (method.toUpperCase().equals(\"GET\")) {\n\t\t\trequest = new HttpGet(url);\n\t\t} else if (method.toUpperCase().equals(\"POST\")) {\n\t\t\tHttpPost post = new HttpPost(url);\n\t\t\tpost.setEntity(new UrlEncodedFormEntity(params));\n\t\t\trequest = post;\n\t\t} else if (method.toUpperCase().equals(\"PUT\")) {\n\t\t\trequest = new HttpPut(url);\n\t\t} else if (method.toUpperCase().equals(\"DELETE\")) {\n\t\t\trequest = new HttpDelete(url);\n\t\t} else {\n\t\t\trequest = new HttpGet();\n\t\t}\n\n\t\treturn request;\n\t}", "public HttpRequest l() throws IOException {\n if (this.f != null) {\n return this;\n }\n a().setDoOutput(true);\n this.f = new d(a().getOutputStream(), c(a().getRequestProperty(\"Content-Type\"), \"charset\"), this.j);\n return this;\n }", "public GrizzletRequest getRequest();", "private static HttpRequest buildRequest(final URI uri, final String host) {\n FullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n getHttpMethod(), uri.getRawPath());\n request.headers().set(HttpHeaderNames.HOST, host);\n request.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);\n request.headers().set(HttpHeaderNames.ACCEPT_ENCODING,\n HttpHeaderValues.GZIP);\n request.headers().set(HttpHeaderNames.CONTENT_TYPE,\n \"application/json; charset=UTF-8\");\n\n // Set some example cookies.\n request.headers().set(HttpHeaderNames.COOKIE,\n ClientCookieEncoder.STRICT.encode(\n new DefaultCookie(\"my-cookie\", \"foo\"),\n new DefaultCookie(\"another-cookie\", \"bar\")));\n\n // set content\n final ByteBuf buffer = request.content().clear();\n final String json = \"hello, json\";\n int p0 = buffer.writerIndex();\n buffer.writeBytes(json.getBytes(CharsetUtil.UTF_8));\n int p1 = buffer.writerIndex();\n request.headers().set(HttpHeaderNames.CONTENT_LENGTH,\n Integer.toString(p1 - p0));\n\n return request;\n }", "protected TrellisRequest getRequest() {\n return request;\n }", "public HttpRequest(HttpRequestBuilder builder){\r\n mUrl = builder.Url;\r\n mMethodType = builder.MethodType;\r\n mCallback = builder.Callback;\r\n mJsonRequestParams = builder.JsonRequestParams;\r\n }", "Request _request(String operation);", "public REQ getRequest() {\n return request;\n }", "@Override\r\n public UriBuilder getRequestUriBuilder() {\n return null;\r\n }", "String getRequest();", "public Request<E, T> buildHttpMultiPartRequest (E model)\n\t{\n\t\tthis.model = model;\n\t\treturn new HttpMultiPartRequest <E,T>(this);\n\t}", "@Override\n public OutgoingRequest createOutgoingRequest(DriverRequest originalRequest, String uri, boolean proxy) {\n HttpHost physicalHost = UriUtils.extractHost(uri);\n\n if (!originalRequest.isExternal()) {\n if (preserveHost) {\n // Preserve host if required\n HttpHost virtualHost = HttpRequestHelper.getHost(originalRequest.getOriginalRequest());\n // Rewrite the uri with the virtualHost\n uri = UriUtils.rewriteURI(uri, virtualHost);\n } else {\n uri = UriUtils.rewriteURI(uri, firstBaseUrlHost);\n }\n }\n\n RequestConfig.Builder builder = RequestConfig.custom();\n builder.setConnectTimeout(connectTimeout);\n builder.setSocketTimeout(socketTimeout);\n\n // Use browser compatibility cookie policy. This policy is the closest\n // to the behavior of a real browser.\n builder.setCookieSpec(CustomBrowserCompatSpecFactory.CUSTOM_BROWSER_COMPATIBILITY);\n\n builder.setRedirectsEnabled(false);\n RequestConfig config = builder.build();\n\n OutgoingRequestContext context = new OutgoingRequestContext();\n\n String method = \"GET\";\n if (proxy) {\n method = originalRequest.getOriginalRequest().getRequestLine().getMethod().toUpperCase();\n }\n OutgoingRequest outgoingRequest =\n new OutgoingRequest(method, uri, originalRequest.getOriginalRequest().getProtocolVersion(),\n originalRequest, config, context);\n if (ENTITY_METHODS.contains(method)) {\n outgoingRequest.setEntity(originalRequest.getOriginalRequest().getEntity());\n } else if (!SIMPLE_METHODS.contains(method)) {\n throw new UnsupportedHttpMethodException(method + \" \" + uri);\n }\n\n context.setPhysicalHost(physicalHost);\n context.setOutgoingRequest(outgoingRequest);\n context.setProxy(proxy);\n\n return outgoingRequest;\n }", "private ObjectNode makeRequest(final String api, final JsiiObjectRef objRef) {\n ObjectNode req = makeRequest(api);\n req.set(\"objref\", objRef.toJson());\n return req;\n }", "public void makeRequest() {\n Request newRequest = new Request();\n\n if (mProduct == null) {\n Toast.makeText(getContext(), \"BAD\", Toast.LENGTH_LONG).show();\n return;\n }\n\n newRequest.setClient(ParseUser.getCurrentUser());\n newRequest.setProduct(mProduct);\n newRequest.setBeaut(mBeaut);\n\n Date dateTime = new Date(selectedAppointmet.appDate.getTimeInMillis());\n newRequest.setDateTime(dateTime);\n // TODO: uncomment below line when dataset is clean and products have lengths\n// newRequest.setLength(mProduct.getLength());\n newRequest.setLength(1);\n newRequest.setSeat(selectedAppointmet.seatId);\n newRequest.setDescription(rComments.getText().toString());\n\n sendRequest(newRequest);\n }", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarClienteRequest actualizarClienteRequest = new ActualizarClienteRequest();\r\n\t\tactualizarClienteRequest.setCliente(codigo);\r\n\t\tactualizarClienteRequest.setFechaAniversario(fechAniv);\r\n\t\tactualizarClienteRequest.setObservaciones(observaciones);\r\n\t\tactualizarClienteRequest.setRazonComercial(razonComercial);\r\n\t\tactualizarClienteRequest.setReferencia(referencia);\r\n\t\tactualizarClienteRequest.setUsuario(usuario);\r\n\t\t\r\n\t\tString request = JSONHelper.serializar(actualizarClienteRequest);\r\n\t\treturn request;\r\n\t}", "@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}", "public String getRawRequest()\n\t{\n\t\treturn rawRequest;\n\t}", "public Request(){\n\t\tthis(null, null, null);\n\t}", "public GhRequest getRequest() {\r\n return localRequest;\r\n }", "public GhRequest getRequest() {\r\n return localRequest;\r\n }", "public HttpRequest b() throws IOException {\n byte[] bArr = new byte[HttpRequest.this.j];\n while (true) {\n int read = inputStream2.read(bArr);\n if (read == -1) {\n return HttpRequest.this;\n }\n outputStream2.write(bArr, 0, read);\n }\n }", "public String getRequest() {\n Object ref = request_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n request_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "private ObjectNode makeRequest(final String api) {\n ObjectNode req = JSON.objectNode();\n req.put(\"api\", api);\n return req;\n }", "public HttpRequest m() throws IOException {\n if (this.g) {\n this.f.a(\"\\r\\n--00content0boundary00\\r\\n\");\n } else {\n this.g = true;\n d(\"multipart/form-data; boundary=00content0boundary00\").l();\n this.f.a(\"--00content0boundary00\\r\\n\");\n }\n return this;\n }", "public com.google.devtools.clouderrorreporting.v1beta1.HttpRequestContext.Builder\n getHttpRequestBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getHttpRequestFieldBuilder().getBuilder();\n }", "com.google.protobuf.ByteString\n getRequestBytes();", "public String getRequest() {\n Object ref = request_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n request_ = s;\n }\n return s;\n }\n }", "private Request() {\n initFields();\n }", "public ServerResponse<T> sendRequest()\n {\n return this.sendRequestWithMultiHeaders(Collections.emptyMap());\n }", "@Override\n public String getRequestURI() {\n if (httpRequest instanceof HttpRequestImpl) {\n return strip(context, ((HttpRequestImpl) httpRequest).requestRawPath());\n }\n return strip(context, super.getRequestURI());\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Response sendRequest(Request request) {\n return null;\n }", "public static Request getRequest() {\n return request;\n }", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarCompromisoRequest actualizarCompromisoRequest = new ActualizarCompromisoRequest();\r\n\t\tactualizarCompromisoRequest.listaInventarioCompromiso = this.listaInventarioCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPosicionCompromiso = this.listaPosicionCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPresentacionCompromiso = this.listaPresentacionCompromiso;\r\n\t\tactualizarCompromisoRequest.updateInformacionAdicionalTO = this.updateInformacionAdicionalTO;\r\n\t\tactualizarCompromisoRequest.codigoCabecera = this.codigoCabecera;\r\n\t\tString request = JSONHelper.serializar(actualizarCompromisoRequest);\r\n\t\treturn request;\r\n\t}", "public CommentsRequest toJraw() {\n return new CommentsRequest.Builder()\n .sort(commentSort().mode())\n .focus(focusCommentId())\n .context(contextCount())\n .limit(commentLimit())\n .build();\n }", "@Override \n public String getRequestURI() {\n if (requestURI != null) {\n return requestURI;\n }\n\n StringBuilder buffer = new StringBuilder();\n buffer.append(getRequestURIWithoutQuery());\n if (super.getQueryString() != null) {\n buffer.append(\"?\").append(super.getQueryString());\n }\n return requestURI = buffer.toString();\n }", "public RequestDataBuilder get() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.GET);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "public String getRequest() {\n return request;\n }", "public ServiceRequest() {\n super();\n this.addNamespaceToRequest = true;\n }", "@Deprecated\n public Request.Builder makeRequestBuilder() {\n Request.Builder hrb = new Request.Builder();\n\n Map<String, String> traceHeaders = tracing.makeOutboundHttpTraceHeaders();\n traceHeaders.forEach(hrb::addHeader);\n return hrb;\n }", "public TransmissionProtocol.Request.Builder addRequestBuilder() {\n return getRequestFieldBuilder().addBuilder(\n TransmissionProtocol.Request.getDefaultInstance());\n }", "public com.google.protobuf.ByteString\n getRequestBytes() {\n Object ref = request_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n request_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Builder clearHttpRequest() {\n bitField0_ = (bitField0_ & ~0x00000001);\n httpRequest_ = null;\n if (httpRequestBuilder_ != null) {\n httpRequestBuilder_.dispose();\n httpRequestBuilder_ = null;\n }\n onChanged();\n return this;\n }", "public net.iGap.proto.ProtoRequest.Request getRequest() {\n return instance.getRequest();\n }", "public QueryDoctor getRequest() {\r\n return localRequest;\r\n }", "public SveaRequest<SveaCloseOrder> prepareRequest() {\n String errors = validateRequest();\n \n if (!errors.equals(\"\")) {\n throw new SveaWebPayException(\"Validation failed\", new ValidationException(errors));\n }\n \n // build inspectable request object and insert into order builder\n SveaCloseOrder sveaCloseOrder = new SveaCloseOrder();\n sveaCloseOrder.Auth = getStoreAuthorization();\n SveaCloseOrderInformation orderInfo = new SveaCloseOrderInformation();\n orderInfo.SveaOrderId = order.getOrderId();\n sveaCloseOrder.CloseOrderInformation = orderInfo;\n \n SveaRequest<SveaCloseOrder> object = new SveaRequest<SveaCloseOrder>();\n object.request = sveaCloseOrder;\n \n return object;\n }", "public T getRequestData();", "public synchronized RestRequest getRequest() {\n\t\treturn getContext().getLocalSession().getOpSession().getRequest();\n\t}", "@SuppressWarnings(\"deprecation\")\n\tprotected static HttpUriRequest createHttpRequest(Request<?> request, Map<String, String> additionalHeaders) throws AuthFailureError {\n\t\tswitch (request.getMethod()) {\n\t\tcase Method.DEPRECATED_GET_OR_POST: {\n\t\t\t// This is the deprecated way that needs to be handled for backwards compatibility.\n\t\t\t// If the request's post body is null, then the assumption is that the request is\n\t\t\t// GET. Otherwise, it is assumed that the request is a POST.\n\t\t\tbyte[] postBody = request.getPostBody();\n\t\t\tif (postBody != null) {\n\t\t\t\tHttpPost postRequest = new HttpPost(request.getUrl());\n\t\t\t\tpostRequest.addHeader(HEADER_CONTENT_TYPE, request.getPostBodyContentType());\n\t\t\t\tHttpEntity entity;\n\t\t\t\tentity = new ByteArrayEntity(postBody);\n\t\t\t\tpostRequest.setEntity(entity);\n\t\t\t\treturn postRequest;\n\t\t\t} else {\n\t\t\t\treturn new HttpGet(request.getUrl());\n\t\t\t}\n\t\t}\n\t\tcase Method.GET:\n\t\t\treturn new HttpGet(request.getUrl());\n\t\tcase Method.DELETE:\n\t\t\treturn new HttpDelete(request.getUrl());\n\t\tcase Method.POST: {\n\t\t\tHttpPost postRequest = new HttpPost(request.getUrl());\n\t\t\tpostRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());\n\t\t\tsetEntityIfNonEmptyBody(postRequest, request);\n\t\t\treturn postRequest;\n\t\t}\n\t\tcase Method.PUT: {\n\t\t\tHttpPut putRequest = new HttpPut(request.getUrl());\n\t\t\tputRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());\n\t\t\tsetEntityIfNonEmptyBody(putRequest, request);\n\t\t\treturn putRequest;\n\t\t}\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Unknown request method.\");\n\t\t}\n\t}", "void request(RequestParams params);", "public com.google.protobuf.ByteString\n getRequestBytes() {\n Object ref = request_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n request_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Response send() {\n setupAndConnect();\n setRequestMethod();\n setRequestBody();\n setRequestHeaders();\n writeRequestBody();\n getResponse();\n connection.disconnect();\n return response;\n }", "public static String getRequest() {\n return request;\n }", "void projectUriRequest(Request request);", "public HttpRequest j() throws IOException {\n if (this.f == null) {\n return this;\n }\n if (this.g) {\n this.f.a(\"\\r\\n--00content0boundary00--\\r\\n\");\n }\n if (this.h) {\n try {\n this.f.close();\n } catch (IOException unused) {\n }\n } else {\n this.f.close();\n }\n this.f = null;\n return this;\n }" ]
[ "0.6687476", "0.6299719", "0.6274756", "0.6186407", "0.61804265", "0.61703086", "0.6089682", "0.6017107", "0.5875485", "0.58656555", "0.58524585", "0.57854956", "0.5749418", "0.56960315", "0.56806976", "0.56797594", "0.5619839", "0.5604239", "0.557637", "0.54847795", "0.5469874", "0.5461064", "0.54494655", "0.5425189", "0.53824604", "0.5380432", "0.5364462", "0.53579247", "0.5356346", "0.53558844", "0.5329325", "0.5320719", "0.5320246", "0.5302821", "0.5290034", "0.52823377", "0.52663046", "0.52590406", "0.52590406", "0.5239006", "0.52362543", "0.5227653", "0.52260476", "0.5172152", "0.5167696", "0.51663667", "0.51539266", "0.51538754", "0.5149857", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.51417506", "0.513468", "0.5126705", "0.511351", "0.5111956", "0.5111881", "0.5104452", "0.5096531", "0.50936145", "0.5090762", "0.50889987", "0.5088693", "0.50854427", "0.5080014", "0.5074244", "0.506631", "0.50495666", "0.5042048", "0.50285584", "0.50145936", "0.49907258", "0.49893492", "0.49844348", "0.49748167", "0.49675292" ]
0.6778203
0
Converts this object to a streamed http request.
@NonNull StreamedHttpRequest toStreamHttpRequest();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface NettyHttpRequestBuilder {\n /**\n * Converts this object to a full http request.\n *\n * @return a full http request\n */\n @NonNull\n FullHttpRequest toFullHttpRequest();\n\n /**\n * Converts this object to a streamed http request.\n * @return The streamed request\n */\n @NonNull\n StreamedHttpRequest toStreamHttpRequest();\n\n /**\n * Converts this object to the most appropriate http request type.\n * @return The http request\n */\n @NonNull\n HttpRequest toHttpRequest();\n\n /**\n * @return Is the request a stream.\n */\n boolean isStream();\n\n /**\n * Convert the given request to a full http request.\n * @param request The request\n * @return The full request.\n */\n static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }\n\n}", "public InputStream stream() throws HttpRequestException {\n InputStream inputStream;\n InputStream inputStream2;\n if (this.code() < 400) {\n try {\n inputStream2 = this.getConnection().getInputStream();\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }\n inputStream2 = inputStream = this.getConnection().getErrorStream();\n if (inputStream == null) {\n try {\n inputStream2 = this.getConnection().getInputStream();\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }\n if (!this.uncompress) return inputStream2;\n if (!\"gzip\".equals(this.contentEncoding())) {\n return inputStream2;\n }\n try {\n return new GZIPInputStream(inputStream2);\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}", "@NonNull\n HttpRequest toHttpRequest();", "static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }", "public ODataBatchRequest rawAppend(final byte[] toBeStreamed) throws IOException {\n getStreamManager().getBodyStreamWriter().write(toBeStreamed);\n return this;\n }", "public Stream stream() {\n Preconditions.checkState(prepared);\n Preconditions.checkState(!closed);\n return new Stream();\n }", "public HttpRequest l() throws IOException {\n if (this.f != null) {\n return this;\n }\n a().setDoOutput(true);\n this.f = new d(a().getOutputStream(), c(a().getRequestProperty(\"Content-Type\"), \"charset\"), this.j);\n return this;\n }", "public HttpRequest a(InputStream inputStream, OutputStream outputStream) throws IOException {\n final InputStream inputStream2 = inputStream;\n final OutputStream outputStream2 = outputStream;\n return (HttpRequest) new a<HttpRequest>(inputStream, this.h) {\n /* renamed from: a */\n public HttpRequest b() throws IOException {\n byte[] bArr = new byte[HttpRequest.this.j];\n while (true) {\n int read = inputStream2.read(bArr);\n if (read == -1) {\n return HttpRequest.this;\n }\n outputStream2.write(bArr, 0, read);\n }\n }\n }.call();\n }", "public InputStream executeStreaming() throws DomainApiException {\n try {\n Socket socket = new Socket(HOST, PORT);\n try {\n StringBuffer sb = new StringBuffer();\n sb.append(\"GET \" + initPathParameter() + \"\\n\");\n sb.append(\"Content-Type: application/json\\n\");\n sb.append(\"Authorization: \"\n + authentificator.generateBasicAuthorization() + \"\\n\\n\");\n socket.getOutputStream().write(sb.toString().getBytes());\n } catch (IOException ex) {\n throw new DomainApiException(ex);\n }\n return socket.getInputStream();\n } catch (MalformedURLException ex) {\n throw new DomainApiException(ex);\n } catch (IOException ex) {\n throw new DomainApiException(ex);\n }\n }", "public Stream getStream(Streamable type){\n return Stream.builder().add(type).build() ;\n }", "public HttpRequest b() throws IOException {\n byte[] bArr = new byte[HttpRequest.this.j];\n while (true) {\n int read = inputStream2.read(bArr);\n if (read == -1) {\n return HttpRequest.this;\n }\n outputStream2.write(bArr, 0, read);\n }\n }", "public Request<E, T> buildHttpPut ()\n\t{\n\t\treturn new HttpPutRequest<E, T>(this);\n\t}", "public void build() {\n\t\t\tRequest request = new Request();\n request.context = context;\n\t\t\trequest.requestType = requestType;\n\t\t\trequest.url = url;\n\t\t\trequest.envelope = envelope;\n\t\t\trequest.headers = headers;\n\n\t\t\trequest.responseListener = responseListener;\n\t\t\trequest.onValidateResponseListener = validateResponseListener;\n\n\t\t\trequest.isDebug = isDebug;\n\n\t\t\trequest.start();\n\t\t}", "Observable<SubscribeRequest> getSubscribeRequestStream();", "public interface FileService {\n @POST(\"file/upload\")\n Call<Result<String>> upload(@Body RequestBody file);\n\n @GET\n @Streaming\n Call<ResponseBody> download(@Url String url);\n}", "public interface DownLoadService {\n\n @Streaming\n @GET\n Observable<ResponseBody> downloadFilm(@Url String url);\n\n}", "public <T> MockHttpServletRequestBuilder feed(\n MockHttpServletRequestBuilder request,\n final T payload,\n final MediaType mediaType) {\n if (payload == null) {\n return request;\n }\n\n final SerializationHelper.ByteArrayHttpOutputMessage msg = conv.outputMessage(payload, mediaType);\n return request\n .headers(msg.headers)\n .content(msg.out.toByteArray());\n }", "@NonNull\n FullHttpRequest toFullHttpRequest();", "@Override\n public final boolean isStreaming() {\n return false;\n }", "private Response buildStream(final File asset, final String range) throws Exception {\n if (range == null) {\n StreamingOutput streamer = new StreamingOutput() {\n @Override\n public void write(final OutputStream output) throws IOException, WebApplicationException {\n\n final FileChannel inputChannel = new FileInputStream(asset).getChannel();\n final WritableByteChannel outputChannel = Channels.newChannel(output);\n try {\n inputChannel.transferTo(0, inputChannel.size(), outputChannel);\n } finally {\n // closing the channels\n inputChannel.close();\n outputChannel.close();\n }\n }\n\n };\n return Response.ok(streamer).header(HttpHeaders.CONTENT_LENGTH, asset.length()).build();\n }\n\n final int chunk_size = 1024 * 1024;\n String[] ranges = range.split(\"=\")[1].split(\"-\");\n final int from = Integer.parseInt(ranges[0]);\n /**\n * Chunk media if the range upper bound is unspecified. Chrome sends \"bytes=0-\"\n */\n int to = chunk_size + from;\n if (to >= asset.length()) {\n to = (int) (asset.length() - 1);\n }\n if (ranges.length == 2) {\n to = Integer.parseInt(ranges[1]);\n }\n\n final String responseRange = String.format(\"bytes %d-%d/%d\", from, to, asset.length());\n final RandomAccessFile raf = new RandomAccessFile(asset, \"r\");\n raf.seek(from);\n\n final int len = to - from + 1;\n final MediaStreamer streamer = new MediaStreamer(len, raf);\n Response.ResponseBuilder res = Response.status(Status.PARTIAL_CONTENT).entity(streamer)\n .header(\"Accept-Ranges\", \"bytes\")\n .header(\"Content-Range\", responseRange)\n .header(HttpHeaders.CONTENT_LENGTH, streamer.getLenth())\n .header(HttpHeaders.LAST_MODIFIED, new Date(asset.lastModified()));\n return res.build();\n }", "public ODataBatchRequest rawAppend(final byte[] toBeStreamed, int off, int len) throws IOException {\n getStreamManager().getBodyStreamWriter().write(toBeStreamed, off, len);\n return this;\n }", "public Entity transform(HttpRequestEntity entity) throws IOException {\n final String responseFormat = SupportedFormat.TURTLE;\n final Graph generatedRdf = generateRdf(entity);\n return new WritingEntity() {\n\n @Override\n public MimeType getType() {\n try {\n return new MimeType(responseFormat);\n } catch (MimeTypeParseException ex) {\n throw new RuntimeException(ex);\n }\n }\n\n @Override\n public void writeData(OutputStream out) throws IOException { \n Serializer.getInstance().serialize(out, generatedRdf, responseFormat);\n out.flush();\n }\n };\n \n \n //baseRequest.setHandled(true);\n \n }", "@Override\n public OutgoingRequest createOutgoingRequest(DriverRequest originalRequest, String uri, boolean proxy) {\n HttpHost physicalHost = UriUtils.extractHost(uri);\n\n if (!originalRequest.isExternal()) {\n if (preserveHost) {\n // Preserve host if required\n HttpHost virtualHost = HttpRequestHelper.getHost(originalRequest.getOriginalRequest());\n // Rewrite the uri with the virtualHost\n uri = UriUtils.rewriteURI(uri, virtualHost);\n } else {\n uri = UriUtils.rewriteURI(uri, firstBaseUrlHost);\n }\n }\n\n RequestConfig.Builder builder = RequestConfig.custom();\n builder.setConnectTimeout(connectTimeout);\n builder.setSocketTimeout(socketTimeout);\n\n // Use browser compatibility cookie policy. This policy is the closest\n // to the behavior of a real browser.\n builder.setCookieSpec(CustomBrowserCompatSpecFactory.CUSTOM_BROWSER_COMPATIBILITY);\n\n builder.setRedirectsEnabled(false);\n RequestConfig config = builder.build();\n\n OutgoingRequestContext context = new OutgoingRequestContext();\n\n String method = \"GET\";\n if (proxy) {\n method = originalRequest.getOriginalRequest().getRequestLine().getMethod().toUpperCase();\n }\n OutgoingRequest outgoingRequest =\n new OutgoingRequest(method, uri, originalRequest.getOriginalRequest().getProtocolVersion(),\n originalRequest, config, context);\n if (ENTITY_METHODS.contains(method)) {\n outgoingRequest.setEntity(originalRequest.getOriginalRequest().getEntity());\n } else if (!SIMPLE_METHODS.contains(method)) {\n throw new UnsupportedHttpMethodException(method + \" \" + uri);\n }\n\n context.setPhysicalHost(physicalHost);\n context.setOutgoingRequest(outgoingRequest);\n context.setProxy(proxy);\n\n return outgoingRequest;\n }", "public interface AudioDownloadClient {\n\n @GET(\"uc?export=download\")\n @Streaming\n Call<ResponseBody> downloadAudio(@Query(\"id\") String id);\n}", "<R> Streamlet<R> newSource(IRichSpout spout);", "public static final HTTPStream createHTTPStream (String address, boolean isPost, byte[] postData,\r\n String headers, int timeOutMs, int[] statusCode,\r\n StringBuffer responseHeaders, int numRedirectsToFollow,\r\n String httpRequestCmd)\r\n {\n if (timeOutMs < 0)\r\n timeOutMs = 0;\r\n else if (timeOutMs == 0)\r\n timeOutMs = 30000;\r\n\r\n for (;;)\r\n {\r\n try\r\n {\r\n HTTPStream httpStream = new HTTPStream (address, isPost, postData, headers,\r\n timeOutMs, statusCode, responseHeaders,\r\n numRedirectsToFollow, httpRequestCmd);\r\n\r\n return httpStream;\r\n }\r\n catch (Throwable e) {}\r\n\r\n return null;\r\n }\r\n }", "HttpPipeline getHttpPipeline();", "public COSInputStream createInputStream() throws IOException\n {\n return stream.createInputStream();\n }", "public Request<E, T> buildHttpGet ()\n\t{\n\t\treturn new HttpGetRequest<E,T>(this);\n\t}", "private Request build() {\n Request.Builder builder =\n new Request.Builder().cacheControl(new CacheControl.Builder().noCache().build());\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();\n for (Map.Entry<String, String> entry : queryParams.entrySet()) {\n urlBuilder = urlBuilder.addEncodedQueryParameter(entry.getKey(), entry.getValue());\n }\n builder = builder.url(urlBuilder.build());\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder = builder.header(entry.getKey(), entry.getValue());\n }\n\n RequestBody body = (bodyBuilder == null) ? null : bodyBuilder.build();\n builder = builder.method(method.name(), body);\n\n return builder.build();\n }", "public void test_001_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_001_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss\n sendRequest2(request, 10);\n //R1.2 miss\n checkMiss(request, 2, VALID_RESPONSE);\n }", "public interface DownlodApi {\n\n\n @Streaming\n @GET(\"http://121.29.10.1/f3.market.xiaomi.com/download/AppStore/0ff0604fd770f481927d1edfad35675a3568ba656/com.tencent.mobileqq.apk\")\n Observable<ResponseBody> downloadQQ();\n}", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "static Request parseRequest(InputStream in) throws IOException {\n\t\tRequestLine request = readRequestLine(in);\n\t\tHeaders headers = readHeaders(in);\n\t\tlong length = -1;\n\t\tInputStream body;\n\t\tif (HeaderValue.CHUNKED.equals(headers.get(HeaderName.TRANSFER_ENCODING))) {\n\t\t\tbody = new ChunkedInputStream(in);\n\t\t} else {\n\t\t\tString header = headers.get(HeaderName.CONTENT_LENGTH);\n\t\t\tlength = header == null ? 0 : Long.parseLong(header);\n\t\t\tbody = new LimitedInputStream(in, length);\n\t\t}\n\t\treturn new Request(request.method(), request.target(), request.path(), request.query(), headers, length, body);\n\t}", "public void makeDestinationRequest() {\n this._hasDestinationRequests = true;\n }", "Stream<In> getInputStream();", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "public OutputStream openOutputStream() throws IOException {\n return response.getOutputStream();\n }", "public synchronized void requestStream(Query q) {\n // if this user has already registered a query\n if (!streams.containsKey(q)) {\n Closeable stream = factory.getStream(q);\n streams.put(q, stream);\n counts.put(q, 0);\n }\n counts.put(q, counts.get(q) + 1);\n if (sheduledRemovals.containsKey(q)) {\n sheduledRemovals.remove(q);\n }\n }", "public InputStream getStream();", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public final InputStream returnStream()\n\t{\n\t\treturn stream;\n\t}", "public final StreamedFixtureBuilder<T> fromStream(final FixtureStream stream) {\n\t\t\treturn new StreamedFixtureBuilder<T>(this, stream.asSourceStream());\n\t\t}", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n private final int requestId;\n\n private final SettableFuture<com.baichen.jraft.transport.RpcResult> future;\n\n private RepeatableTimer.TimerTask timeout;\n\n private long startTime;\n\n public PendingRequest(T request, int requestId, SettableFuture<com.baichen.jraft.transport.RpcResult> future) {\n this.request = request;\n this.requestId = requestId;\n this.future = future;\n }\n\n public long getStartTime() {\n return startTime;\n }\n\n public void setStartTime(long startTime) {\n this.startTime = startTime;\n }\n\n public void setTimeout(RepeatableTimer.TimerTask timeout) {\n this.timeout = timeout;\n }\n\n public RepeatableTimer.TimerTask getTimeout() {\n return timeout;\n }\n\n public T getRequest() {\n return request;\n }\n\n public int getRequestId() {\n return requestId;\n }\n\n public SettableFuture<com.baichen.jraft.transport.RpcResult> getFuture() {\n return future;\n }\n }\n}", "default Stream<Token<?>> stream() {\n return stream(true);\n }", "public static RequestCallback getOctetStreamRequestCallback() {\n return request -> request.getHeaders()\n .setAccept(Arrays.asList(MediaType.APPLICATION_OCTET_STREAM, MediaType.ALL));\n }", "private ObjectInputStream getInputStream() {\n\t\t// retornamos el stream de entrada\n\t\treturn this.inputStream;\n\t}", "private StreamObserver<JobResultsRequestWrapper> getJobResultsRequestWrapperStreamObserver(CoordinationProtos.NodeEndpoint foreman,\n ResponseSender sender,\n String queryId) {\n final JobResultsServiceGrpc.JobResultsServiceStub stub = getJobResultsServiceStub(foreman, queryId);\n Pointer<StreamObserver<JobResultsRequestWrapper>> streamObserverInternal = new Pointer<>();\n\n Context.current().fork().run( () -> {\n MethodDescriptor<JobResultsRequestWrapper, JobResultsResponse> jobResultsMethod =\n JobResultsRequestUtils.getJobResultsMethod(allocator);\n\n ClientCall<JobResultsRequestWrapper, JobResultsResponse> clientCall =\n stub.getChannel().newCall(jobResultsMethod, stub.getCallOptions());\n\n streamObserverInternal.value = ClientCalls.asyncBidiStreamingCall(clientCall,\n getResponseObserver(foreman, sender, queryId));\n });\n return streamObserverInternal.value;\n }", "@Override\n public Single<StreamingHttpResponse> handle(HttpServiceContext ctx,\n StreamingHttpRequest request,\n StreamingHttpResponseFactory responseFactory) {\n request.context().put(CLIENT_CTX, request.headers().get(header(CLIENT_CTX)));\n request.context().put(CLIENT_FILTER_OUT_CTX, request.headers().get(header(CLIENT_FILTER_OUT_CTX)));\n // Set server-side values:\n request.context().put(SERVER_FILTER_IN_CTX, value(SERVER_FILTER_IN_CTX));\n request.context().put(SERVER_FILTER_IN_TRAILER_CTX, value(SERVER_FILTER_IN_TRAILER_CTX));\n return delegate().handle(ctx, request, responseFactory).map(response -> {\n HttpHeaders headers = response.headers();\n // Take the first two values from context:\n headers.set(header(SERVER_FILTER_IN_CTX),\n requireNonNull(response.context().get(SERVER_FILTER_IN_CTX)));\n headers.set(header(SERVER_CTX), requireNonNull(response.context().get(SERVER_CTX)));\n // Set the last value explicitly:\n assertThat(response.context().containsKey(SERVER_FILTER_OUT_CTX), is(false));\n headers.set(header(SERVER_FILTER_OUT_CTX), value(SERVER_FILTER_OUT_CTX));\n\n // For Trailers-Only response put everything into headers:\n if (headers.contains(GRPC_STATUS)) {\n setTrailers(response.context(), headers);\n return response;\n }\n return response.transform(new StatelessTrailersTransformer<Buffer>() {\n @Override\n protected HttpHeaders payloadComplete(HttpHeaders trailers) {\n setTrailers(response.context(), trailers);\n return trailers;\n }\n });\n });\n }", "public HttpRequest (final InputStream inputStream)\n {\n in = new HttpInputStream (new BufferedInputStream (inputStream));\n headers = new HashMap <String, String> ();\n }", "static Observable<BaseResult> upload(String url, File file) {\n RequestBody requestBody = RequestBody.create(MediaType.parse(\"multipart/form-data\"), file);\n\n MultipartBody.Builder builder = new MultipartBody.Builder().setType(MultipartBody.FORM);\n\n// HashMap<String, String> params = new HashMap<>();\n builder.addFormDataPart(\"file\", file.getName(), requestBody);\n\n// String content = null;\n// builder.addPart(\n// RequestBody.create(MediaType.parse(\"applicaiton/otcet-stream\"), content));\n\n return baseApi.upload(url, builder.build())\n .compose(getComposer())\n .map(new mFunction(new TypeToken<BaseResult>() {\n }));\n }", "public Request<E, T> buildHttpPost ()\n\t{\n\t\treturn new HttpPostRequest<E, T>(this);\n\t}", "@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}", "public InputStream getEntityReplayInputStream() throws IOException {\n if(inputIsChunked) {\n return new ChunkedInputStream(getRecordedInput().getMessageBodyReplayInputStream());\n } else {\n return getRecordedInput().getMessageBodyReplayInputStream();\n }\n }", "public void test_002_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_002_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss, cached by RFC\n sendRequest2(request, 0);\n // R1.2 hit\n checkHit(request, 2, VALID_RESPONSE);\n }", "MovilizerRequest getRequestFromFile(Path filePath);", "public RecordingStream(RecordingContentItemLocal recordingItem, ContentItem referencingContentItem, ContentRequest request) throws HNStreamingException, HNStreamingRangeException\n {\n this.recordingItem = recordingItem;\n this.referencingContentItem = referencingContentItem;\n this.url = request.getURI();\n this.request = request;\n\n contentLocationType = HNStreamContentLocationType.HN_CONTENT_LOCATION_LOCAL_MSV_CONTENT; \n\n if (log.isInfoEnabled())\n {\n log.info(\"constructing RecordingStream - id: \" + request.getConnectionId() + \", url: \" + url);\n }\n\n //ensure the recordingcontentitem has a recorded service associated with it\n if (getSegmentedRecordedService() == null)\n {\n throw new HNStreamingException(\"No recorded service\");\n }\n\n protocolInfo = request.getProtocolInfo();\n requestedRate = request.getRate();\n requestedFrameTypes = request.getRequestedFrameTypesInTrickMode();\n \n //both range and timeseekrange may be open-ended (end time -1)\n if (request.isRangeHeaderIncluded() || request.isDtcpRangeHeaderIncluded())\n {\n //restricted range format (7.4.38.3) means start is required...http range start must be be less than end\n long requestedStartBytePosition = request.getStartBytePosition();\n //requestedEndBytePosition may be -1\n long requestedEndBytePosition = request.getEndBytePosition() > -1 ? request.getEndBytePosition() : -1;\n\n //start/end nanos are invalid when range header is provided\n if (log.isInfoEnabled())\n {\n log.info(\"range header provided - requested startByte: \" + requestedStartBytePosition\n + \", requested endByte: \" + requestedEndBytePosition + \", rate: \" + requestedRate);\n }\n transmitInfo = getTransmitInfoForRange(requestedStartBytePosition, requestedEndBytePosition, requestedRate);\n }\n else if (request.isTimeSeekRangeHeaderIncluded())\n {\n if (log.isInfoEnabled()) \n {\n log.info(\"timeSeekRange header provided - resolving start time position for startNanos: \" + request.getTimeSeekStartNanos() + \n \", endNanos: \" + request.getTimeSeekEndNanos() + \", rate: \" + requestedRate);\n }\n \n //timeseekrange format (7.4.40.3) start required, end optional, start must be less than end in forward scan, \n //end must be less than start in backward scan \n //timeseekrange header includes bytes= field, need to resolve byte offsets for the given\n //time values\n long requestedStartTimePosition = request.getTimeSeekStartNanos();\n long requestedStartBytePosition = getByteOffsetForRecordingNanos(request.getTimeSeekStartNanos());\n\n // Check if the TimeSeekRange for end byte is beyond the content\n // time range.\n long requestedEndTimePosition = 0L;\n long requestedEndBytePosition = 0L;\n if (checkForTimeSeekEndPosition(request.getTimeSeekStartNanos(), request.getTimeSeekEndNanos()))\n {\n if (log.isInfoEnabled()) \n {\n log.info(\"The requested time range is beyond the available seeek time range, so sending the total content size.\");\n }\n requestedEndTimePosition = getAvailableSeekEndTime().getNanoseconds();\n requestedEndBytePosition = getAvailableSeekEndByte(false);\n }\n else\n {\n // time seek end may be -1\n requestedEndTimePosition = request.getTimeSeekEndNanos() > -1 ? request.getTimeSeekEndNanos()\n : -1;\n requestedEndBytePosition = request.getTimeSeekEndNanos() > -1 ? getByteOffsetForRecordingNanos(request.getTimeSeekEndNanos())\n : request.getTimeSeekEndNanos();\n }//normalize positions based on time and rate \n \n if (log.isInfoEnabled()) \n {\n log.info(\"timeSeekRange header provided - resolved time positions for startNanos: \" + request.getTimeSeekStartNanos() + \", start time: \" + requestedStartTimePosition +\n \", endNanos: \" + request.getTimeSeekEndNanos() + \", end time: \" + requestedEndTimePosition + \", rate: \" + requestedRate);\n }\n if (log.isInfoEnabled())\n {\n log.info(\"timeSeekRange header provided - requested startByte: \" + requestedStartBytePosition\n + \", requested endByte: \" + requestedEndBytePosition);\n }\n transmitInfo = getTransmitInfoForTimeRange(requestedStartTimePosition, requestedEndTimePosition, \n requestedStartBytePosition, requestedEndBytePosition, requestedRate);\n }\n else\n {\n //no requested start or end byte position\n transmitInfo = new TransmitInfo(requestedRate);\n if (log.isDebugEnabled()) \n {\n log.debug(\"both range and timeSeekRangeHeader not provided - rate: \" + requestedRate);\n }\n }\n if (log.isInfoEnabled())\n {\n log.info(\"initial transmit info: \" + transmitInfo);\n }\n\n connectionId = request.getConnectionId();\n session = new HNServerSession(MediaServer.getServerIdStr());\n\n socket = request.getSocket();\n \n recordingChangedListener = new RecordingChangedListenerImpl(recordingItem);\n ((RecordingManager) ManagerManager.getInstance(RecordingManager.class)).getRecordingManager().addRecordingChangedListener(recordingChangedListener);\n \n //no need to keep reference to listener - it is removed in client#release\n TimeShiftWindowChangedListener timeShiftWindowChangedListener = new TimeShiftWindowChangedListenerImpl();\n client = recordingItem.getNewTSWClient(TimeShiftManager.TSWUSE_NETPLAYBACK, timeShiftWindowChangedListener);\n if (log.isDebugEnabled())\n {\n log.debug(\"getNewTSWClient returned: \" + client);\n }\n \n //listener released in session#releaseResources - no need to hold a reference \n session.setListener(new EDListenerImpl());\n\n connectionCompleteListener = new ConnectionCompleteListenerImpl(connectionId);\n MediaServer.getInstance().getCMS().addConnectionCompleteListener(connectionCompleteListener);\n }", "public ServerResponse<T> sendRequest()\n {\n return this.sendRequestWithMultiHeaders(Collections.emptyMap());\n }", "public InputStream getStream() {\n final CircularByteBuffer cbb = new CircularByteBuffer(1024);\n new Thread(\n new Runnable(){\n public void run(){\n ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream());\n Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos);\n\n try {\n if (zos != null) {\n zos.flush();\n zos.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n ).start();\n\n return cbb.getInputStream();\n }", "@Override\n public Call<Void> clone() {\n return new HttpCall(httpClient, endpoint, compressionEnabled, encodedSpans);\n }", "public String getStream(){\n return this.stream;\n }", "@Override\n public void stream(T data) {\n channel.write(new DataMessage<>(data));\n }", "public abstract <T> SerializationStream writeObject(T t);", "TypedRequest createTypedRequest();", "public Request(final FullHttpRequest request) {\n this.request = request;\n }", "public InputStream getInputStream() throws IOException {\n return body.getInputStream();\n }", "public InputStream getStream() {\n\t\treturn new ByteArrayInputStream(os.toByteArray());\n\t}", "public void sendStreamResponse(final Iterator<Record> rocksIterator) throws IOException {\n this.rocksIterator = rocksIterator;\n openStream();\n sendStream();\n if (!rocksIterator.hasNext()) {\n closeStream();\n }\n }", "public CStream get_stream() {\r\n\t\treturn new CStream(this);\r\n\t}", "@Override\n public ServletInputStream getInputStream() throws IOException {\n return new ServletInputStream() {\n private int lastIndexRetrieved = -1;\n private ReadListener readListener = null;\n\n @Override\n public boolean isFinished() {\n return (lastIndexRetrieved == bytes.length - 1);\n }\n\n @Override\n public boolean isReady() {\n // This implementation will never block\n // We also never need to call the readListener from this method, as this method will never return false\n return isFinished();\n }\n\n @Override\n public void setReadListener(ReadListener readListener) {\n this.readListener = readListener;\n if (!isFinished()) {\n try {\n readListener.onDataAvailable();\n } catch (IOException e) {\n readListener.onError(e);\n }\n } else {\n try {\n readListener.onAllDataRead();\n } catch (IOException e) {\n readListener.onError(e);\n }\n }\n }\n\n @Override\n public int read() throws IOException {\n int i;\n if (!isFinished()) {\n i = bytes[lastIndexRetrieved + 1];\n lastIndexRetrieved++;\n if (isFinished() && (readListener != null)) {\n try {\n readListener.onAllDataRead();\n } catch (IOException ex) {\n readListener.onError(ex);\n throw ex;\n }\n }\n return i;\n } else {\n return -1;\n }\n }\n };\n }", "public boolean hasRequestStreaming()\n {\n return requestStreaming;\n }", "@Override\n public WriteRequest getOriginalRequest() {\n return null;\n }", "public T getRequestData();", "public ClientStream delegate() {\n return newStream;\n }", "public java.net.HttpURLConnection buildConnectionWithStream(ohos.miscservices.httpaccess.data.RequestData r6) {\r\n /*\r\n // Method dump skipped, instructions count: 137\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: ohos.miscservices.httpaccess.HttpFetchImpl.buildConnectionWithStream(ohos.miscservices.httpaccess.data.RequestData):java.net.HttpURLConnection\");\r\n }", "public InputStream asByteStream() {\n return new ByteArrayInputStream(rawBytes);\n }", "private void sendRequest() throws IOException {\n\t\tHttpURLConnection urlConnection = getHttpURLConnection2(request.getServerUrl());\n\t\t\n\t\ttry {\n\t\t\tInputStream responseStream = null;\n\t final int serverResponseCode = urlConnection.getResponseCode();\n\t if (serverResponseCode / 100 == 2) {\n\t \tresponseStream = urlConnection.getInputStream();\n\t } else { // getErrorStream if the response code is not 2xx\n\t \tresponseStream = urlConnection.getErrorStream();\n\t }\n\t \n\t uploadLstener.onCompleted(uploadId, serverResponseCode, getResponseBodyAsString(responseStream));\n\t responseStream.close();\n\t\t} finally {\n\t\t\turlConnection.disconnect();\n\t\t}\n\t}", "public abstract void serialize(OutputStream stream, T object) throws IOException;", "public RequestDataBuilder trace() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.TRACE);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "public interface Request {\n public String toXml();\n\n\n public String getHandlerId();\n\n\n public String getRequestId();\n}", "public String getStreamContent() {\n return streamContent;\n }", "public SmsSendRequestDto() {\n super();\n }", "@Override\r\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn this.s.getInputStream();\r\n\t}", "public InputStream openHttp2Stream(URL url) throws IOException {\r\n return openHttpEntity(url).getContent();\r\n }", "public HttpRequest m() throws IOException {\n if (this.g) {\n this.f.a(\"\\r\\n--00content0boundary00\\r\\n\");\n } else {\n this.g = true;\n d(\"multipart/form-data; boundary=00content0boundary00\").l();\n this.f.a(\"--00content0boundary00\\r\\n\");\n }\n return this;\n }", "public final Http2FrameStream newStream() {\n/* 69 */ Http2FrameCodec codec = this.frameCodec;\n/* 70 */ if (codec == null) {\n/* 71 */ throw new IllegalStateException(StringUtil.simpleClassName(Http2FrameCodec.class) + \" not found. Has the handler been added to a pipeline?\");\n/* */ }\n/* */ \n/* 74 */ return codec.newStream();\n/* */ }", "public GetBulkStateRequest build() {\n GetBulkStateRequest request = new GetBulkStateRequest();\n request.setStoreName(this.storeName);\n request.setKeys(this.keys);\n request.setMetadata(this.metadata);\n request.setParallelism(this.parallelism);\n return request;\n }", "DataStreamApi getDataStreamApi();", "public <T extends DocWriteRequest<T>> T getRequestToExecute() {\n assert assertInvariants(ItemProcessingState.TRANSLATED);\n return (T) requestToExecute;\n }", "long request(MarketDataRequest inRequest,\n boolean inStreamEvents);", "public Builder setStream(boolean value) {\n \n stream_ = value;\n onChanged();\n return this;\n }", "void sendRequest(String invocationId, HttpRequest request);", "public interface DataStreamClient {\n\n Logger LOG = LoggerFactory.getLogger(DataStreamClient.class);\n\n /** Return Client id. */\n ClientId getId();\n\n /** Return Streamer Api instance. */\n DataStreamApi getDataStreamApi();\n\n /**\n * send to server via streaming.\n * Return a completable future.\n */\n\n /** To build {@link DataStreamClient} objects */\n class Builder {\n private ClientId clientId;\n private DataStreamClientRpc dataStreamClientRpc;\n private RaftProperties properties;\n private Parameters parameters;\n\n private Builder() {}\n\n public DataStreamClientImpl build(){\n if (clientId == null) {\n clientId = ClientId.randomId();\n }\n if (properties != null) {\n if (dataStreamClientRpc == null) {\n final SupportedDataStreamType type = RaftConfigKeys.DataStream.type(properties, LOG::info);\n dataStreamClientRpc = DataStreamClientFactory.cast(type.newFactory(parameters))\n .newDataStreamClientRpc(clientId, properties);\n }\n }\n return new DataStreamClientImpl(clientId, properties, dataStreamClientRpc);\n }\n\n public Builder setClientId(ClientId clientId) {\n this.clientId = clientId;\n return this;\n }\n\n public Builder setParameters(Parameters parameters) {\n this.parameters = parameters;\n return this;\n }\n\n public Builder setDataStreamClientRpc(DataStreamClientRpc dataStreamClientRpc){\n this.dataStreamClientRpc = dataStreamClientRpc;\n return this;\n }\n\n public Builder setProperties(RaftProperties properties) {\n this.properties = properties;\n return this;\n }\n }\n\n}", "protected ServletInputStream() { }", "public void saveToStream(OutputStream stream, Model model);", "@Override\r\n\tpublic InputStream getInStream() {\n\t\treturn inStreamServer;\r\n\t}", "public RequestDataBuilder put() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.PUT);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "private void requestLiveStreaming() throws IOException {\n\n String targetCamCode = dis.readUTF();\n\n Cam targetCam = CamRegister.findRegisteredCam(targetCamCode);\n\n try {\n DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream());\n\n targetDos.writeInt(LIVE_STREAMING_COMMAND);\n targetDos.writeUTF(camClient.getCamCode());\n targetDos.flush();\n\n dos.writeInt(SUCCESS_CODE);\n dos.flush();\n\n } catch (Exception e) {\n e.printStackTrace();\n dos.writeInt(NOT_FOUND_CODE);\n dos.flush();\n }\n }", "public interface AlexaHttpRequest {\n /**\n * @return the signature, base64 encoded.\n */\n String getBaseEncoded64Signature();\n\n /**\n * @return URL for the certificate chain needed to verify the request signature.\n */\n String getSigningCertificateChainUrl();\n\n /**\n * @return the request envelope, in serialized form.\n */\n byte[] getSerializedRequestEnvelope();\n\n /**\n * @return the request envelope, in deserialized form.\n */\n RequestEnvelope getDeserializedRequestEnvelope();\n}" ]
[ "0.58239996", "0.5439578", "0.5367305", "0.5349496", "0.52394223", "0.52272886", "0.52260137", "0.5158843", "0.51288605", "0.50900483", "0.5055913", "0.5029401", "0.50200844", "0.50134194", "0.49728763", "0.49676234", "0.49140248", "0.4901108", "0.48888585", "0.4815034", "0.47685096", "0.4748625", "0.4744851", "0.46759295", "0.46675256", "0.4657617", "0.4651175", "0.46501568", "0.46468893", "0.46445557", "0.4636993", "0.46317935", "0.46226898", "0.4616402", "0.46153077", "0.4614714", "0.46113715", "0.46035957", "0.46029785", "0.46006927", "0.4597444", "0.45807594", "0.45616096", "0.45590222", "0.45578507", "0.45531568", "0.4551206", "0.45262673", "0.45242178", "0.45202574", "0.4514373", "0.4503757", "0.45010996", "0.4496976", "0.44946858", "0.44873995", "0.44761238", "0.44634345", "0.44594008", "0.44548738", "0.44543895", "0.44513786", "0.44500977", "0.44498858", "0.44447646", "0.44307855", "0.43969595", "0.43963626", "0.43887198", "0.43835863", "0.43777496", "0.4375045", "0.437343", "0.43705288", "0.43677136", "0.435957", "0.43515968", "0.43472365", "0.43425208", "0.43362427", "0.4317817", "0.43162423", "0.43132755", "0.43121287", "0.4310015", "0.43044707", "0.43019474", "0.42983377", "0.42979175", "0.42969126", "0.42909583", "0.42873162", "0.42838395", "0.4276408", "0.42719537", "0.42686838", "0.4265124", "0.42638296", "0.42624468", "0.4260812" ]
0.7943792
0
Converts this object to the most appropriate http request type.
@NonNull HttpRequest toHttpRequest();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Type getType() {\n return Type.TypeRequest;\n }", "public String getRequestType() { return this.requestType; }", "public static String getRequestType(){\n return requestType;\n }", "public java.lang.String getRequestType() {\n return requestType;\n }", "public RequestType getRequestType(){\n\t\t\treturn this.type;\n\t\t}", "public SystemRequest(@NonNull RequestType requestType){\r\n\t\tthis();\r\n\t\tsetRequestType(requestType);\r\n\t}", "TypedRequest createTypedRequest();", "public abstract Class<? extends ModificationRequestBase> getRequestClass();", "public void setRequestType(RequestType requestType) {\n this.requestType = requestType;\n }", "public void setRequestType(java.lang.String requestType) {\n this.requestType = requestType;\n }", "public int getReqType()\r\n {\r\n return safeConvertInt(getAttribute(\"type\"));\r\n }", "private void setRequestMethod() {\n switch (type) {\n case GET:\n try {\n connection.setRequestMethod(GET);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as GET successfully\");\n LOG.severe(e.toString());\n }\n break;\n case POST:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(POST);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as POST successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PUT:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PUT);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PUT successfully\");\n LOG.severe(e.toString());\n }\n break;\n case DELETE:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(DELETE);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as DELETE successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PATCH:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PATCH);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PATCH successfully\");\n LOG.severe(e.toString());\n }\n break;\n }\n }", "HttpHeaderType createHttpHeaderType();", "public ZserioType getRequestType()\n {\n return requestType;\n }", "public T caseRequestBaseType(RequestBaseType object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getRequestType() {\n\t\treturn null;\n\t}", "private String determineRequestType(DocumentAccessBean argDocument) {\n\t\n\tString reqType = REQUESTTYPES.UNKNOWN;\n\n\ttry {\n\t\tint docType = determineDocType(argDocument);\n\t\tint fromStorageType = determineStorageType(argDocument.getFrom());\n\t\tint toStorageType = determineStorageType(argDocument.getTo());\n\t\tif ( (docType == DOCTYPES.I13NACT) && (1==1) )\n\t\t\treqType = REQUESTTYPES.O_INVEN1;\n\t\telse if ( (docType == DOCTYPES.CHANGEACT) && (fromStorageType == STORAGETYPES.EXPEDITOR) )\n\t\t\treqType = REQUESTTYPES.O_ZAMEN1;\n\t\telse if ( (docType == DOCTYPES.CHANGEACT) && ( \n\t\t\t(fromStorageType == STORAGETYPES.POSITION) || (fromStorageType == STORAGETYPES.STORAGE) ) )\n\t\t\treqType = REQUESTTYPES.O_ZAMEN2;\n\t\telse if ( (docType == DOCTYPES.EXT_IN) && (toStorageType == STORAGETYPES.STORAGE) )\n\t\t\treqType = REQUESTTYPES.O_VPRIX1;\n\t\telse if ( (docType == DOCTYPES.EXT_OUT) && (fromStorageType == STORAGETYPES.STORAGE) )\n\t\t\treqType = REQUESTTYPES.O_VRASX1;\n\t\telse if ( (docType == DOCTYPES.INT_IN) && (fromStorageType == STORAGETYPES.EXPEDITOR) )\n\t\t\treqType = REQUESTTYPES.O_VPRIX2;\n\t\telse if ( (docType == DOCTYPES.PAYOFF) && (fromStorageType == STORAGETYPES.STORAGE) )\n\t\t\treqType = REQUESTTYPES.O_SPIS1;\n\t\telse if ( (docType == DOCTYPES.EXT_IN) && (toStorageType == STORAGETYPES.STORAGE) )\n\t\t\treqType = REQUESTTYPES.O_VPRIX1;\n\t\telse if ( (docType == DOCTYPES.EXT_OUT) && (fromStorageType == STORAGETYPES.STORAGE) )\n\t\t\treqType = REQUESTTYPES.O_VRASX1;\n\t\telse if ( ( (docType == DOCTYPES.INT_IN) || (docType == DOCTYPES.BLOK_IN) )&& (fromStorageType == STORAGETYPES.EXPEDITOR) )\n\t\t\treqType = REQUESTTYPES.O_VPRIX2;\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"PLATINUM-SYNC: Cannot determine PIE request type\");\n\t\te.printStackTrace(System.out);\n\t}\n\t\t\n\tlogIt(\"Determine PIE query type, type=\" + reqType);\n\treturn reqType;\n}", "@ApiModelProperty(example = \"PostAuthTransaction\", required = true, value = \"Object name of the secondary transaction request.\")\n\n public String getRequestType() {\n return requestType;\n }", "public HTTPRequestMethod getMethod();", "public teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType() {\n teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type result = teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.valueOf(type_);\n return result == null ? teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.UNRECOGNIZED : result;\n }", "public teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType() {\n teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type result = teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.valueOf(type_);\n return result == null ? teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.UNRECOGNIZED : result;\n }", "public String getRequestType() {\r\n return (String) getAttributeInternal(REQUESTTYPE);\r\n }", "public interface RequestType {\n String GET = \"GET\";\n String POST = \"POST\";\n String UPDATE = \"UPDATE\";\n String DELETE = \"DELETE\";\n String DEFAULT = \"DEFAULT\";\n}", "<T extends Response> T send(Request request, Class<T> responseType) throws IOException;", "public SchemaType getRequestSchemaType()\n {\n return requestSchemaType;\n }", "static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }", "public void setRequestType(String value) {\r\n setAttributeInternal(REQUESTTYPE, value);\r\n }", "protected abstract HttpUriRequest getHttpUriRequest();", "public Converter<?, RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) {\n/* 38 */ if (String.class.equals(type)) {\n/* 39 */ return new Converter<String, RequestBody>()\n/* */ {\n/* */ public RequestBody convert(String value) throws IOException {\n/* 42 */ return RequestBody.create(ToStringConverterFactory.MEDIA_TYPE, value);\n/* */ }\n/* */ };\n/* */ }\n/* 46 */ return null;\n/* */ }", "@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}", "@Override\n protected String inferProtocol() {\n return \"http\";\n }", "@Override\n public ElementMatcher<TypeDescription> typeMatcher() {\n return named(\"com.google.api.client.http.HttpRequest\");\n }", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "private Response toRequestedType(int id, String type) {\n\tPrediction pred = plist.find(id);\n\tif (pred == null) {\n\t String msg = id + \" is a bad ID.\\n\";\n\t return Response.status(Response.Status.BAD_REQUEST).\n\t\t entity(msg).\n\t\t type(MediaType.TEXT_PLAIN).\n\t\t build();\n\t}\n\telse if (type.contains(\"json\"))\n\t return Response.ok(toJson(pred), type).build();\n\telse\n\t return Response.ok(pred, type).build(); // toXml is automatic\n }", "@Override\n\tprotected Set<RequestTypeEnum> provideAllowableRequestTypes() {\n\t\treturn Collections.singleton(RequestTypeEnum.POST);\n\t}", "@Override\n public String getBodyContentType() {\n return \"application/x-www-form-urlencoded; charset=UTF-8\";\n }", "@SuppressWarnings(\"deprecation\")\n\tprotected static HttpUriRequest createHttpRequest(Request<?> request, Map<String, String> additionalHeaders) throws AuthFailureError {\n\t\tswitch (request.getMethod()) {\n\t\tcase Method.DEPRECATED_GET_OR_POST: {\n\t\t\t// This is the deprecated way that needs to be handled for backwards compatibility.\n\t\t\t// If the request's post body is null, then the assumption is that the request is\n\t\t\t// GET. Otherwise, it is assumed that the request is a POST.\n\t\t\tbyte[] postBody = request.getPostBody();\n\t\t\tif (postBody != null) {\n\t\t\t\tHttpPost postRequest = new HttpPost(request.getUrl());\n\t\t\t\tpostRequest.addHeader(HEADER_CONTENT_TYPE, request.getPostBodyContentType());\n\t\t\t\tHttpEntity entity;\n\t\t\t\tentity = new ByteArrayEntity(postBody);\n\t\t\t\tpostRequest.setEntity(entity);\n\t\t\t\treturn postRequest;\n\t\t\t} else {\n\t\t\t\treturn new HttpGet(request.getUrl());\n\t\t\t}\n\t\t}\n\t\tcase Method.GET:\n\t\t\treturn new HttpGet(request.getUrl());\n\t\tcase Method.DELETE:\n\t\t\treturn new HttpDelete(request.getUrl());\n\t\tcase Method.POST: {\n\t\t\tHttpPost postRequest = new HttpPost(request.getUrl());\n\t\t\tpostRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());\n\t\t\tsetEntityIfNonEmptyBody(postRequest, request);\n\t\t\treturn postRequest;\n\t\t}\n\t\tcase Method.PUT: {\n\t\t\tHttpPut putRequest = new HttpPut(request.getUrl());\n\t\t\tputRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());\n\t\t\tsetEntityIfNonEmptyBody(putRequest, request);\n\t\t\treturn putRequest;\n\t\t}\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Unknown request method.\");\n\t\t}\n\t}", "RequestStatusType createRequestStatusType();", "teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType();", "public ChangeUserTypeRequest getChangeUserTypeRequest(HttpServletRequest req) {\n\t\tString requestId = (String) req.getParameter(\"requestId\");\n\t\t\n\t\t// Create the ChangeUserTypeRequest object\n\t\tChangeUserTypeRequest changeUserTypeRequest = new ChangeUserTypeRequest();\n\t\tchangeUserTypeRequest.setUsername(req.getParameter(\"name\" + requestId));\n\t\tchangeUserTypeRequest.setEmailAddress(req.getParameter(\"emailAddress\" + requestId));\n\t\tchangeUserTypeRequest.setNewUserType(req.getParameter(\"userType\" + requestId));\n\t\t\n\t\treturn changeUserTypeRequest;\n\t\t\n\t}", "public interface IRequest {\n\t/**\n\t * This method creates request based on operationType and parameter object.\n\t * @param opType operation type of the request to be created.\n\t * @param params List of parameters to be sent along with the request.\n\t */\n\tvoid createRequest(EnumOperationType opType, IParameter parameter);\n\t\n\t/**\n\t * This method retrieves operation type of the the request.\n\t * \n\t * @return operation type\n\t */\n\tEnumOperationType getOperationType();\n\t\n\t/**\n\t * This method retrieves the parameters object configured for the request.\n\t */\n\tIParameter getParameter();\n\t\n\t/**\n\t * This method allows user to get configured request in XML.\n\t * \n\t * @return\n\t * @throws Exception \n\t */\n\tpublic String getRequestInXML() throws Exception;\n\t\n\t/**\n\t * This method parses XML and creates a request object out of it. \n\t */\n\tpublic void parseXML(String XML);\n\t\n\tpublic void setId(String id);\n\t\n\tpublic String getId();\n}", "public default Class<?> getRequestType() {\n Class<?> clazz = this.getClass();\n /* Simple case that this class directly implements the interface */\n for (Type interfaze : clazz.getGenericInterfaces()) {\n if (interfaze instanceof ParameterizedType) {\n ParameterizedType parameterizedInterface = (ParameterizedType) interfaze;\n if (parameterizedInterface.getRawType()\n .equals(IRequestHandler.class)) {\n Type actualParameterType = parameterizedInterface\n .getActualTypeArguments()[0];\n if (actualParameterType instanceof Class) {\n return (Class<?>) actualParameterType;\n }\n return null;\n\n }\n }\n }\n Type superType = clazz.getGenericSuperclass();\n if (!(superType instanceof ParameterizedType)) {\n /*\n * The type of request must be a generic parameter on the super\n * type. Which means that the type of request to handle is not\n * inherited, it must be declared directly on this class.\n */\n return null;\n }\n\n Class<?> superClass = clazz.getSuperclass();\n Type[] actualTypeArguments = ((ParameterizedType) superType)\n .getActualTypeArguments();\n TypeVariable<?>[] typeParameters = superClass.getTypeParameters();\n\n Map<Type, Type> resolvedTypes = new HashMap<>();\n for (int i = 0; i < actualTypeArguments.length; i++) {\n resolvedTypes.put(typeParameters[i], actualTypeArguments[i]);\n }\n /*\n * Loop over the super types, matching generic parameters on the class\n * to generic parameters on the superclass. The loop terminates if no\n * generic parameters can be matched.\n */\n while (!resolvedTypes.isEmpty()) {\n for (Type interfaze : superClass.getGenericInterfaces()) {\n if (interfaze instanceof ParameterizedType) {\n ParameterizedType parameterizedInterface = (ParameterizedType) interfaze;\n if (parameterizedInterface.getRawType()\n .equals(IRequestHandler.class)) {\n Type actualParameterType = parameterizedInterface\n .getActualTypeArguments()[0];\n actualParameterType = resolvedTypes\n .get(actualParameterType);\n if (actualParameterType instanceof Class) {\n return (Class<?>) actualParameterType;\n }\n return null;\n }\n }\n }\n superType = clazz.getGenericSuperclass();\n if (!(superType instanceof ParameterizedType)) {\n return null;\n }\n superClass = superClass.getSuperclass();\n actualTypeArguments = ((ParameterizedType) superType)\n .getActualTypeArguments();\n typeParameters = superClass.getTypeParameters();\n /*\n * Match generic parameters on this superclass back to the\n * parameters on the original class.\n */\n Map<Type, Type> deepResolvedTypes = new HashMap<>();\n for (int i = 0; i < actualTypeArguments.length; i++) {\n Type resolvedType = resolvedTypes.get(actualTypeArguments[i]);\n if (resolvedType != null) {\n deepResolvedTypes.put(typeParameters[i], resolvedType);\n }\n }\n resolvedTypes = deepResolvedTypes;\n }\n return null;\n }", "public interface NettyHttpRequestBuilder {\n /**\n * Converts this object to a full http request.\n *\n * @return a full http request\n */\n @NonNull\n FullHttpRequest toFullHttpRequest();\n\n /**\n * Converts this object to a streamed http request.\n * @return The streamed request\n */\n @NonNull\n StreamedHttpRequest toStreamHttpRequest();\n\n /**\n * Converts this object to the most appropriate http request type.\n * @return The http request\n */\n @NonNull\n HttpRequest toHttpRequest();\n\n /**\n * @return Is the request a stream.\n */\n boolean isStream();\n\n /**\n * Convert the given request to a full http request.\n * @param request The request\n * @return The full request.\n */\n static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }\n\n}", "public String getRequestMethod(){\n return this.requestMethod;\n }", "@Override\n\tpublic void setHTTPMODE(HttpMethod httpmodel) {\n\t\tthis.httpmodel = httpmodel;\n\t}", "public GenericWSRequest(int requestId, int requestType, HttpServletRequest req, HttpServletResponse res, ServletConfig config, ServletContext servletContext) {\n super(requestId, null);\n this.requestType = requestType;\n this.httpServletRequest = req;\n this.httpServletRespone = res;\n this.servletConfig = config;\n this.servletContext = servletContext;\n }", "MovilizerRequest getRequestFromString(String requestString);", "public void setRequestType(String category){\n requestType = category;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Property\n public native MintRequestType getRequestType ();", "protected HTTPRequest createHTTPRequest(HTTPFaxClientSpi faxClientSpi, FaxActionType faxActionType,\n Enum<?> templateNameEnum, FaxJob faxJob) {\n // get template name string\n String templateName = templateNameEnum.toString();\n\n // get template\n String template = this.httpRequestTemplateMap.get(templateName);\n\n HTTPRequest httpRequest = null;\n if (template != null) {\n // format template\n String content = this.formatTemplate(template, faxJob);\n\n // format resource\n String resource = this.formatHTTPResource(faxClientSpi, faxActionType, faxJob);\n\n // format URL parameters\n String parametersText = this.formatHTTPURLParameters(faxClientSpi, faxJob);\n\n // create HTTP request\n httpRequest = new HTTPRequest();\n\n // setup HTTP request\n httpRequest.setResource(resource);\n httpRequest.setContent(content);\n httpRequest.setParametersText(parametersText);\n }\n\n return httpRequest;\n }", "public interface RequestModifier {\n\n /**\n * Set HTTP request method, only support get, post,put , delete method.\n *\n * @param method\n *\n */\n public void setMethod(HTTPMethod method);\n\n /**\n * Set HTTP Protocol.\n *\n * @param protocol\n *\n */\n public void setProtocol(String protocol);\n\n /**\n * Set HTTP version , such as HTTP1.1.\n *\n * @param version\n *\n */\n public void setVersion(String version);\n\n /**\n * Set HTTP domain.\n *\n * @param domain\n *\n */\n public void setDomain(String domain);\n\n /**\n * Set path in the url.\n *\n * @param path\n *\n */\n public void setPath(String path);\n\n /**\n * Set web server port\n *\n * @param port\n *\n */\n public void setPort(int port);\n\n /**\n * Set HTTP url\n *\n * @param url\n *\n */\n public void setUrl(URL url);\n\n /**\n * Set HTTP url string\n *\n * @param url\n *\n */\n public void setUrl(String url);\n\n /**\n * Modify the exist argument in url.\n *\n * @param urlArg\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyURIArgContent(URLArg urlArg);\n\n /**\n * Modify the exist header in HTTP request headers.\n *\n * @param header\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyHeaderContent(Header header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void addHeader(String key, String header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void delHeader(String key);\n\n /**\n * Add the post arg in request header, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addPostArg(String key, String value);\n\n /**\n * Add the url arg in request url, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addUrlArg(String key, String value);\n}", "@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }", "void processRequest(RequestInfo<T, O> requestInfo, Class<T> TClass, Class<O> OClass, boolean invalidateCache);", "public Request<E, T> buildHttpPost ()\n\t{\n\t\treturn new HttpPostRequest<E, T>(this);\n\t}", "public Builder setType(teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n type_ = value.getNumber();\n onChanged();\n return this;\n }", "public GWIRequest(int method, Map<String, String> params,\n String url, Object request,\n Type resType,\n Response.Listener<R> listener,\n Response.ErrorListener errorListener, Gson gson) {\n super(method, url, errorListener);\n mParams = params;\n mBodyRequest = request;\n this.mResType = resType;\n this.mListener = listener;\n if (gson == null) {\n mGson = new GsonBuilder().registerTypeAdapter(Date.class,\n new DotNetDateAdapter()).setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE).create();\n } else {\n mGson = gson;\n }\n }", "Request _request(String operation);", "com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();", "public proto.MessagesProtos.ClientRequest.MessageType getType() {\n\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\tproto.MessagesProtos.ClientRequest.MessageType result = proto.MessagesProtos.ClientRequest.MessageType.valueOf(type_);\n\t\t\t\treturn result == null ? proto.MessagesProtos.ClientRequest.MessageType.UNRECOGNIZED : result;\n\t\t\t}", "public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}", "public proto.MessagesProtos.ClientRequest.MessageType getType() {\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\tproto.MessagesProtos.ClientRequest.MessageType result = proto.MessagesProtos.ClientRequest.MessageType.valueOf(type_);\n\t\t\treturn result == null ? proto.MessagesProtos.ClientRequest.MessageType.UNRECOGNIZED : result;\n\t\t}", "String getHttpMethod();", "String getHttpMethod();", "private void generalRequest(LocalRequestType type) {\n\n\t\tPosition carPosition = null;\n\n\t\tif (Storage.getInstance().getCarPosition().isPresent()) {\n\t\t\tcarPosition = Storage.getInstance().getCarPosition().get();\n\t\t}\n\n\t\tLocalRequest request = new LocalRequest(\"id\" + this.requestIndex, type, Storage.getInstance().getUserPosition(),\n\t\t\t\tcarPosition, this.privateReplyChannel);\n\t\tthis.requestIndex++;\n\t\tGson gson = new GsonBuilder().create();\n\t\tString json = gson.toJson(request);\n\t\ttry {\n\t\t\tchannel.basicPublish(R.LOCAL_INTERACTIONS_CHANNEL, \"\", null, json.getBytes());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Request(String typeString, String path, String portString, String versionString) throws UnknownRequestException, UnknownHTTPVersionException, URISyntaxException{\n\t\t\tpath = new URI(Parser.convertToReadableURL(path)).getPath();\n\t\t\tif (path.length() == 0){\n\t\t\t\tpath = \"/\";\n\t\t\t}\n\t\t\t\n\t\t\tthis.path = path;\n\t\t\tthis.version = Parser.extractVersion(versionString);\n\t\t\tthis.type = Parser.extractType(typeString);\n\t\t\tList<String> content = new ArrayList<String>();\n\t\t\tsetContent(content);\n\t\t}", "@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }", "public GWIRequest(int method, Map<String, String> params,\n String url, Object request,\n Type resType,\n Response.Listener<R> listener,\n Response.ErrorListener errorListener) {\n super(method, url, errorListener);\n mParams = params;\n mBodyRequest = request;\n this.mResType = resType;\n this.mListener = listener;\n mGson = new GsonBuilder().registerTypeAdapter(Date.class, new DotNetDateAdapter()).setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)\n .create();\n }", "public String getRequestMethod()\n {\n return requestMethod;\n }", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "public interface RequestInfo {\n\n /**\n * Sets status for the request\n * @param status\n */\n void setStatus(STATUS status);\n\n /**\n * @return status of the request\n */\n STATUS getStatus();\n\n /**\n * @return unique id of the request\n */\n Long getId();\n\n /**\n * @return list of errors for this request if any\n */\n List<? extends ErrorInfo> getErrorInfo();\n\n /**\n * @return number of retries available for this request\n */\n int getRetries();\n\n /**\n * @return number of already executed attempts\n */\n int getExecutions();\n\n /**\n * @return command name for this request\n */\n String getCommandName();\n\n /**\n * @return business key assigned to this request\n */\n String getKey();\n\n /**\n * @return descriptive message assigned to this request\n */\n String getMessage();\n\n /**\n * @return time that this request shall be executed (for the first attempt)\n */\n Date getTime();\n\n /**\n * @return serialized bytes of the contextual request data\n */\n byte[] getRequestData();\n\n /**\n * @return serialized bytes of the response data\n */\n byte[] getResponseData();\n \n /**\n * @return optional deployment id in case this job is scheduled from within process context\n */\n String getDeploymentId();\n \n /**\n * @return optional process instance id in case this job is scheduled from within process context\n */\n Long getProcessInstanceId();\n \n /**\n * @return get priority assigned to this job request\n */\n int getPriority();\n}", "public Request<E, T> buildHttpGet ()\n\t{\n\t\treturn new HttpGetRequest<E,T>(this);\n\t}", "protected static Dispatcher of(Class<?> type) {\n if (type == void.class) {\n return VOID;\n } else if (type == boolean.class) {\n return BOOLEAN;\n } else if (type == byte.class) {\n return BYTE;\n } else if (type == short.class) {\n return SHORT;\n } else if (type == char.class) {\n return CHARACTER;\n } else if (type == int.class) {\n return INTEGER;\n } else if (type == long.class) {\n return LONG;\n } else if (type == float.class) {\n return FLOAT;\n } else if (type == double.class) {\n return DOUBLE;\n } else if (type.isArray()) {\n if (type.getComponentType() == boolean.class) {\n return OfPrimitiveArray.BOOLEAN;\n } else if (type.getComponentType() == byte.class) {\n return OfPrimitiveArray.BYTE;\n } else if (type.getComponentType() == short.class) {\n return OfPrimitiveArray.SHORT;\n } else if (type.getComponentType() == char.class) {\n return OfPrimitiveArray.CHARACTER;\n } else if (type.getComponentType() == int.class) {\n return OfPrimitiveArray.INTEGER;\n } else if (type.getComponentType() == long.class) {\n return OfPrimitiveArray.LONG;\n } else if (type.getComponentType() == float.class) {\n return OfPrimitiveArray.FLOAT;\n } else if (type.getComponentType() == double.class) {\n return OfPrimitiveArray.DOUBLE;\n } else {\n return OfNonPrimitiveArray.of(type.getComponentType());\n }\n } else {\n return REFERENCE;\n }\n }", "proto.MessagesProtos.ClientRequest.MessageType getType();", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }", "@Override\n protected Response handleRequest(Request request) throws IOException {\n String path = request.getParameter(PATH);\n Resource res = request.getResource();\n String type = res.getValueMap().get(TYPE, String.class);\n Response answer;\n if(COMPONENTS.equals(type)) {\n answer = findComponents(request);\n } else if(TEMPLATES.equals(type)) {\n answer = findTemplates(request);\n } else if(OBJECTS.equals(type)) {\n answer = findObjects(request);\n } else {\n answer = new ErrorResponse().setHttpErrorCode(SC_BAD_REQUEST).setErrorMessage(UNKNOWN_TYPE + type);\n }\n return answer;\n }", "public interface IRequest<T, O> {\r\n /**\r\n * Call back interface method for processing the Server Request\r\n *\r\n * @param requestInfo - RequestInfo Object which holds all the required Request Details\r\n */\r\n void processRequest(RequestInfo<T, O> requestInfo, Class<T> TClass, Class<O> OClass, boolean invalidateCache);\r\n\r\n void registerListener(INetworkListener networkListener);\r\n\r\n boolean cancelRequest();\r\n}", "public interface HttpMimeType {\n\n\t// Image\n \n public static final String APNG_IMAGE = \"image/apng\";\n \n public static final String BMP_IMAGE = \"image/bmp\";\n\n\tpublic static final String GIF_IMAGE = \"image/gif\";\n\t\n\tpublic static final String ICO_IMAGE = \"image/ico\";\n\n\tpublic static final String JPEG_IMAGE = \"image/jpeg\";\n\n\tpublic static final String JPG_IMAGE = \"image/jpg\";\n\n public static final String PNG_IMAGE = \"image/png\";\n\n\tpublic static final String SVG_IMAGE = \"image/svg+xml\";\n\n\tpublic static final String TIFF_IMAGE = \"image/tiff\";\n\t\n\tpublic static final String WEBP_IMAGE = \"image/webp\";\n\n\t// text formats\n\n\tpublic static final String TEXT_PLAIN = \"text/plain\";\n\n\tpublic static final String CSV = \"text/csv\";\n\n\tpublic static final String CSS = \"text/css\";\n\n\tpublic static final String HTML = \"text/html\";\n\n\tpublic static final String JAVASCRIPT = \"text/javascript\";\n\n\tpublic static final String RTF = \"text/rtf\";\n\n\tpublic static final String XML = \"text/xml\";\n\n\t// document formats\n\n\tpublic static final String JSON = \"application/json\";\n\n\tpublic static final String ATOM = \"application/atom+xml\";\n\n\tpublic static final String PDF = \"application/pdf\";\n\n\tpublic static final String POSTSCRIPT = \"application/postscript\";\n\n\tpublic static final String XLS = \"application/vnd.ms-excel\";\n\n\tpublic static final String XLSX = \"application/vnd.ms-excel\";\n\n\tpublic static final String PPT = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String PPTX = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String XPS = \"application/vnd.ms-xpsdocument\";\n\n\t// binary\n\n\tpublic static final String BINARY = \"application/octet-stream\";\n\n\t// music ones\n\n\tpublic static final String MP4_AUDIO = \"audio/mp4\";\n\n\tpublic static final String MP3_AUDIO = \"audio/mpeg\";\n\n\tpublic static final String OGG_VORBIS_AUDIO = \"audio/ogg\";\n\n\tpublic static final String OPUS_AUDIO = \"audio/opus\";\n\n\tpublic static final String VORBIS_AUDIO = \"audio/vorbis\";\n\n\tpublic static final String WEBM_AUDIO = \"audio/webm\";\n\n\t// video\n\n\tpublic static final String MPEG_VIDEO = \"video/mpeg\";\n\n\tpublic static final String MP4_VIDEO = \"video/mp4\";\n\n\tpublic static final String OGG_THEORA_VIDEO = \"video/ogg\";\n\n\tpublic static final String QUICKTIME_VIDEO = \"video/quicktime\";\n\n\tpublic static final String WEBM_VIDEO = \"video/webm\";\n\n\t// feeds\n\n\tpublic static final String RDF = \"application/rdf+xml\";\n\n\tpublic static final String RSS = \"application/rss+xml\";\n\n}", "public abstract boolean isAppropriateRequest(Request request);", "void createRequest(EnumOperationType opType, IParameter parameter);", "public ServerRequest(final String requestType, final String requestURL,\n final ServerRequestData requestContent,\n final Class<T> responseClass) {\n mRequestType = requestType;\n mRequestURL = requestURL;\n mRequestContent = requestContent;\n mResponseClass = responseClass;\n }", "private Object deserializeObjectFromRequest(String mimeInputFormat,\n\t\tIWebSerialDeserial serialDeserial)\n\t{\n\t\tWebRequest servletRequest = AbstractRestResource.getCurrentWebRequest();\n\n\t\treturn serialDeserial.requestToObject(servletRequest, parameterClass, mimeInputFormat);\n\t}", "@Override\n protected ResponseEntity<Object> handleHttpMediaTypeNotSupported(\n HttpMediaTypeNotSupportedException ex,\n HttpHeaders headers,\n HttpStatus status,\n WebRequest request) {\n\n LOGGER.info(\"handleHttpMediaTypeNotSupported\");\n return new ResponseEntity<>(new ErrorDto(\"handleHttpMediaTypeNotSupported\"), HttpStatus.UNSUPPORTED_MEDIA_TYPE);\n }", "EchoedRequestType createEchoedRequestType();", "@java.lang.Override public speech.multilang.Params.ScoringControllerParams.Type getType() {\n @SuppressWarnings(\"deprecation\")\n speech.multilang.Params.ScoringControllerParams.Type result = speech.multilang.Params.ScoringControllerParams.Type.valueOf(type_);\n return result == null ? speech.multilang.Params.ScoringControllerParams.Type.UNKNOWN : result;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.czht.face.recognition.Czhtdev.Request, com.czht.face.recognition.Czhtdev.Request.Builder, com.czht.face.recognition.Czhtdev.RequestOrBuilder> \n getRequestFieldBuilder() {\n if (requestBuilder_ == null) {\n requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.czht.face.recognition.Czhtdev.Request, com.czht.face.recognition.Czhtdev.Request.Builder, com.czht.face.recognition.Czhtdev.RequestOrBuilder>(\n getRequest(),\n getParentForChildren(),\n isClean());\n request_ = null;\n }\n return requestBuilder_;\n }", "@java.lang.Override\n public speech.multilang.Params.ScoringControllerParams.Type getType() {\n @SuppressWarnings(\"deprecation\")\n speech.multilang.Params.ScoringControllerParams.Type result = speech.multilang.Params.ScoringControllerParams.Type.valueOf(type_);\n return result == null ? speech.multilang.Params.ScoringControllerParams.Type.UNKNOWN : result;\n }", "private String getContentType(String sHTTPRequest) {\n String sContentType = \"Content-Type: \";\n\n // update based on file extension or if response starts with HTML/URL\n String sFileExtension = getFileExtension(sHTTPRequest);\n if (sFileExtension.equalsIgnoreCase(\".html\") || sFileExtension.equalsIgnoreCase(\".htm\")) {\n sContentType += \"text/html\";\n } else if (sFileExtension.equalsIgnoreCase(\".txt\")) {\n sContentType += \"text/plain\";\n } else if (sFileExtension.equalsIgnoreCase(\".pdf\")) {\n sContentType += \"application/pdf\";\n } else if (sFileExtension.equalsIgnoreCase(\".png\")) {\n sContentType += \"image/png\";\n } else if (sFileExtension.equalsIgnoreCase(\".jpeg\") || sFileExtension.equalsIgnoreCase(\".jpg\")) {\n sContentType += \"image/jpeg\";\n } else {\n sContentType += \"text/html\"; // default response\n }\n\n // return final content type\n return sContentType;\n }", "@Override\n\tpublic WebApiRequest getRequest() {\n\t\tString category = \"\";\n\t\tString destination = \"\";\n\t\tJSONObject para = new JSONObject();\n\t\tif (taskFlag == GET_BALANCE_DETAIL_FLAG) {\n\t\t\tcategory = CATEGORY_NAME;\n\t\t\tdestination = GET_BALANCE_Detail;\n\t\t\ttry {\n\t\t\t\tpara.put(\"ID\", getIntent().getIntExtra(\"BalanceID\", 0));\n\t\t\t\tpara.put(\"CardType\", getIntent().getIntExtra(\"CardType\", 1));\n\t\t\t\tpara.put(\"ChangeType\", getIntent().getIntExtra(\"ChangeType\", 0));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tWebApiHttpHead header = mApp.createNeededCheckingWebConnectHead(category, destination, para.toString());\n\t\tWebApiRequest request = new WebApiRequest(category, destination,para.toString(), header);\n\t\treturn request;\n\t}", "@java.lang.Override public speech.multilang.Params.ForwardingControllerParams.Type getType() {\n @SuppressWarnings(\"deprecation\")\n speech.multilang.Params.ForwardingControllerParams.Type result = speech.multilang.Params.ForwardingControllerParams.Type.valueOf(type_);\n return result == null ? speech.multilang.Params.ForwardingControllerParams.Type.UNKNOWN : result;\n }", "private HttpUriRequest createHttpRequest(String url, String method,\n\t\t\tList<NameValuePair> params) throws UnsupportedEncodingException {\n\t\tHttpUriRequest request;\n\t\tif (method.toUpperCase().equals(\"GET\")) {\n\t\t\trequest = new HttpGet(url);\n\t\t} else if (method.toUpperCase().equals(\"POST\")) {\n\t\t\tHttpPost post = new HttpPost(url);\n\t\t\tpost.setEntity(new UrlEncodedFormEntity(params));\n\t\t\trequest = post;\n\t\t} else if (method.toUpperCase().equals(\"PUT\")) {\n\t\t\trequest = new HttpPut(url);\n\t\t} else if (method.toUpperCase().equals(\"DELETE\")) {\n\t\t\trequest = new HttpDelete(url);\n\t\t} else {\n\t\t\trequest = new HttpGet();\n\t\t}\n\n\t\treturn request;\n\t}", "protected static AbstractMessage getMergeRequestInstanceByCode(int typeCode) {\n switch (typeCode) {\n case MessageType.TYPE_GLOBAL_BEGIN:\n return new GlobalBeginRequest();\n case MessageType.TYPE_GLOBAL_COMMIT:\n return new GlobalCommitRequest();\n case MessageType.TYPE_GLOBAL_ROLLBACK:\n return new GlobalRollbackRequest();\n case MessageType.TYPE_GLOBAL_STATUS:\n return new GlobalStatusRequest();\n case MessageType.TYPE_GLOBAL_LOCK_QUERY:\n return new GlobalLockQueryRequest();\n case MessageType.TYPE_BRANCH_REGISTER:\n return new BranchRegisterRequest();\n case MessageType.TYPE_BRANCH_STATUS_REPORT:\n return new BranchReportRequest();\n default:\n throw new IllegalArgumentException(\"not support typeCode,\" + typeCode);\n }\n }", "public void setRequestSchemaType(SchemaType requestSchemaType)\n {\n this.requestSchemaType = requestSchemaType;\n }", "protected abstract MediaType getSupportedMediaType();", "BaseResource(RequestContext.RequestType requestType, RequestParser<HttpHeaders> parser) {\n this.requestType = requestType;\n this.parser = parser;\n }", "@java.lang.Override\n public speech.multilang.Params.ForwardingControllerParams.Type getType() {\n @SuppressWarnings(\"deprecation\")\n speech.multilang.Params.ForwardingControllerParams.Type result = speech.multilang.Params.ForwardingControllerParams.Type.valueOf(type_);\n return result == null ? speech.multilang.Params.ForwardingControllerParams.Type.UNKNOWN : result;\n }", "public HTTPRequest createHTTPRequest(HTTPFaxClientSpi faxClientSpi, FaxActionType faxActionType, FaxJob faxJob) {\n FaxJob2HTTPRequestConverterConfigurationConstants templateName = null;\n switch (faxActionType) {\n case SUBMIT_FAX_JOB:\n templateName = FaxJob2HTTPRequestConverterConfigurationConstants.SUBMIT_FAX_JOB_TEMPLATE_PROPERTY_KEY;\n break;\n case SUSPEND_FAX_JOB:\n templateName = FaxJob2HTTPRequestConverterConfigurationConstants.SUSPEND_FAX_JOB_TEMPLATE_PROPERTY_KEY;\n break;\n case RESUME_FAX_JOB:\n templateName = FaxJob2HTTPRequestConverterConfigurationConstants.RESUME_FAX_JOB_TEMPLATE_PROPERTY_KEY;\n break;\n case CANCEL_FAX_JOB:\n templateName = FaxJob2HTTPRequestConverterConfigurationConstants.CANCEL_FAX_JOB_TEMPLATE_PROPERTY_KEY;\n break;\n case GET_FAX_JOB_STATUS:\n templateName = FaxJob2HTTPRequestConverterConfigurationConstants.GET_FAX_JOB_STATUS_TEMPLATE_PROPERTY_KEY;\n break;\n default:\n throw new FaxException(\"Fax action type: \" + faxActionType + \" not supported.\");\n }\n\n // create HTTP request\n HTTPRequest httpRequest = this.createHTTPRequest(faxClientSpi, faxActionType, templateName, faxJob);\n\n return httpRequest;\n }", "@Override\n public DependencyGraphRequest readFrom(Class<DependencyGraphRequest> type,\n Type genericType,\n Annotation[] annotations,\n MediaType mediaType,\n MultivaluedMap<String, String> httpHeaders,\n InputStream entityStream) throws IOException, WebApplicationException {\n return new DependencyGraphRequest(0, 0);\n }", "public static Type getByHttpName(String httpName) {\n/* 126 */ if (httpName == null) return null; \n/* 127 */ return byName.get(httpName.toUpperCase(Locale.ROOT));\n/* */ }" ]
[ "0.63118106", "0.6218617", "0.5825573", "0.5815982", "0.5807164", "0.57620466", "0.5754156", "0.5718194", "0.56688225", "0.5617435", "0.56014365", "0.5538676", "0.5537839", "0.5500276", "0.5486624", "0.54669154", "0.5390886", "0.5388457", "0.5351325", "0.5337475", "0.5325841", "0.5323008", "0.5310349", "0.5308611", "0.5303806", "0.5274461", "0.52665", "0.52642995", "0.5242618", "0.5239316", "0.523664", "0.52275705", "0.52188987", "0.5135951", "0.5125024", "0.5122288", "0.51003563", "0.5098802", "0.5081185", "0.50633156", "0.5049353", "0.50480014", "0.5042787", "0.5009134", "0.49749696", "0.49577376", "0.49250302", "0.48918146", "0.48681256", "0.48553267", "0.48335534", "0.48289916", "0.4828586", "0.4826341", "0.4811967", "0.4808147", "0.47975892", "0.478086", "0.47744584", "0.47712246", "0.4770022", "0.47699904", "0.47608605", "0.47608605", "0.47528857", "0.47514713", "0.47500882", "0.4738324", "0.47283486", "0.4719992", "0.47189137", "0.4717577", "0.4711108", "0.469869", "0.46936458", "0.46811548", "0.46753415", "0.4673381", "0.46722645", "0.46656418", "0.4664183", "0.4653771", "0.46435627", "0.46417904", "0.46375537", "0.4636449", "0.46308288", "0.46302754", "0.46276844", "0.4622149", "0.46206746", "0.4615037", "0.46078137", "0.46074647", "0.460488", "0.46015838", "0.4592367", "0.4589894", "0.45866692", "0.4586399" ]
0.50584894
40
Convert the given request to a full http request.
static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) { Objects.requireNonNull(request, "The request cannot be null"); while (request instanceof HttpRequestWrapper) { request = ((HttpRequestWrapper<?>) request).getDelegate(); } if (request instanceof NettyHttpRequestBuilder) { return ((NettyHttpRequestBuilder) request).toHttpRequest(); } // manual conversion HttpRequest nettyRequest; ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null); if (byteBuf != null) { nettyRequest = new DefaultFullHttpRequest( HttpVersion.HTTP_1_1, HttpMethod.valueOf(request.getMethodName()), request.getUri().toString(), byteBuf ); } else { nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.valueOf(request.getMethodName()), request.getUri().toString() ); } request.getHeaders() .forEach((s, strings) -> nettyRequest.headers().add(s, strings)); return nettyRequest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NonNull\n HttpRequest toHttpRequest();", "void projectUriRequest(Request request);", "MovilizerRequest getRequestFromString(String requestString);", "public interface NettyHttpRequestBuilder {\n /**\n * Converts this object to a full http request.\n *\n * @return a full http request\n */\n @NonNull\n FullHttpRequest toFullHttpRequest();\n\n /**\n * Converts this object to a streamed http request.\n * @return The streamed request\n */\n @NonNull\n StreamedHttpRequest toStreamHttpRequest();\n\n /**\n * Converts this object to the most appropriate http request type.\n * @return The http request\n */\n @NonNull\n HttpRequest toHttpRequest();\n\n /**\n * @return Is the request a stream.\n */\n boolean isStream();\n\n /**\n * Convert the given request to a full http request.\n * @param request The request\n * @return The full request.\n */\n static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }\n\n}", "protected abstract HttpUriRequest getHttpUriRequest();", "static Request parseRequest(InputStream in) throws IOException {\n\t\tRequestLine request = readRequestLine(in);\n\t\tHeaders headers = readHeaders(in);\n\t\tlong length = -1;\n\t\tInputStream body;\n\t\tif (HeaderValue.CHUNKED.equals(headers.get(HeaderName.TRANSFER_ENCODING))) {\n\t\t\tbody = new ChunkedInputStream(in);\n\t\t} else {\n\t\t\tString header = headers.get(HeaderName.CONTENT_LENGTH);\n\t\t\tlength = header == null ? 0 : Long.parseLong(header);\n\t\t\tbody = new LimitedInputStream(in, length);\n\t\t}\n\t\treturn new Request(request.method(), request.target(), request.path(), request.query(), headers, length, body);\n\t}", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "@SuppressWarnings(\"deprecation\")\n\tprotected static HttpUriRequest createHttpRequest(Request<?> request, Map<String, String> additionalHeaders) throws AuthFailureError {\n\t\tswitch (request.getMethod()) {\n\t\tcase Method.DEPRECATED_GET_OR_POST: {\n\t\t\t// This is the deprecated way that needs to be handled for backwards compatibility.\n\t\t\t// If the request's post body is null, then the assumption is that the request is\n\t\t\t// GET. Otherwise, it is assumed that the request is a POST.\n\t\t\tbyte[] postBody = request.getPostBody();\n\t\t\tif (postBody != null) {\n\t\t\t\tHttpPost postRequest = new HttpPost(request.getUrl());\n\t\t\t\tpostRequest.addHeader(HEADER_CONTENT_TYPE, request.getPostBodyContentType());\n\t\t\t\tHttpEntity entity;\n\t\t\t\tentity = new ByteArrayEntity(postBody);\n\t\t\t\tpostRequest.setEntity(entity);\n\t\t\t\treturn postRequest;\n\t\t\t} else {\n\t\t\t\treturn new HttpGet(request.getUrl());\n\t\t\t}\n\t\t}\n\t\tcase Method.GET:\n\t\t\treturn new HttpGet(request.getUrl());\n\t\tcase Method.DELETE:\n\t\t\treturn new HttpDelete(request.getUrl());\n\t\tcase Method.POST: {\n\t\t\tHttpPost postRequest = new HttpPost(request.getUrl());\n\t\t\tpostRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());\n\t\t\tsetEntityIfNonEmptyBody(postRequest, request);\n\t\t\treturn postRequest;\n\t\t}\n\t\tcase Method.PUT: {\n\t\t\tHttpPut putRequest = new HttpPut(request.getUrl());\n\t\t\tputRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());\n\t\t\tsetEntityIfNonEmptyBody(putRequest, request);\n\t\t\treturn putRequest;\n\t\t}\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Unknown request method.\");\n\t\t}\n\t}", "protected HttpServletRequest modifyRequest(HttpServletRequest request) {\n return new HttpServletRequestWrapper(request) {\n @Override\n public String getRequestURI() {\n StringBuffer uri = new StringBuffer(this.getPathInfo());\n if (this.getQueryString().length() > 0) {\n uri.append(\"?\").append(this.getQueryString());\n }\n return uri.toString();\n }\n @Override\n public String getPathInfo() {\n return (String)this.getRequest().getAttribute(RackPortlet.PORTLET_REQUEST_PATH);\n }\n @Override\n public String getQueryString() {\n return (String)this.getRequest().getAttribute(RackPortlet.PORTLET_REQUEST_QUERY);\n }\n @Override public String getServletPath() { return \"\"; }\n @Override public ServletInputStream getInputStream() { return new EmptyServletInputStream(); }\n };\n }", "@NonNull\n FullHttpRequest toFullHttpRequest();", "public Request(final FullHttpRequest request) {\n this.request = request;\n }", "void projectSurveyUriRequest(Request request);", "private HttpUriRequest createHttpRequest(String url, String method,\n\t\t\tList<NameValuePair> params) throws UnsupportedEncodingException {\n\t\tHttpUriRequest request;\n\t\tif (method.toUpperCase().equals(\"GET\")) {\n\t\t\trequest = new HttpGet(url);\n\t\t} else if (method.toUpperCase().equals(\"POST\")) {\n\t\t\tHttpPost post = new HttpPost(url);\n\t\t\tpost.setEntity(new UrlEncodedFormEntity(params));\n\t\t\trequest = post;\n\t\t} else if (method.toUpperCase().equals(\"PUT\")) {\n\t\t\trequest = new HttpPut(url);\n\t\t} else if (method.toUpperCase().equals(\"DELETE\")) {\n\t\t\trequest = new HttpDelete(url);\n\t\t} else {\n\t\t\trequest = new HttpGet();\n\t\t}\n\n\t\treturn request;\n\t}", "public String prepareRequestToHost(Object request) {\n\t\tString clRequest = null;\n\t\tUserAuthRequestAndTXLifeRequest userRequest = ((NbaTXLife) request).getTXLife().getUserAuthRequestAndTXLifeRequest();\n\t\tif (userRequest != null && userRequest.getTXLifeRequestCount() > 0) {\n\t\t\tTXLifeRequest txRequest = userRequest.getTXLifeRequestAt(0);\n\t\t\tlong transType = txRequest.getTransType();\n\t\t\tlong transSubType = txRequest.getTransSubType();\n\t\t\tif (transType == NbaOliConstants.TC_TYPE_NEWBUSSUBMISSION && transSubType == NbaOliConstants.TC_SUBTYPE_BACKEND_PRINT) {\n\t\t\t\t// TODO determine why a new instance of this same class is needed\n\t\t\t\tNbaCyberPrintRequests cyberRequest = new NbaCyberPrintRequests();\n\t\t\t\ttry {\n\t\t\t\t\tclRequest = cyberRequest.createPrintRequest((NbaTXLife) request);\n\t\t\t\t} catch (NbaBaseException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(new NbaBaseException(\"Invalid Print Type Requested\"));\n\t\t\t}\n\t\t\tgetLogger().logDebug(clRequest);\n\t\t}\n\t\treturn clRequest;\n\t}", "public static String getRequestUrlAsHttp(HttpServletRequest argRequest) {\r\n\t\tStringBuffer requestURL = argRequest.getRequestURL();\r\n\t\tString queryString = argRequest.getQueryString();\r\n\t\tif (requestURL != null) {\r\n\t\t\tif (queryString != null && !queryString.isEmpty()) {\r\n\t\t\t\trequestURL.append(HttpConstants.QMARK).append(queryString);\r\n\t\t\t}\r\n\t\t\tString result = requestURL.toString();\r\n\t\t\t// result = result.replace(\"https://\", \"http://\");\r\n\t\t\tresult = StringUtils.replace(result, \"https://\", \"http://\");\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "String getRequest();", "public static Payload convert(Request request) {\n \n Metadata newMeta = Metadata.newBuilder().setType(request.getClass().getSimpleName())\n .setClientIp(NetUtils.localIP()).putAllHeaders(request.getHeaders()).build();\n \n byte[] jsonBytes = convertRequestToByte(request);\n \n Payload.Builder builder = Payload.newBuilder();\n \n return builder\n .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes)))\n .setMetadata(newMeta).build();\n \n }", "@Override\n public OutgoingRequest createOutgoingRequest(DriverRequest originalRequest, String uri, boolean proxy) {\n HttpHost physicalHost = UriUtils.extractHost(uri);\n\n if (!originalRequest.isExternal()) {\n if (preserveHost) {\n // Preserve host if required\n HttpHost virtualHost = HttpRequestHelper.getHost(originalRequest.getOriginalRequest());\n // Rewrite the uri with the virtualHost\n uri = UriUtils.rewriteURI(uri, virtualHost);\n } else {\n uri = UriUtils.rewriteURI(uri, firstBaseUrlHost);\n }\n }\n\n RequestConfig.Builder builder = RequestConfig.custom();\n builder.setConnectTimeout(connectTimeout);\n builder.setSocketTimeout(socketTimeout);\n\n // Use browser compatibility cookie policy. This policy is the closest\n // to the behavior of a real browser.\n builder.setCookieSpec(CustomBrowserCompatSpecFactory.CUSTOM_BROWSER_COMPATIBILITY);\n\n builder.setRedirectsEnabled(false);\n RequestConfig config = builder.build();\n\n OutgoingRequestContext context = new OutgoingRequestContext();\n\n String method = \"GET\";\n if (proxy) {\n method = originalRequest.getOriginalRequest().getRequestLine().getMethod().toUpperCase();\n }\n OutgoingRequest outgoingRequest =\n new OutgoingRequest(method, uri, originalRequest.getOriginalRequest().getProtocolVersion(),\n originalRequest, config, context);\n if (ENTITY_METHODS.contains(method)) {\n outgoingRequest.setEntity(originalRequest.getOriginalRequest().getEntity());\n } else if (!SIMPLE_METHODS.contains(method)) {\n throw new UnsupportedHttpMethodException(method + \" \" + uri);\n }\n\n context.setPhysicalHost(physicalHost);\n context.setOutgoingRequest(outgoingRequest);\n context.setProxy(proxy);\n\n return outgoingRequest;\n }", "private Request build() {\n Request.Builder builder =\n new Request.Builder().cacheControl(new CacheControl.Builder().noCache().build());\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();\n for (Map.Entry<String, String> entry : queryParams.entrySet()) {\n urlBuilder = urlBuilder.addEncodedQueryParameter(entry.getKey(), entry.getValue());\n }\n builder = builder.url(urlBuilder.build());\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder = builder.header(entry.getKey(), entry.getValue());\n }\n\n RequestBody body = (bodyBuilder == null) ? null : bodyBuilder.build();\n builder = builder.method(method.name(), body);\n\n return builder.build();\n }", "public static HashMap<String, String> generateRequest (String request){\n LOGGER.info(\"Request generator got line => \" + request);\n /**\n * we split on spaces as that is the http convention\n */\n String[] brokenDownRequest = request.split(\" \");\n\n /**\n * creating anf then filling up the request hashmap\n */\n HashMap<String, String> parsedRequest = new HashMap<>();\n parsedRequest.put(\"Type\", brokenDownRequest[0]);\n parsedRequest.put(\"Path\", brokenDownRequest[1]);\n parsedRequest.put(\"HttpVersion\", brokenDownRequest[2]);\n\n /**\n * returning the request hashmap\n */\n return parsedRequest;\n }", "Request _request(String operation);", "public Response sendRequest(Request request) {\n return null;\n }", "public static Payload convert(Request request, RequestMeta meta) {\n //meta.\n Payload.Builder payloadBuilder = Payload.newBuilder();\n Metadata.Builder metaBuilder = Metadata.newBuilder();\n if (meta != null) {\n metaBuilder.putAllHeaders(request.getHeaders()).setType(request.getClass().getSimpleName());\n }\n metaBuilder.setClientIp(NetUtils.localIP());\n payloadBuilder.setMetadata(metaBuilder.build());\n \n // request body .\n byte[] jsonBytes = convertRequestToByte(request);\n return payloadBuilder\n .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes)))\n .build();\n \n }", "@Override\n\tpublic void updateRequest(Request request) {\n\n\t\tString requestBody = request.getBodyAsString();\n\t\tif ( (requestBody == null)\n\t\t || (requestBody.trim().isEmpty()) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tboolean toArguments = true;\n\t\tXMLRequestParser parser = new XMLwithAttributesParser(request,toArguments);\n\n\t\ttry {\n\t\t\tparser.parseXml().saveResultsToRequest();\n\t\t} catch (IOException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t} catch (SAXException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t}\n\t}", "@NonNull\n StreamedHttpRequest toStreamHttpRequest();", "private static HttpRequest buildRequest(final URI uri, final String host) {\n FullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n getHttpMethod(), uri.getRawPath());\n request.headers().set(HttpHeaderNames.HOST, host);\n request.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);\n request.headers().set(HttpHeaderNames.ACCEPT_ENCODING,\n HttpHeaderValues.GZIP);\n request.headers().set(HttpHeaderNames.CONTENT_TYPE,\n \"application/json; charset=UTF-8\");\n\n // Set some example cookies.\n request.headers().set(HttpHeaderNames.COOKIE,\n ClientCookieEncoder.STRICT.encode(\n new DefaultCookie(\"my-cookie\", \"foo\"),\n new DefaultCookie(\"another-cookie\", \"bar\")));\n\n // set content\n final ByteBuf buffer = request.content().clear();\n final String json = \"hello, json\";\n int p0 = buffer.writerIndex();\n buffer.writeBytes(json.getBytes(CharsetUtil.UTF_8));\n int p1 = buffer.writerIndex();\n request.headers().set(HttpHeaderNames.CONTENT_LENGTH,\n Integer.toString(p1 - p0));\n\n return request;\n }", "@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}", "String getRequest(String url);", "public GrizzletRequest getRequest();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "public Request <String, ArrayList<Connection>> buildHttpContactRequest ()\n\t{\n\t\tHttpBuilder<String, ArrayList<Connection>> builder = new HttpBuilder<String, ArrayList<Connection>>(null, getApiKey());\n\t\t\n\t\tif (this.getAuthInfo() != null)\n\t\t\tbuilder.setAuthInfo(this.getAuthInfo().getBytes());\n\t\t\n\t\tif (this.getPath() != null)\n\t\t\tbuilder.setPath(this.getPath());\n\t\t\n\t\treturn new HttpContactRequest(builder);\n\t}", "public static void remapRequest(HttpServletRequest request) throws Exception {\n Request connectorReq = (Request) request;\n\n MappingData mappingData = connectorReq.getMappingData();\n mappingData.recycle();\n\n connectorReq.getConnector().\n getMapper().map(connectorReq.getCoyoteRequest().serverName(),\n connectorReq.getCoyoteRequest().decodedURI(), null,\n mappingData);\n\n connectorReq.setContext((Context) connectorReq.getMappingData().context);\n connectorReq.setWrapper((Wrapper) connectorReq.getMappingData().wrapper);\n }", "String requestToString(MovilizerRequest request);", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "void request(RequestParams params);", "public LoggerRequestWapper(HttpServletRequest request) {\n //异常,此时request在下面已经被读取了,所以创给父类在读取会报错\n super(request);\n ServletInputStream in = null;\n StringBuilder builder = new StringBuilder();\n try {\n in = request.getInputStream();\n byte[] buf = new byte[1024];\n int index = in.read(buf);\n while (index != -1) {\n builder.append(new String(buf, 0, index));\n index = in.read(buf);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n// java.io.IOException: Stream closed 这一块不要关闭输入流,关闭流就意味着不可读了,随便你保留了body,但是框架依旧认为是不可读\n// try {\n//// in.close();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }\n\n body = builder.toString();\n\n System.out.println(\"body = \" + body);\n\n }", "private void mergeRequest(net.iGap.proto.ProtoRequest.Request value) {\n if (request_ != null &&\n request_ != net.iGap.proto.ProtoRequest.Request.getDefaultInstance()) {\n request_ =\n net.iGap.proto.ProtoRequest.Request.newBuilder(request_).mergeFrom(value).buildPartial();\n } else {\n request_ = value;\n }\n \n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static String buildSyntheticRequestUrl(HttpServletRequest request)\n {\n StringBuilder url = new StringBuilder(request.getRequestURL());\n\n String queryString;\n if (METHOD_GET.equalsIgnoreCase(request.getMethod()))\n {\n queryString = request.getQueryString();\n }\n else\n {\n queryString = queryStringFromParameters(request);\n }\n\n if (!StringUtils.isBlank(queryString))\n {\n url.append('?').append(queryString);\n }\n\n return url.toString();\n }", "private static String toCurl(HttpUriRequest request, boolean logAuthToken)\n throws IOException {\n StringBuilder builder = new StringBuilder();\n\n builder.append(\"curl \");\n\n for (Header header : request.getAllHeaders()) {\n if (!logAuthToken\n && (header.getName().equals(\"Authorization\") || header\n .getName().equals(\"Cookie\"))) {\n continue;\n }\n builder.append(\"--header \\\"\");\n builder.append(header.toString().trim());\n builder.append(\"\\\" \");\n }\n\n URI uri = request.getURI();\n\n // If this is a wrapped request, use the URI from the original\n // request instead. getURI() on the wrapper seems to return a\n // relative URI. We want an absolute URI.\n if (request instanceof RequestWrapper) {\n HttpRequest original = ((RequestWrapper) request).getOriginal();\n if (original instanceof HttpUriRequest) {\n uri = ((HttpUriRequest) original).getURI();\n }\n }\n\n builder.append(\"\\\"\");\n builder.append(uri);\n builder.append(\"\\\"\");\n\n if (request instanceof HttpEntityEnclosingRequest) {\n HttpEntityEnclosingRequest entityRequest = (HttpEntityEnclosingRequest) request;\n HttpEntity entity = entityRequest.getEntity();\n if (entity != null && entity.isRepeatable()) {\n if (entity.getContentLength() < 1024) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n entity.writeTo(stream);\n String entityString = stream.toString();\n\n // TODO: Check the content type, too.\n builder.append(\" --data-ascii \\\"\").append(entityString)\n .append(\"\\\"\");\n } else {\n builder.append(\" [TOO MUCH DATA TO INCLUDE]\");\n }\n }\n }\n\n return builder.toString();\n }", "private void sendRequest(Request request) {\n\t\tif (url==null) {\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tif (request.cmd==null) {\n\t\t\t// allows running custom request in Postman thread\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tif (request.requiresServerToken && this.serverToken==null) {\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tJSONObject answer = null;\n\t\ttry {\n\t\t\tHttpURLConnection conn = createHttpURLConnection(url);\n\t\t\tconn.setUseCaches(false);\n\t\t\tconn.setRequestProperty(\"connection\", \"close\"); // disable keep alive\n\t\t\tconn.setRequestMethod(\"POST\");\n\t\t\tif (serverToken!=null) {\n\t\t\t\tconn.setRequestProperty(\"X-EPILOG-SERVER-TOKEN\", serverToken);\n\t\t\t}\n\t\t\tconn.setRequestProperty(\"X-EPILOG-COMMAND\", request.cmd);\n\t\t\tconn.setRequestProperty(\"X-EPILOG-VERSION\", this.plugin.version);\n\t\t\tconn.setRequestProperty(\"X-EPILOG-TIME\", \"\"+System.currentTimeMillis());\n\t\t\tJSONObject info = request.info;\n\t\t\tinfo.put(\"logSendLimit\", this.logSendLimit);\n\t\t\tinfo.put(\"logCacheSize\", this.logQueue.size() + this.pendingLogs.size());\n\t\t\tinfo.put(\"nLogs\", request.data==null ? 0 : request.data.size());\n\t\t\tconn.setRequestProperty(\"X-EPILOG-INFO\", info.toString());\n\t\t\tconn.setDoOutput(true);\n\t\t\t\n\t\t\tGZIPOutputStream out = new GZIPOutputStream(conn.getOutputStream());\n\t\t\tif (request.data!=null) {\n\t\t\t\tfor (JSONObject json : request.data) {\n\t\t\t\t\tout.write(json.toString().getBytes());\n\t\t\t\t\tout.write(0xA); // newline\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t\tInputStream in = conn.getInputStream();\n\t\t\tString response = convertStreamToString(in);\n\t\t\tin.close();\n\t\t\tconn.disconnect();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tanswer = new JSONObject(response);\n\t\t\t\thandleRequestResponse(answer);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthis.plugin.getLogger().warning(\"invalid server response\");\n\t\t\t\tthis.plugin.getLogger().log(Level.INFO, response);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tboolean success = answer!=null;\n\t\tif (success) {\n\t\t\tString status = answer.optString(\"status\");\n\t\t\tif (!status.equalsIgnoreCase(\"ok\")) {\n\t\t\t\tsuccess = false;\n\t\t\t\tthis.plugin.getLogger().warning(\"server error\");\n\t\t\t\tthis.plugin.getLogger().log(Level.INFO, answer.toString());\n\t\t\t}\n\t\t}\n\t\trequest.response(success, answer);\n\t}", "Call mo35727a(Request request);", "public static Request parseRequest(BufferedReader input) throws IOException, IllegalStateException, SocketException\n {\n Request request = new Request();\n String line;\n Matcher matcher;\n\n // Parsing request method & uri\n if ((line = input.readLine()) == null) throw new SocketException(\"Client disconnected\");\n\n matcher = regexMethod.matcher(line);\n if (matcher.find()) {\n request.method = RtspMethod.valueOf(matcher.group(1));\n request.uri = matcher.group(2);\n LogHelper.e(TAG, \"Line: \" + line);\n LogHelper.e(TAG, \"Parsing request method & uri: \" + request.method + \" --> \" + request.uri);\n\n // Parsing headers of the request\n while ((line = input.readLine()) != null && line.length() > 3) {\n matcher = regexHeader.matcher(line);\n if (matcher.find()) {\n request.headers.put(matcher.group(1).toLowerCase(Locale.US), matcher.group(2));\n LogHelper.e(TAG, \"Parsing headers of the request: \" + line + \" | \" +\n matcher.group(1).toLowerCase(Locale.US) + \" --> \" + matcher.group(2));\n }\n }\n if (line == null) throw new SocketException(\"Client disconnected\");\n\n // It's not an error, it's just easier to follow what's happening in logcat with the request in red\n LogHelper.e(TAG, request.method + \" \" + request.uri);\n }\n\n return request;\n }", "public CalculationRequest(String rawRequest_)\n\t{\n\t\trawRequest = rawRequest_;\n\t}", "void setRequest(Request req);", "public Request<E, T> buildHttpGet ()\n\t{\n\t\treturn new HttpGetRequest<E,T>(this);\n\t}", "private CustomRequest getCustomRequestFor(HttpRequest aRequest,\n Handler aHandler) {\n int lRequestMapped = mapToVolleyMethodCode(aRequest.getMethod());\n RequestComposite lMap = new RequestComposite();\n lMap.setHttpReq(aRequest);\n Handler lHandler = aHandler == null ? mainHandler : aHandler;\n Listener<String> lListener = getListenerForRequest(lMap, lHandler);\n Response.ErrorListener lErrorListener = getErrorListenerForRequest(lMap,\n lHandler);\n CustomRequest lReq = new CustomRequest(lRequestMapped,\n aRequest.getUrl(), lListener, lErrorListener, aRequest);\n // update the reference in the map.\n lMap.setVolleyReq(lReq);\n return lReq;\n }", "net.iGap.proto.ProtoRequest.Request getRequest();", "@Override\r\n\t\t\tprotected Vector prepareRequests(ACLMessage request) {\n\t\t\t\tString incomingRequestKey = (String) ((AchieveREResponder) parent).REQUEST_KEY;\r\n\t\t\t\tACLMessage incomingRequest = (ACLMessage) getDataStore().get(incomingRequestKey);\r\n\t\t\t\t// Prepare the request to forward to the responder\r\n\t\t\t\tSystem.out.println(\"Agent \"+getLocalName()+\": Forward the request to \"+bestOffer.getName());\r\n\t\t\t\tACLMessage outgoingRequest = new ACLMessage(ACLMessage.REQUEST);\r\n\t\t\t\toutgoingRequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\t\toutgoingRequest.addReceiver(bestOffer);\r\n\t\t\t\toutgoingRequest.setContent(incomingRequest.getContent());\r\n\t\t\t\toutgoingRequest.setReplyByDate(incomingRequest.getReplyByDate());\r\n\t\t\t\tVector v = new Vector(1);\r\n\t\t\t\tv.addElement(outgoingRequest);\r\n\t\t\t\treturn v;\r\n\t\t\t}", "public HttpEntity generateEntity(HttpEntityEnclosingRequestBase httpRequest) {\n ArrayList<NameValuePair> params = new ArrayList<NameValuePair>();\n Iterator<Map.Entry<String, String>> it = petition.getEntityMap()\n .entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<String, String> e = (Entry<String, String>) it.next();\n String key = URLEncoder.encode(e.getKey());\n String value;\n value = e.getValue();\n params.add(new BasicNameValuePair(key, value));\n }\n UrlEncodedFormEntity ent = null;\n try {\n ent = new UrlEncodedFormEntity(params);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n return ent;\n\n }", "public static String getRequestUri(HttpServletRequest request) {\n String uri = (String) request.getAttribute(FORWARD_REQUEST_URI_ATTRIBUTE);\n if (uri == null) {\n uri = (String) request.getAttribute(INCLUDE_REQUEST_URI_ATTRIBUTE);\n }\n if (uri == null) {\n uri = request.getRequestURI();\n }\n return normalize(decodeAndCleanUriString(request, uri));\n }", "public void handleRequest(Request request)\n {\n Request proxied = new Request(extractMethodName(request.getMethodName()), request.getParams()).withResponseBlock(request.getResponseBlock());\n proxied.setIdentifier(request.getIdentifier());\n receiver.handleMessage(proxied.toJsonString());\n }", "public Request<E, T> buildHttpPost ()\n\t{\n\t\treturn new HttpPostRequest<E, T>(this);\n\t}", "public String getRequest() {\n Object ref = request_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n request_ = s;\n }\n return s;\n }\n }", "static RequestLine readRequestLine(InputStream in) throws IOException {\n\t\tString line = readLine(in, true);\n\t\tString[] parts = line.split(\" \");\n\t\tif (parts.length != 3) {\n\t\t\tthrow new WebException(StatusCode.BAD_REQUEST, \"invalid request line: \" + line);\n\t\t}\n\t\tString method = parts[0];\n\t\tString target = parts[1];\n\t\tString path = target;\n\t\tString query = null;\n\t\tint index = target.indexOf('?');\n\t\tif (index != -1) {\n\t\t\tpath = target.substring(0, index);\n\t\t\tquery = target.substring(index + 1);\n\t\t}\n\t\treturn new RequestLine(method, target, path, query);\n\t}", "private ObjectNode makeRequest(final String api) {\n ObjectNode req = JSON.objectNode();\n req.put(\"api\", api);\n return req;\n }", "public void setHttpRequest( HttpRequest req ) {\r\n\trequest=req;\r\n }", "public String getRequest() {\n Object ref = request_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n request_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public HttpServerRequest parseRequestBuffer(ByteBuffer buffer, HttpServerRequest result) {\n\n\t\tif (result == null) {\n\t\t\tresult = new HttpServerRequest();\n\t\t}\n\t\tint status = 1;\n\t\tHttpParsingContext context = result.getContext();\n\t\tcontext.setBuffer(buffer);\n\n\t\tif (context.chunkSize > 0) {\n\t\t\tstatus = pushChunkToBody(buffer, result, context);\n\t\t}\n\t\t// Copy body data to the request bodyBuffer\n\t\tif (context.isbodyFound() && result.getContentLength() > 0) {\n\t\t\tpushRemainingToBody(context.buffer, result.getBodyBuffer(), result.getContentLength());\n\t\t\tstatus = 0;\n\t\t}\n\n\t\t// while no errors and buffer not finished\n\t\twhile ((status = lexer.nextToken(context)) > 0) {\n\t\t\tswitch (context.currentType) {\n\t\t\tcase REQUEST_METHOD: {\n\t\t\t\tresult.setMethod(HttpVerb.valueOf(context.getTokenValue().toUpperCase()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase REQUEST_URI: {\n\t\t\t\tresult.setURI(context.getTokenValue());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HTTP_VERSION: {\n\t\t\t\tresult.setVersion(context.getTokenValue());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HEADER_NAME: {\n\t\t\t\tcontext.persistHeaderName();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase HEADER_VALUE: {\n\t\t\t\tresult.pushToHeaders(context.getLastHeaderName(), context.getTokenValue());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase BODY: {\n\t\t\t\tresult.initKeepAlive();\n\t\t\t\t// Copy body data to the request bodyBuffer\n\t\t\t\tif (result.getContentLength() > 0) {\n\t\t\t\t\tpushRemainingToBody(context.buffer, result.getBodyBuffer(), result.getContentLength());\n\t\t\t\t\tstatus = 0;\n\t\t\t\t} else if (result.isChunked() && !context.chunked) {\n\t\t\t\t\tcontext.chunked = true;\n\t\t\t\t\tcontext.currentType = HttpParsingContext.TokenType.CHUNK_OCTET;\n\t\t\t\t\tresult.buildChunkedBody();\n\t\t\t\t} else { // BODY Found on chunked encoding so request done\n\t\t\t\t\tstatus = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CHUNK_OCTET: {\n\t\t\t\tString[] parts = context.getTokenValue().split(\";\");\n\t\t\t\tif (parts.length > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcontext.chunkSize = Integer.parseInt(parts[0].trim(), 16);\n\t\t\t\t\t\tif (context.chunkSize == 0) {// Last Chunk gets 0 so we\n\t\t\t\t\t\t\t// can try to read footers\n\t\t\t\t\t\t\tcontext.currentType = HttpParsingContext.TokenType.HTTP_VERSION;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult.incrementChunkSize(context.chunkSize);\n\t\t\t\t\t\t\tcontext.incrementAndGetPointer();\n\t\t\t\t\t\t\tstatus = pushChunkToBody(buffer, result, context);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t// Error while reading size BadFormat :p\n\t\t\t\t\t\tstatus = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tif (status <= 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\t// There was an error while parsing request\n\t\tif (status < 0) {\n\t\t\tresult = MalFormedHttpRequest.instance;\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n\tpublic WebApiRequest getRequest() {\n\t\tString category = \"\";\n\t\tString destination = \"\";\n\t\tJSONObject para = new JSONObject();\n\t\tif (taskFlag == GET_BALANCE_DETAIL_FLAG) {\n\t\t\tcategory = CATEGORY_NAME;\n\t\t\tdestination = GET_BALANCE_Detail;\n\t\t\ttry {\n\t\t\t\tpara.put(\"ID\", getIntent().getIntExtra(\"BalanceID\", 0));\n\t\t\t\tpara.put(\"CardType\", getIntent().getIntExtra(\"CardType\", 1));\n\t\t\t\tpara.put(\"ChangeType\", getIntent().getIntExtra(\"ChangeType\", 0));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tWebApiHttpHead header = mApp.createNeededCheckingWebConnectHead(category, destination, para.toString());\n\t\tWebApiRequest request = new WebApiRequest(category, destination,para.toString(), header);\n\t\treturn request;\n\t}", "Request(Request otherRequest) {\n this.reqNum = otherRequest.reqNum;\n this.reqText = otherRequest.reqText;\n this.reqExampleDocs = new ArrayList<ExampleDocument>(otherRequest.reqExampleDocs);\n }", "public void setRequest(REQ request) {\n this.request = request;\n }", "protected TrellisRequest getRequest() {\n return request;\n }", "public void setRequest(final String request) {\n this.request = request;\n }", "@Override\n public String getRequestURI() {\n if (httpRequest instanceof HttpRequestImpl) {\n return strip(context, ((HttpRequestImpl) httpRequest).requestRawPath());\n }\n return strip(context, super.getRequestURI());\n }", "static String request(String requestMethod, String input, String endURL)\n {\n StringBuilder result;\n result = new StringBuilder();\n try\n {\n String targetURL = firstURL + endURL;\n URL ServiceURL = new URL(targetURL);\n HttpURLConnection httpConnection = (HttpURLConnection) ServiceURL.openConnection();\n httpConnection.setRequestMethod(requestMethod);\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\");\n httpConnection.setDoOutput(true);\n\n switch (requestMethod) {\n case \"POST\":\n\n httpConnection.setDoInput(true);\n OutputStream outputStream = httpConnection.getOutputStream();\n outputStream.write(input.getBytes());\n outputStream.flush();\n\n result = new StringBuilder(\"1\");\n break;\n case \"GET\":\n\n BufferedReader responseBuffer = new BufferedReader(new InputStreamReader((httpConnection.getInputStream())));\n String tmp;\n while ((tmp = responseBuffer.readLine()) != null) {\n result.append(tmp);\n }\n break;\n }\n\n if (httpConnection.getResponseCode() != 200)\n throw new RuntimeException(\"HTTP GET Request Failed with Error code : \" + httpConnection.getResponseCode());\n\n httpConnection.disconnect();\n\n } catch (IOException exception) {\n exception.printStackTrace();\n }\n return result.toString();\n }", "@Deprecated\n public <T> Promise<Response<T>> sendRequest(final Request<T> request) {\n return sendRequest(request, new RequestContext());\n }", "private MarketDataRequest generateRequestFromAtom(MarketDataRequestAtom inAtom,\n MarketDataRequest inCompleteRequest)\n {\n return MarketDataRequestBuilder.newRequest().withAssetClass(inCompleteRequest.getAssetClass()).withSymbols(inAtom.getSymbol()).withContent(inAtom.getContent()).withExchange(inAtom.getExchange()).create();\n }", "public ResponseFromHTTP makeRequest() throws CustomRuntimeException\n\t{\n\t\tResponseFromHTTP result=null;\n\t\tCloseableHttpClient httpclient=null;\n\t\tCloseableHttpResponse response=null;\n\t\tboolean needAuth=false;\n\t\tboolean viaProxy=httpTransportInfo.isUseProxy() && StringUtils.isNotBlank(httpTransportInfo.getProxyHost());\n\n\t\tHttpHost target = new HttpHost(httpTransportInfo.getHost(), httpTransportInfo.getPort(),httpTransportInfo.getProtocol());\n\t\t//basic auth for request\n\t\tCredentialsProvider credsProvider = new BasicCredentialsProvider();\n\t\tif(StringUtils.isNotBlank(httpTransportInfo.getLogin()) && \n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getPassword()))\n\t\t{\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(target.getHostName(), target.getPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getLogin(), httpTransportInfo.getPassword()));\n\t\t\tneedAuth=true;\n\t\t}\n\n\t\t//proxy auth?\n\t\tif(viaProxy && StringUtils.isNotBlank(httpTransportInfo.getProxyLogin()) &&\n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getProxyPassword()))\n\t\t{\n\t\t\t//proxy auth setting\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(httpTransportInfo.getProxyHost(), httpTransportInfo.getProxyPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getProxyLogin(), httpTransportInfo.getProxyPassword()));\n\t\t}\n\n\t\ttry\n\t\t{\n\n\t\t\tHttpClientBuilder httpclientBuilder = HttpClients.custom()\n\t\t\t\t\t.setDefaultCredentialsProvider(credsProvider);\n\t\t\t//https\n\t\t\tif(\"https\".equalsIgnoreCase(httpTransportInfo.getProtocol()))\n\t\t\t{\n\t\t\t\t//A.K. - Set stub for check certificate - deprecated from 4.4.1\n\t\t\t\tSSLContextBuilder sslContextBuilder=SSLContexts.custom();\n\t\t\t\tTrustStrategyLZ trustStrategyLZ=new TrustStrategyLZ();\n\t\t\t\tsslContextBuilder.loadTrustMaterial(null,trustStrategyLZ);\n\t\t\t\tSSLContext sslContext = sslContextBuilder.build();\n\t\t\t\tSSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n\t\t\t\thttpclientBuilder.setSSLSocketFactory(sslsf);\n\t\t\t}\n\n\t\t\thttpclient=httpclientBuilder.build();\n\n\t\t\t//timeouts\n\t\t\tBuilder builder = RequestConfig.custom()\n\t\t\t\t\t.setSocketTimeout(httpTransportInfo.getSocketTimeoutSec()*1000)\n\t\t\t\t\t.setConnectTimeout(httpTransportInfo.getConnectTimeoutSec()*1000);\n\n\t\t\t//via proxy?\n\t\t\tif(viaProxy)\n\t\t\t{\n\t\t\t\t//proxy setting\n\t\t\t\tHttpHost proxy = new HttpHost(httpTransportInfo.getProxyHost(),httpTransportInfo.getProxyPort(),httpTransportInfo.getProxyProtocol());\n\t\t\t\tbuilder.setProxy(proxy);\n\t\t\t}\n\n\t\t\tRequestConfig requestConfig=builder.build();\n\n\t\t\t// Create AuthCache instance\n\t\t\tAuthCache authCache = new BasicAuthCache();\n\t\t\t// Generate BASIC scheme object and add it to the local\n\t\t\t// auth cache\n\t\t\tBasicScheme basicAuth = new BasicScheme();\n\t\t\tauthCache.put(target, basicAuth);\n\n\t\t\t// Add AuthCache to the execution context\n\t\t\tHttpClientContext localContext = HttpClientContext.create();\n\t\t\tlocalContext.setAuthCache(authCache);\n\n\t\t\tPathParser parsedPath=new PathParser(getUri());\n\t\t\tif(restMethodDef.isUseOriginalURI())\n\t\t\t{\n\t\t\t\t//in this case params from URI will not add to all params\n\t\t\t\tparsedPath.getParams().clear();\n\t\t\t}\n\t\t\tparsedPath.getParams().addAll(getRequestDefinition().getParams());\n\t\t\t//prepare URI\n\t\t\tURIBuilder uriBuilder = new URIBuilder().setPath(parsedPath.getUri());\n\t\t\tif(!getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\t//form's parameters - GET/DELETE/OPTIONS/PUT\n\t\t\t\tfor(NameValuePair nameValuePair : parsedPath.getParams())\n\t\t\t\t{\n\t\t\t\t\turiBuilder.setParameter(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tURI resultUri =(restMethodDef.isUseOriginalURI())?new URI(getUri()):uriBuilder.build();\n\n\t\t\t//\t\t\tHttpRequestBase httpPostOrGet=(getRequestDefinition().isHttpMethodPost())?\n\t\t\t//\t\t\t\t\tnew HttpPost(resultUri):\n\t\t\t//\t\t\t\t\tnew HttpGet(resultUri);\n\n\t\t\tHttpRequestBase httpPostOrGetEtc=null;\n\t\t\t//\n\t\t\tswitch(getRequestDefinition().getHttpMethod())\n\t\t\t{\n\t\t\t\tcase POST: httpPostOrGetEtc=new HttpPost(resultUri);break;\n\t\t\t\tcase DELETE: httpPostOrGetEtc=new HttpDelete(resultUri);break;\n\t\t\t\tcase OPTIONS: httpPostOrGetEtc=new HttpOptions(resultUri);break;\n\t\t\t\tcase PUT: httpPostOrGetEtc=new HttpPut(resultUri);break;\n\n\t\t\t\tdefault: httpPostOrGetEtc=new HttpGet(resultUri);break;\n\t\t\t}\n\n\t\t\t//Specifie protocol version\n\t\t\tif(httpTransportInfo.isVersionHttp10())\n\t\t\t\thttpPostOrGetEtc.setProtocolVersion(HttpVersion.HTTP_1_0);\n\n\t\t\t//user agent\n\t\t\thttpPostOrGetEtc.setHeader(HttpHeaders.USER_AGENT,httpTransportInfo.getUserAgent());\n\t\t\t//заголовки из запроса\n\t\t\tif(getRequestDefinition().getHeaders().size()>0)\n\t\t\t{\n\t\t\t\tfor(NameValuePair nameValuePair : getRequestDefinition().getHeaders())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getName()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Additional HTTP headers from httpTransportInfo\n\t\t\tif(httpTransportInfo.getAddHeaders()!=null)\n\t\t\t{\n\t\t\t\tfor(Map.Entry<String, String> entry:httpTransportInfo.getAddHeaders().entrySet())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(entry.getKey()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(entry.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(entry.getKey(),entry.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\thttpPostOrGetEtc.setConfig(requestConfig);\n\t\t\t//Form's parameters, request POST\n\t\t\tif(getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t\telse if(parsedPath.getParams().size()>0)\n\t\t\t\t{\n\t\t\t\t\tUrlEncodedFormEntity entityForm = new UrlEncodedFormEntity(parsedPath.getParams(), httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(entityForm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Body for PUT\n\t\t\tif(getRequestDefinition().getHttpMethod()==HttpMethod.PUT)\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPut) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresponse = httpclient.execute(target, httpPostOrGetEtc, (needAuth)?localContext:null);\n\t\t\t//response.\n\t\t\tHttpEntity entity = response.getEntity();\n\t\t\tif(entity!=null)\n\t\t\t{\n\t\t\t\t//charset\n\t\t\t\tContentType contentType = ContentType.get(entity);\n\t\t\t\tString currentCharSet=httpTransportInfo.getCharset();\n\t\t\t\tif(contentType!=null)\n\t\t\t\t{\n\t\t\t\t\t//String mimeType = contentType.getMimeType();\n\t\t\t\t\tif(contentType.getCharset()!=null)\n\t\t\t\t\t\tcurrentCharSet=contentType.getCharset().name();\n\t\t\t\t}\n\t\t\t\tInputStream inputStream=entity.getContent();\n\t\t\t\tif(getRequestDefinition().isBinaryResponseBody())\n\t\t\t\t{\n\t\t\t\t\t//binary content\n\t\t\t\t\tbyte[] bodyBin = IOUtils.toByteArray(inputStream);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),bodyBin,response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//copy content to string\n\t\t\t\t\tStringWriter writer = new StringWriter();\n\t\t\t\t\tIOUtils.copy(inputStream, writer, currentCharSet);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),writer.toString(),response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\tinputStream.close();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new CustomRuntimeException(\"fetchData over http uri: \"+getUri(),e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(response!=null)\n\t\t\t\t\tresponse.close();\n\t\t\t\tif(httpclient!=null)\n\t\t\t\t\thttpclient.close();\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t} \t\n\t\t}\t\t\n\t\treturn result;\n\n\t}", "@Override\n\t\tvoid request(HttpURLConnection u, String prefix) {\n\t\t}", "public Request getRequest() throws IOException {\n\t\tString message = underlying.readStringLine();\n\t\tif(message != null && message.startsWith(\"!compute \"))\t\t\n\t\t\treturn new NodeRequest(message.substring(9).split(\"\\\\s\"));\t\t\n\t\tif(message != null && message.equals(\"!getLogs\"))\t\t\n\t\t\treturn new LogRequest();\n\t\tif(message != null && message.startsWith(\"!share \"))\t\t\n\t\t\treturn new ShareRequest(message.substring(7).trim());\n\t\tif(message != null && (message.startsWith(\"!commit \") || message.equals(\"!rollback\")))\t\t\n\t\t\treturn new CommitRequest(message);\n\t\treturn null;\n\t}", "com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();", "public void build() {\n\t\t\tRequest request = new Request();\n request.context = context;\n\t\t\trequest.requestType = requestType;\n\t\t\trequest.url = url;\n\t\t\trequest.envelope = envelope;\n\t\t\trequest.headers = headers;\n\n\t\t\trequest.responseListener = responseListener;\n\t\t\trequest.onValidateResponseListener = validateResponseListener;\n\n\t\t\trequest.isDebug = isDebug;\n\n\t\t\trequest.start();\n\t\t}", "public URL resolveHttpRequest(InetAddress inetAddress,\r\n URL url,\r\n String[] request,\r\n NetworkInterface networkInterface);", "public static EvaluableRequest buildEvaluableRequest(String requestBody, String requestResourcePath, HttpServletRequest request) {\n // Create and fill an evaluable request object.\n EvaluableRequest evaluableRequest = new EvaluableRequest(requestBody,\n requestResourcePath != null ? requestResourcePath.split(\"/\") : null);\n // Adding query parameters...\n Map<String, String> evaluableParams = new HashMap<>();\n List<String> parameterNames = Collections.list(request.getParameterNames());\n for (String parameter : parameterNames) {\n evaluableParams.put(parameter, request.getParameter(parameter));\n }\n evaluableRequest.setParams(evaluableParams);\n // Adding headers...\n Map<String, String> evaluableHeaders = new HashMap<>();\n List<String> headerNames = Collections.list(request.getHeaderNames());\n for (String header : headerNames) {\n evaluableHeaders.put(header, request.getHeader(header));\n }\n evaluableRequest.setHeaders(evaluableHeaders);\n\n return evaluableRequest;\n }", "public String prepareRequestStr(OpenAccessCardRequest request) {\n if (request == null || StringUtil.isEmpty(request.getSrcTransactionID(), true) || StringUtil.isEmpty(request.getMerchantID(), true) || StringUtil.isEmpty(request.getIssuerid(), true) || StringUtil.isEmpty(request.getCplc(), true) || StringUtil.isEmpty(request.getDeviceModel(), true)) {\n LogX.e(\"OpenAccessCardTask prepareRequestStr, invalid param\");\n return null;\n }\n return JSONHelper.createRequestStr(request.getMerchantID(), request.getRsaKeyIndex(), request.createRequestData(JSONHelper.createHeaderStr(request.getSrcTransactionID(), HEAD_COMMANDER, request.getIsNeedServiceTokenAuth())), this.mContext);\n }", "CompletableFuture<Void> sendRequestOneWay(HttpRequest request);", "public static Request constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy,\n String targetVnf) {\n /*\n * Construct an APPC request\n */\n Request request = new Request();\n request.setCommonHeader(new CommonHeader());\n request.getCommonHeader().setRequestId(onset.getRequestId());\n request.getCommonHeader().setSubRequestId(operation.getSubRequestId());\n request.setAction(policy.getRecipe().substring(0, 1).toUpperCase() + policy.getRecipe().substring(1));\n\n // convert policy payload strings to objects\n if (policy.getPayload() == null) {\n logger.info(\"no APPC payload specified for policy {}\", policy.getName());\n } else {\n convertPayload(policy.getPayload(), request.getPayload());\n }\n\n // add/replace specific values\n request.getPayload().put(\"generic-vnf.vnf-id\", targetVnf);\n\n /*\n * Return the request\n */\n\n return request;\n }", "CompletableFuture<HttpResponse> sendRequest(HttpRequest request);", "private GroupRequest convertToGroupRequest(GroupRequestProtocolMessage groupRequestProtocol){\n GroupRequest groupRequest = new GroupRequest();\n groupRequest.setId(groupRequestProtocol.getId());\n groupRequest.setCreationTimestamp(groupRequestProtocol.getCreationTimestamp());\n groupRequest.setAggregatorOperator(AggregatorOperatorUtils\n .getAggregatorOperator(groupRequestProtocol.getAggregatorOperator()));\n groupRequest.setRequestType(RequestTypeUtils.getRequestType(groupRequestProtocol.getRequestType()));\n groupRequest.setThirdPartyId(groupRequestProtocol.getThirdPartyId());\n return groupRequest;\n }", "public Response submitRequest(Request req)\n throws IOException\n {\n return submitRequest(req.getMethod(), req.getUri(), req.getHeaders(), req.getBody(), req.getEncoding(), req.getType());\n }", "public com.google.protobuf.ByteString\n getRequestBytes() {\n Object ref = request_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n request_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String request(ViaRequestPacketEntity packet);", "private StringRequest createStringRequest(final project.software.uni.positionprediction.datatypes.Request request,\r\n String url,\r\n Response.Listener<String> responseListener,\r\n Response.ErrorListener errorListener){\r\n\r\n return new StringRequest(Request.Method.GET, url,\r\n responseListener,\r\n errorListener\r\n )\r\n\r\n {\r\n @Override\r\n public Map <String, String> getHeaders() {\r\n HashMap< String, String > headers = new HashMap <> ();\r\n String creds = String.format(\"%s:%s\",username,password);\r\n String encodedCredentials = Base64.encodeToString(creds.getBytes(), Base64.DEFAULT);\r\n headers.put(\"Authorization\", \"Basic \" + encodedCredentials);\r\n\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Response<String> parseNetworkResponse(NetworkResponse response) {\r\n statusMap.put(new Integer(request.getId()), new Integer(response.statusCode));\r\n\r\n return super.parseNetworkResponse(response);\r\n }\r\n };\r\n\r\n }", "public void performHttpRequest(Request request) throws Exception {\n LOGGER.debug(\"Performing HTTP request with these parameters: {}\", request);\n\n try (Response response = invokeHttpRequest(request, null)) {\n validateResponse(response);\n } catch (ProcessingException | IOException e) {\n LOGGER.debug(\"HTTP request failed!\", e);\n throw e;\n }\n }", "public GWIRequest(int method, Map<String, String> params,\n String url, Object request,\n Type resType,\n Response.Listener<R> listener,\n Response.ErrorListener errorListener, Gson gson) {\n super(method, url, errorListener);\n mParams = params;\n mBodyRequest = request;\n this.mResType = resType;\n this.mListener = listener;\n if (gson == null) {\n mGson = new GsonBuilder().registerTypeAdapter(Date.class,\n new DotNetDateAdapter()).setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE).create();\n } else {\n mGson = gson;\n }\n }", "public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}", "public void handleRequest(Request req) {\n\n }", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public HTTPResponse get(HTTPRequest request) {\n\t\tHTTPResponse response = new HTTPResponse();\n\t\tresponse.setResponseHeader(request.getProtocol(), HTTPConstants.STATUS_OK, HTTPConstants.STATUS_CODE_OK);\n\t\tresponse.setResponse(getResponseString(true));\n\t\treturn response;\n\t}", "@Override\r\n public UriBuilder getRequestUriBuilder() {\n return null;\r\n }", "public void postRequestPrepare(Request<?> request);", "@Deprecated\n public Request createRequestEntity(Request request) throws RequestCreationException;", "public Request<E, T> buildHttpPut ()\n\t{\n\t\treturn new HttpPutRequest<E, T>(this);\n\t}", "public static OfbizUrlBuilder from(HttpServletRequest request) throws GenericEntityException, WebAppConfigurationException {\n Assert.notNull(\"request\", request);\n OfbizUrlBuilder builder = (OfbizUrlBuilder) request.getAttribute(\"_OFBIZ_URL_BUILDER_\");\n if (builder == null) {\n WebSiteProperties webSiteProps = WebSiteProperties.from(request);\n URL url = ConfigXMLReader.getControllerConfigURL(request.getServletContext());\n ControllerConfig config = (url != null) ? ConfigXMLReader.getControllerConfig(url, true) : null; // SCIPIO: 2017-11-18: controller now fully optional (2 change)\n // SCIPIO: Use more reliable call\n //String servletPath = (String) request.getAttribute(\"_CONTROL_PATH_\");\n String servletPath = RequestHandler.getControlPath(request);\n String contextPath = request.getContextPath();\n builder = new OfbizUrlBuilder(config, webSiteProps, servletPath, contextPath); // SCIPIO\n request.setAttribute(\"_OFBIZ_URL_BUILDER_\", builder);\n }\n return builder;\n }", "@Override\n protected String inferProtocol() {\n return \"http\";\n }", "public static Request getRequest() {\n return request;\n }", "public static String getRequest() {\n return request;\n }", "public void makeRequest() {\n Request newRequest = new Request();\n\n if (mProduct == null) {\n Toast.makeText(getContext(), \"BAD\", Toast.LENGTH_LONG).show();\n return;\n }\n\n newRequest.setClient(ParseUser.getCurrentUser());\n newRequest.setProduct(mProduct);\n newRequest.setBeaut(mBeaut);\n\n Date dateTime = new Date(selectedAppointmet.appDate.getTimeInMillis());\n newRequest.setDateTime(dateTime);\n // TODO: uncomment below line when dataset is clean and products have lengths\n// newRequest.setLength(mProduct.getLength());\n newRequest.setLength(1);\n newRequest.setSeat(selectedAppointmet.seatId);\n newRequest.setDescription(rComments.getText().toString());\n\n sendRequest(newRequest);\n }", "public static ChallengeRequest parseRequest(String header) {\r\n ChallengeRequest result = null;\r\n \r\n if (header != null) {\r\n int space = header.indexOf(' ');\r\n \r\n if (space != -1) {\r\n String scheme = header.substring(0, space);\r\n String realm = header.substring(space + 1);\r\n int equals = realm.indexOf('=');\r\n String realmValue = realm.substring(equals + 2,\r\n realm.length() - 1);\r\n result = new ChallengeRequest(new ChallengeScheme(\"HTTP_\"\r\n + scheme, scheme), realmValue);\r\n }\r\n }\r\n \r\n return result;\r\n }" ]
[ "0.65624636", "0.62572193", "0.60250115", "0.59182024", "0.5896634", "0.5849623", "0.58231705", "0.58230656", "0.58219665", "0.5770996", "0.57427424", "0.56915253", "0.56262714", "0.561478", "0.5608704", "0.55987996", "0.55873895", "0.5577268", "0.5512186", "0.54953146", "0.54864126", "0.54102004", "0.5404578", "0.53483737", "0.5319671", "0.5319558", "0.52902776", "0.5289528", "0.5260629", "0.52503645", "0.52440655", "0.5227416", "0.5227274", "0.5195025", "0.51931316", "0.51930976", "0.51767355", "0.51696676", "0.516797", "0.51643527", "0.5164128", "0.51470196", "0.51400787", "0.51364005", "0.51290876", "0.5128174", "0.5126826", "0.51235104", "0.51124525", "0.5090145", "0.50325805", "0.5016526", "0.5016225", "0.49998564", "0.49941912", "0.49897653", "0.49869907", "0.49861664", "0.49747863", "0.49708363", "0.4961065", "0.49602923", "0.49467057", "0.4939071", "0.49387893", "0.49329665", "0.49280977", "0.49171895", "0.4903749", "0.4899944", "0.48721805", "0.4870916", "0.4869908", "0.48674682", "0.4864158", "0.48588106", "0.4857608", "0.48553652", "0.48464146", "0.48398632", "0.48296195", "0.48264298", "0.48005563", "0.4798283", "0.47941384", "0.4792286", "0.47899753", "0.47834244", "0.47825158", "0.47756174", "0.47746924", "0.47738037", "0.477312", "0.4758511", "0.47577944", "0.4751245", "0.47471884", "0.47416532", "0.47379187", "0.473585" ]
0.71011686
0
TODO put the message into db.
@Override public void onReceive(Object message) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Message save(Message message) {\n\n try {\n\n statement.execute(\"insert into messages (sender_id, receiver_id, transmitted_time, text)\" +\n \"values ('\" + message.getSender_id() + \"', '\" + message.getReceiver_id()\n + \"', current_timestamp() , '\" + message.getText() + \"');\");\n ResultSet resultSet = statement.executeQuery(\n \"select * from messages \" +\n \"where messages.index = \" +\n \"(select max(messages.index) from messages);\"\n );\n\n if (resultSet.next()) {\n message.setIndex(resultSet.getLong(\"index\"));\n message.setTransmitted_time(resultSet.getTimestamp(\"transmitted_time\"));\n }\n\n message.setReadOrNot(false);\n return message;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n\n return null;\n\n }", "@Override\r\n\tpublic void addMessage(Integer receive_id, Integer send_id, String content,Timestamp createtime) {\n\t\tString sql=\"insert into message(receive_id,send_id,content,createtime,isread,result) values(?,?,?,?,?,?)\";\r\n\t\tObject[] args=new Object[] {receive_id,send_id,content,createtime,0,0};\r\n\t\ttry {\r\n\t\t\tupdate(conn, sql, args);\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}\r\n\t}", "@Override\n public void handleMessage(Message message) {}", "@Override\n\tpublic void onMessage(Message message) {\n\t\tTextMessage textMessage = (TextMessage) message;\n\t\ttry {\n\t\t\tString id = textMessage.getText();\n\t\t\tint i = Integer.parseInt(id);\n\t\t\tgoodsService.out(i);\n\t\t\tList<Goods> list = goodsService.findByZt();\n\t\t\tsolrTemplate.saveBeans(list);\n\t\t\tsolrTemplate.commit();\n\t\t} catch (JMSException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void updateDatabase(users.Message msg, DatabaseConnection dc) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"INSERT into \" + this.messagesTable + \" \");\n\t\tsb.append(\"(id, type, datesent, timesent, senderid, receiverid, opened, replied, subject, body) \");\n\t\tsb.append(\"VALUES \"); //(1, 2, 3, \"20141225\", 100, 5);\");\n\t\tsb.append(\"(\" + msg.id + \", \" + msg.type + \", \");\n\t\tsb.append(\"\\\"\"+msg.datesent + \"\\\", \\\"\" + msg.timesent + \"\\\", \");\n\t\tsb.append(msg.senderid + \", \\\"\" + msg.receiverid + \"\\\", \");\n\t\tsb.append(msg.opened + \", \" + msg.replied + \", \");\n\t\tsb.append(\"\\\"\"+msg.subject + \"\\\", \\\"\" + msg.body + \"\\\");\");\n\t\tdc.executeUpdate(sb.toString());\n\t}", "@Override\r\n public void handleMessage(Message msg) {\n }", "private void saveOrUpdateNewMessageRealm(_Message message) {\r\n\r\n //realm required to submit from separate thread. IF I do operation in ui thread,\r\n //I need .allowQueriesOnUiThread(true), that's no need in my case\r\n executor.execute(() -> {\r\n // use Realm on background thread\r\n _RealmController.insertOrUpdateNewMessage(message);\r\n });\r\n }", "void saveMessage(int id,String msg) throws SQLException {\n\t\tpst=con.prepareStatement(\"INSERT INTO message VALUES(?,?)\");\n\t\tpst.setInt(1, id);\n\t\tpst.setString(2, msg);\n\t\t\n\t\tpst.executeUpdate();\n\t}", "public QlikMessageDto insertMessageInDatabase(String message) {\r\n\t\tQlikMessageDto qlikMessage = null;\r\n\r\n\t\tlong insertedRowId = 0;\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\r\n\t\t\tConnection conn = DriverManager.getConnection(url, user, password);\r\n\r\n\t\t\tPreparedStatement statement = conn.prepareStatement(sql_insertMessage, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tstatement.setString(1, message);\r\n\t\t\tstatement.setBoolean(2, Utility.isPalindrome(message));\r\n\r\n\t\t\tint rowsInserted = statement.executeUpdate();\r\n\t\t\tif (rowsInserted > 0) {\r\n\t\t\t\tqlikMessage = new QlikMessageDto();\r\n\t\t\t\tqlikMessage.setMessagetext(message);\r\n\t\t\t\tqlikMessage.setIspalindrome(Utility.isPalindrome(message));\r\n\t\t\t}\r\n\r\n\t\t\t// Get inserted row id\r\n\t\t\tResultSet rs = statement.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tinsertedRowId = rs.getInt(1);\r\n\t\t\t\tqlikMessage.setId(insertedRowId);\r\n\t\t\t}\r\n\t\t\tconn.close();\r\n\t\t} catch (ClassNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn qlikMessage;\r\n\t}", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "@Override\n\tpublic void save(Message msg) {\n\t\tmsgdao.save(msg);\n\n\t}", "private void processMessage(SQSMessage message) {\n String body = message.getBody();\n// logger.log(\"Body: \" + body);\n String[] lines = body.replaceAll(\"\\t\", \"\").trim().split(\"\\n:\");\n MT103 mt103 = new MT103();\n for (String line : lines) {\n String beginLine = line.startsWith(\":\") ? line.substring(1, 3) : line.substring(0, 2);\n int begin = Integer.parseInt(beginLine);\n switch (begin) {\n case 20:\n getField20(line, mt103);\n case 21:\n getField21(line, mt103);\n case 25:\n getField25(line, mt103);\n case 28:\n getField28(line, mt103);\n case 60:\n getField60(line, mt103);\n case 61:\n getField61(line, mt103);\n case 62:\n getField62(line, mt103);\n case 64:\n getField64(line, mt103);\n case 86:\n getField86(line, mt103);\n }\n }\n logger.log(\"Comenzando a insertar \" + mt103.getField20());\n EntityTransaction tx = entityManager.getTransaction();\n if (!tx.isActive()) {\n tx.begin();\n }\n entityManager.persist(mt103);\n tx.commit();\n logger.log(\"Termino de insertar \" + mt103.getField20());\n }", "void mo80456b(Message message);", "public Message updateMessage(Message message){\n Message existeMessage= repo.findById(message.getIdMessage()).orElse(null);\n existeMessage.setMessageText(message.getMessageText());\n return repo.save(existeMessage); \n }", "private ExecuteMessage() {\n initFields();\n }", "private void addMsg(String xmsg) {\n\r\n\t\tSQLiteDatabase db = dbh.getWritableDatabase();\r\n\t\tContentValues values = new ContentValues();\r\n\t\tLog.v(\"-->\", xmsg);\r\n\t\tvalues.put(\"M_ID\", Integer.parseInt(xmsg.substring(0, 2))); // msg id ==\r\n\t\tLog.v(\"values: \", xmsg.substring(0, 2)); // [0,1]\r\n\t\tvalues.put(\"SEQ\", Integer.parseInt(xmsg.substring(2, 4))); // seq\r\n\t\tLog.v(\"values: \", xmsg.substring(2, 4));\r\n\t\tvalues.put(\"MSG\", xmsg.substring(5)); // msg\r\n\t\tLog.v(\"values: \", xmsg.substring(5));\r\n\t\tdb.insertOrThrow(TABLE_NAME, null, values);\r\n\r\n\t}", "public static synchronized void createMessage(MessageModel message, String parentMessageId) throws MessageException, MongoException, SQLException {\n\t\t// Verify the message parameters\n\t\tboolean valid = true;\n\t\tStringBuilder errorMessage = new StringBuilder();\n\t\t\n\t\tif(message.getMessageText() == null || !Security.isStringNotEmpty(message.getMessageText())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message text : \" + message.getMessageText());\n\t\t}\n\t\tif(message.getMessageBoardName() == null || !Security.isValidBoardName(message.getMessageBoardName())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message board name : \" + message.getMessageBoardName());\n\t\t}\n\t\tif(message.getMessagePosterId() == null || !Security.isValidUserId(message.getMessagePosterId())) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message poster id : \" + message.getMessagePosterId());\n\t\t}\n\t\tif(message.getMessageDate() == null) {\n\t\t\tvalid = false;\n\t\t\terrorMessage.append(\" - Invalid message date : null\");\n\t\t}\n\t\t\n\t\t// If there is an error, throw an error\n\t\tif(!valid) {\n\t\t\t\n\t\t\tthrow new MessageException(errorMessage.toString());\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// Escape the HTML special characters\n\t\t\tmessage.setMessageText(Security.htmlEncode(message.getMessageText()));\n\t\t\tmessage.setMessageBoardName(Security.htmlEncode(message.getMessageBoardName()));\n\t\t\t\n\t\t\t// Get message ID dynamically\n\t\t\tif(parentMessageId != null && !parentMessageId.equals(\"\")) {\n\t\t\t\t\n\t\t\t\t// Get the message parent\n\t\t\t\tMessageFilter parentFilter = new MessageFilter();\n\t\t\t\tparentFilter.addMessageId(parentMessageId);\n\t\t\t\tList<MessageModel> parents = MessageDatabaseManager.getMessage(parentFilter, false, true);\n\t\t\t\tif(parents.size() == 1) {\n\t\t\t\t\t\n\t\t\t\t\tMessageModel parent = parents.get(0);\n\t\t\t\t\tmessage.setMessageId(parent.getNextAnswerId());\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tthrow new MessageException(\"Parent message not found : \" + parentMessageId);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// Get the next root message ID\n\t\t\t\tmessage.setMessageId(MessageDatabaseManager.getNextRootMessageId());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Insert the new message\n\t\t\tMessageDatabaseManager.insertMessage(message);\n\t\t\t\n\t\t}\n\t}", "public void message_add(message message){\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_MESSAGES_ID, message.id_get());\n \tvalues.put(KEY_MESSAGES_FROM, message.from_get());\n \tvalues.put(KEY_MESSAGES_TIME, message.time_get());\n \tvalues.put(KEY_MESSAGES_TEXT, message.text_get());\n \tvalues.put(KEY_MESSAGES_URI, message.uri_get_string());\n\n \t// 3. insert\n \tdb.insert(TABLE_MESSAGES, // table\n \t\t\tnull, //nullColumnHack\n \t\t\tvalues); // key/value -> keys = column names/ values = column values\n\n \t// 4. close\n \tdb.close();\n }", "public void postMessage(Message message){\n messageRepository.addMessage(message);\n }", "@Override\n\tpublic void getMessage(TranObject msg) {\n\n\t}", "void mo80453a(Message message);", "public void storeMessage(Message message) {\n Entity messageEntity = new Entity(\"Message\", message.getId().toString());\n messageEntity.setProperty(\"user\", message.getUser());\n messageEntity.setProperty(\"text\", message.getText());\n messageEntity.setProperty(\"timestamp\", message.getTimestamp());\n\n datastore.put(messageEntity);\n }", "private void writeMessage(Message message) throws IOException {\n Message.Command temp = message.getCommand();\n if (temp != Message.Command.GET_RESERVED && temp != Message.Command.GET_AVAILABLE) {\n connectionLoggerService.add(\"Bank : \" + message.toString());\n }\n objectOutputStream.reset();\n objectOutputStream.writeObject(message);\n }", "private static void storeMessage(String tokenId,String db,String user,String password){\n JSONArray jsonArray = getMailMessageList(tokenId);\n for (int i=0; i<jsonArray.length();i++)\n {\n for (int j=0;j<jsonArray.getJSONObject(i).getJSONArray(\"messages\").length();j++)\n {\n String messageId = jsonArray.getJSONObject(i).getJSONArray(\"messages\").getJSONObject(j)\n .getString(\"id\");\n addIntoDB(getMailMessage(tokenId, messageId),db,user,password);/*insert each mail details into DB */\n }\n }\n }", "protected abstract TMessage prepareMessage();", "@Override\n public Message saveMessage(MessageDTO message) { \n return messageRepository.save(MessageTransformer.transform(message));\n }", "public void insertMessage(Message message){\n Tag Tag=null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.STORY_COLUMN_NAME1, message.getUsername());\n values.put(databaseValues.STORY_COLUMN_NAME2, message.getMessage());\n values.put(databaseValues.STORY_COLUMN_NAME3, message.getMessageType());\n values.put(databaseValues.STORY_COLUMN_NAME4, message.getPicture());\n Log.e(String.valueOf(Tag), message.getUsername());\n Log.e(String.valueOf(Tag), message.getMessage());\n Log.e(String.valueOf(Tag), message.getMessageType());\n db.insert(databaseValues.TABLE_NAME2, null, values);\n db.close();\n }", "public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }", "@Override\n\tpublic int saveAndSendMessage(TransactionMessage transactionMessage) {\n\t\treturn 0;\n\t}", "public boolean send_message(String SID, String RID, String message)\r\n {\r\n DBConnect db = new DBConnect();\r\n try\r\n {\r\n \r\n String SQL = \"insert into MESSAGES(SID, RID,message) values ('\" + SID + \"', '\" + RID + \"', '\"+ message + \"')\";\r\n System.out.println(\"\"+SQL);\r\n try\r\n {\r\n \r\n db.pstmt = db.conn.prepareStatement(SQL);\r\n \r\n try\r\n {\r\n if (db.pstmt.executeUpdate() != 0)\r\n return true;\r\n }\r\n catch(Exception e)\r\n {\r\n\r\n }\r\n } \r\n catch(Exception e)\r\n {\r\n \r\n }\r\n finally\r\n {\r\n try\r\n {\r\n db.conn.close();\r\n }\r\n catch (Exception e)\r\n {\r\n \r\n }\r\n }\r\n } \r\n catch(Exception e)\r\n {\r\n \r\n }\r\n return false;\r\n}", "@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}", "public void updateMessage(Message message){\n Tag Tag = null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.STORY_COLUMN_NAME2, message.getMessage());\n values.put(databaseValues.STORY_COLUMN_NAME3, message.getMessageType());\n values.put(databaseValues.STORY_COLUMN_NAME4, message.getPicture());\n db.update(databaseValues.TABLE_NAME3,values,\"Username=?\",new String[]{message.username});\n }", "public void storeMessage(Message message) {\n Entity messageEntity = new Entity(\"Message\", message.getId().toString());\n messageEntity.setProperty(\"user\", message.getUser());\n messageEntity.setProperty(\"text\", message.getText());\n messageEntity.setProperty(\"timestamp\", message.getTimestamp());\n messageEntity.setProperty(\"recipient\", message.getRecipient());\n datastore.put(messageEntity);\n }", "public void putMessage (Message message);", "private void updateDatabase(String messageText)\n {\n HashMap<String, ChatData> mapThis = new HashMap<>();\n ChatData thisData = new ChatData(thisUsername, otherUsername, otherUid, messageText, thisPhoto, otherPhoto, new Date());\n thisData.setRead(true);\n mapThis.put(otherUid, thisData);\n FirebaseFirestore.getInstance().collection(\"chats\").document(thisUid).set(mapThis, SetOptions.merge());\n \n HashMap<String, ChatData> mapOther = new HashMap<>();\n ChatData otherData = new ChatData(otherUsername, thisUsername, thisUid, messageText, otherPhoto, thisPhoto, new Date());\n mapOther.put(thisUid, otherData);\n FirebaseFirestore.getInstance().collection(\"chats\").document(otherUid).set(mapOther, SetOptions.merge());\n \n Map<String, String> map = new HashMap<>();\n map.put(\"message\", messageText);\n map.put(\"user\", thisUsername);\n reference.push().setValue(map);\n messageArea.setText(\"\");\n \n new Notification(otherUid, thisUsername, Notification.NOTIFICATION_CHAT, messageText, this);\n }", "@Override\n\tpublic void insertMessage(String ToUserName, String FromUserName,\n\t\t\tString CreateTime, String MsgType, String Content, String MsgId,\n\t\t\tString PicUrl, String MediaId, String Format, String ThumbMediaId,\n\t\t\tString Location_X, String Location_Y, String Scale, String Label,\n\t\t\tString Title, String Description, String Url, String Event,\n\t\t\tString EventKey, String Ticket, String Latitude, String Longitude,\n\t\t\tString Precision, String Recognition, int sessionid) {\n\t\t\n\t}", "int insert(Message record);", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "public synchronized int saveMessageToDB(Connection connection, String message) throws SQLException\n {\n message = message.replaceAll(\"<p>&nbsp;</p>\", \"\");\n String queryFormat = \"INSERT INTO messagetext (messageText) VALUES('\" + message + \"')\";\n Statement statement = (Statement) connection.createStatement();\n boolean rowsAffected = statement.execute(queryFormat);\n if(rowsAffected) {\n System.out.println(\"Error in getting ID\");\n return 0;\n }\n ResultSet result = statement.executeQuery(\"SELECT LAST_INSERT_ID() AS id\");\n result.next();\n int messageTextID = result.getInt(\"id\");\n return messageTextID;\n }", "static long insert(SQLiteDatabase db, Topic topic, StoredMessage msg) {\n if (msg.id > 0) {\n return msg.id;\n }\n\n db.beginTransaction();\n try {\n if (msg.topicId <= 0) {\n msg.topicId = TopicDb.getId(db, msg.topic);\n }\n if (msg.userId <= 0) {\n msg.userId = UserDb.getId(db, msg.from);\n }\n\n if (msg.userId <= 0 || msg.topicId <= 0) {\n Log.d(TAG, \"Failed to insert message \" + msg.seq);\n return -1;\n }\n\n int status;\n if (msg.seq == 0) {\n msg.seq = TopicDb.getNextUnsentSeq(db, topic);\n status = msg.status == BaseDb.STATUS_UNDEFINED ? BaseDb.STATUS_QUEUED : msg.status;\n } else {\n status = BaseDb.STATUS_SYNCED;\n }\n\n // Convert message to a map of values\n ContentValues values = new ContentValues();\n values.put(COLUMN_NAME_TOPIC_ID, msg.topicId);\n values.put(COLUMN_NAME_USER_ID, msg.userId);\n values.put(COLUMN_NAME_STATUS, status);\n values.put(COLUMN_NAME_SENDER, msg.from);\n values.put(COLUMN_NAME_TS, msg.ts.getTime());\n values.put(COLUMN_NAME_SEQ, msg.seq);\n values.put(COLUMN_NAME_CONTENT, BaseDb.serialize(msg.content));\n\n msg.id = db.insertOrThrow(TABLE_NAME, null, values);\n db.setTransactionSuccessful();\n } catch (Exception ex) {\n Log.e(TAG, \"Insert failed\", ex);\n } finally {\n db.endTransaction();\n }\n\n return msg.id;\n }", "private void writeMessageInDataFile(String message){\n try {\n String messageToWrite = \"\\n\" + this + message;\n messagesManager.add(messageToWrite); // adds last message to last 15 messages queue\n Files.write(Paths.get(\"messages.txt\"), messageToWrite.getBytes(), StandardOpenOption.APPEND); // writes last message in messages database\n }catch (IOException e) {\n System.err.println(\"*** ERROR ***\\nCouldn't write in data file.\");\n }\n }", "protected void handleMessage(Message msg) {}", "public boolean addMessage(VicinityMessage message) throws SQLException\n {\n boolean isAdded=false;\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n ContentValues values = new ContentValues();\n values.put(\"messageBody\", message.getMessageBody());\n values.put(\"isMyMsg\", message.isMyMsg());\n values.put(\"sentBy\", message.getFriendName());\n values.put(\"msgTimestamp\", message.getDate());\n values.put(\"fromIP\", message.getFrom());\n values.put(\"image\" , message.getImageString());\n\n\n isAdded=database.insert(\"Message\", null, values)>0;\n Log.i(TAG, \"ADD SUCCESSFUL\");\n\n dbH.close();\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n }\n return isAdded;}", "protected void queryMsg() {\n\t\tif (currentPosition == 0) {//LIVE\n\t\t\tobtainLiveData(true, currentPosition, liveMaxChatId);\n\t\t} else {//CHAT\n\t\t\tobtainChatData(true, currentPosition, chatModels.get(0).getChatId());\n\t\t}\n\t}", "@Override\n protected void saveMessageToDatabase(String conversationKey, String message) {\n String messageKey = messagesRef.push().getKey();\n HashMap<String, Object> messageInfo = buildMessageInfo(message);\n messagesRef.child(messageKey).updateChildren(messageInfo);\n\n FirebaseDatabase.getInstance().getReference().child(\"Groups\").\n child(getConversationKey()).child(\"lastMessageTime\").setValue(Calendar.getInstance().getTimeInMillis());\n }", "@Override\n public void addMessage(byte[] message) throws RemoteException {\n Logger.getGlobal().log(Level.INFO,\"Ajout d'un message dans le composant post de nom : \" + this.getName());\n if(SerializationUtils.deserialize(message) instanceof _DefaultMessage){\n try {\n _DbConnectionManager.serializeJavaObjectToDB(this.dbConnection, message, this.getName(), _Component.postTableName);\n } catch (SQLException e1) {\n Logger.getGlobal().log(Level.SEVERE,\"Error save default message to bd in component : \" + this.getName());\n e1.printStackTrace();\n }\n }else{\n Logger.getGlobal().log(Level.INFO,\"Impossible de sauvegarder ce message, n'est pas un _DefaultMessage dans le component : \" + this.getName());\n }\n }", "Message getCurrentMessage();", "@Override\n\tpublic void save(Message message) {\n\t\tmessRepository.save(message);\n\t}", "private void sendMessage() {\n Log.d(\"FlashChat\", \"I sent something\");\n // get the message the user typed\n String userInput = mInputText.getText().toString();\n\n if (! (userInput.length() == 0)){\n\n InstantMessage message = new InstantMessage(userInput, mUserMe);\n // push the message to Firebase DB\n mDatabaseReference.child(mLocation).push().setValue(message);\n mInputText.setText(\"\");\n }\n\n }", "private synchronized void processMessage(Message m) throws JMSException {\n\n\t\t// get message counter. this value is set by the FailoverQSender.\n\t\tint ct = m.getIntProperty(FailoverQSender.MESSAGE_COUNTER);\n\t\t// log the message\n\t\t//log(\"received message: \" + ct +\", current connected broker: \" + this.getCurrentConnectedBrokerAddress());\n\t\t\n\t\t// saved the data in data holder.\n\t\tdata.addElement(new Integer(ct));\n\t}", "private void postMessages() {\n List<models.MessageProbe> probes = new Model.Finder(String.class, models.MessageProbe.class).where().ne(\"curr_status\", 1).findList();\n for (models.MessageProbe currProbe : probes) {\n if ((currProbe.curr_status == models.MessageProbe.STATUS.WITH_ERROR) || (currProbe.curr_status == models.MessageProbe.STATUS.NEW)) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToPost());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.POSTED;\n currProbe.curr_error = null;\n postCounter++;\n }\n currProbe.update();\n }\n }\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.DELETED) {\n currProbe.delete();\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.EDITED) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToModify());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.WAIT_CONFIRM;\n currProbe.curr_error = null;\n editCounter++;\n }\n currProbe.update();\n }\n }\n }\n }\n }", "abstract void addMessage(Message message);", "@PostMapping(value = \"/all/messages\", consumes = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity postMessage(@RequestBody Message message) {\n String messageId = UUID.randomUUID().toString();\n message.setMessageId(messageId);\n message.setDateTime(LocalDateTime.now());\n\n // save message in all data sources\n postgresDataService.saveMessage(message);\n mysqlDataService.saveMessage(message);\n return ResponseEntity.status(HttpStatus.CREATED).body(message);\n }", "public void addMessage() {\n }", "public Message() {\n message = \"\";\n senderID = \"\";\n time = 0;\n }", "@Override\n\tpublic MessagePojo updatemessage(MessagePojo message) {\n\t\treturn null;\n\t}", "public MessageData insertMessage(int gameId, String message) {\n\n SQLiteDatabase db = getWritableDatabase();\n ContentValues msgVals = new ContentValues();\n msgVals.put(\"game_id\", gameId);\n msgVals.put(\"json_message\", message);\n\n // Place the current timestamp\n msgVals.put(\"timestamp\", now());\n\n long rowid = db.insert(\"messages\", null, msgVals);\n\n String[] args = new String[]{ \"\"+rowid };\n Cursor c = db.rawQuery(\"SELECT message_id, json_message, timestamp, game_id FROM messages WHERE messages.ROWID =?\", args);\n c.moveToFirst();\n\n return new MessageData(\n c.getInt(0),\n c.getString(1),\n c.getLong(2),\n c.getInt(3)\n );\n }", "void messageSent();", "@Override\r\n\t\t\t\t\tpublic void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\t\t\t\t\t try { \r\n//\t\t\t\t\t\t\t SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\"); \r\n//\t\t\t\t\t\t\t String date = sdf.format(new Date());\r\n\t\t\t\t\t System.out.println(\" From:\"+message.toString()); \r\n\t\t\t\t\t \r\n\t\t\t\t\t Connection conn = null;\r\n\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t\t conn = DriverManager.getConnection(\r\n\t\t\t\t\t \t\t\"jdbc:mysql://localhost:3306/mqtt?useUnicode=true&characterEncoding=UTF-8\",\r\n\t\t\t\t\t \t\t\"root\",\r\n\t\t\t\t\t \t\t\"tmu2012\");\r\n\t\t\t\t\t System.out.println(\"connected to the database\");\r\n\r\n\t\t\t\t\t Statement stmt = conn.createStatement();\r\n\t\t\t\t\t System.out.println(\"Inserting records\");\r\n\t\t\t\t\t \r\n\t\t\t\t\t String qry1 = \"INSERT INTO mymqtts (mqtt) VALUES('\"+message.toString()+\"')\";\r\n\t\t\t\t\t stmt.executeUpdate(qry1);\r\n\t\t\t\t\t System.out.println(\"ok\");\r\n\t\t\t\t\t\t }catch (Exception e) { \r\n\t\t\t\t\t e.printStackTrace(); \r\n\t\t\t\t\t System.out.println(\"error\"); \r\n\t\t\t\t\t } \r\n\t\t\t\t\t}", "abstract void updateMessage(String msg);", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "@Override\n\tpublic void reSendMessage(TransactionMessage transactionMessage) {\n\t\t\n\t}", "public abstract void documentMessage(Message m);", "public void saveMessage(Message message) {\n log.info(\"Saved message: \" + message.getText());\n }", "@Override\n public void onChatMessageFragmentInteraction(MessageEnum message, Object result) {\n ((MyMessage)result).setSenderId(this.user.getUserId());\n ((MyMessage)result).setReceiverId(this.receiverId);\n ((MyMessage)result).setBookId(this.selectedBook.getBookId());\n //send message to message list\n databaseHandler.sendMessageToDatabase((MyMessage)result);\n //message should come back with reference change?\n }", "public Message save(Message message){\n if(message.getIdMessage()==null){\n return messageRepository.save(message);\n }else{\n Optional<Message> tmpMessage =messageRepository.getMessage(message.getIdMessage());\n if(tmpMessage.isEmpty()) {\n return messageRepository.save(message);\n }else{\n return message;\n }\n }\n }", "public void setMessage(String message) { this.message = message; }", "public static void insertNPCMessage(Connection conn, NPCMessageModel npcMessageModel) throws SQLException {\n\t\tStatement stmt = null;\n\t\tString insertStmt = \"\";\n\t\ttry {\n\t\t\tstmt = conn.createStatement();\n\t\t\tinsertStmt = \"INSERT INTO NPC_Message(NPC_MESSAGE_ID,IsPort,Sent,Transaction_Date,ReturnMessage,Current_Message_Max_Date,Current_Message_Min_Date,Create_User,Create_Date,Next_Message_Max_Date,Next_Message_Min_Date,User_Comment,MessageXML) VALUES (\"\n\t\t\t\t\t+ npcMessageModel.getNPCMessageID() + \",\" + (npcMessageModel.isPort() ? 1 : 0) + \",\"\n\t\t\t\t\t+ (npcMessageModel.isSent() ? 1 : 0) + \",\"\n\t\t\t\t\t+ (!\"null\".equals(npcMessageModel.getTransactionDate())\n\t\t\t\t\t\t\t&& npcMessageModel.getTransactionDate() != null\n\t\t\t\t\t\t\t\t\t? \"TO_DATE('\" + npcMessageModel.getTransactionDate() + \"','\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"DD/MM/YYYY HH24:MI:SS\" + \"')\"\n\t\t\t\t\t\t\t\t\t: \"NULL\")\n\t\t\t\t\t+ \",'\" + npcMessageModel.getReturnedMessage() + \"',\"\n\t\t\t\t\t+ (!\"null\".equals(npcMessageModel.getCurrentMessageMaxDate())\n\t\t\t\t\t\t\t&& npcMessageModel.getCurrentMessageMaxDate() != null\n\t\t\t\t\t\t\t\t\t? \"TO_DATE('\" + npcMessageModel.getCurrentMessageMaxDate() + \"','\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"DD/MM/YYYY HH24:MI:SS\" + \"')\"\n\t\t\t\t\t\t\t\t\t: \"NULL\")\n\t\t\t\t\t+ \",\"\n\t\t\t\t\t+ (!\"null\".equals(npcMessageModel.getCurrentMessageMinDate())\n\t\t\t\t\t\t\t&& npcMessageModel.getCurrentMessageMinDate() != null\n\t\t\t\t\t\t\t\t\t? \"TO_DATE('\" + npcMessageModel.getCurrentMessageMinDate() + \"','\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"DD/MM/YYYY HH24:MI:SS\" + \"')\"\n\t\t\t\t\t\t\t\t\t: \"NULL\")\n\t\t\t\t\t+ \",'\" + npcMessageModel.getCreatedUser() + \"',\"\n\t\t\t\t\t+ (!\"null\".equals(npcMessageModel.getCreatedDate()) && npcMessageModel.getCreatedDate() != null\n\t\t\t\t\t\t\t? \"TO_DATE('\" + npcMessageModel.getCreatedDate() + \"','\" + \"DD/MM/YYYY HH24:MI:SS\" + \"'),\"\n\t\t\t\t\t\t\t: \"NULL\")\n\t\t\t\t\t+ (!\"null\".equals(npcMessageModel.getNextMessageMaxDate())\n\t\t\t\t\t\t\t&& npcMessageModel.getNextMessageMaxDate() != null\n\t\t\t\t\t\t\t\t\t? \"TO_DATE('\" + npcMessageModel.getCurrentMessageMaxDate() + \"','\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"DD/MM/YYYY HH24:MI:SS\" + \"')\"\n\t\t\t\t\t\t\t\t\t: \"NULL\")\n\t\t\t\t\t+ \",\"\n\t\t\t\t\t+ (!\"null\".equals(npcMessageModel.getNextMessageMinDate())\n\t\t\t\t\t\t\t&& npcMessageModel.getNextMessageMinDate() != null\n\t\t\t\t\t\t\t\t\t? \"TO_DATE('\" + npcMessageModel.getCurrentMessageMinDate() + \"','\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"DD/MM/YYYY HH24:MI:SS\" + \"')\"\n\t\t\t\t\t\t\t\t\t: \"NULL\")\n\t\t\t\t\t+ \",\" + DBTypeConverter.toSQLVARCHAR2(npcMessageModel.getUserCommnet()) + \",\"\n\t\t\t\t\t+ DBTypeConverter.toSQLVARCHAR2(npcMessageModel.getMessageXML()) + \")\";\n\t\t\tstmt.execute(insertStmt);\n\t\t} catch (SQLException ex) {\n\t\t\tfinal String message = ex.getMessage();\n\t\t\tthrow new SQLException(message + \"[\" + insertStmt + \"]\");\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }", "@Override\n\t\t\tpublic Message createMessage(Session session) throws JMSException {\n\t\t\t\tMessage m = session.createTextMessage(s);\n\t\t\t\treturn m;\n\t\t\t}", "public Message addMessage(Message p);", "@Override\r\n public void writeMessage(Message msg) throws IOException {\n final StringBuilder buf = new StringBuilder();\r\n msg.accept(new DefaultVisitor() {\r\n\r\n @Override\r\n public void visitNonlocalizableTextFragment(VisitorContext ctx,\r\n NonlocalizableTextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n\r\n @Override\r\n public void visitPlaceholder(VisitorContext ctx, Placeholder placeholder) {\r\n buf.append(placeholder.getTextRepresentation());\r\n }\r\n\r\n @Override\r\n public void visitTextFragment(VisitorContext ctx, TextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n });\r\n out.write(buf.toString().getBytes(UTF8));\r\n }", "@Override\n\tpublic void saveDanmu(Danmu message) {\n\t\tsessionFactory.getCurrentSession().save(message);\n\n\t}", "@Override\n public void onClick(View v){\n EditText newMessageView=(EditText) findViewById(R.id.new_message);\n String newMessageView1 = newMessageView.getText().toString();\n newMessageView.setText(\"\");\n com.arunya.aarunya.Message msg = new com.arunya.aarunya.Message();\n msg.setmDate(new Date());\n msg.setmText(\"newMessage\");\n msg.setmSender(\"Raj\");\n\n MessageDataSource.saveMessage(msg,mConvoId); /*fetches message from edit text add to the message object */\n\n\n\n }", "@Override\n\tpublic void readMessage(Message message) {\n\t\t\n\t}", "public abstract void update(Message message);", "void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void insertMsg (SimpleMessage msg) {\t\t\n\t\trouter.add(msg);\n\t\tSimpleMessage peek = router.peek();\n\t\tif ((double)peek.size/1000 <= maxUpload - totSize){\n\t\t\ttotSize+= sendMsg()/1000;\n\t\t}\n\t}", "void mo23214a(Message message);", "@Test\n\tpublic void testMessage() {\n\t\tUserModel exampleUser = new UserModel();\n\t\texampleUser.setUserId(\"@tester_6\");\n\t\texampleUser.setUserPseudo(\"Test_pseudo\");\n\t\texampleUser.setUserEmail(\"[email protected]\");\n\t\texampleUser.setUserPassword(\"0e3e75234abc68f4378a86b3f4b32a198ba301845b0cd6e50106e874345700cc6663a86c1ea125dc5e92be17c98f9a0f85ca9d5f595db2012f7cc3571945c123\");\n\t\texampleUser.setUserDate(new Date(new java.util.Date().getTime()));\n\t\texampleUser.setUserAdmin(true);\n\t\ttry {\n\t\t\tUserDatabaseManager.insertUser(exampleUser);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot insert a new user for board testing !\");\n\t\t}\n\n\t\t// Test a new board to make new message\n\t\tBoardModel newBoard = new BoardModel();\n\t\tnewBoard.setBoardName(\"test_board2\");\n\t\tnewBoard.setBoardCreatorId(\"@tester_6\");\n\t\tnewBoard.setBoardDescription(\"This is the test board of the test user\");\n\t\ttry {\n\t\t\tBoardDatabaseManager.insertBoard(newBoard);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot insert a new board !\");\n\t\t}\n\n\t\t// Test message insertion\n\t\tMessageModel message = new MessageModel();\n\t\tmessage.setMessageBoardName(\"test_board2\");\n\t\tmessage.setMessageDate(new Date(new java.util.Date().getTime()));\n\t\tmessage.setMessageId(\"1\");\n\t\tmessage.setMessagePosterId(\"@tester\");\n\t\tmessage.setMessageText(\"This is a test message\");\n\t\ttry {\n\t\t\tassertEquals(\"1\", MessageDatabaseManager.getNextRootMessageId());\n\t\t\tMessageDatabaseManager.insertMessage(message);\n\t\t\tassertEquals(\"2\", MessageDatabaseManager.getNextRootMessageId());\n\t\t} catch (MongoException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot insert a new message !\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot add the message to the board !\");\n\t\t}\n\n\t\t// Test answer insertion\n\t\tMessageModel answer = new MessageModel();\n\t\tanswer.setMessageBoardName(\"test_board2\");\n\t\tanswer.setMessageDate(new Date(new java.util.Date().getTime()));\n\t\tanswer.setMessageId(message.getNextAnswerId());\n\t\tanswer.setMessagePosterId(\"@tester\");\n\t\tanswer.setMessageText(\"This is a test answer\");\n\t\ttry {\n\t\t\tMessageDatabaseManager.insertMessage(answer);\n\t\t} catch (MongoException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot insert an answer !\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot add the message to the board !\");\n\t\t}\n\n\t\t// Test updating\n\t\tanswer.setMessageText(\"LOL\");\n\t\ttry {\n\t\t\tMessageDatabaseManager.updateMessage(answer);\n\t\t} catch (MongoException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot update a message\");\n\t\t}\n\n\t\t// Test getting\n\t\tMessageFilter filter = new MessageFilter();\n\t\tfilter.addMessageId(\"1.\");\n\t\tList<MessageModel> messages = MessageDatabaseManager.getMessage(filter, true, true);\n\t\tassertEquals(\"1.1\", messages.get(0).getMessageId());\n\t\tassertEquals(\"LOL\", messages.get(0).getMessageText());\n\t\t\n\n\t\t// Test deleting\n\t\tMessageModel answerAnswer = new MessageModel();\n\t\tanswerAnswer.setMessageId(answer.getNextAnswerId());\n\t\tanswerAnswer.setMessageText(\"This is an answer to an answer\");\n\t\tanswerAnswer.setMessageBoardName(newBoard.getBoardName());\n\t\tanswerAnswer.setMessagePosterId(exampleUser.getUserId());\n\t\tanswerAnswer.setMessageDate(new Date(new java.util.Date().getTime()));\n\t\t\n\t\tBoardFilter newBoardFilter = new BoardFilter();\n\t\tnewBoardFilter.addBoardName(newBoard.getBoardName());\n\t\t\n\t\tmessage.addAnwserId(\"1.1\");\n\t\tanswer.addAnwserId(\"1.1.1\");\n\t\ttry {\n\t\t\tMessageDatabaseManager.insertMessage(answerAnswer);\n\t\t\tassertEquals(3, MessageDatabaseManager.getMessage(new MessageFilter(), false, true).size());\n\t\t\t\n\t\t\tBoardModel board = BoardDatabaseManager.getBoards(newBoardFilter, false).get(0);\n\t\t\tassertEquals(1, board.getBoardMessagesId().size());\n\n\t\t\tMessageDatabaseManager.deleteMessage(message);\n\t\t\tassertEquals(0, MessageDatabaseManager.getMessage(new MessageFilter(), false, true).size());\n\n\t\t\tboard = BoardDatabaseManager.getBoards(newBoardFilter, false).get(0);\n\t\t\tassertEquals(0, board.getBoardMessagesId().size());\n\t\t} catch (MongoException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot delete message !\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Cannot delete the message from the BELONGS_TO_BOARD table !\");\n\t\t}\n\n\t}", "void insert(TbMessage record);", "@Override\n\tpublic void directSendMessage(TransactionMessage transactionMessage) {\n\t\t\n\t}", "int insert(MsgContent record);", "private Message createJMSMessageForjmsMyQueue(Session session, Object messageData) throws JMSException {\n TextMessage tm = session.createTextMessage();\n tm.setText(messageData.toString());\n return tm;\n }", "public Message update(Message message) {\n if (message.getIdMessage()!= null) {\n Optional<Message> tmpMessage = messageRepository.getMessage(message.getIdMessage());\n if (!tmpMessage.isEmpty()) {\n if (message.getMessageText()!= null) {\n tmpMessage.get().setMessageText(message.getMessageText());\n }\n messageRepository.save(tmpMessage.get());\n return tmpMessage.get();\n\n } else {\n return message;\n }\n } else {\n return message;\n }\n }", "public void addMessage(DataMessage message) {\n\t\tthis.tableModel.addMessage(message);\n\t\tthis.showLastMessage();\n\t}", "@Override\r\n\tpublic void getMessage() {\n\t\tSystem.out.println(\"getMessage() 출력...\");\r\n\t}", "public void writeThrough(Message message) {\n Entity messageEntity = new Entity(\"chat-messages\", message.getId().toString());\n messageEntity.setProperty(\"uuid\", message.getId().toString());\n messageEntity.setProperty(\"conv_uuid\", message.getConversationId().toString());\n messageEntity.setProperty(\"author_uuid\", message.getAuthorId().toString());\n messageEntity.setProperty(\"content\", message.getContent());\n messageEntity.setProperty(\"creation_time\", message.getCreationTime().toString());\n datastore.put(messageEntity);\n }", "@Override\n\tpublic void visit(Message message) {\n\t}", "abstract void message(String message);", "private void commit(Message m) throws JMSException {\n\t\t// commit the transaction\n\t\tsession.commit();\n\n\t\t// get the current message counter\n\t\tint counter = m.getIntProperty(FailoverQSender.MESSAGE_COUNTER);\n\t\t// set the commit counter\n\n\t\tcommitCounter = counter;\n\t\t// clear app data\n\t\tthis.reset();\n\n\t\tlog(\"Messages committed, commitCounter: \" + commitCounter);\n\t}", "@Transactional\n @MessageMapping(\"/place-stone/{gameId}\")\n @SendTo(\"/topic/game/{gameId}\")\n public void sendMessage(StompSendMessage sendMessage) {\n\n\n // 1) 데이터 저장 (GameRecords Entity)\n // 게임\n // 로그인 유저\n Games game = gamesRepository.findById(sendMessage.getGameId());\n // 게임 종료 조건 시, Games 테이블의 상태 값 변경 (게임 종료 상태)\n if (sendMessage.getIsFinish() == GAME_OVER) {\n game.setGameStatus(GAME_OVER);\n }\n\n Users loginUser = usersRepository.findByNickname(sendMessage.getLoginUserNickname());\n\n GameRecords gameRecords = GameRecords.builder()\n .game(game)\n .loginUser(loginUser)\n .isFinish(sendMessage.getIsFinish())\n .x(sendMessage.getX())\n .y(sendMessage.getY())\n .unallowedList(sendMessage.getUnallowedList().toString())\n .prevStateList(sendMessage.getPrevStateList().toString())\n .stoneStatus(sendMessage.getLoginUserTurn())\n .build();\n\n // [GameRecords to game_records] Database에 저장\n gameRecordsRepository.save(gameRecords);\n\n // 2) 각 클라이언트로 착수한 돌 정보 전송 ( 돌 상태, 좌표 값 전송 )\n this.simpMessagingTemplate.convertAndSend(\"/topic/game/\"+sendMessage.getGameId(), sendMessage);\n\n }", "public void addMessage(ChatMessage message) {\n sqLiteHandler.addMessageToDB(message, this);\n messages.add(message);\n }", "public Message getMessage(){\n return message;\n }", "MessageQuery createMessageQuery();", "public boolean insert(Connection db) throws SQLException {\n\n StringBuffer sql = new StringBuffer();\n boolean commit = false;\n try {\n commit = db.getAutoCommit();\n if (commit) {\n db.setAutoCommit(false);\n }\n id = DatabaseUtils.getNextSeq(db, \"message_id_seq\");\n sql.append(\n \"INSERT INTO \" + DatabaseUtils.addQuotes(db, \"message\") + \" \" +\n \"(name, description, template_id, subject, body, reply_addr, url, img, access_type, enabled, \");\n if (id > -1) {\n sql.append(\"id, \");\n }\n sql.append(\"entered, modified, \");\n sql.append(\"enteredBy, modifiedBy ) \");\n sql.append(\"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, \");\n if (id > -1) {\n sql.append(\"?,\");\n }\n if (entered != null) {\n sql.append(\"?, \");\n } else {\n sql.append(DatabaseUtils.getCurrentTimestamp(db) + \", \");\n }\n if (modified != null) {\n sql.append(\"?, \");\n } else {\n sql.append(DatabaseUtils.getCurrentTimestamp(db) + \", \");\n }\n sql.append(\"?, ?) \");\n\n int i = 0;\n PreparedStatement pst = db.prepareStatement(sql.toString());\n pst.setString(++i, this.getName());\n pst.setString(++i, this.getDescription());\n pst.setInt(++i, this.getTemplateId());\n pst.setString(++i, this.getMessageSubject());\n pst.setString(++i, this.getMessageText());\n pst.setString(++i, this.getReplyTo());\n pst.setString(++i, this.getUrl());\n pst.setString(++i, this.getImage());\n pst.setInt(++i, this.getAccessType());\n pst.setBoolean(++i, this.getEnabled());\n if (id > -1) {\n pst.setInt(++i, id);\n }\n if (entered != null) {\n pst.setTimestamp(++i, entered);\n }\n if (modified != null) {\n pst.setTimestamp(++i, modified);\n }\n pst.setInt(++i, this.getEnteredBy());\n pst.setInt(++i, this.getModifiedBy());\n\n pst.execute();\n pst.close();\n\n id = DatabaseUtils.getCurrVal(db, \"message_id_seq\", id);\n\n this.update(db, true);\n if (commit) {\n db.commit();\n }\n } catch (SQLException e) {\n if (commit) {\n db.rollback();\n }\n e.printStackTrace();\n throw new SQLException(e.getMessage());\n } finally {\n if (commit) {\n db.setAutoCommit(true);\n }\n }\n return true;\n }" ]
[ "0.6745767", "0.6736004", "0.66640127", "0.6662291", "0.6660139", "0.6610405", "0.65650135", "0.65232503", "0.6485447", "0.6482667", "0.64787346", "0.6395106", "0.63846785", "0.63482857", "0.63481706", "0.6297325", "0.62883687", "0.62708926", "0.62684226", "0.6261518", "0.62595445", "0.6240164", "0.62392163", "0.6239138", "0.6223581", "0.62218225", "0.6219882", "0.62160146", "0.6208447", "0.6184973", "0.61811286", "0.6179886", "0.6179881", "0.61790025", "0.6178708", "0.6170653", "0.6168686", "0.6154929", "0.6154929", "0.6154929", "0.6154929", "0.6154929", "0.61523235", "0.61438835", "0.61407226", "0.61222726", "0.6111714", "0.61110175", "0.61011374", "0.60886186", "0.6084744", "0.6080773", "0.60793144", "0.60708684", "0.607027", "0.606553", "0.6047517", "0.60346484", "0.60176533", "0.6015329", "0.6005377", "0.600496", "0.6002803", "0.60008144", "0.59846073", "0.59576255", "0.59346104", "0.5929284", "0.5916971", "0.590623", "0.59050703", "0.59034497", "0.58978546", "0.5896735", "0.5895263", "0.5891984", "0.5888591", "0.5888167", "0.5882996", "0.58815986", "0.58805245", "0.5874442", "0.5874322", "0.5869989", "0.5869919", "0.58681494", "0.58589226", "0.5858672", "0.58553714", "0.5853972", "0.58497274", "0.5847174", "0.5840718", "0.58378434", "0.5836318", "0.58349496", "0.5834609", "0.58325857", "0.5832161", "0.58308077", "0.5829851" ]
0.0
-1
Utility method that consults ParserService
public static IParser getParser(IElementType type, EObject object, String parserHint) { return ParserService.getInstance().getParser( new HintAdapter(type, object, parserHint)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CParser getParser();", "private Parser () { }", "public interface Parser {\n\n}", "protected Parser getParser() throws TemplateException {\n try {\n return (Parser) _broker.getValue(\"parser\",\"wm\"); \n } catch (Exception e) {\n Engine.log.exception(e);\n throw new TemplateException(\"Could not load parser type \\\"\" + \n _parserName + \"\\\": \" + e);\n }\n }", "private ParseInterface getParser(String sid) {\n if (parseMap.containsKey(sid)) {\n return parseMap.get(sid);\n } else {\n Log.d(TAG, \"Could not instantiate \" + sid + \"parser\");\n }\n return null;\n }", "protected Parser getParser() {\n\t\treturn myParser;\n\t}", "@Override\n\t\t\t\tpublic boolean hasParser() {\n\t\t\t\t\treturn true;\n\t\t\t\t}", "private TwigcsResultParser getParser() {\n\t\tif (parser == null) {\n\t\t\tparser = new TwigcsResultParser();\n\t\t}\n\t\treturn parser;\n\t}", "private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }", "public interface XMLParser {\n\n String parse();\n}", "CParserResult getParserResult();", "abstract protected Parser createSACParser();", "public interface JSONParserService extends Service {\r\n\r\n /**\r\n * Parses from json to map\r\n *\r\n * @param json data\r\n * @return Map<String, Object> or null, if json equals null\r\n */\r\n Map<String, Object> parseToMap(String json);\r\n\r\n /**\r\n * Parses from map to json\r\n *\r\n * @param data map with data\r\n * @return json or null, if map equals null\r\n */\r\n String parseMapToJson(Map<String, Object> data);\r\n\r\n /**\r\n * Parses from object to json\r\n *\r\n * @param obj object that will be parsed to json\r\n * @return json or null if invalid data\r\n */\r\n String parseObjectToJson(Object obj);\r\n\r\n /**\r\n * Parses from json to object of T class\r\n *\r\n * @param json string of json with data object\r\n * @param classObject type object\r\n *\r\n * @return T object or null, if transferred incorrect data\r\n */\r\n <T> T parseToObject(Object json, Class<T> classObject);\r\n\r\n /**\r\n * Parses from json to collection of object's T class\r\n *\r\n * @param json string of json with data objects\r\n * @param typeClass type of objects collection\r\n *\r\n * @return collection of object's T class or null, if transferred incorrect data\r\n */\r\n <T> Collection<T> parseToCollectionObjects(Object json, Type typeClass);\r\n\r\n\r\n}", "public Parser() {\n\t\tpopulateMaps();\n\t}", "public interface IParser {\n\n /**\n * Coco/R generated function. It is used to inform parser about semantic errors.\n */\n void SemErr(String str);\n\n /**\n * Coco/R generated function for parsing input. The signature was changes in parsers' frame files so that it\n * receives source argument.\n *\n * @param source source to be parsed\n */\n void Parse(Source source);\n\n /**\n * Resets the parser but not the {@link NodeFactory} instance it holds. This way it can be used multiple times with\n * storing current state (mainly identifiers table). This is useful for parsing unit files before parsing the actual\n * source.\n */\n void reset();\n\n /**\n * Returns whether there were any errors throughout the parsing of the last source.\n */\n boolean hadErrors();\n\n /**\n * Sets support for extended goto. If this option is turned on, the parser will generate {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.ExtendedBlockNode}s\n * instead of {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode}s.\n */\n void setExtendedGoto(boolean extendedGoto);\n\n /**\n * Returns true if the support for Turbo Pascal extensions is turned on.\n */\n boolean isUsingTPExtension();\n\n /**\n * Reutnrs the root node of the last parsed source.\n */\n RootNode getRootNode();\n\n}", "public Parser() {}", "public interface TextParserService {\n\n public Optional<String> parseStringToHtml(String input) throws TextParsingException;\n\n public Optional<String> parseStringToHtml(String input, int limit) throws TextParsingException;\n\n\n}", "public ResolvingXMLReader(CatalogManager manager) {\n/* 86 */ super(manager);\n/* 87 */ SAXParserFactory spf = JdkXmlUtils.getSAXFactory(this.catalogManager.overrideDefaultParser());\n/* 88 */ spf.setValidating(validating);\n/* */ try {\n/* 90 */ SAXParser parser = spf.newSAXParser();\n/* 91 */ setParent(parser.getXMLReader());\n/* 92 */ } catch (Exception ex) {\n/* 93 */ ex.printStackTrace();\n/* */ } \n/* */ }", "public void parse() {\n }", "public interface Parser {\n\t\n\t/**\n\t * A method to parse the file\n\t * @param file the file\n\t * @return the content\n\t */\n\tpublic String parse(File file);\n\t\n}", "public Process parse(InputSource isrc, URI systemURI) throws IOException, SAXException {\n XMLReader _xr = XMLParserUtils.getXMLReader();\n LocalEntityResolver resolver = new LocalEntityResolver();\n resolver.register(Bpel11QNames.NS_BPEL4WS_2003_03, getClass().getResource(\"/bpel4ws_1_1-fivesight.xsd\"));\n resolver.register(Bpel20QNames.NS_WSBPEL2_0, getClass().getResource(\"/wsbpel_main-draft-Apr-29-2006.xsd\"));\n resolver.register(Bpel20QNames.NS_WSBPEL2_0_FINAL_ABSTRACT, getClass().getResource(\"/ws-bpel_abstract_common_base.xsd\"));\n resolver.register(Bpel20QNames.NS_WSBPEL2_0_FINAL_EXEC, getClass().getResource(\"/ws-bpel_executable.xsd\"));\n resolver.register(Bpel20QNames.NS_WSBPEL2_0_FINAL_PLINK, getClass().getResource(\"/ws-bpel_plnktype.xsd\"));\n resolver.register(Bpel20QNames.NS_WSBPEL2_0_FINAL_SERVREF, getClass().getResource(\"/ws-bpel_serviceref.xsd\"));\n resolver.register(Bpel20QNames.NS_WSBPEL2_0_FINAL_VARPROP, getClass().getResource(\"/ws-bpel_varprop.xsd\"));\n resolver.register(XML, getClass().getResource(\"/xml.xsd\"));\n resolver.register(WSDL,getClass().getResource(\"/wsdl.xsd\"));\n resolver.register(Bpel20QNames.NS_WSBPEL_PARTNERLINK_2004_03,\n getClass().getResource(\"/wsbpel_plinkType-draft-Apr-29-2006.xsd\"));\n _xr.setEntityResolver(resolver);\n Document doc = DOMUtils.newDocument();\n _xr.setContentHandler(new DOMBuilderContentHandler(doc));\n _xr.setFeature(\"http://xml.org/sax/features/namespaces\",true);\n _xr.setFeature(\"http://xml.org/sax/features/namespace-prefixes\", true);\n \n _xr.setFeature(\"http://xml.org/sax/features/validation\", true);\n\t\tXMLParserUtils.addExternalSchemaURL(_xr, Bpel11QNames.NS_BPEL4WS_2003_03, Bpel11QNames.NS_BPEL4WS_2003_03);\n\t\tXMLParserUtils.addExternalSchemaURL(_xr, Bpel20QNames.NS_WSBPEL2_0, Bpel20QNames.NS_WSBPEL2_0);\n\t\tXMLParserUtils.addExternalSchemaURL(_xr, Bpel20QNames.NS_WSBPEL2_0_FINAL_EXEC, Bpel20QNames.NS_WSBPEL2_0_FINAL_EXEC);\n\t\tXMLParserUtils.addExternalSchemaURL(_xr, Bpel20QNames.NS_WSBPEL2_0_FINAL_ABSTRACT, Bpel20QNames.NS_WSBPEL2_0_FINAL_ABSTRACT);\n BOMSAXErrorHandler errorHandler = new BOMSAXErrorHandler();\n _xr.setErrorHandler(errorHandler);\n _xr.parse(isrc);\n if (Boolean.parseBoolean(System.getProperty(\"org.apache.ode.compiler.failOnValidationErrors\", \"false\"))) {\n\t if (!errorHandler.wasOK()) {\n\t \tthrow new SAXException(\"Validation errors during parsing\");\n\t }\n } else {\n \tif (!errorHandler.wasOK()) {\n \t\t__log.warn(\"Validation errors during parsing, continuing due to -Dorg.apache.ode.compiler.failOnValidationErrors=false switch\");\n \t}\n }\n return (Process) createBpelObject(doc.getDocumentElement(), systemURI);\n }", "public StringParser getStringParser();", "private SAXParserProvider() {\n // empty\n }", "private void init() throws EPPParserException {\n\t\tcat.debug(\"init() enter\");\n\n\t\tcat.info(\"Creating parser instance with symbol table size: \"\n\t\t\t\t + symbolTableSize);\n\n\t\t// Explicitly providing an XMLConfiguration here\n\t\t// prevents Xerces from going out and looking up\n\t\t// the default parser configuration from the System properties\n\t\t// If the symbol table size is 0 then don't create a symbol table. Just\n\t\t// use the default constructor for the XMLConfiguration. The default from\n\t\t// the XMLConfiguration will be used\n\t\tif (symbolTableSize == 0) {\n\t\t\t/**\n\t\t\t * @todo change the configuration that's instantiated to be\n\t\t\t * \t\t configurable\n\t\t\t */\n\t\t\tparserImpl = new DOMParser(new XMLGrammarCachingConfiguration());\n\t\t}\n\t\telse {\n\t\t\tSymbolTable symbolTable = new SymbolTable(symbolTableSize);\n\n\t\t\t/**\n\t\t\t * @todo change the configuration that's instantiated to be\n\t\t\t * \t\t configurable\n\t\t\t */\n\t\t\tparserImpl = new DOMParser(new XML11Configuration(symbolTable));\n\t\t}\n\n\t\t// Register this instance with the entity resolver\n\t\tEPPSchemaCachingEntityResolver resolver =\n\t\t\tnew EPPSchemaCachingEntityResolver(this);\n\n\t\tparserImpl.setEntityResolver(resolver);\n\n\t\t// setup the default behavior for this parser\n\t\tcat.debug(\"Setting default parser features. Namespaces and Schema validation are on\");\n\n\t\ttry {\n\n if (EPPEnv.getValidating()) {\n parserImpl.setFeature(VALIDATION_FEATURE_ID, true);\n parserImpl.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);\n }\n\n if (EPPEnv.getFullSchemaChecking()) {\n parserImpl.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);\n }\n\n // set other properties of the parser -\n parserImpl.setFeature(LOAD_EXTERNAL_DTD, false);\n parserImpl.setFeature(LOAD_DTD_GRAMMAR, false);\n parserImpl.setFeature(CREATE_ENTITY_REF_NODES, false);\n parserImpl.setFeature(INCLUDE_IGNORABLE_WHITE_SPACE, false);\n parserImpl.setFeature(EXTERNAL_GENERAL_ENTITIES, false);\n parserImpl.setFeature(EXTERNAL_PARAMETER_ENTITIES, false);\n\n\t\t\tparserImpl.setFeature(NAMESPACES_FEATURE_ID, true);\n \t\tparserImpl.setFeature(DEFER_NODE_EXPANSION, false);\n\t\t}\n catch (SAXException e) {\n\t\t\tcat.error(\"setting features of parserImpl failed\", e);\n\t\t\tthrow new EPPParserException(e);\n\t\t}\n \n // Pre-load the XML schemas based on the registerd EPPMapFactory \n // and EPPExtFactory instances.\n Set theSchemas = EPPFactory.getInstance().getXmlSchemas();\n Iterator theSchemasIter = theSchemas.iterator();\n while (theSchemasIter.hasNext()) {\n \tString theSchemaName = (String) theSchemasIter.next();\n \t\n \tcat.debug(\"init(): Pre-loading XML schema \\\"\" + theSchemaName + \"\\\"\");\n \t\n \t\t// lookup the file name in this classes's classpath under \"schemas\"\n \t\tInputStream theSchemaStream =\n \t\t\tgetClass().getClassLoader().getResourceAsStream(\"schemas/\"\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ theSchemaName);\n\n \t\n \tthis.addSchemaToCache(new XMLInputSource(theSchemaName, theSchemaName, theSchemaName, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheSchemaStream, null));\n }\n \n \n\t\tcat.debug(\"init() exit\");\n\t}", "@Test\n void testParser() {\n VmParsingHelper.DEFAULT.parse(VM_SRC);\n }", "public interface MediaWikiParser {\n\t/**\n\t * Parses MediaWiki Source, given as parameter src, and returns a ParsedPage.\n\t */\n\tpublic ParsedPage parse(String src);\n\t\n\t/**\n\t * Retruns information abour the configuration of the parser.\n\t */\n\tpublic String configurationInfo();\n\t\n\t/**\n\t * Retruns the String which is uses as line separator, usually it \n\t * will be \"\\n\" or \"\\r\\n\"\n\t */\n\tpublic String getLineSeparator();\n}", "@Before\n public void buildParser() throws Exception {\n parser = new com.putable.siteriter.msmith19.SDLParserImpl();\n }", "private Sentence parseSentence(Sentence s) throws Exception {\n\t\tif(s == null)\n\t\t\treturn null;\n\t\treturn (useParser)?textTools.parseSentence(s):s;\n\t}", "public IncrementalSAXSource_Xerces()\n throws NoSuchMethodException\n {\n try\n {\n // This should be cleaned up and the use of reflection\n // removed - see JDK-8129880\n\n // Xerces-2 incremental parsing support (as of Beta 3)\n // ContentHandlers still get set on fIncrementalParser (to get\n // conversion from XNI events to SAX events), but\n // _control_ for incremental parsing must be exercised via the config.\n //\n // At this time there's no way to read the existing config, only\n // to assert a new one... and only when creating a brand-new parser.\n //\n // Reflection is used to allow us to continue to compile against\n // Xerces1. If/when we can abandon the older versions of the parser,\n // this will simplify significantly.\n\n // If we can't get the magic constructor, no need to look further.\n Class<?> xniConfigClass=ObjectFactory.findProviderClass(\n \"com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration\",\n true);\n Class<?>[] args1={xniConfigClass};\n Constructor<?> ctor=SAXParser.class.getConstructor(args1);\n\n // Build the parser configuration object. StandardParserConfiguration\n // happens to implement XMLPullParserConfiguration, which is the API\n // we're going to want to use.\n Class<?> xniStdConfigClass=ObjectFactory.findProviderClass(\n \"com.sun.org.apache.xerces.internal.parsers.StandardParserConfiguration\",\n true);\n fPullParserConfig=xniStdConfigClass.getConstructor().newInstance();\n Object[] args2={fPullParserConfig};\n fIncrementalParser = (SAXParser)ctor.newInstance(args2);\n\n // Preload all the needed the configuration methods... I want to know they're\n // all here before we commit to trying to use them, just in case the\n // API changes again.\n Class<?> fXniInputSourceClass=ObjectFactory.findProviderClass(\n \"com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource\",\n true);\n Class<?>[] args3={fXniInputSourceClass};\n fConfigSetInput=xniStdConfigClass.getMethod(\"setInputSource\",args3);\n\n Class<?>[] args4={String.class,String.class,String.class};\n fConfigInputSourceCtor=fXniInputSourceClass.getConstructor(args4);\n Class<?>[] args5={java.io.InputStream.class};\n fConfigSetByteStream=fXniInputSourceClass.getMethod(\"setByteStream\",args5);\n Class<?>[] args6={java.io.Reader.class};\n fConfigSetCharStream=fXniInputSourceClass.getMethod(\"setCharacterStream\",args6);\n Class<?>[] args7={String.class};\n fConfigSetEncoding=fXniInputSourceClass.getMethod(\"setEncoding\",args7);\n\n Class<?>[] argsb={Boolean.TYPE};\n fConfigParse=xniStdConfigClass.getMethod(\"parse\",argsb);\n Class<?>[] noargs=new Class<?>[0];\n fReset=fIncrementalParser.getClass().getMethod(\"reset\",noargs);\n }\n catch(Exception e)\n {\n // Fallback if this fails (implemented in createIncrementalSAXSource) is\n // to attempt Xerces-1 incremental setup. Can't do tail-call in\n // constructor, so create new, copy Xerces-1 initialization,\n // then throw it away... Ugh.\n IncrementalSAXSource_Xerces dummy=new IncrementalSAXSource_Xerces(new SAXParser());\n this.fParseSomeSetup=dummy.fParseSomeSetup;\n this.fParseSome=dummy.fParseSome;\n this.fIncrementalParser=dummy.fIncrementalParser;\n }\n }", "private SAXParser getSAXParser() {\n\t SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();\n\t if (saxParserFactory == null) {\n\t return null;\n\t }\n\t SAXParser saxParser = null;\n\t try {\n\t saxParser = saxParserFactory.newSAXParser();\n\t } catch (Exception e) {\n\t }\n\t return saxParser;\n\t }", "public interface Parseable\n{\n\n /**\n * Returns a new {@link GTIParser}.\n * \n * @param gtiScanner The input {@link GTIScanner}.\n * @return A new {@link GTIParser}.\n * @see Parseable#newParser(GTIScanner)\n */\n public GTIParser newParser ( GTIScanner gtiScanner );\n\n\n /**\n * Returns a new {@link GTIParser}.\n * \n * @param pText The input {@link String}.\n * @return A new {@link GTIParser}.\n * @see Parseable#newParser(String)\n */\n public GTIParser newParser ( String pText );\n\n\n /**\n * Returns a new {@link GTIScanner}.\n * \n * @param text The input {@link String}.\n * @return A new {@link GTIScanner}.\n * @see Parseable#newScanner(String)\n */\n public GTIScanner newScanner ( String text );\n}", "private Parser[] getParsers() {\n return new Parser[]{new OpenDocumentParser()};\n }", "public void initParser() {;\r\n lp = DependencyParser.loadFromModelFile(\"edu/stanford/nlp/models/parser/nndep/english_SD.gz\");\r\n tokenizerFactory = PTBTokenizer\r\n .factory(new CoreLabelTokenFactory(), \"\");\r\n }", "public interface ResponseParser {\r\n\t\r\n\tList<Place> parseSearchResponse(String rawJson) throws Exception;\r\n\t\r\n\tList<Place> parseFilteredSearchResponse(String rawJson) throws Exception;\r\n\r\n}", "Parse createParse();", "interface IXMLParser\n{\n boolean exists (String path);\n\n Node getNode (String path);\n\n Node[] getChildren (String path);\n\n String getText (String path);\n\n void setText (String path, String value);\n\n String getAttribute (String path, String attributeName);\n\n String setAttribute (String path, String attributeName);\n}", "public interface QueryResponseParser {\n Documents<IdolSearchResult> parseQueryResults(AciSearchRequest<String> searchRequest, AciParameters aciParameters, QueryResponseData responseData, IdolDocumentService.QueryExecutor queryExecutor);\n\n List<IdolSearchResult> parseQueryHits(Collection<Hit> hits);\n}", "public interface Parser {\r\n String parse(String path) throws ParsingException;\r\n Map<String, String> parse(Map<String, String> paths) throws ParsingException;\r\n}", "public abstract IParser[] getParserOptionSet();", "public ResolveByExtension() {\n this.parsers = new HashMap<>();\n }", "List<ParseData> parse(ParseDataSettings parseData);", "@Override\n\tprotected List<String> performScanning(String inputFilePath) {\n\t\tList<String> resultList = App.fileParser(inputFilePath);\n\t\treturn resultList;\n\t}", "private PersonDao parseXmlStringPerson(String xmlDoc){\n try {\n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n PersonHandler personHandle = new PersonHandler();\n saxParser.parse(new InputSource(new StringReader(xmlDoc)), personHandle);\n return ((ArrayList<PersonDao>)personHandle.getObjects()).get(0);\n } catch (Exception e) {\n AppLogger.getLogger().error(e.getMessage());\n }\n return null;\n }", "@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "public IParser getParserSuccessfull ( ){ return mParserSuccessfull; }", "void read(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException;", "public interface Parser<T> {\n\t\n\t/**\n\t * Il metodo che deve essere completato per poter analizzare la stringa\n\t * @param value la stringa da analizzare\n\t * @return il tipo di dato voluto\n\t */\n\tpublic T parse(String value);\n\t\n}", "public void mo1779d(XmlPullParser xmlPullParser) {\n }", "private void parseConfig() {\n try {\n synonymAnalyzers = new HashMap<>();\n\n Object xmlSynonymAnalyzers = args.get(\"synonymAnalyzers\");\n\n if (xmlSynonymAnalyzers != null && xmlSynonymAnalyzers instanceof NamedList) {\n NamedList<?> synonymAnalyzersList = (NamedList<?>) xmlSynonymAnalyzers;\n for (Entry<String, ?> entry : synonymAnalyzersList) {\n String analyzerName = entry.getKey();\n if (!(entry.getValue() instanceof NamedList)) {\n continue;\n }\n NamedList<?> analyzerAsNamedList = (NamedList<?>) entry.getValue();\n\n TokenizerFactory tokenizerFactory = null;\n TokenFilterFactory filterFactory;\n List<TokenFilterFactory> filterFactories = new LinkedList<>();\n\n for (Entry<String, ?> analyzerEntry : analyzerAsNamedList) {\n String key = analyzerEntry.getKey();\n if (!(entry.getValue() instanceof NamedList)) {\n continue;\n }\n Map<String, String> params = convertNamedListToMap((NamedList<?>)analyzerEntry.getValue());\n\n String className = params.get(\"class\");\n if (className == null) {\n continue;\n }\n\n params.put(\"luceneMatchVersion\", luceneMatchVersion.toString());\n\n if (key.equals(\"tokenizer\")) {\n try {\n tokenizerFactory = TokenizerFactory.forName(className, params);\n } catch (IllegalArgumentException iae) {\n if (!className.contains(\".\")) {\n iae.printStackTrace();\n }\n // Now try by classname instead of SPI keyword\n tokenizerFactory = loader.newInstance(className, TokenizerFactory.class, new String[]{}, new Class[] { Map.class }, new Object[] { params });\n }\n if (tokenizerFactory instanceof ResourceLoaderAware) {\n ((ResourceLoaderAware)tokenizerFactory).inform(loader);\n }\n } else if (key.equals(\"filter\")) {\n try {\n filterFactory = TokenFilterFactory.forName(className, params);\n } catch (IllegalArgumentException iae) {\n if (!className.contains(\".\")) {\n iae.printStackTrace();\n }\n // Now try by classname instead of SPI keyword\n filterFactory = loader.newInstance(className, TokenFilterFactory.class, new String[]{}, new Class[] { Map.class }, new Object[] { params });\n }\n if (filterFactory instanceof ResourceLoaderAware) {\n ((ResourceLoaderAware)filterFactory).inform(loader);\n }\n filterFactories.add(filterFactory);\n }\n }\n if (tokenizerFactory == null) {\n throw new SolrException(ErrorCode.SERVER_ERROR,\n \"tokenizer must not be null for synonym analyzer: \" + analyzerName);\n } else if (filterFactories.isEmpty()) {\n throw new SolrException(ErrorCode.SERVER_ERROR,\n \"filter factories must be defined for synonym analyzer: \" + analyzerName);\n }\n\n TokenizerChain analyzer = new TokenizerChain(tokenizerFactory,\n filterFactories.toArray(new TokenFilterFactory[filterFactories.size()]));\n\n synonymAnalyzers.put(analyzerName, analyzer);\n }\n }\n } catch (IOException e) {\n throw new SolrException(ErrorCode.SERVER_ERROR, \"Failed to create parser. Check your config.\", e);\n }\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "private PLPParser makeParser(String input) throws LexicalException {\n\t\t\tshow(input); //Display the input \n\t\t\tPLPScanner scanner = new PLPScanner(input).scan(); //Create a Scanner and initialize it\n\t\t\tshow(scanner); //Display the Scanner\n\t\t\tPLPParser parser = new PLPParser(scanner);\n\t\t\treturn parser;\n\t\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localErrorMessageTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\n \"errorMessage\"));\n \n elementList.add(localErrorMessage==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localErrorMessage));\n } if (localResponseXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\n \"responseXml\"));\n \n elementList.add(localResponseXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localResponseXml));\n } if (localResultTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\n \"result\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localResult));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "private Parser() {\n objetos = new ListaEnlazada();\n }", "public interface Parser {\n\n ParsedObject[] parse();\n}", "private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}", "public void testParser() throws Exception {\n assertEquals(\"http://util.java/HashMap\", parse(HashMap.class));\n assertEquals(\"http://simpleframework.org/xml/Element\", parse(Element.class));\n assertEquals(\"http://simpleframework.org/xml/ElementList\", parse(ElementList.class));\n assertEquals(\"http://w3c.org/dom/Node\", parse(Node.class));\n assertEquals(\"http://simpleframework.org/xml/strategy/PackageParser\", parse(PackageParser.class));\n \n assertEquals(HashMap.class, revert(\"http://util.java/HashMap\"));\n assertEquals(Element.class, revert(\"http://simpleframework.org/xml/Element\"));\n assertEquals(ElementList.class, revert(\"http://simpleframework.org/xml/ElementList\"));\n assertEquals(Node.class, revert(\"http://w3c.org/dom/Node\"));\n assertEquals(PackageParser.class, revert(\"http://simpleframework.org/xml/strategy/PackageParser\"));\n \n long start = System.currentTimeMillis();\n for(int i = 0; i < ITERATIONS; i++) {\n fastParse(ElementList.class);\n }\n long fast = System.currentTimeMillis() - start;\n start = System.currentTimeMillis();\n for(int i = 0; i < ITERATIONS; i++) {\n parse(ElementList.class);\n }\n long normal = System.currentTimeMillis() - start;\n System.out.printf(\"fast=%sms normal=%sms diff=%s%n\", fast, normal, normal / fast);\n }", "void parse();", "public void runParser() throws Exception {\n\t\tparseXmlFile();\r\n\t\t\r\n\t\t//get each employee element and create a Employee object\r\n\t\tparseDocument();\r\n\t\t\r\n\t\t//Iterate through the list and print the data\r\n\t\t//printData();\r\n\t\t\r\n\t}", "public void setupParser(InputStream is) {\r\n inputSource = new InputSource(is);\r\n }", "public void parse()\n throws ClassNotFoundException, IllegalAccessException,\n\t InstantiationException, IOException, SAXException,\n\t ParserConfigurationException\n {\n\tSAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();\n\txmlReader = saxParser.getXMLReader();\n\txmlReader.setContentHandler(this);\n\txmlReader.setEntityResolver(this);\n\txmlReader.setErrorHandler(this);\n\txmlReader.setDTDHandler(this);\n\txmlReader.parse(xmlSource);\n\t}", "void initBeforeParsing() {\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localNameTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"name\"));\r\n \r\n elementList.add(localName==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n } if (localIpTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"ip\"));\r\n \r\n elementList.add(localIp==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localIp));\r\n } if (localPortTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"port\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPort));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localTokenTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"token\"));\n \n elementList.add(localToken==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localToken));\n } if (localObjectNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"objectName\"));\n \n elementList.add(localObjectName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localObjectName));\n } if (localOldProperty_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldProperty_description\"));\n \n elementList.add(localOldProperty_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldProperty_description));\n } if (localOldValues_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldValues_description\"));\n \n elementList.add(localOldValues_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldValues_description));\n } if (localNewProperty_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newProperty_description\"));\n \n elementList.add(localNewProperty_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewProperty_description));\n } if (localNewValues_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newValues_description\"));\n \n elementList.add(localNewValues_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewValues_description));\n } if (localOldProperty_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldProperty_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldProperty_descriptionType));\n } if (localOldValues_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldValues_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldValues_descriptionType));\n } if (localNewProperty_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newProperty_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewProperty_descriptionType));\n } if (localNewValues_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newValues_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewValues_descriptionType));\n } if (localOldCardinalityTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldCardinalityType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldCardinalityType));\n } if (localOldCardinalityNumTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldCardinalityNum\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldCardinalityNum));\n } if (localNewCardinalityTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newCardinalityType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewCardinalityType));\n } if (localNewCardinalityNumTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newCardinalityNum\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewCardinalityNum));\n } if (localDescriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDescriptionType));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n if (local_return!=null) {\r\n for (int i = 0;i < local_return.length;i++){\r\n\r\n if (local_return[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(local_return[i]);\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(local_return);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public interface Parser extends ProvidesFeedback {\n\n\t/**\n\t * Parses input provided by a given lexical analyzer\n\t * \n\t * @param lex\n\t * the lexical analyzer\n\t */\n\tpublic void parse(Lexer lex);\n\n}", "public static Parser getInstance(Context ctx){\n if(instance == null){\n instance = new Parser(ctx);\n }\n return instance;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate StaticBasicParserPool getParserPool() {\n\t\ttry {\n\t\t\tStaticBasicParserPool parserPool = new StaticBasicParserPool();\n\t\t\tparserPool.setBuilderFeatures(Collections.singletonMap(\"http://apache.org/xml/features/dom/defer-node-expansion\", false));\n\t\t\tparserPool.initialize();\n\t\t\treturn parserPool;\n\t\t} catch (XMLParserException e) {\n\t\t\tthrow new RuntimeException(\"Error while initilizing parse pool\", e);\n\t\t}\n\t}", "public void mo1778c(XmlPullParser xmlPullParser) {\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"id\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localId));\r\n } if (localIpTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"ip\"));\r\n \r\n elementList.add(localIp==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localIp));\r\n } if (localNameTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"name\"));\r\n \r\n elementList.add(localName==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n } if (localPortTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"port\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPort));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "private static DocumentBuilder instantiateParser()\n throws IOException {\n\n DocumentBuilder parser = null;\n\n try {\n DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();\n fac.setNamespaceAware( true );\n fac.setValidating( false );\n fac.setIgnoringElementContentWhitespace( false );\n parser = fac.newDocumentBuilder();\n return parser;\n } catch ( ParserConfigurationException e ) {\n throw new IOException( \"Unable to initialize DocumentBuilder: \" + e.getMessage() );\n }\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n if (local_return!=null){\r\n for (int i = 0;i < local_return.length;i++){\r\n \r\n if (local_return[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return[i]));\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n \r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public EPPSchemaCachingParser() {\n\t\ttry {\n\t\t\tinit();\n\t\t}\n\t\t catch (EPPParserException e) {\n\t\t\tcat.error(\"Couldn't instantiate parser instance\", e);\n\t\t}\n\t}", "@Before\n\tpublic void initParser() {\n\t\tXMLTagParser.init(file);\n\t}", "void setParser(CParser parser);", "private interface ParseInterface {\n public void parse(String sentence);\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getDirectSrvInfoReturn\"));\n \n \n elementList.add(localGetDirectSrvInfoReturn==null?null:\n localGetDirectSrvInfoReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "private PersistenceUnitInfoImpl parseResources(ConfigurationParser parser,\n List<URL> urls, String name, ClassLoader loader)\n throws IOException {\n List<PersistenceUnitInfoImpl> pinfos = new ArrayList<>();\n for (URL url : urls) {\n parser.parse(url);\n pinfos.addAll((List<PersistenceUnitInfoImpl>) parser.getResults());\n }\n return findUnit(pinfos, name, loader);\n }", "public interface ClassParserFactory {\n\n ClassParser createParser(Class<?> clazz);\n}", "public static Parser getInstance() {\n return instance;\n }", "public interface Parser<T> {\n T parse(String source) throws JAXBException;\n\n\n List<String> groupContent(String content);\n\n}", "public interface IParserComp extends IPAMOJAComponent {\n\n /**\n * Returns a parser object. \n * This an abstract method to be implemented by the descendants.\n * @return the parser object.\n */\n CParser getParser();\n\n /**\n * Sets the specified parser object to this parser component.\n * This an abstract method to be implemented by the descendants.\n * @param parser @author Jackline Ssanyu ([email protected])\n */\n void setParser(CParser parser);\n\n /**\n * Returns a parser-result object containing boolean value (indicating whether a parse was successful or not) and the parse tree constructed. \n * This an abstract method to be implemented by the descendants.\n * \n * @return the value of the parser-result object.\n */\n CParserResult getParserResult(); \n\n /**\n *\n * @return\n */\n ArrayList<CParseLog> getLogs();\n\n /**\n * Links to <code>GrammarComp</code> component via its interface.\n * Sets the value of <code>Grammar</code> and registers for property change events.\n * \n * @param aGrammar new value of Grammar\n */\n void setGrammar(IGrammarComp aGrammar);\n\n /**\n * Get the grammar object.\n * @return the value of the grammar object\n */ \n IGrammarComp getGrammar();\n \n /**\n * Get the symbolstream object.\n * @return the value of the symbolstream object\n */ \n ISymbolStreamComp getSymbolStream();\n\n /**\n * Links to <code>SymbolStreamComp</code> component via its interface.\n * Sets the value of <code>SymbolStream</code> and registers for property change events.\n * \n * @param aSymbolStream\n */\n void setSymbolStream(ISymbolStreamComp aSymbolStream);\n\n /**\n *\n * @return\n */\n CParseStack getStateStack();\n\n /**\n *\n * @param fStateStack\n */\n void setStateStack(CParseStack fStateStack); \n\n /**\n *\n * @return\n */\n public ArrayList<Symbol> getSymbolsUnmatched();\n\n /**\n *\n * @param symbolsUnmatched\n */\n public void setSymbolsUnmatched(ArrayList<Symbol> symbolsUnmatched);\n\n /**\n *\n */\n public void parseText();\n}", "protected PListParser() {\n logger = AppRegistryBridge.getInstance().getLoggingBridge();\n }", "public abstract ArgumentParser makeParser();", "public void init() {\r\n\t\ttry {\r\n\t\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\r\n\t\t\t//factory.setValidating(true);\r\n\t\t\t//factory.setFeature(\r\n\t\t\t//\t\t\"http://apache.org/xml/features/validation/schema\", true);\r\n\t\t\tfactory.setNamespaceAware(true);\r\n\t\t\t_parser = factory.newSAXParser();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}", "public parser(Scanner s) {super(s);}", "public CrossrefUnixrefSaxParser() {\n }", "public boolean hasParse();", "public static Parser getParser(String url)\n\t{\n\t\ttry\n\t\t{\n\t\t\tjava.net.URLConnection conn = (new java.net.URL(url)).openConnection();\n\t\t\tconn.setRequestProperty(\"User-Agent\", \"Mozilla\");\n\t\t\tParser p = new Parser(conn);\n\t\t\treturn p;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\treturn null;\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localSpIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spId\"));\r\n \r\n if (localSpId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spId cannot be null!!\");\r\n }\r\n } if (localSpPasswordTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spPassword\"));\r\n \r\n if (localSpPassword != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpPassword));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spPassword cannot be null!!\");\r\n }\r\n } if (localServiceIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"serviceId\"));\r\n \r\n if (localServiceId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"serviceId cannot be null!!\");\r\n }\r\n } if (localTimeStampTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"timeStamp\"));\r\n \r\n if (localTimeStamp != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localTimeStamp));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"timeStamp cannot be null!!\");\r\n }\r\n } if (localOATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"OA\"));\r\n \r\n if (localOA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"OA cannot be null!!\");\r\n }\r\n } if (localOauth_tokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"oauth_token\"));\r\n \r\n if (localOauth_token != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOauth_token));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"oauth_token cannot be null!!\");\r\n }\r\n } if (localFATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"FA\"));\r\n \r\n if (localFA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"FA cannot be null!!\");\r\n }\r\n } if (localTokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"token\"));\r\n \r\n if (localToken != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localToken));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"token cannot be null!!\");\r\n }\r\n } if (localWatcherTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"watcher\"));\r\n \r\n if (localWatcher != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localWatcher));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"watcher cannot be null!!\");\r\n }\r\n } if (localPresentityTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentity\"));\r\n \r\n if (localPresentity != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentity));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentity cannot be null!!\");\r\n }\r\n } if (localAuthIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"authId\"));\r\n \r\n if (localAuthId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAuthId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"authId cannot be null!!\");\r\n }\r\n } if (localLinkidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"linkid\"));\r\n \r\n if (localLinkid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localLinkid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"linkid cannot be null!!\");\r\n }\r\n } if (localPresentidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentid\"));\r\n \r\n if (localPresentid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentid cannot be null!!\");\r\n }\r\n } if (localMsgTypeTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"msgType\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMsgType));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "private boolean parseSome()\n throws SAXException, IOException, IllegalAccessException,\n java.lang.reflect.InvocationTargetException\n {\n if(fConfigSetInput!=null)\n {\n Object ret=(Boolean)(fConfigParse.invoke(fPullParserConfig,parmsfalse));\n return ((Boolean)ret).booleanValue();\n }\n else\n {\n Object ret=fParseSome.invoke(fIncrementalParser,noparms);\n return ((Boolean)ret).booleanValue();\n }\n }", "void Parse(Source source);" ]
[ "0.62854147", "0.62110937", "0.61611354", "0.6061745", "0.59839976", "0.5949908", "0.57989705", "0.5777672", "0.5767841", "0.5750051", "0.57472885", "0.5714317", "0.5696972", "0.56949365", "0.56837493", "0.56254345", "0.5614715", "0.55894536", "0.5578223", "0.55448514", "0.5496785", "0.5476952", "0.54597455", "0.5457141", "0.54446137", "0.5441817", "0.5437268", "0.54333913", "0.5414324", "0.54135925", "0.54110175", "0.5407412", "0.53998256", "0.538837", "0.53746986", "0.5360522", "0.53514004", "0.53384686", "0.5310705", "0.53097284", "0.52978224", "0.5297725", "0.52962327", "0.5278764", "0.5278079", "0.5274742", "0.52746546", "0.52677757", "0.5264326", "0.52575564", "0.52513295", "0.52513295", "0.52513295", "0.52513295", "0.52513295", "0.52513295", "0.52513295", "0.52513295", "0.52513295", "0.5238685", "0.5238036", "0.52348226", "0.52330375", "0.52290875", "0.5224405", "0.52229834", "0.51952136", "0.51890445", "0.51829857", "0.51755196", "0.5175128", "0.5172963", "0.5169886", "0.51686925", "0.5167938", "0.51650894", "0.516307", "0.5162474", "0.5144837", "0.51440006", "0.51438034", "0.5140548", "0.51357013", "0.51333964", "0.5125647", "0.5120792", "0.51157796", "0.5107534", "0.5102223", "0.5099271", "0.50921124", "0.50891083", "0.50857687", "0.5077017", "0.50652856", "0.50617635", "0.50613904", "0.50449175", "0.5041099", "0.5040802", "0.50350106" ]
0.0
-1
returns the time taken between the last start/stop pair in milliseconds
public long stop() { long t = System.currentTimeMillis() - lastStart; if(count == 0) firstTime = t; totalTime += t; count++; updateHist(t); if(printIterval > 0 && count % printIterval == 0) System.out.println(this); return t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getStopTime();", "public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }", "public Double waitTimeCalculatior(long start) {\n\t\t\t\tdouble difference = (System.currentTimeMillis() - start);\n\t\t\t\treturn difference;\n\t\t\t}", "@Override\n\tpublic long getTimeLapsed(long start, long end) {\n\t\tlong difference=(end - start);\n\t\treturn difference;\t}", "public long getElapsedTime(){\n long timePassed = endTime - startTime;\n return timePassed;\n }", "public static long getElapsedTime() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed;\n\t}", "public long getElapsedMilliSecond() {\n long elapsed;\n if (running) {\n elapsed = (System.nanoTime() - startTime) / 1000000;\n } else {\n elapsed = (stopTime - startTime) / 1000000;\n }\n return elapsed;\n }", "public static long getElapsedTime() {\n long time = System.currentTimeMillis() - START_TIME;\n // long time = System.nanoTime() / 1000000;\n return time;\n }", "public long getElapsedMilliseconds() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerMs;\n\t}", "public static long getElapsedTimeSecs() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = ((System.nanoTime() - startTime)/1000000);\n\t\t} else {\n\t\t\telapsed = ((stopTime - startTime)/1000000);\n\t\t}\n\t\treturn elapsed;\n\t}", "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 }", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "long getElapsedTime();", "public long getTimeTaken();", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "public float getSecondsElapsed() { return _startTime==0? 0 : (System.currentTimeMillis() - _startTime)/1000f; }", "public double getElapsedTime(){\n double CurrentTime = System.currentTimeMillis();\n double ElapseTime = (CurrentTime - startTime)/1000;\n return ElapseTime;\n }", "public long elapsedMillis() {\n/* 162 */ return elapsedTime(TimeUnit.MILLISECONDS);\n/* */ }", "public long getElapsedSeconds() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerSs;\n\t}", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }", "public long sinceStart() {\n return System.currentTimeMillis() - lastStart;\n }", "public double computeElapsedTime() {\r\n\r\n long now = System.currentTimeMillis();\r\n\r\n elapsedTime = (double) (now - startTime);\r\n\r\n // if elasedTime is invalid, then set it to 0\r\n if (elapsedTime <= 0) {\r\n elapsedTime = (double) 0.0;\r\n }\r\n\r\n return (double) (elapsedTime / 1000.0); // return in seconds!!\r\n }", "public long getElapsedTime()\r\n {\r\n if(isRunning)\r\n {\r\n long endTime = System.currentTimeMillis();\r\n return elapsedTime=endTime-startTime;\r\n }\r\n else\r\n {\r\n return elapsedTime;\r\n }\r\n }", "long elapsedTime();", "public String getElapsedTime() {\n\n long elapsed;\n int mins;\n int secs;\n int millis;\n\n if (running) {\n elapsed = System.currentTimeMillis() - startTime;\n } else {\n elapsed = stopTime - startTime;\n }\n\n mins = (int) (elapsed / 60000);\n secs = (int) (elapsed - mins * 60000) / 1000;\n millis = (int) (elapsed - mins * 60000 - secs * 1000);\n\n //Keeps 3 digits when a second rolls over. Perhaps find a better way of doing this\n return (String.format(\"%02d\", mins) + \":\" + String.format(\"%02d\", secs) + \":\"\n + String.format(\"%03d\", millis));\n }", "private long getDistanceFromSecondMark(){\n long numSecsElapsed = (long)Math.floor(timeElapsed / WorkoutStatic.ONE_SECOND);\n return timeElapsed - numSecsElapsed * WorkoutStatic.ONE_SECOND;\n }", "public int duration (long start, long end){\n\t\tlong duration = end - start;\n\t\tint time = (int)(duration /1000);\n\t\treturn time;\n\t}", "public int getTotalTime();", "public long getElapsedNanoSecond() {\n long elapsed;\n if (running) {\n elapsed = (System.nanoTime() - startTime);\n } else {\n elapsed = (stopTime - startTime);\n }\n return elapsed;\n }", "public long getElapsedTicks() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerTick;\n\t}", "public long elapsedTime(){\n\n // calculate elapsed time by getting current CPU time and substracting the CPU time from when we started the stopwatch\n\n // this does not stop the stopwatch\n\n return (magicBean.getCurrentThreadCpuTime() - stopWatchStartTimeNanoSecs);\n\n }", "public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }", "public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }", "private long getDuration() throws Exception {\n\treturn dtEnd.getTime() - dtStart.getTime();\n }", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "private long getTimeEnd(ArrayList<Point> r, ArrayList<Point> s){\n\t\t// Get the trajectory with earliest last point\n\t\tlong tn = s.get(s.size()-1).timeLong < r.get(r.size()-1).timeLong ? \n\t\t\t\ts.get(s.size()-1).timeLong : r.get(r.size()-1).timeLong;\n\t\treturn tn;\n\t}", "private long getTotalDuration() {\n if(mMarkers.size() == 0) {\n return 0;\n }\n long first = mMarkers.get(0).time;\n long last = mMarkers.get(mMarkers.size() - 1).time;\n return last - first;\n }", "public long duration() {\n\t\treturn end - start;\n\t}", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public long getElapsedTimeMili() {\n return running ? ((System.currentTimeMillis() - startTime)/100) % 1000 : 0;\n }", "public int getDuration() {\n\t\treturn (int) ((endTime.getTime()-startTime.getTime())/1000) + 1;\n\t}", "public long startTimeNanos();", "public double getFinishTime(){return finishTime;}", "public long startTime();", "public static long getRunningTime(long startTime) {\n return System.currentTimeMillis()-startTime;\n }", "public long getElapsedMinutes() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerMm;\n\t}", "public Long getLastRunDuration();", "public double getTime()\n {\n long l = System.currentTimeMillis()-base;\n return l/1000.0;\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }", "private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "abstract Long getStopTimestamp();", "public double getElapsedTime() {\r\n return (double) (elapsedTime / 1000.0); // convert from milliseconds to seconds\r\n }", "private static String elapsed(long start) {\r\n\treturn \": elapsed : \" + (System.currentTimeMillis() - start) + \" ms \";\r\n }", "public long elapsedTime(long startTime,long endTime){\r\n\t\tlong elapsedTime=(endTime-startTime)/1000;\r\n\t\treturn elapsedTime;\r\n\t}", "public static String timeDifference(long start) {\r\n\t\treturn timeDifference(start, System.currentTimeMillis());\r\n\t}", "public long getElapsedTime() {\n long additionalRealTime = 0;\n\n if(mStartTime > 0) {\n additionalRealTime = System.currentTimeMillis() - mStartTime;\n }\n return mElapsedTime + additionalRealTime;\n }", "public long getTotalTime() {\n var timeStarted = getStartTime();\n var timeFinished = getEndTime();\n return timeStarted.until(timeFinished, SECONDS);\n }", "public static void calTime() {\n time = new Date().getTime() - start;\n }", "public long getElapsedMs()\n\t{\n\t\tif (m_running)\n\t\t{\n\t\t\tlong systemMs = SystemClock.elapsedRealtime();\n\t\t\treturn m_elapsedMs + (systemMs - m_lastMs);\n\t\t}\n\n\t\treturn m_elapsedMs;\n\t}", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public long timeAlg(){\n long startTime = System.nanoTime();\n \n this.doTheAlgorithm();\n \n long endTime = System.nanoTime();\n long elapsedTime = endTime - startTime;\n \n return elapsedTime;\n }", "public double getDuration() {\n if (null == firstTime) {\n return 0.0;\n }\n return lastTime.timeDiff_ns(firstTime);\n }", "private String calculateTime(long startTime, long endTime) {\r\n\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.00\");\r\n\r\n\t\tdouble timeTaken = ((endTime - startTime) / 1000000000.0);\r\n\r\n\t\tString timeTakenStr = df.format(timeTaken);\r\n\r\n\t\treturn timeTakenStr;\r\n\t}", "public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }", "public String elapsedTime() {\n return totalWatch.toString();\n }", "public double getSecs( );", "Integer getStartTimeout();", "public int computeDuration() {\n return (int) Duration.between(getStart_time(), getEnd_time()).toSeconds();\n }", "public double getTimeRemaining() {\n\t\treturn (startingTime + duration) - System.currentTimeMillis();\n\t}", "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "private static double timeInSec(long endTime, long startTime) {\n\t\tlong duration = (endTime - startTime);\n\t\tif (duration > 0) {\n\t\t\tdouble dm = (duration/1000000.0); //Milliseconds\n\t\t\tdouble d = dm/1000.0; //seconds\n\t\t\treturn d ;\n\t\t}\n\t\treturn 0.0 ;\n\t}", "public long getLoopTime();", "public double getElapsedTime()\n\t{\n\t\treturn elapsedTime;\n\t}", "public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }", "public static double toc(double TSTART) {\n\t\treturn System.currentTimeMillis() / 1000d - TSTART;\n\t}", "@DISPID(56)\r\n\t// = 0x38. The runtime will prefer the VTID if present\r\n\t@VTID(54)\r\n\tint actualCPUTime_Milliseconds();", "int getTtiSeconds();", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "@Transient\n \tpublic int getDuration() {\n \t\tint duration = (int) (this.endTime.getTime() - this.startTime.getTime());\n \t\treturn duration / 1000;\n \t}", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public String getStopTime() {\n\t\treturn (new Parser(value)).skipString().getString();\n\t}", "private long getTimeIni(ArrayList<Point> r, ArrayList<Point> s){\n\t\t// Get the trajectory with latest first point\n\t\tlong t1 = s.get(0).timeLong > r.get(0).timeLong ? \n\t\t\t\ts.get(0).timeLong : r.get(0).timeLong;\n\t\treturn t1;\n\t}", "public int getTurnaround (){\n return finishingTime-arrival_time;\n }", "long getDurationNanos();", "public long elapsedTime(TimeUnit desiredUnit) {\n/* 153 */ return desiredUnit.convert(elapsedNanos(), TimeUnit.NANOSECONDS);\n/* */ }", "@Override\n public synchronized double get() {\n if (m_running) {\n return ((getMsClock() - m_startTime) + m_accumulatedTime) / 1000.0;\n }\n return m_accumulatedTime;\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}", "double getStaStart();", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public long findFastestTime()\r\n {\r\n for(int top = 1; top < listOfTimes.size(); top++)\r\n { \r\n long item = listOfTimes.get(top); \r\n int i = top;\r\n\r\n while(i > 0 && item < listOfTimes.get(i - 1))\r\n {\r\n listOfTimes.set(i, listOfTimes.get(i- 1));\r\n i--;\r\n }//end while \r\n\r\n listOfTimes.set(i, item);\r\n }//end for \r\n\r\n return listOfTimes.get(0);\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 double getElapsedTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs && (( SpObs )child).isOptional() )\n\t\t\t\t\telapsedTime += ( ( SpObs )child ).getElapsedTime() ;\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t\telapsedTime += (( SpMSB )child).getElapsedTime() ;\n\t\t}\n\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\treturn elapsedTime ;\n\t}", "public int totalTime(){\n\t\t\n\t\tint time=0;\n\t\t\n\t\n\t\tfor(int i=0; (i<songList.length);i++){\n\t\t\t\n\t\t\tif(songList[i]!=null){\n\t\t\t\n\t\t\ttime+= songList[i].getDuration();\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn time;\n\t\t\n\t}", "double getTime();", "public static double getTimeMs(){\n return System.nanoTime()*nanoToMs;\n }" ]
[ "0.7359472", "0.7318707", "0.7251957", "0.715948", "0.7115583", "0.71059144", "0.70805144", "0.7065716", "0.70598775", "0.70566446", "0.7046799", "0.6981964", "0.69593346", "0.687487", "0.6865675", "0.6860775", "0.684308", "0.67524886", "0.6743099", "0.6715189", "0.67149615", "0.6714031", "0.67034817", "0.67026925", "0.6700147", "0.6662507", "0.66489786", "0.6648637", "0.6632567", "0.6631444", "0.6613244", "0.66066265", "0.6605213", "0.6594706", "0.6589268", "0.6579924", "0.6538535", "0.65366906", "0.65294415", "0.65154445", "0.6477658", "0.6458782", "0.64563787", "0.64458644", "0.6424145", "0.64062977", "0.6406274", "0.6405604", "0.64032704", "0.63980275", "0.63899255", "0.63730145", "0.63657385", "0.63646847", "0.63530606", "0.6349111", "0.633172", "0.6329173", "0.6311625", "0.6307299", "0.63069636", "0.6300488", "0.62916833", "0.6290732", "0.6290106", "0.6284658", "0.62765527", "0.6252483", "0.6209125", "0.6203209", "0.61991966", "0.61982995", "0.61911047", "0.6188726", "0.6181088", "0.61783653", "0.6106542", "0.61046904", "0.6100093", "0.6089003", "0.6081747", "0.6080155", "0.60788625", "0.60696983", "0.60610205", "0.6058954", "0.6058196", "0.6054228", "0.6049665", "0.6047646", "0.5988998", "0.59886974", "0.59882796", "0.59882796", "0.59839886", "0.59810895", "0.59790033", "0.5977745", "0.59687793", "0.5965263" ]
0.6387104
51
like stop, returns the time taken between the last start/stop pair in milliseconds, but does not stop the timer.
public long sinceStart() { return System.currentTimeMillis() - lastStart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getStopTime();", "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 getElapsedMilliSecond() {\n long elapsed;\n if (running) {\n elapsed = (System.nanoTime() - startTime) / 1000000;\n } else {\n elapsed = (stopTime - startTime) / 1000000;\n }\n return elapsed;\n }", "public long stop() {\r\n \tendTime = System.currentTimeMillis();\r\n \tif (timer != null) {\r\n \t\ttimer.cancel();\r\n \t}\r\n \tif (doOutput) System.out.println(\".\");\r\n \treturn (endTime - startTime)/1000;\r\n }", "public long stop() {\n long t = System.currentTimeMillis() - lastStart;\n if(count == 0)\n firstTime = t;\n totalTime += t;\n count++;\n updateHist(t);\n if(printIterval > 0 && count % printIterval == 0)\n System.out.println(this);\n return t;\n }", "public static long getElapsedTime() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed;\n\t}", "public long getElapsedNanoSecond() {\n long elapsed;\n if (running) {\n elapsed = (System.nanoTime() - startTime);\n } else {\n elapsed = (stopTime - startTime);\n }\n return elapsed;\n }", "public float getSecondsElapsed() { return _startTime==0? 0 : (System.currentTimeMillis() - _startTime)/1000f; }", "public long getElapsedMilliseconds() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerMs;\n\t}", "public static long getElapsedTimeSecs() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = ((System.nanoTime() - startTime)/1000000);\n\t\t} else {\n\t\t\telapsed = ((stopTime - startTime)/1000000);\n\t\t}\n\t\treturn elapsed;\n\t}", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }", "public long elapsedMillis() {\n/* 162 */ return elapsedTime(TimeUnit.MILLISECONDS);\n/* */ }", "public long getElapsedSeconds() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerSs;\n\t}", "public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }", "public static long getElapsedTime() {\n long time = System.currentTimeMillis() - START_TIME;\n // long time = System.nanoTime() / 1000000;\n return time;\n }", "public long elapsedTime(){\n\n // calculate elapsed time by getting current CPU time and substracting the CPU time from when we started the stopwatch\n\n // this does not stop the stopwatch\n\n return (magicBean.getCurrentThreadCpuTime() - stopWatchStartTimeNanoSecs);\n\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 long startTimeNanos();", "@Override\n public synchronized void stop() {\n final double temp = get();\n m_accumulatedTime = temp;\n m_running = false;\n }", "public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }", "public long getElapsedTime()\r\n {\r\n if(isRunning)\r\n {\r\n long endTime = System.currentTimeMillis();\r\n return elapsedTime=endTime-startTime;\r\n }\r\n else\r\n {\r\n return elapsedTime;\r\n }\r\n }", "public Double waitTimeCalculatior(long start) {\n\t\t\t\tdouble difference = (System.currentTimeMillis() - start);\n\t\t\t\treturn difference;\n\t\t\t}", "public Stopwatch stop() {\n/* 123 */ long tick = this.ticker.read();\n/* 124 */ Preconditions.checkState(this.isRunning);\n/* 125 */ this.isRunning = false;\n/* 126 */ this.elapsedNanos += tick - this.startTick;\n/* 127 */ return this;\n/* */ }", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "public String getStopTime() {\n\t\treturn (new Parser(value)).skipString().getString();\n\t}", "abstract Long getStopTimestamp();", "public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }", "long getElapsedTime();", "Integer getStartTimeout();", "public long stop() {\n return timer.stop(task);\n }", "public long getElapsedTicks() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerTick;\n\t}", "public double getTimeRemaining() {\n\t\treturn (startingTime + duration) - System.currentTimeMillis();\n\t}", "public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }", "public long getElapsedTimeMili() {\n return running ? ((System.currentTimeMillis() - startTime)/100) % 1000 : 0;\n }", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "public void stop() {timer.stop();}", "public Long getLastRunDuration();", "public long getElapsedMinutes() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerMm;\n\t}", "@Override\n public synchronized double get() {\n if (m_running) {\n return ((getMsClock() - m_startTime) + m_accumulatedTime) / 1000.0;\n }\n return m_accumulatedTime;\n }", "long getDurationNanos();", "public double getElapsedTime(){\n double CurrentTime = System.currentTimeMillis();\n double ElapseTime = (CurrentTime - startTime)/1000;\n return ElapseTime;\n }", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "public void endTimer() {\n\t\t\n\t\ttimerEnd = System.currentTimeMillis();\n\t\ttotalTime = this.toSec(\"nano\", timerEnd - timerStart);\n\t\ttimerStarted = false;\n\t}", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public static void calTime() {\n time = new Date().getTime() - start;\n }", "public void stop()\n\t{\n\t\t//get the time information as first part for better precision\n\t\tlong systemMs = SystemClock.elapsedRealtime();\n\n\t\t//if it was already stopped or did not even run, do nothing\n\t\tif (!m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tm_elapsedMs += (systemMs - m_lastMs);\n\n\t\tm_running = false;\n\t}", "public double computeElapsedTime() {\r\n\r\n long now = System.currentTimeMillis();\r\n\r\n elapsedTime = (double) (now - startTime);\r\n\r\n // if elasedTime is invalid, then set it to 0\r\n if (elapsedTime <= 0) {\r\n elapsedTime = (double) 0.0;\r\n }\r\n\r\n return (double) (elapsedTime / 1000.0); // return in seconds!!\r\n }", "public long getElapsedTime(){\n long timePassed = endTime - startTime;\n return timePassed;\n }", "public void stopStopwatch() {\n timeCount = currentNanoTime.getAsLong();\n currentNanoTime = () -> timeCount;\n }", "public double getTime()\n {\n long l = System.currentTimeMillis()-base;\n return l/1000.0;\n }", "public String getElapsedTime() {\n\n long elapsed;\n int mins;\n int secs;\n int millis;\n\n if (running) {\n elapsed = System.currentTimeMillis() - startTime;\n } else {\n elapsed = stopTime - startTime;\n }\n\n mins = (int) (elapsed / 60000);\n secs = (int) (elapsed - mins * 60000) / 1000;\n millis = (int) (elapsed - mins * 60000 - secs * 1000);\n\n //Keeps 3 digits when a second rolls over. Perhaps find a better way of doing this\n return (String.format(\"%02d\", mins) + \":\" + String.format(\"%02d\", secs) + \":\"\n + String.format(\"%03d\", millis));\n }", "@Override\n\t\tpublic final double time() throws Throwable {\n\t\t\tinit();\n\t\t\ttimer.lap();\n\t\t\ttimed();\n\t\t\tdouble time = timer.lap();\n\t\t\tcleanup();\n\t\t\treturn time;\n\t\t}", "public int stopTimer() {\n timerTask.cancel();\n timerTask = null;\n return counts;\n }", "@Override\n\tpublic long getTimeLapsed(long start, long end) {\n\t\tlong difference=(end - start);\n\t\treturn difference;\t}", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "public static long getRunningTime(long startTime) {\n return System.currentTimeMillis()-startTime;\n }", "public long getLoopTime();", "public double getSecs( );", "public void stop(){\n\t\tthis.timer.stop();\n\t\t//whenever we stop the entire game, also calculate the endTime\n\t\tthis.endTime = System.nanoTime();\n\t\tthis.time = this.startTime - this.endTime;\t//calculate the time difference\n\t\t\n\t\tthis.stop = true;\n\t}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "public long getTimerTime() {\n return timerTime;\n }", "public double getElapsedTime() {\r\n return (double) (elapsedTime / 1000.0); // convert from milliseconds to seconds\r\n }", "public static long startTimer() {\n return System.currentTimeMillis();\n }", "public static double ParaTimer(){\n return (System.nanoTime() - timer)/(1000000000.);\n }", "int getTtiSeconds();", "public float getRemainingTime () {\n\t\treturn duration - timer < 0 ? 0 : duration - timer;\n\t}", "Timer getTimer();", "public long startTime();", "public long getRemainingTime() {\n return (maxTime_ * 1000L)\n - (System.currentTimeMillis() - startTime_);\n }", "public long elapsedTime(TimeUnit desiredUnit) {\n/* 153 */ return desiredUnit.convert(elapsedNanos(), TimeUnit.NANOSECONDS);\n/* */ }", "Double getRemainingTime();", "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "long elapsedTime();", "public long getStopTimestamp() {\n return stopTimestamp;\n }", "public long getElapsedMs()\n\t{\n\t\tif (m_running)\n\t\t{\n\t\t\tlong systemMs = SystemClock.elapsedRealtime();\n\t\t\treturn m_elapsedMs + (systemMs - m_lastMs);\n\t\t}\n\n\t\treturn m_elapsedMs;\n\t}", "public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }", "public long getTimeTaken();", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public int getTotalTime();", "public interface Stopwatch {\n\n /** Mark the start time. */\n void start();\n\n /** Mark the end time. */\n void stop();\n\n /** Reset the stopwatch so that it can be used again. */\n void reset();\n\n /** Returns the duration in the specified time unit. */\n long getDuration(TimeUnit timeUnit);\n\n /** Returns the duration in nanoseconds. */\n long getDuration();\n}", "private static double timeInSec(long endTime, long startTime) {\n\t\tlong duration = (endTime - startTime);\n\t\tif (duration > 0) {\n\t\t\tdouble dm = (duration/1000000.0); //Milliseconds\n\t\t\tdouble d = dm/1000.0; //seconds\n\t\t\treturn d ;\n\t\t}\n\t\treturn 0.0 ;\n\t}", "private void stopTime()\n {\n timer.stop();\n }", "public static double getSecondsTime() {\n\t\treturn (TimeUtils.millis() - time) / 1000.0;\n\t}", "public long getElapsedTime() {\n long additionalRealTime = 0;\n\n if(mStartTime > 0) {\n additionalRealTime = System.currentTimeMillis() - mStartTime;\n }\n return mElapsedTime + additionalRealTime;\n }", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "public long getRunLastMillis()\n {\n return 0L;\n }", "public double getDuration() {\n if (null == firstTime) {\n return 0.0;\n }\n return lastTime.timeDiff_ns(firstTime);\n }", "int getRunningDuration();", "RampDownTimer getRampDownTimer();", "public final Pair<String, Integer> startTimer() {\r\n long j = (long) 1000;\r\n this.remainTime -= j;\r\n long j2 = this.remainTime;\r\n long j3 = j2 - j;\r\n long j4 = j3 / ((long) 3600000);\r\n long j5 = (long) 60;\r\n long j6 = (j3 / ((long) 60000)) % j5;\r\n long j7 = (j3 / j) % j5;\r\n double d = (double) j2;\r\n double d2 = (double) this.totalRemainTime;\r\n Double.isNaN(d);\r\n Double.isNaN(d2);\r\n double d3 = d / d2;\r\n double d4 = (double) AbstractSpiCall.DEFAULT_TIMEOUT;\r\n Double.isNaN(d4);\r\n double d5 = d3 * d4;\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(designTimeUnit(j4));\r\n String str = \" : \";\r\n sb.append(str);\r\n sb.append(designTimeUnit(j6));\r\n sb.append(str);\r\n sb.append(designTimeUnit(j7));\r\n return new Pair<>(sb.toString(), Integer.valueOf((int) Math.ceil(d5)));\r\n }", "public long getRemainingTime() {\n if (isPaused()) {\n return pausedPoint;\n }\n long res = (long) ((spedEndTime - SystemClock.elapsedRealtime()) * speed);\n return res > 0 ? res : 0;\n }", "private long getDuration() throws Exception {\n\treturn dtEnd.getTime() - dtStart.getTime();\n }", "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "public long toDurationMillis() {\r\n return FieldUtils.safeAdd(getEndMillis(), -getStartMillis());\r\n }", "public static double toc(double TSTART) {\n\t\treturn System.currentTimeMillis() / 1000d - TSTART;\n\t}", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "public static long getTime() \r\n {\r\n return System.nanoTime(); \r\n }", "@Override\n\t\tpublic long getEndMillis() {\n\t\t\treturn 0;\n\t\t}" ]
[ "0.7612791", "0.71396893", "0.7093129", "0.705442", "0.6877753", "0.68204075", "0.6799701", "0.6640585", "0.6633883", "0.6614986", "0.6551813", "0.65269256", "0.6488926", "0.647796", "0.6463181", "0.6453047", "0.64108187", "0.63887626", "0.63629043", "0.6361036", "0.63583887", "0.6350086", "0.6332537", "0.6317888", "0.6305121", "0.62823766", "0.6259775", "0.6257848", "0.6228655", "0.6198766", "0.61881214", "0.61489606", "0.61189234", "0.61168146", "0.6111075", "0.61037", "0.61027193", "0.6094521", "0.60908604", "0.60817266", "0.60767996", "0.60695404", "0.6056015", "0.6046417", "0.60461885", "0.6033323", "0.60254675", "0.6021739", "0.6019107", "0.6009275", "0.6003584", "0.59996235", "0.59871215", "0.5983191", "0.5977605", "0.5977051", "0.5973044", "0.59725446", "0.5965074", "0.5954957", "0.5950383", "0.5943453", "0.5928745", "0.5907849", "0.5901975", "0.5899031", "0.5874724", "0.58594924", "0.5857395", "0.58506626", "0.58443016", "0.5842361", "0.5839565", "0.58365214", "0.5823799", "0.582134", "0.58196634", "0.58020955", "0.578772", "0.5783775", "0.57802904", "0.5779664", "0.57750434", "0.5764628", "0.57624125", "0.576184", "0.5761435", "0.57613224", "0.57582706", "0.57515633", "0.5748999", "0.5734711", "0.5733602", "0.5718044", "0.5710263", "0.5708706", "0.5705848", "0.57038605", "0.5691915", "0.568739" ]
0.59559757
59
How many times start/stop has been called
public int getCount() { return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getNumStarted() {\n return numStarted;\n }", "static final long getTotalStartedCount()\n {\n synchronized (threadStartLock)\n {\n return totalStartedCnt;\n }\n }", "long start();", "Long getRunningCount();", "public int getNumTimes();", "public int getCycles();", "public int runCount() {\n return testCount;\n }", "public long getStarted () {\n\treturn started;\n }", "public long startTime();", "public void markRunStart(){\r\n runStart = stepCount;\r\n }", "public void countTimer() {\n\t\t\n\t\ttimerEnd = System.currentTimeMillis();\n\t}", "int getInstanceCount();", "static long GetCycleCount() {\n\t\treturn System.currentTimeMillis();\n\t}", "@Override\n\tpublic Integer call() {\n\t\tint count = ThreadLocalRandom.current().nextInt(1, 11);\n\n\t\tfor (int i = 1; i <= count; i++) {\n\t\t\tSystem.out.println(\"Running...\" + i);\n\t\t}\n\n\t\treturn count;\n\t}", "public int getRunCount() {\n return runCount;\n }", "int countInstances();", "public int getRun();", "@DISPID(15)\r\n\t// = 0xf. The runtime will prefer the VTID if present\r\n\t@VTID(17)\r\n\tint restartCount();", "public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}", "public StartCount() {\n\tint pass = 4;\n\tboolean heard = false;\n\tIterator iter;\n\n\ttry {\n\t \n\t \n\t aif.open();\n\t aif.registerHandler(this, kCOUNT_MESSAGE);\n\t \n\t while (true) {\n\t\tSystem.out.println(\"Start of Epoch\");\n\t\tif (pass++ > 2) {\n\n\t\t countMessage[LEVEL_BYTE] = 0;\n\t\t countMessage[COUNT_BYTE] = 0;\n\t\t countMessage[REMAINING_TIME_LO_BYTE] = 64;\n\t\t aif.sendAM(countMessage, kCOUNT_MESSAGE, (short)0xFFFF);\n\t\t pass = 0;\n\t\t}\n\t\tThread.currentThread().sleep(2000);\n\t\titeration++;\n\t\t//if (epochCount > 0) heard = true;\n\t\titer = counts.values().iterator();\n\t\tepochCount = 0;\n\t\twhile (iter.hasNext()) {\n\t\t CountReport cr = (CountReport)iter.next();\n\t\t if (iteration - cr.iteration > 8) iter.remove();\n\t\t else epochCount += cr.count;\n\t\t}\n\t\tSystem.out.println(\"End of Epoch, Count = \" + epochCount);\n\n\n\n\t }\n\n\t \n\t} catch (Exception e) {\n\t e.printStackTrace();\n\t}\n }", "private void reactMain_region_digitalwatch_Time_counting_Counting() {\n\t\tif (timeEvents[0]) {\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 0);\n\n\t\t\ttimer.setTimer(this, 0, 1 * 1000, false);\n\n\t\t\tsCILogicUnit.operationCallback.increaseTimeByOne();\n\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.main_region_digitalwatch_Time_counting_Counting;\n\t\t}\n\t}", "int getStart();", "public int start() { return _start; }", "public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}", "boolean isStarted();", "boolean isStarted();", "public void resetRunCount() {\n\n }", "public int getRunningDevicesCount();", "public long stop() {\n long t = System.currentTimeMillis() - lastStart;\n if(count == 0)\n firstTime = t;\n totalTime += t;\n count++;\n updateHist(t);\n if(printIterval > 0 && count % printIterval == 0)\n System.out.println(this);\n return t;\n }", "public abstract long getNumUpdate();", "int getIterations();", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "public void step() {\n \tinternaltime ++;\n \n }", "void beforeStop();", "public void Times() \n {\n if(status.getStatus_NUM() == 1 || status.getStatus_NUM() == 2 || status.getStatus_NUM() == 3)\n { //Waiting Time\n startWaitingTime = System.nanoTime();\n if(status.getStatus_NUM() != 1 || status.getStatus_NUM() != 2 || status.getStatus_NUM() != 3)\n {\n endWaitingTime = System.nanoTime();\n }\n \n totalWaitingTime += endWaitingTime - startWaitingTime;\n }\n //When it is running status \n else if(status.getStatus_NUM() == 0)\n {\n //Running Time\n startRunningTime = System.nanoTime();\n //Add a process\n if(status.getStatus_NUM() != 0)\n {\n endRunningTime = System.nanoTime();\n }\n \n totalRunningTime += endRunningTime - startRunningTime;\n }\n //When it is terminated\n else\n {\n System.out.println(\"Terminated\");\n System.out.println(\"Total Running Time : \" + totalRunningTime);\n System.out.println(\"Total Waiting Time : \" + totalWaitingTime);\n }\n }", "public long count() ;", "@Override\n public void start(int totalTasks) {\n }", "@Override\n public void stepCount(long step, int timestamp) {\n }", "int getRunningDuration();", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "boolean hasStart();", "public int getCallsNb();", "@Override\n public int count() {\n return this.bench.size();\n }", "public int start() {\n return start;\n }", "public int getRuns();", "public void timePassed() {\r\n }", "public void timePassed() {\r\n }", "long count();", "long count();", "long count();", "long count();", "long count();", "long count();", "long count();", "public boolean isCounting() {\n assert startTime != -1;\n return System.currentTimeMillis() - startTime <= durationMillis;\n }", "Sample start();", "@Override\n\tpublic void count() {\n\t\t\n\t}", "static void doCount(){\n\t\tStaticDemo st=new StaticDemo();\n\t\t st.count++;\n\t\t System.out.println(\"Count is:\"+st.count);\n\t }", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n\n }", "public void timePassed() {\r\n\r\n }", "long getSpinCount();", "public long getRunning() { return running; }", "public void timePassed() { }", "public abstract void interactionStarts(long ms);", "public void incCount() { }", "public static void start() { \r\n\t\ttempo_inicial = System.nanoTime(); \r\n\t\ttempo_final = 0; \r\n\t\tdiftempo = 0; \r\n\t}", "public abstract void started();", "static void loopcomp () {\r\n\t\tint t40k= timer(8000,40000); \r\n\t\tint t1k= timer(8000,1000); \r\n\t\tSystem.out.println(\"Total number of loops for printing every 40k loops = \" + t40k);\r\n\t\tSystem.out.println(\"Total number of loops for printing every 1k loops = \"+ t1k);\r\n\t}", "int getRepeatCount();", "public boolean hasStarted() {\n return hasStarted(10, 500, TimeUnit.MILLISECONDS);\n }", "public void count (double x)\r\n\t{\r\n\t\tsuper.count(x);\r\n\t\tdouble tmp = SimState.s.now - lastSampleTime;\r\n\t\t// If this statement is true there must be an error in the simulation\r\n\t\t// => abort\r\n\t\tif( tmp < 0 )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"last = \" + lastSampleTime + \" now = \" + SimState.s.now);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\tsumPowerOne+= (lastSampleSize*tmp);\r\n\t\tsumPowerTwo+= (lastSampleSize*lastSampleSize*tmp);\r\n\t\tlastSampleTime = SimState.s.now;\r\n\t\tlastSampleSize = x;\r\n\t}", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public void time(int value) \n{\n runtimes = value;\n}", "public static void performanceCountReset() { }", "@Override\n\tvoid start() {\n\t\tSystem.out.println(\"starts\");\n\t}", "public static int performanceCountGet() { return 0; }", "public void timePassed() {\n }", "public void timePassed() {\n }", "@WorkerThread\n long count();", "void incrementCount();", "private synchronized void incrementCount()\n\t{\n\t\tcount++;\n\t}", "@Override public void init_loop() {\n loop_cnt_++;\n }", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "public int running() {\n return this.running;\n }", "private static String elapsed(long start) {\r\n\treturn \": elapsed : \" + (System.currentTimeMillis() - start) + \" ms \";\r\n }", "public int getMissedCallsCount();", "@Override\n\tpublic void run() {\n\t\tString key = CounterUtils.getKey(this.name);\n//\t\tif(DemoUtils.isExist(DemoUtils.keyName, key)) {\n//\t\t\tSystem.out.println(\"OK\");\n//\t\t}\n\t\t\n\t\twhile(true) {\n\t\t\tSystem.out.println(name + \" : \" + CounterUtils.get(CounterUtils.getKey(name)));\n\t\t\tCounterUtils.setEntity(key);\n\t\t\tCounterUtils.inc(key);\n\t\t\tcounter ++;\n\t\t\tif(cal.getTimeInMillis() < new Date().getTime()) {\n\t\t\t\tSystem.out.println(name + \" : \" + counter);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t//CounterUtils.del(CounterUtils.getKey(name));\n\t\t}\n\t\t\n\t\t\n\t}", "int getServerProcessingIterations();", "int updateCount(double dist);", "public void run() {\n long num = numEvents.get();\n long lastnum = lastNumEvents.get();\n long evps = (num-lastnum)/App.METRICS_PER_SECOND;\n lastNumEvents.set(num);\n System.out.println(\"Consumer[\"+\n nnaammee+\"]: cursorRestarts=\"+cursorRestarts.get()\n +\" numEvents=\"+num\n +\" events/second=\"+evps\n +\" totalNumEvents=\"+totalNumEvents.get());\n }", "public void IncTimeInProc() {\n this.TimeInProc++;\n }", "public boolean isStarted()\r\n\t{\r\n\t\treturn currentstate == TIMER_START;\r\n\t}", "public void timeToRunDec()\n\t{\n\t\tthis.time_to_run -- ;\n\t}", "int getResumesCount();", "public abstract long count();", "public void start2();", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}", "void start() {\n \tm_e.step(); // 1, 3\n }", "@Override\r\n\tpublic void startTime() {\n\t\tSystem.out.println(\"인터페이스 ISports2메소드 --> startTime()\");\r\n\t\t\r\n\t}" ]
[ "0.7089291", "0.6831889", "0.6732078", "0.6713753", "0.6674263", "0.6433683", "0.6390665", "0.634628", "0.6249468", "0.6225622", "0.6223643", "0.6210435", "0.61968744", "0.6170131", "0.6168576", "0.61627674", "0.61312264", "0.6129909", "0.61119586", "0.60830015", "0.6079504", "0.6071171", "0.6069036", "0.6026791", "0.59946734", "0.59946734", "0.59766626", "0.59397507", "0.5939102", "0.5935316", "0.5918936", "0.58588904", "0.58457047", "0.58296335", "0.5821568", "0.57951975", "0.57898223", "0.5787353", "0.5761066", "0.5759072", "0.57542884", "0.5754244", "0.57529205", "0.57505566", "0.57449603", "0.5744041", "0.5744041", "0.57414013", "0.57414013", "0.57414013", "0.57414013", "0.57414013", "0.57414013", "0.57414013", "0.5732537", "0.5716905", "0.57129014", "0.57080853", "0.5702257", "0.5695049", "0.5688555", "0.56867933", "0.5685179", "0.56797945", "0.5670287", "0.5669338", "0.5668866", "0.5658473", "0.564983", "0.56472605", "0.5642625", "0.56385064", "0.56385064", "0.5637743", "0.5633784", "0.5631734", "0.5631303", "0.56260276", "0.56260276", "0.56191087", "0.5615703", "0.5614654", "0.5613161", "0.5608245", "0.56081474", "0.5607435", "0.5604478", "0.56030667", "0.5602673", "0.5601538", "0.5600724", "0.55997545", "0.5599562", "0.55992", "0.5591252", "0.55893534", "0.55892986", "0.5587595", "0.55871236", "0.5585068", "0.5583683" ]
0.0
-1
appropriate data structure as private data member appropriate method to save prime number to the data structure
public void generateSchedule(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void getPrime() {\n\t\tfor(int i=2;i<MAXN;i++){\n\t\t\tif(prime[i]==0){\n\t\t\t\tprime[++prime[0]]=i;\n\t\t\t}\n\t\t}\n\t}", "static void primeNumberSeries(){\n\t}", "boolean isPrime(int n) {\n //check if n is a multiple of 2\n\n if(n == 2){\n primeRecorderMap.put(n, true);\n return true;\n }else if (n % 2 == 0){\n primeRecorderMap.put(n, false);\n return false;\n }\n //if not, then just check the odds\n if (primeRecorderMap.containsKey(n)) {\n if (primeRecorderMap.get(n)) {\n return true;\n } else {\n return false;\n }\n } else {\n for (int i = 3; i * i <= n; i += 2) {\n if (n % i == 0) {\n primeRecorderMap.put(n, false);\n return false;\n }\n }\n primeRecorderMap.put(n, true);\n return true;\n }\n }", "public java.util.Map<java.lang.String, java.lang.Double> prime()\n\t{\n\t\treturn _prime;\n\t}", "boolean isPrime (int i) { //isCrossedOut()\n if(i == 2){\n return true;\n }\n if(i % 2 == 0 || i == 1){\n return false;\n }\n\n //Finn position i arrayet\n int bitIndex = (i-1) / 2;\n int arrayIndex = bitIndex / 8;\n bitIndex = bitIndex % 8;\n //System.out.println(\"isPrime(\"+ i +\")\");\n\n if((bitArr[arrayIndex] & bitMask[bitIndex]) == 0){\n return false;\n }\n return true;\n }", "public void findPrimeNumbers(){\n boolean [] numbers = new boolean[this.n +1];\n\n Arrays.fill(numbers,true);\n\n numbers[0]= numbers[1]=false;\n\n for (int i = P; i< numbers.length; i++) {\n if(numbers[i]) {\n for (int j = P; i*j < numbers.length; j++) {\n numbers[i*j]=false;\n }\n }\n }\n\n for (int i = 0; i < numbers.length; i++){\n if(numbers[i] == true){\n this.primeNumbers.add(i);\n }\n }\n\n }", "private synchronized void verifyNumbersPrime() {\n\t\tint primeIndex = 1;\n\t\tfor (int j = NUMBER_TWO; j <= Integer.MAX_VALUE && primeIndex < primes.length; j++) {\n\t\t\tif(isPrime(j)) {\n\t\t\t\tprimes[primeIndex++] = j;\n\t\t\t}\n\t\t}\n\t}", "public int primetest(int primenumber){ // method tests if number is prime\n\t\tfor (int j=2; j < prime.size()+2; j++){\n\t\t\tif ((primenumber % prime.get(j-2)) == 0){\n \t \t\t\treturn 0;\n \t \t\t}\n \t\t}\n \t\tprime.add(prime.size(), primenumber);\n \t\treturn 1;\n\n\t}", "public HugeInt getPrime()\r\n\t{\r\n\t\treturn p;\r\n\t}", "public Pickup(OptimusPrime prime, Game game) {\n this.prime = prime;\n this.game = game;\n \n }", "public PrimeNumberCalculator() {\n\t\t\t\tthis.threads = 1;\n\t\t}", "public PrimeCounter() {\n\t\t}", "public void mymeth(long number){\n\t\tlong z=number;\n\t\tfor(int k=2; k<=(int) Math.sqrt(z);k++){\n\t\t\tif (primetest(k) == 1 && number%k == 0){\n\t\t\t\tstore=k;\n\t\t\t\tz=number/k;\n\t\t\t}\n \t}\n \t\tSystem.out.println(store); \n \t}", "static void checkPrime(){\n\t\tint n1=78;\r\n\t}", "int nextPrime(int input) { //Ikke særlig optimalt dette. Hadde problemer med å iterere over binærArrayet direkte\n if(input < 2)\n return 2;\n if(input % 2 == 0){ //Unødvendig å sjekke partall.\n input++;\n }\n while(input < maxNum){\n if(isPrime(input)){\n return input;\n }\n input += 2;\n }\n return -1;\n }", "private boolean isprime(long i) {\n\t\t\n\t\tif(i<=2) \n\t\treturn true;\n\t\tfor(long n = 2;n< i;n++) {\n\t\t\tif(i%n ==0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void func(){\n\t\tHashMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tint limit = 1000;\n\t\tboolean psb[] = generatePrime(limit);\n\t\t\n\t\tint ps[] = MathTool.generatePrime(100000);\n\t\tfor (int i = 1; ps[i]<1000; i++) {\n\t\t\t//System.out.println(ps[i]);\n\t\t}\n\t\tint max=0;\n\t\tfor (int i = 0; ps[i] < limit; i++) {\n\t\t\tint n = ps[i];\n\t\t\tint j=i;\n\t\t\twhile(n<limit){\n\t\t\t\tif(!psb[n]){\n\t\t\t\t\tint num =j-i+1;\n\t\t\t\t\tif(map.containsKey(n)){\n\t\t\t\t\t\tif(map.get(new Integer(n)) < num){\n\t\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t}\n\t\t\t\t\tif(num > max){\n\t\t\t\t\t\tmax=num;\n\t\t\t\t\t\tSystem.out.println(num+\" \"+n+\" \"+i+\" \"+j);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tn+=ps[j];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void calculatePrimeNumbers(){\n int NUM = 5000000;\n\n boolean[] flags = new boolean[NUM + 1];\n\n int count = 0;\n\n for(int i = 2; i <= NUM; i++) {\n primeNumberFlagOperation(flags, i);\n }\n\n for(int i = 2; i <= NUM; i++) {\n if(flags[i]) {\n\n // remove all multiples of prime: i\n for(int k = i + i; k <= NUM; k += i) {\n flags[k] = false;\n }\n\n count++;\n }\n }\n }", "private static Map<Integer, Integer> primeFactorization(int n) {\n \tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n \t\n \tfor (int i = 2; i <= n; ++i) {\n \t\tint exponent = 0;\n \t\t\n \t\twhile (n % i == 0) {\n \t\t\t++exponent;\n \t\t\tn /= i;\n \t\t}\n \t\t\n \t\tif (exponent > 0)\n \t\t\tmap.put(i, exponent);\n \t}\n \t\n \treturn map;\n }", "public static void main(String[] args) throws Exception {\n \n TestFile.printFile(); // call method for viewing data file produced by program\n ///* \n // A list to hold prime numbers\n final long N = 1000000; // Find primes up to N\n long[] primeNumbers = new long[ARRAY_SIZE]; // create array of long type and set it to ARRAY_SIZE\n\n long number; // A number to be tested for primeness\n RandomAccessFile inout =\n new RandomAccessFile(\"PrimeNumbers.dat\", \"rw\"); // open file to write data to\n if (inout.length() == 0) { // if file is empty, start at one\n number = 1;\n }\n else {\n inout.seek(inout.length() - 8); // A long is 8 bytes\n number = inout.readLong(); // Get the last prime number in the file \n }\n\n int squareRoot = 1; // creat and initialize variable for sqrRoot\n \n // Repeatedly find prime numbers\n newNumber:while (number <= N) {\n // Check if 2, 3, 4, ..., N is prime\n number++;\n inout.seek(0); // use seek method for file pointer position\n\n if (squareRoot * squareRoot < number) { // compare sqrRoot to current number and increment accordingly\n squareRoot++;\n }\n\n while (inout.getFilePointer() < inout.length()) { // use file pointer position compared to file length to control call of readNextBatch method\n int size = readNextBatch(primeNumbers, inout);\n\n // Exercise03_21 if number is prime\n for (int k = 0; k < size && primeNumbers[k] <= squareRoot; k++) {\n if (number % primeNumbers[k] == 0) { // If true, not prime\n continue newNumber; // Exit the for loop\n }\n }\n }\n\n // Append a new prime number to the end of the file\n inout.seek(inout.length());\n inout.writeLong(number);\n }\n \n inout.close();// close file resource\n }", "private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "public interface PrimesService {\n\n /**\n * Checks whether the <code>number</code> is prime.\n * @param number not null and greater than 1\n * @return number {@link Primality}\n */\n Primality checkPrimality(BigInteger number);\n\n /**\n * Returns the neighbouring primes of <code>number</code>.\n * @param number not null and greater than 1\n * @return {@link NeighbouringPrimesResult}\n */\n NeighbouringPrimesResult getNeighbouringPrimes(BigInteger number);\n\n}", "static boolean isPrime(int num, int[] primearray, int primeindex) {\n for (int prime : primearray) {\n if (prime * prime > num) {\n primearray[primeindex] = num;\n return true;\n } else if (0 == num % prime) {\n return false;\n }\n }\n primearray[primeindex] = num;\n return true;\n }", "private boolean determinePrime(int num) {\n int temp;\n boolean isPrime = true;\n \n if(num <= 1)\n {\n isPrime = false;\n }\n else\n {\n for(int i = 2;i<=num/2; i++)\n {\n //divide the number by i, get the remainder \n temp = num % i;\n \n //if remainder is 0, the number is not prime\n if(temp == 0)\n {\n isPrime = false;\n break;\n }\n }\n }\n \n return isPrime;\n }", "@Test\n public void testInverseStressPrime() {\n final GaloisPrimeField field = new GaloisPrimeField(15_485_863);\n final GaloisElement element = field.element(1_000_000);\n final GaloisElement inverse = galoisInverse.invert(element);\n Assertions.assertEquals(BigInteger.valueOf(2_540_812), inverse.value());\n }", "@Test\n public void testInversePrime() {\n final GaloisPrimeField field = new GaloisPrimeField(13);\n final GaloisElement element = field.element(9);\n final GaloisElement inverse = galoisInverse.invert(element);\n Assertions.assertEquals(BigInteger.valueOf(3), inverse.value());\n }", "public Prime(Integer threadId, Integer limit, List<Integer> primeNumbers) {\n this.limit = limit;\n this.threadId = threadId;\n this.primeNumbers = primeNumbers;\n }", "public P primeiro() {\n\t\treturn this.primeiro;\n\t}", "private boolean isPrime(int number) {\n if (number < 2) return false;\n if (number == 2) return true;\n if (number % 2 == 0) return false;\n for (int i = 3; i * i <= number; i += 2)\n if (number % i == 0) return false;\n return true;\n }", "public static void main(String[] args) {\n\t\tint[] prime= new int[1229]; //only need primes up to 10000\n\t\tint n=1;\n\t\tint index=0;\n\t\tint test=0;\n\t\tfor (int i=2; (i-n)<=1229; i++) {\n\t\t\tfor (int j=2; j<=Math.sqrt(i); j++) {\n\t\t\t\tint k=i%j;\n\t\t\t\tif (k==0) {\n\t\t\t\t\tn++;\n\t\t\t\t\ttest++;\n\t\t\t\t\tj=(int)Math.sqrt(i);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (test==0) {\n\t\t\t\tprime[index]=i;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\ttest=0;\n\t\t}\n\t\t\n\t\t//use primes to find prime factorization and sum of divisors\n\t\tint [] divides= new int[1229]; //Number of times each prime divides a number\n\t\tint [] sumOfDivisors= new int[10000]; //Sum of divisors for i at index i\n\t\tint total=0;\n\t\tint sum=1;\n\t\tindex=1;\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tint d=i;\n\t\t\tfor (int j=0; j<1229; j++) { //find prime factorization for i\n\t\t\t\twhile (d%prime[j]==0 && d>1) {\n\t\t\t\t\td=d/prime[j];\n\t\t\t\t\tdivides[j]++;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tfor (int j=0; j<1229; j++) { //use Number theory formula for sum of divisors\n\t\t\t\tsum*=(Math.pow(prime[j], divides[j]+1)-1)/(prime[j]-1);\n\t\t\t}\n\t\t\tif (sum-i<i) { //only check if sum of divisors of i is less than i\n\t\t\t\tif (sumOfDivisors[sum-i-1]==i) { //check if amicable pair\n\t\t\t\t\ttotal=total+i+sum-i; //add both to total (only happens once)\n\t\t\t\t}\n\t\t\t}\n\t\t\tArrays.fill(divides,0); //reset divisors array\n\t\t\tsumOfDivisors[index]=sum-i; //store number of divisors\n\t\t\tsum=1;\n\t\t\tindex++;\n\t\t}\n\t\tSystem.out.print(\"The sum of all amicable numbers less than 10000 is: \");\n\t\tSystem.out.println(total);\n long endTime = System.currentTimeMillis();\n System.out.println(\"It took \" + (endTime - startTime) + \" milliseconds.\");\n\n\t}", "publci int countPrime(int n){\n boolean[] notPrime = new boolean[n];\n for (int i = 2; i * i <= n; i++){\n if(!notPrime[i]){\n for (int j = i; j * i < n; j++)\n notPrime[j * i] = true;\n }\n }\n}", "public Primes(int n) {\n this.n = n;\n }", "static boolean isPrime(long num) {\n\t\tif(num==1)\n\t\t\treturn false;\n\t\tif(num==2 || num==3)\n\t\t\treturn true;\n\t\t\n\t\tif(num%2==0 || num%3==0)\n\t\t\treturn false;\n\t\t\n\t\tfor(int value=5; value*value<=num; value+=6)\n\t\t\tif(num%value==0 || num%(value+2)==0)\n\t\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "public static void primeNumber() {\n\t\tboolean isprimeNumber = false;\n\t\tSystem.out.println(\"prime numbers between 1 and 1000 are\");\n\n\t\tfor (int i = 2; i <1000; i++) {\n\t\tif(calculation(i)==true)\n\t\t{\n\t\t\tSystem.out.println(i);\n\t\t\tprime++;\n\t\t}\n\t\t\n\t}\n\t\tSystem.out.println(prime+\" numbers are prime\");\n\t}", "private static void incExp(Map<Integer, Integer> map, int prime, int by) {\n \tif (by > 0) {\n \t\tInteger n = map.get(prime);\n \t\tif (n == null)\n \t\t\tmap.put(prime, by);\n \t\telse\n \t\t\tmap.put(prime, n+by);\n \t}\n }", "private int obtem_primeiro(int numero)\n {\n for (Map.Entry i : janela.entrySet()) if(((Estado)i.getValue()).getNumero_sequencia() == numero && !((Estado) i.getValue()).isEstado()) return (int) i.getKey();\n return 0;\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n \n boolean[] isNotPrime = new boolean[(N - 1 - 1) / 2 + 1];\n List<Integer> list = new ArrayList<Integer>();\n HashSet<Integer> primes = new HashSet<Integer>();\n \n list.add(2);\n primes.add(2);\n long sum = 0;\n for (int i = 1; i < isNotPrime.length; i++) {\n if (isNotPrime[i]) {\n continue;\n }\n list.add(2 * i + 1);\n primes.add(2 * i + 1);\n long nextIndex = (((long) 2 * i + 1) * (2 * i + 1) - 1) / 2;\n if (nextIndex >= isNotPrime.length) {\n continue;\n }\n for (int j = ((2 * i + 1) * (2 * i + 1) - 1) / 2; j < isNotPrime.length; j += 2 * i + 1) {\n isNotPrime[j] = true;\n }\n }\n int index = 0;\n while (index < list.size()) {\n int curPrime = list.get(index);\n index++;\n if (curPrime < 10) {\n continue;\n }\n int base = 1;\n while (curPrime / base > 9) {\n base *= 10;\n }\n int leftTruncate = curPrime;\n int rightTruncate = curPrime;\n boolean isValid = true;\n while (base != 1) {\n leftTruncate = leftTruncate - leftTruncate / base * base;\n rightTruncate = rightTruncate / 10;\n base /= 10;\n if (primes.contains(leftTruncate) == false || primes.contains(rightTruncate) == false) {\n isValid = false;\n break;\n }\n }\n if (isValid) {\n sum += curPrime;\n }\n }\n System.out.println(sum);\n scanner.close();\n }", "public static int is_prime(int num) {\n\t\t\n\t\t /* Initializes recursion */\n\t\treturn check_if_prime(num, firstprime);\n\t}", "public void PrimeNumber()\r\n\t{\r\n\t\tint num;\r\n\t\tSystem.out.println(\"Enter the Number\");\r\n\t\tnum = sc.nextInt();// read input to calculate prime number\r\n\t\tint count=0;\r\n\t\twhile(count!=2)\r\n\t\t{\r\n\t\t\tnum++;\r\n\t\t\tcount=0;\r\n\t\t\tint i=1;\r\n\t\t\twhile(i<=num)\r\n\t\t\t{\r\n\t\t\t\tif(num%i==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tif(count==2)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(num);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t/*for(int i=2;i<=num;i++)\r\n\t\t{\r\n\t\t\tif(num%i!=0)\r\n\t\t\tbreak;\r\n\t\t\tSystem.out.println(+num);\r\n\t\t}\r\n\t\t//System.out.println(+num);*/\r\n\t\t\r\n\t}", "private static int nextPrime(int n) {\n\t if (n % 2 == 0)\n\t n++;\n\n\t for (; !isPrime(n); n += 2)\n\t ;\n\n\t return n;\n\t }", "private static int primeSize(int size){\n while (!checkPrime(size)){ //keep adding size by 1 until finds a prime size\n size++;\n }\n return size;\n }", "void initPrimesEratosthenes()\n\t{\n\t\tfinal double logMaxFactor = Math.log(maxFactor);\n\t\tfinal int maxPrimeIndex = (int) ((maxFactor) / (logMaxFactor - 1.1)) + 4;\n\t\tprimesInv = new double [maxPrimeIndex]; //the 6542 primesInv up to 65536=2^16, then sentinel 65535 at end\n\t\tprimes = new int [maxPrimeIndex]; //the 6542 primesInv up to 65536=2^16, then sentinel 65535 at end\n\t\tint primeIndex = 0;\n\t\tfinal boolean [] noPrimes = new boolean [maxFactor+1];\n\t\tfor (int i = 2; i <= Math.sqrt(maxFactor); i++) {\n\t\t\tif (!noPrimes[i]) {\n\t\t\t\tprimes[primeIndex] = i;\n\t\t\t\tprimesInv[primeIndex++] = 1.0 / i;\n\t\t\t}\n\t\t\tfor (int j = i * i; j <= maxFactor; j += i) {\n\t\t\t\tnoPrimes[j] = true;\n\t\t\t}\n\t\t}\n\t\tfor (int i = (int) (Math.sqrt(maxFactor)+1); i <= maxFactor; i++) {\n\t\t\tif (!noPrimes[i]) {\n\t\t\t\tprimes[primeIndex] = i;\n\t\t\t\tprimesInv[primeIndex++] = 1.0 / i;\n\t\t\t}\n\t\t}\n\t\tfor (int i=primeIndex; i < primes.length; i++) {\n\t\t\tprimes[i] = Integer.MAX_VALUE;\n\t\t}\n\n\t\tSystem.out.println(\"Prime table built max factor '\" + maxFactor + \"' bytes used : \" + primeIndex * 12);\n\t}", "public static boolean isPrimeNumber(int num) {\r\n\t\t\t\r\n\t\tif(num<=1) {\r\n\t\treturn false;\r\n\t\t}\r\n\t\tfor(int i=2;i<num;i++) {\r\n\t\t\t\r\n\t\t\tif(num%i==0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t\t}", "private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}", "public int hashCode(){\n \n long code;\n\n // Values in linear combination with two\n // prime numbers.\n\n code = ((21599*(long)value)+(20507*(long)n.value));\n code = code%(long)prime;\n return (int)code;\n }", "PEKSInitial() {\n\t\tprimeP = BigInteger.probablePrime(512, new Random());// generate a 512\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// bit prime\n\t\tprimeQ = BigInteger.probablePrime(512, new Random());// generate a 512\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// bit prime\n\t\tgenerator = new BigInteger(512, new Random());// a 512 bit number, may\n\t\t \t\t\t\t\t\t\t\t\t\t// not prime\n\t\tprimeM = primeP.multiply(primeQ);// compute m=p*q\n\t\tfainM = (primeP.subtract(BigInteger.ONE)).multiply(primeQ\n\t\t\t\t.subtract(BigInteger.ONE));// eluer function of m\n\t\t//keyVector.add(generator);\n\t\t//File outputFile = new File(\"Data Records\\\\123456.txt\");\n\t\t//ht.put(generator,outputFile.getAbsolutePath());\n\t}", "public PrimeCounter(long startValue) {\n\t\t\tnum = startValue;\n\t\t}", "public static boolean isPrime(int value) {\n /* counter keep track of number of modulo operation\n in prime number,the modulus returns 0 two times only\n 1.when it is devided by 1\n 2.when it is devided by it self \n */\n int counter = 0;\n // zero , one is not prime\n if (value == 0 || value == 1) {\n counter = 0;\n } else {\n // starting from 2,doing modulus operation\n for(int i = 2;i<=value;i++){\n if (value%i==0) {\n counter++;\n }\n }\n }\n // checking the counter,we done modulus starting from 2,so we don't have to consider 1st case\n // counter is one means the value is only devisible by it self(2nd case)\n if (counter==1) {\n return true;\n }\n // if the number is devisible by numbers other than one and the number it self,then it is not prime\n else{\n return false;\n } \n }", "private static boolean isPrime(int num) {\n\t\tfor(int divisor=2;divisor<=num/2;divisor++){\n\t\t\tif(num%divisor==0) return false;\n\t\t}\n\t\treturn true;\n\t}", "static boolean isPrime(int a){ //isPrime function evaluates if the int is prime takes int and returns boolean\n //logic:\n //a number is prime if no other number is divisible by it other than 1 and itself.\n //algorithim: modulos every number until n to see if is divisible and modulos == 0 \n //faster way: check everynumber up until half of the the number. ( int division will cut off the decimal ) since if it is double, it will also be divisible by 2\n //not, start the loop after 1 because 1 is neither prime nor composite\n if ( a == 1){\n System.out.println(\"Error: 1 is neither prime nor composite\");\n return false;\n }//end if\n for(int i = 2; i <= (a/2); i++){\n if(a % i == 0)//if the number is divisible by any number other than itself then it is not prime.\n return false;\n }//end for\n return true; //if the number succesfully passes through the loop then it is a prime number and return true\n \n }", "public ArrayList<Integer> getPrimes() {\n\t\treturn primes;\n\t}", "public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}", "private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private static int nextPrime(int n) { // calcula el siguiente numero primo\n\t\t\t\t\t\t\t\t\t\t\t// mallor o igual a n.\n\t\tif (n % 2 == 0)\n\t\t\tn++;\n\n\t\tfor (; !isPrime(n); n += 2)\n\t\t\t;\n\n\t\treturn n;\n\t}", "@SuppressWarnings(\"unused\")\r\n\t\tprivate int getNextPrime(int currentPrime) {\r\n\t\t\t// first we double the size of the current prime + 1\r\n\t\t\tcurrentPrime *= 2;\r\n\t\t\tcurrentPrime += 1;\r\n\r\n\t\t\twhile (!isPrime(currentPrime))\r\n\t\t\t\tcurrentPrime++;\r\n\r\n\t\t\treturn currentPrime;\r\n\t\t}", "public void checkPrime()\n {\n for (int i = 0; i<= Values2.size()-1; i++)\n {\n if (isPrime(Values2.get(i)))\n {\n Values2.remove(i);\n }\n }\n }", "private static boolean isPrime(int n) {\n\t if(n == 2 || n == 3)\n\t return true;\n\n\t if(n == 1 || n % 2 == 0)\n\t return false;\n\n\t for (int i = 3; i * i <= n; i += 2) {\n\t if (n % i == 0)\n\t return false;\n\t }\n\t return true;\n\t }", "private boolean isPrime(long num) {\n if (num < 2) // prime numbers are positive and above 1\n return false;\n long max = (long) sqrt(num); // get the rounded square root of the number to check for primality\n for (int j = 2; j <= max; j++) {\n if (num % j == 0) {\n return false; // not a prime number as is divisible\n }\n }\n return true; // optimus prime :-)\n }", "public void prime(LogTarget lt, int prime) throws APIException {\n\t\tfor (int i = 0; i < prime; ++i) {\n\t\t\tPooled<T> pt = new Pooled<T>(creator.create(), this, lt);\n\t\t\tsynchronized (list) {\n\t\t\t\tlist.addFirst(pt);\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\n\t}", "public void testIsPrime(){\n boolean primo = true;\n if (primo == calcula.isPrime(5)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 5... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(5) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver false \n primo = false;\n if (primo == calcula.isPrime(40)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 40... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(40) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver true \n primo = true;\n if (primo == calcula.isPrime(11)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 11... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(11) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver false \n primo = false;\n if (primo == calcula.isPrime(25)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 25... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(25) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver true \n primo = true;\n if (primo == calcula.isPrime(47)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 47... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(47) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver false \n primo = false;\n if (primo == calcula.isPrime(1)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 1...\");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(1) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Recorremos el ArrayList para comprobar si todos son OK o hay algún ERROR\n int contador = 0;\n for (String func : lista){\n func = lista.get(contador);\n if (!func.equals(\"OK\")){\n funciona = \"NO\";\n }\n contador = contador + 1;\n }\n System.out.println(\"El método \" + funciona + \" funciona correctamente\");\n lista.clear();\n funciona = \"SI\";\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter a number to get prime numbers below that number\");\nint givenum = sc.nextInt();\nint i,number,count;\nfor(number=1;number<=givenum;number++)\n{\n\tcount=0;\n\tfor(i=2;i<=number/2;i++)\n\t{\n\t\tif(number%i==0)\n\t\t{\n\t\t\tcount++;\n\t\t\tbreak;\n\t\t}\n\t}\nif(count==0 && number !=1)\n{\n\tSystem.out.println(number);\n}\n}\n\t}", "public PrimeSequence(int startingNumber) \r\n\t{\r\n\t\tcurrentNumber = startingNumber;\r\n\t\tlastDigitCounters = new int[DIGITS];\r\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tArrayList <Integer>arr= new ArrayList<Integer>();\r\n\t\tArrayList <Boolean>isPrime= new ArrayList<Boolean>();\r\n\t\tSystem.out.println(\"Enter the max range\");\r\n\t\tint n =s.nextInt();\r\n\t\tint i,j,p=0;\r\n\t\tfor(i=0;i<=(n-2)/2;i=i+1)\r\n\t\t{\r\n\t\t\tisPrime.add(true);\r\n\t\t}\r\n\t\tSystem.out.println(isPrime);\r\n\t\tarr.add(2);\r\n\t\tfor(i=0;i<isPrime.size();++i)\r\n\t\t{\r\n\t\t\tif(isPrime.get(i))\r\n\t\t\t{\r\n\t\t\t\tp=2*i+3;\r\n\t\t\t\tarr.add(p);\r\n\t\t\t}\r\n\t\t\tfor(j=2*i*i +6*i+3;j<isPrime.size();j=j+p)\r\n\t\t\t{\r\n\t\t\t\tisPrime.set(j,false);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(isPrime);\r\n\t\tSystem.out.println(arr);\r\n\t}", "public static boolean isPrime(int num){\n if(num<=1){\n return false;\n }\n for(int i=2;i<=(long)Math.sqrt(num) ; i++){\n if(num%i==0){\n return false;\n }\n }\n return true;\n }", "static boolean isPrime(String number)\n {\n int num = Integer.valueOf(number);\n\n for(int i = 2; i * i <= num; i++)\n {\n if ((num % i) == 0)\n return false;\n }\n return num > 1 ? true : false;\n }", "public void initialize()\n {\n System.out.println(\"Enter number of bits of the prime numbers: \");\n Scanner scanner = new Scanner(System.in);\n SIZE = scanner.nextInt();\n AKS tb = new AKS();\n\n /* Step 1: Select two large prime numbers. Say p and q. */\n long startTime = System.currentTimeMillis();\n p = genPrime(tb, SIZE);\n q = genPrime(tb, SIZE);\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n System.out.println(\"Total prime generator time: \" + elapsedTime + \" ms\");\n System.out.println(p);\n System.out.println(q);\n this.genKeyPair(p, q);\n }", "public void setIsPrime()\n\t{\n\t\tint divisor = 2;\n\t\tdo\n\t\t{\n\t\t\tif (number % divisor == noRemainder)\n\t\t\t{\n\t\t\t\texactDivision = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\texactDivision = false;\n\t\t\t}\n\t\t\tdivisor++;\n\t\t} while (divisor < number && exactDivision == false);\n\t}", "public static void Prime(int number)\n\t {\n\t \tboolean isPrime=true;\n\t \tfor(int i=2;i<=number/2;i++)\n\t \t{\n\t \tint temp;\n\t \t\n\t \ttemp=number%i;\n\t \tif(temp==0) \n\t \t{\n\t \t\tisPrime=false;\n\t \t\tFactorization(number); //Calling Factorization method\n\t \t\tbreak;\n\t \t\t\n\t \t}\n\t \t\n }\n\t \tif(isPrime)\n\t \t{\n\t \t\tSystem.out.println(\"Entered number is prime number\");\n\t\t \tcheck();\t\n\t \t}\n\t}", "private static ArrayList<Integer> generatePrimes(int maxPrime)\n\t{\n\t\t\n\t\t// Create an array of number with the max number being the maxPrime\n\t\t\n\t\tArrayList<Integer> arrayNumbers = new ArrayList<Integer>();\n\t\t\n\t\tint upperbound = (int) Math.sqrt(maxPrime);\n\t\t\n\t\tfor (int counterNumber = 2; counterNumber <= maxPrime; counterNumber++)\n\t\t{\n\t\t\tarrayNumbers.add(counterNumber);\n\t\t}\n\t\t\n\t\tArrayList<Integer> arrayPrimes = new ArrayList<Integer>();\n\t\t\n\t\twhile (arrayNumbers.size() > 0)\n\t\t{\n\t\t\tint currentNumber = arrayNumbers.get(0);\n\t\t\tremoveMultiple(arrayNumbers, currentNumber);\n\t\t\tarrayPrimes.add(currentNumber);\n\t\t}\n\t\t\n\t\treturn arrayPrimes;\n\t\t\n\t}", "public static boolean isPrime(MyInteger number1){\r\n\t\tfor (int i = 2; i<number1.getInt(); i++){\r\n\t\t\tif(number1.getInt()/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void findPrime (int n){\n\t\tboolean [] isPrime = new boolean[n];\n\t\tisPrime[0] = false;\n\t\tisPrime[1] = true;\n\t\t\n\t\tfor(int i = 2; i< n; i++){\n\t\t\tisPrime[i]= true;\n\t\t}\n\t\tint limit = (int)Math.sqrt(n);\n\t\tfor(int i = 2; i<= limit; i++){\n\t\t\tif(isPrime[i])\n\t\t\t{\n\t\t\t\tfor(int j= i * i ; j < n; j+= i){\n\t\t\t\t\tisPrime[j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0; i< n; i++){\n\t\t\tif(isPrime[i])\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "public static boolean isPrime(int num) {\n\n if (num <= 1) {\n return false;\n }\n\n if (num == 2) {\n return true;\n }\n\n for (int i = 3; i < num; i++) {\n\n if (num % i == 0) {\n return false;\n }\n\n }\n\n return true;\n\n }", "public IntList(int size){\n\t\tprime = new ArrayList<Integer>(size);\n\t}", "public boolean isPrime(){\r\n\t\tfor (int i = 2; i<value; i++){\r\n\t\t\tif(value/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public ArrayList<BigInteger> getAll() {\n\t\treturn primes;\n\t}", "protected static int nextPrime(int n )\r\n\t{\r\n\t\tif( n % 2 == 0 )\r\n\t\t\tn++;\r\n\t\tfor( ; !isPrime( n ); n += 2 )\r\n\t\t\t;\r\n\t\treturn n;\r\n\t}", "public static void main(String[] args) {\n\n int[] range = new int[100];\n\n\n for (int i = 0; i<range.length; i++) {\n range[i]=i+2;\n }\n /*\n for (int i = 1; i <prange; i++) {\n System.out.println(numbers[i]);\n\n\n }\n\n primearray obj = new primearray(numbers);\n for (int i = 1; i <prange; i++) {\n System.out.println(obj.range[i]);\n\n\n }*/\n primearray obj = new primearray(range);\n\n obj.perform();\n\n\n\n\n }", "public Prime_Numbers() {\n initComponents();\n }", "public void primeNumber(int a)\n { boolean result = false;\n int i;\n if(a!=1)\n {\n for( i=2;i<a;i++)\n {\n if(a%i==0)\n {\n break;\n }\n\n }\n if(a==i)\n {\n System.out.println(i);\n result=true;\n }\n }\n }", "public int[] getPrimes() {\n\t\treturn primes;\n\t}", "public void setPri(Integer pri) {\n this.pri = pri;\n }", "private static void computePrimes(boolean[] primes) {\n\t\tprimes[0] = false;\n\t\tprimes[1] = false;\n\n\t\t// Starts all numbers as primes\n\t\tfor (int x = 2; x < primes.length; x++) {\n\t\t\tprimes[x] = true;\n\t\t}\n\t\t// Checks every number above 2 for primality\n\t\tfor (int y = 2; y < primes.length; y++) {\n\t\t\tif (primes[y] == true) {\n\t\t\t\tfor (int j = y * y; j < primes.length; j += y) {\n\t\t\t\t\tprimes[j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean isPrime() {\n boolean isPrime = true;\n for (int i = 2; i < value; i++) {\n if (value % i == 0) {\n isPrime = false;\n }\n }\n return isPrime;\n }", "private static boolean checkPrime(int size){\n boolean prime = true;\n //if can divide by two then it is not prime\n if (size%2==0) prime = false;\n //if not, then just check the odds as all even numbers are divisible by 2\n for(int i = 3; i*i <= size; i += 2) {\n if(size % i == 0)\n prime = false;\n }\n return prime;\n }", "public static boolean isPrime(BigInteger n) {\n\t\tglobalLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\tprimeLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\t// Use some other function if n is sufficiently small (n<=10^10)\n\t\tif (n.compareTo(BigInteger.valueOf(10000000000l)) <= 0) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is small enough to be checked normally.\");\n\t\t\treturn isPrime(n.longValue());\n\t\t} else if (!n.testBit(0)) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is even so it is composite.\");\n\t\t\treturn false;\n\t\t}\n\t\tprimeLog.log(\n\t\t\t\t\"The number \" + n.toString() + \"is too large and will be checked with Rabin Miller primality test.\");\n\n\t\t// Find values to the equation n=2^s*m where s is as large as possible\n\t\tint s = 0;\n\t\t// Find out how many times we can divide (n-1) by 2\n\t\tBigInteger nMinusOne = n.subtract(BigInteger.ONE);\n\t\twhile (!nMinusOne.testBit(s)) {\n\t\t\ts++;\n\t\t}\n\t\t// Find k by calculating n>>s\n\t\tBigInteger m = nMinusOne.shiftRight(s);\n\t\tprimeLog.log(n.toString() + \" - 1 = 2^\" + s + \" * \" + m.toString());\n\n\t\tint prime = 0;\n\t\tint composite = 0;\n\n\t\t// Check to see if n is prime using base a\n\t\tlong maxValue = n.bitLength() > 63 ? Long.MAX_VALUE : n.longValue();\n\t\tfor (int i = 0; i < PRIMALITY_CHECK_ITERATIONS; i++) {\n\t\t\tprimeLog.stepIn(\"Trial \" + i);\n\t\t\tBigInteger a = BigInteger.valueOf(randomLong(2, maxValue - 2));\n\t\t\tprimeLog.log(\"Checking if n is prime using a=\" + a.toString() + \".\");\n\t\t\t// First iteration is a^m % n\n\t\t\tBigInteger res = a.modPow(m, n);\n\t\t\tprimeLog.log(\"a^m % n = \" + res.toString());\n\t\t\t// On first iteration if |a^m mod n| = 1 then say it is prime\n\t\t\tif (res.equals(BigInteger.ONE) || res.equals(nMinusOne)) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\tprimeLog.stepOut();\n\t\t\t\tprime++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tboolean flag = false;\n\t\t\tfor (int j = 1; !flag && j < s; j++) {\n\t\t\t\tres = res.modPow(BigInteger.valueOf(2), n);\n\t\t\t\tprimeLog.log(\"a^(2^\" + j + \" * m) % n = \" + res.toString());\n\t\t\t\tif (res.equals(BigInteger.ONE)) {\n\t\t\t\t\t// If a^[(2^j)*m] % n = 1 then we say is is composite\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\t\tcomposite++;\n\t\t\t\t\tflag = true;\n\t\t\t\t} else if (res.equals(nMinusOne)) {\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\t\t// If a^[(2^j)*m] % n = -1 then we say is is prime\n\t\t\t\t\tprime++;\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!flag) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\tcomposite++;\n\t\t\t}\n\t\t\tprimeLog.stepOut();\n\t\t}\n\t\tprimeLog.log(\"Out of \" + (prime + composite) + \" trials, \" + prime + \" trials claimed n was prime.\");\n\t\tprimeLog.log(\"n is prime: \" + (prime > composite));\n\t\tglobalLog.appendToCurrent(\": \" + (prime > composite));\n\t\tglobalLog.stepOut();\n\t\tprimeLog.appendToCurrent(\": \" + (prime > composite));\n\t\treturn prime > composite;\n\t}", "private static boolean isPrime(int number){\n for(int divisor = 2; divisor <= number / 2; divisor++){\n if(number % divisor == 0){ // If true. number is not prime\n return false;\n }\n }\n return true; // Number is prime\n }", "public PrimeSequence(int startingNumber)\n\t{\n\t\tnumber = startingNumber;\n\t}", "private static boolean isPrime(long n)\r\n {\r\n //Variable that will be returned, by default true\r\n boolean prime = true;\r\n //Start at 3 and increment by 2\r\n for(int i = 3;i<n/2;i=i+2)\r\n {\r\n //If the remainder of the division of n by i is 0, return prime as false \r\n if(n%i==0)\r\n {\r\n prime = false;\r\n return prime;\r\n }\r\n }\r\n //return the default value if the program gets to here\r\n return prime;\r\n }", "public static boolean isPrime(int num) {\n for (int i = 2; i < num; i++) {\r\n if (num % i == 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public static IntStream primeStream(){\n return IntStream.iterate(2, PrimeFactory::getNextHigherPrime);\n }", "private static boolean isPrime(int n) {\n if (n%2==0) return false;\r\n //if not, then just check the odds\r\n for(int i=3;i*i<=n;i+=2) {\r\n if(n%i==0)\r\n return false;\r\n }\r\n return true;\r\n }", "private static int findSpecialPrimesSum() {\n // holds whether a prime number has invalid digits\n boolean invalidDigits;\n // holds whether a number is prime or not\n boolean[] notPrime = new boolean[UPPER_BOUND];\n // number of special primes found\n int numOfSpecialPrimes = 0;\n // sum of the special primes\n int sum = 0;\n // temp variable for a number\n int tempNum;\n\n // set all non prime numbers to true\n for (int index = SMALLEST_PRIME; index < notPrime.length; index++) {\n for (int counter = index * SMALLEST_PRIME; counter < notPrime.length; counter += index) {\n notPrime[counter] = true;\n }\n }\n\n // loop through all possible values\n for (int num = DIV_10; num < notPrime.length; num++) {\n // only run if the number is prime\n if (notPrime[num] == false) {\n // check if the number ends with a 3 or 7\n if (END_DIGITS[num % DIV_10] == true) {\n tempNum = num;\n // strip the number until we get the first digit\n invalidDigits = false;\n while (tempNum >= DIV_10) {\n // check if the prime has even digits that are not 2\n if ((tempNum % DIV_10) % SMALLEST_PRIME == 0 && tempNum % DIV_10 != SMALLEST_PRIME) {\n invalidDigits = true;\n break;\n }\n tempNum /= DIV_10;\n }\n // check if the prime has invalid digits\n if (invalidDigits == true) {\n continue;\n }\n // check if the number starts with 2,3,5,7\n if (START_DIGITS[tempNum] == true) {\n // check if the number is left and right truncatable\n if (leftTruncatablePrime(num, notPrime) == true\n && rightTruncatablePrime(num, notPrime) == true) {\n numOfSpecialPrimes++;\n sum += num;\n }\n }\n }\n }\n // if all 11 primes are found, exit loop\n if (numOfSpecialPrimes == NUM_OF_PRIMES) {\n break;\n }\n }\n\n return sum;\n }", "private static void primeCalc(int UI)\n\t{\n\t\tSystem.out.print(\"The Prime Numbers are: \");\n\t\tSystem.out.println();\n\t\t\n\t\tint P = 0;\n \n\t\twhile (++P <= UI) \n\t\t{\n\n \tint P2 = (int) Math.ceil(Math.sqrt(P));\n\n boolean Decision = false;\n\n while (P2 > 1) \n\t\t\t{\n\n \tif ((P != P2) && (P % P2 == 0)) \n\t\t\t\t{\n \tDecision = false;\n break;\n }\n\t\t\t\telse if (!Decision) \n\t\t\t\t{\n \tDecision = true;\n }\n\n --P2;\n\t\t\t}\n\n if (Decision) \n\t\t\t{\n \tSystem.out.println(P);\n \n }\n\n\t\n\t\t}\n\n\n\t}", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "public boolean isPrime()\n\t{\n\t\treturn isPrime(value);\n\t}", "public static void setupPrimes() {\n int[] naturals = new int[BIGGEST_PRIME];\n for (int i = 0; i < naturals.length; i++) {\n naturals[i] = i;\n }\n int nthPrime = 2;\n for (int n = 0; n < primes.length; n++) {\n for (int nthPrimeMultiple = nthPrime*nthPrime; nthPrimeMultiple < BIGGEST_PRIME; nthPrimeMultiple+=nthPrime) {\n naturals[nthPrimeMultiple] = 0;\n }\n primes[n] = nthPrime;\n\n do {\n nthPrime++;\n if (nthPrime >= naturals.length) return;\n } while (naturals[nthPrime] == 0);\n }\n }", "private void verifyNumbersPrimeWitStream(){\n\t\tList<Integer> primeList = IntStream.range(2, Integer.MAX_VALUE)\n\t\t\t\t.filter(n -> isPrime(n))\n\t\t\t\t.limit(primes.length)\n\t\t\t\t.boxed()\n\t\t\t\t.collect(Collectors.toList());\n\t\tprimes = primeList.stream().mapToInt(i->i).toArray();\n\t}", "@Override\n public boolean isPrime(int value){\n if (value == 0 || value == 1){\n return false;\n }\n // Check all numbers up to the square root of the number\n for (int i = 2; i*i < value+1; i++) {\n if (value % i == 0) {\n return false;\n }\n }\n return true;\n }", "private synchronized void agregarElemento(int numero){\n int hashtag = funcionHash(numero);\n int cantDigitos = cantidadDigitos(numero);\n \n if(!listaPorDigitos.containsKey(cantDigitos)){\n listaPorDigitos.put(cantDigitos, new TreeMap());\n }\n if(listaPorDigitos.get(cantDigitos).get(hashtag) == null){\n listaPorDigitos.get(cantDigitos).put(hashtag, new ArrayList<Integer>());\n }\n listaPorDigitos.get(cantDigitos).get(hashtag).add(numero);\n this.add(numero);\n }", "ArrayList<BigInteger> factorize(BigInteger num) {\n ArrayList<BigInteger> result = calcPrimeFactors(num);\n return result;\n }", "long buscarPrimeiro();" ]
[ "0.6541021", "0.61199164", "0.6067908", "0.59989417", "0.5863887", "0.58497477", "0.57598186", "0.5707558", "0.5664043", "0.56372243", "0.5627469", "0.56015545", "0.5539264", "0.55180854", "0.5498486", "0.5477798", "0.54656506", "0.5461593", "0.5435998", "0.5412033", "0.53775465", "0.5372079", "0.53576523", "0.5345996", "0.5335651", "0.53284574", "0.5323937", "0.531511", "0.53102756", "0.5295929", "0.5293208", "0.52886224", "0.5285587", "0.52809936", "0.52772313", "0.5270317", "0.5268089", "0.52490073", "0.5247364", "0.5245134", "0.5243595", "0.524302", "0.5238348", "0.5225462", "0.5209648", "0.5194765", "0.5180221", "0.51712847", "0.51595485", "0.51595175", "0.5155926", "0.5151311", "0.51485515", "0.51440144", "0.5138278", "0.5137449", "0.5133699", "0.5132733", "0.513031", "0.5128779", "0.51228094", "0.5121284", "0.5117131", "0.5116145", "0.5112403", "0.51117355", "0.50944865", "0.50699615", "0.5069912", "0.5066779", "0.5060331", "0.5059612", "0.50582033", "0.5056316", "0.5045075", "0.5044226", "0.5043327", "0.5021911", "0.5021298", "0.5017307", "0.50142926", "0.50082004", "0.5007373", "0.5005253", "0.49882537", "0.49824077", "0.49687555", "0.49681872", "0.49670288", "0.49664065", "0.4966389", "0.49653885", "0.4963003", "0.49602243", "0.4958018", "0.4954575", "0.49449015", "0.49343395", "0.4928201", "0.49246448", "0.49188188" ]
0.0
-1
TODO Autogenerated method stub
@Override public String intercept(ActionInvocation invocation) throws Exception { System.out.println("动作执行前..."); HttpSession session=ServletActionContext.getRequest().getSession(); Object obj=session.getAttribute("user"); if (obj==null) { return "login"; } String rtValue = invocation.invoke(); System.out.println("动作执行后..."); return rtValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void run() { serveurConnect.add(client.getNomClient() + " / " + client.getClientSocket().getRemoteSocketAddress() + " déconnecté"); Compte c = new Compte(client.getNomClient(), client.getPassClient()); Comptes.remove(c); clients.remove(clientThreads.indexOf(client)); System.out.println("erreur" + clientThreads.indexOf(client)); clientThreads.remove(clientThreads.indexOf(client)); }
{ "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
Fetch checkpoint, return create a new instance if not found.
private static CheckpointBo getCheckpoint(ICheckpointDao dao, String id, Date defaultTimestamp) { CheckpointBo checkpoint = dao.getCheckpoint(id); return checkpoint != null ? checkpoint : CheckpointBo.newInstance(id, defaultTimestamp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static GeneticProgram loadCheckpoint(String arg) {\n CheckpointLoader cpl = new CheckpointLoader(arg);\n GeneticProgram gp = cpl.instantiate();\n if (gp == null) {\n System.err.println(\"Could not load checkpoint.\");\n System.exit(-1);\n }\n return gp;\n }", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "private CheckpointVault getPersistedCheckpoints(SModel model) {\n // FIXME synchronization - synchronized or concurrent map?\n CheckpointVault cpv = myPersistedCheckpoints.get(model.getReference());\n if (cpv == null) {\n cpv = new CheckpointVault(myStreamProvider.getStreamManager(model));\n cpv.readCheckpointRegistry();\n myPersistedCheckpoints.put(model.getReference(), cpv);\n }\n return cpv;\n }", "public Checkpoint lastCheckpoint(){\n if(!checkpointRecordFile.exists()){\n return null;\n }\n return lastCheckpoint(rootDir);\n }", "public Result createCheckpoint(String checkpointDir) {\n if (rocksDBInstance == null) {\n logger.error(\"There is no RocksDB instance\");\n return Result.failWithCodeAndMessage(\n \"sys_error\", \"There is no RocksDB instance\");\n } else {\n if (!operationLock.tryLock()) {\n logger.error(\"There is an another operation on RocksDB instance!\");\n return Result.failWithCodeAndMessage(\n \"sys_error\",\n \"There is an another operation on RocksDB instance!\"\n );\n }\n try {\n final Checkpoint checkpoint = Checkpoint.create(rocksDBInstance);\n checkpoint.createCheckpoint(checkpointDir);\n return Result.ok();\n } catch (RocksDBException e) {\n logger.error(\"Create RocksDB checkpoint error!\", e);\n return Result.failWithCodeAndMessage(\"sys_error\", e.getMessage());\n } finally {\n operationLock.unlock();\n }\n }\n }", "private ModelCheckpoints loadFromTransientModule(SModelName originalModelName) {\n // XXX getCheckpointModelsFor iterates models of the module, hence needs a model read\n // OTOH, just a wrap with model read doesn't make sense here (models could get disposed right after the call),\n // so likely we shall populate myCheckpoints in constructor/dedicated method. Still, what about checkpoint model disposed *after*\n // I've collected all the relevant state for this class?\n // Not sure whether read shall be local to this class or external on constructor/initialization method\n // It seems to be an implementation detail that we traverse model and use its nodes to persist mapping label information (that's what we need RA for).\n return new ModelAccessHelper(myTransientModelProvider.getRepository()).runReadAction(() -> {\n String nameNoStereotype = originalModelName.getLongName();\n ArrayList<CheckpointState> cpModels = new ArrayList<>(4);\n for (SModel m : myModule.getModels()) {\n if (!nameNoStereotype.equals(m.getName().getLongName()) || false == m instanceof ModelWithAttributes) {\n continue;\n }\n // we keep CP (both origin and actual) as model properties to facilitate scenario when CP models are not persisted.\n // Otherwise, we could have use values written into CheckpointVault's registry file. As long as there's no registry for workspace models,\n // we have to use this dubious mechanism (not necessarily bad, just a bit confusing as we duplicate actual CP value as model attribute and\n // in the CheckpointVault's registry).\n CheckpointIdentity modelCheckpoint = readIdentityAttributes((ModelWithAttributes) m, GENERATION_PLAN, CHECKPOINT);\n if (modelCheckpoint == null) {\n continue;\n }\n CheckpointIdentity prevCheckpoint = readIdentityAttributes((ModelWithAttributes) m, PREV_GENERATION_PLAN, PREV_CHECKPOINT);\n cpModels.add(new CheckpointState(m, prevCheckpoint, modelCheckpoint));\n }\n return cpModels.isEmpty() ? null : new ModelCheckpoints(cpModels);\n });\n }", "@Override\n\tpublic Serializable checkpointInfo() throws Exception {\n\t\treturn null;\n\t}", "@Nullable\n public ModelCheckpoints getState(@NotNull SModel model) {\n if (isCheckpointModel(model)) {\n // FIXME provisional fix.\n // Assume if input comes from a checkpoint, it's the one already loaded, look at\n // transients first, then among persisted. Perhaps, shall extract CP identity from the model and use it to find proper MCp.\n // Alternatively, shall keep model reference of the origin along with CP model, so that can navigate to an appropriate MCp/CpV\n // using model reference as for the general scenario. However, don't want to persist origin model ref in a CP model, and didn't\n // come up with a nice way to satisfy that (filtering model attributes are not to my liking).\n for (ModelCheckpoints mcp : myTransientCheckpoints.values()) {\n CheckpointState cps = mcp.findStateWith(model);\n if (cps != null) {\n return mcp;\n }\n }\n for (CheckpointVault cpv : myPersistedCheckpoints.values()) {\n ModelCheckpoints mcp = cpv.getCheckpointsIfOwns(model);\n if (mcp != null) {\n return mcp;\n }\n }\n return null;\n }\n ModelCheckpoints mcp = getTransientCheckpoints(model.getReference());\n if (mcp != null) {\n return mcp;\n }\n // FIXME once accessed, perhaps ModelCheckpoints instance shall be kept in myTransientCheckpoints or myExposedPersisted?\n return getPersistedCheckpoints(model).getCheckpointsFor((m, cp) -> {\n // XXX for now, expose whole ModelCheckpoints at once, although just specific CheckpointState\n // (accessed later though MC.find) would suffice\n SModel exposed = createBlankCheckpointModel(model.getReference(), null /*FIXME need distinct method to create CP model from existing*/, cp);\n new CloneUtil(m, exposed).cloneModelWithImports();\n assert exposed instanceof ModelWithAttributes;\n assert m instanceof ModelWithAttributes;\n ((ModelWithAttributes) m).forEachAttribute(((ModelWithAttributes) exposed)::setAttribute);\n myModule.addModelToKeep(exposed.getReference(), true);\n CheckpointIdentity persistedCheckpoint = readIdentityAttributes((ModelWithAttributes) m, GENERATION_PLAN, CHECKPOINT);\n CheckpointIdentity prevCheckpoint = readIdentityAttributes((ModelWithAttributes) m, PREV_GENERATION_PLAN, PREV_CHECKPOINT);\n assert cp.equals(persistedCheckpoint) : String.format(\"CP consistency issue: expected to read CP %s, but model comes with CP value %s\", cp, persistedCheckpoint);\n return new CheckpointState(exposed, prevCheckpoint, cp);\n });\n }", "default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }", "public ComputationGraph loadCheckpointCG(Checkpoint checkpoint){\n return loadCheckpointCG(checkpoint.getCheckpointNum());\n }", "public MultiLayerNetwork loadCheckpointMLN(Checkpoint checkpoint){\n return loadCheckpointMLN(checkpoint.getCheckpointNum());\n }", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "private Parameters createCheckpoint() {\n Parameters checkpoint = Parameters.create();\n checkpoint.set(\"lastDoc/identifier\", this.lastAddedDocumentIdentifier);\n checkpoint.set(\"lastDoc/number\", this.lastAddedDocumentNumber);\n checkpoint.set(\"indexBlockCount\", this.indexBlockCount);\n Parameters shards = Parameters.create();\n for (Bin b : this.geometricParts.radixBins.values()) {\n for (String indexPath : b.getBinPaths()) {\n shards.set(indexPath, b.size);\n }\n }\n checkpoint.set(\"shards\", shards);\n return checkpoint;\n }", "void checkpoint() throws IOException;", "public File getFileForCheckpoint(Checkpoint checkpoint){\n return getFileForCheckpoint(checkpoint.getCheckpointNum());\n }", "void checkpoint(Node node) throws RepositoryException;", "com.google.cloud.notebooks.v1beta1.Instance getInstance();", "public boolean doCheckpoint() {\n CountDownLatch latch = null;\n boolean fullCheckpoint;\n synchronized(this) { \n latch = nextCheckpointCountDownLatch;\n nextCheckpointCountDownLatch = new CountDownLatch(1);\n fullCheckpoint = this.fullCheckPoint;\n this.fullCheckPoint=false; \n } \n try {\n \n log.debug(\"Checkpoint started.\");\n RecordLocation newMark = null;\n \n ArrayList futureTasks = new ArrayList(queues.size()+topics.size());\n \n //\n // We do many partial checkpoints (fullCheckpoint==false) to move topic messages\n // to long term store as soon as possible. \n // \n // We want to avoid doing that for queue messages since removes the come in the same\n // checkpoint cycle will nullify the previous message add. Therefore, we only\n // checkpoint queues on the fullCheckpoint cycles.\n //\n if( fullCheckpoint ) { \n Iterator iterator = queues.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalMessageStore ms = (JournalMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n }\n \n Iterator iterator = topics.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalTopicMessageStore ms = (JournalTopicMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n \n try {\n for (Iterator iter = futureTasks.iterator(); iter.hasNext();) {\n FutureTask ft = (FutureTask) iter.next();\n RecordLocation mark = (RecordLocation) ft.get();\n // We only set a newMark on full checkpoints.\n if( fullCheckpoint ) {\n if (mark != null && (newMark == null || newMark.compareTo(mark) < 0)) {\n newMark = mark;\n }\n }\n }\n } catch (Throwable e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n \n \n if( fullCheckpoint ) {\n try {\n if (newMark != null) {\n log.debug(\"Marking journal at: \" + newMark);\n journal.setMark(newMark, true);\n }\n }\n catch (Exception e) {\n log.error(\"Failed to mark the Journal: \" + e, e);\n }\n \n if (longTermPersistence instanceof JDBCPersistenceAdapter) {\n // We may be check pointing more often than the checkpointInterval if under high use\n // But we don't want to clean up the db that often.\n long now = System.currentTimeMillis();\n if( now > lastCleanup+checkpointInterval ) {\n lastCleanup = now;\n ((JDBCPersistenceAdapter) longTermPersistence).cleanup();\n }\n }\n }\n \n log.debug(\"Checkpoint done.\");\n }\n finally {\n latch.countDown();\n }\n synchronized(this) {\n return this.fullCheckPoint;\n } \n \n }", "@Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException {\n IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), \"db-checkpoint-thread\", checkpointer);\n\n cpThread.start();\n\n checkpointerThread = cpThread;\n\n CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, \"node started\");\n\n if (chp != null)\n chp.cpBeginFut.get();\n }", "@Override\n public Workload get(@NotNull UUID id) throws InstanceNotFoundException {\n return workloadRepository.findById(id)\n .orElseThrow(new PersistentExceptionSupplier(new InstanceNotFoundException(id)));\n }", "public synchronized long getCheckpoint() {\n return globalCheckpoint;\n }", "public Epoch getEpoch(int timestamp, boolean create, ServerViewController controller) {\n epochsLock.lock();\n\n Epoch epoch = epochs.get(timestamp);\n if(epoch == null && create){\n epoch = new Epoch(controller, this, timestamp);\n epochs.put(timestamp, epoch);\n }\n\n epochsLock.unlock();\n\n return epoch;\n }", "FetchFirst createFetchFirst();", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "public CheckpointSubject getDecision(PBFTCheckpoint c){\n if(!(c != null && c.getSequenceNumber() != null && c.getDigest() != null)){\n return null;\n }\n\n Object lpid = getLocalServerID();\n\n long seqn = c.getSequenceNumber();\n long now = getClockValue();\n String qkey = String.valueOf(seqn);\n\n SoftQuorum q = (SoftQuorum)getStateLog().getQuorum(CHECKPOINTQUORUMSTORE, qkey);\n\n if(q == null){\n int f = getServiceBFTResilience();\n\n q = new SoftQuorum(2 * f + 1);\n\n getStateLog().getQuorumTable(CHECKPOINTQUORUMSTORE).put(qkey, q);\n \n }\n\n q.add(new Vote(c.getReplicaID(), new CheckpointSubject(c)));\n \n JDSUtility.debug(\"[getDecision(checkpoint)] s\" + lpid + \", at time \" + now + \", updated a entry in its log for \" + c);\n\n CheckpointSubject cs = (CheckpointSubject) q.decide();\n\n if(cs != null){ \n JDSUtility.debug(\"[getDecision(checkpoint)] s\" + lpid + \", at time \" + now + \", completed quorum for checkpoint (\" + seqn + \").\");\n }\n\n return cs;\n \n }", "@Override\n protected CheckpointStorageAccess createCheckpointStorage(Path checkpointDir) throws Exception {\n return new MemoryBackendCheckpointStorageAccess(\n new JobID(), checkpointDir, null, DEFAULT_MAX_STATE_SIZE);\n }", "@Test\n public void findElectionInDatastore_electionExists_returnCorrespondingEntity() throws Exception {\n DatastoreService ds = DatastoreServiceFactory.getDatastoreService();\n Entity electionEntity = new Entity(\"Election\");\n electionEntity.setProperty(\"id\", \"9999\");\n electionEntity.setProperty(\"name\", \"myElection\");\n electionEntity.setProperty(\"scope\", \"myScope\");\n electionEntity.setProperty(\"date\", \"myDate\");\n electionEntity.setProperty(\"contests\", new HashSet<Long>());\n electionEntity.setProperty(\"referendums\", new HashSet<Long>());\n ds.put(electionEntity);\n\n Optional<Entity> foundEntity = ServletUtils.findElectionInDatastore(ds, \"9999\");\n Assert.assertTrue(foundEntity.isPresent());\n Assert.assertEquals(foundEntity.get(), electionEntity);\n }", "protected PersistentInCacheProxi putSingleton(PersistentObject candidate) throws PersistenceException{\n\t\tPersistentInCacheProxi incache;\n\t\tLong classKey = new Long(candidate.getClassId());\n\t\tHashtable<Long, PersistentInCacheProxi> objectMap;\n\t\tsynchronized (this.classMap){\n\t\t\tobjectMap = this.classMap.get(classKey);\n\t\t\tif (objectMap == null) {\n\t\t\t\tobjectMap = new Hashtable<Long, PersistentInCacheProxi>();\n\t\t\t\tthis.classMap.put(classKey, objectMap);\n\t\t\t}\n\t\t}\n\t\tsynchronized (objectMap) {\n\t\t\tif (objectMap.size() == 0)return this.put(candidate);\n\t\t\tincache = objectMap.values().iterator().next();\t\t\t\n\t\t}\n\t\tif (incache.getTheObject() != null)return incache;\n\t\tincache.setObject(candidate);\n\t\treturn incache;\n\t}", "private MetadataCheckpointPolicy getNoOpCheckpointPolicy() {\n DurableLogConfig dlConfig = DurableLogConfig\n .builder()\n .with(DurableLogConfig.CHECKPOINT_COMMIT_COUNT, Integer.MAX_VALUE)\n .with(DurableLogConfig.CHECKPOINT_TOTAL_COMMIT_LENGTH, Long.MAX_VALUE)\n .build();\n\n return new MetadataCheckpointPolicy(dlConfig, Runnables.doNothing(), executorService());\n }", "@Test\n public void testLocationReference() throws Exception {\n {\n MemoryBackendCheckpointStorageAccess storage =\n new MemoryBackendCheckpointStorageAccess(\n new JobID(), null, null, DEFAULT_MAX_STATE_SIZE);\n CheckpointStorageLocation location = storage.initializeLocationForCheckpoint(42);\n assertTrue(location.getLocationReference().isDefaultReference());\n }\n\n // non persistent memory state backend for checkpoint\n {\n MemoryBackendCheckpointStorageAccess storage =\n new MemoryBackendCheckpointStorageAccess(\n new JobID(), randomTempPath(), null, DEFAULT_MAX_STATE_SIZE);\n CheckpointStorageLocation location = storage.initializeLocationForCheckpoint(42);\n assertTrue(location.getLocationReference().isDefaultReference());\n }\n\n // memory state backend for savepoint\n {\n MemoryBackendCheckpointStorageAccess storage =\n new MemoryBackendCheckpointStorageAccess(\n new JobID(), null, null, DEFAULT_MAX_STATE_SIZE);\n CheckpointStorageLocation location =\n storage.initializeLocationForSavepoint(1337, randomTempPath().toString());\n assertTrue(location.getLocationReference().isDefaultReference());\n }\n }", "@Override public WALRecord next() throws IgniteCheckedException {\n WALRecord rec = super.next();\n\n if (rec == null)\n return null;\n\n if (rec.type() == CHECKPOINT_RECORD) {\n CheckpointRecord cpRec = (CheckpointRecord)rec;\n\n // We roll memory up until we find a checkpoint start record registered in the status.\n if (F.eq(cpRec.checkpointId(), status.cpStartId)) {\n log.info(\"Found last checkpoint marker [cpId=\" + cpRec.checkpointId() +\n \", pos=\" + rec.position() + ']');\n\n needApplyBinaryUpdates = false;\n }\n else if (!F.eq(cpRec.checkpointId(), status.cpEndId))\n U.warn(log, \"Found unexpected checkpoint marker, skipping [cpId=\" + cpRec.checkpointId() +\n \", expCpId=\" + status.cpStartId + \", pos=\" + rec.position() + ']');\n }\n\n return rec;\n }", "private ComputationGraph load() throws Exception {\r\n ComputationGraph restored = ModelSerializer.restoreComputationGraph(locationToSave);\r\n return restored;\r\n }", "Snapshot create();", "Node getNode(ProgramPoint programPoint, @Nullable ProgramState programState) {\n Node result = new Node(programPoint, programState);\n Node cached = nodes.get(result);\n if (cached != null) {\n cached.isNew = false;\n return cached;\n }\n result.isNew = true;\n nodes.put(result, result);\n return result;\n }", "public interface CheckInstantiator {\n /**\n * Gets a check instance by first checking the entity dictionary for a mapping on the provided identifier.\n * In the event that no such mapping is found the identifier is used as a canonical name.\n * @param dictionary the entity dictionary to search for a mapping\n * @param checkName the identifier of the check to instantiate\n * @return the check instance\n * @throws IllegalArgumentException if there is no mapping for {@code checkName} and {@code checkName} is not\n * a canonical identifier\n */\n default Check getCheck(EntityDictionary dictionary, String checkName) {\n Class<? extends Check> checkCls = dictionary.getCheck(checkName);\n return instantiateCheck(checkCls);\n }\n\n /**\n * Instantiates a new instance of a check.\n * @param checkCls the check class to instantiate\n * @return the instance of the check\n * @throws IllegalArgumentException if the check class cannot be instantiated with a zero argument constructor\n */\n default Check instantiateCheck(Class<? extends Check> checkCls) {\n try {\n return checkCls.newInstance();\n } catch (InstantiationException | IllegalAccessException | NullPointerException e) {\n String checkName = (checkCls != null) ? checkCls.getSimpleName() : \"null\";\n throw new IllegalArgumentException(\"Could not instantiate specified check '\" + checkName + \"'.\", e);\n }\n }\n}", "@Test\n public void testUpdateCheckpoint() throws Exception {\n TestHarnessBuilder builder = new TestHarnessBuilder();\n builder.withLease(leaseKey, null).build();\n\n // Run the taker and renewer in-between getting the Lease object and calling checkpoint\n coordinator.runLeaseTaker();\n coordinator.runLeaseRenewer();\n\n Lease lease = coordinator.getCurrentlyHeldLease(leaseKey);\n if (lease == null) {\n List<Lease> leases = leaseRefresher.listLeases();\n for (Lease kinesisClientLease : leases) {\n System.out.println(kinesisClientLease);\n }\n }\n\n assertNotNull(lease);\n final ExtendedSequenceNumber initialCheckpoint = new ExtendedSequenceNumber(\"initialCheckpoint\");\n final ExtendedSequenceNumber pendingCheckpoint = new ExtendedSequenceNumber(\"pendingCheckpoint\");\n final ExtendedSequenceNumber newCheckpoint = new ExtendedSequenceNumber(\"newCheckpoint\");\n final byte[] checkpointState = \"checkpointState\".getBytes();\n\n // lease's leaseCounter is wrong at this point, but it shouldn't matter.\n assertTrue(dynamoDBCheckpointer.setCheckpoint(lease.leaseKey(), initialCheckpoint, lease.concurrencyToken()));\n\n final Lease leaseFromDDBAtInitialCheckpoint = leaseRefresher.getLease(lease.leaseKey());\n lease.leaseCounter(lease.leaseCounter() + 1);\n lease.checkpoint(initialCheckpoint);\n lease.leaseOwner(coordinator.workerIdentifier());\n assertEquals(lease, leaseFromDDBAtInitialCheckpoint);\n\n dynamoDBCheckpointer.prepareCheckpoint(lease.leaseKey(), pendingCheckpoint, lease.concurrencyToken().toString(), checkpointState);\n\n final Lease leaseFromDDBAtPendingCheckpoint = leaseRefresher.getLease(lease.leaseKey());\n lease.leaseCounter(lease.leaseCounter() + 1);\n lease.checkpoint(initialCheckpoint);\n lease.pendingCheckpoint(pendingCheckpoint);\n lease.pendingCheckpointState(checkpointState);\n assertEquals(lease, leaseFromDDBAtPendingCheckpoint);\n\n assertTrue(dynamoDBCheckpointer.setCheckpoint(lease.leaseKey(), newCheckpoint, lease.concurrencyToken()));\n\n final Lease leaseFromDDBAtNewCheckpoint = leaseRefresher.getLease(lease.leaseKey());\n lease.leaseCounter(lease.leaseCounter() + 1);\n lease.checkpoint(newCheckpoint);\n lease.pendingCheckpoint(null);\n lease.pendingCheckpointState(null);\n assertEquals(lease, leaseFromDDBAtNewCheckpoint);\n }", "public Checkpoint(File checkpointDir) {\n this.directory = checkpointDir;\n readValid();\n }", "public T get(Env env) throws APIException {\n\t\tThread t = Thread.currentThread();\n\t\tT obj = objs.get(t);\n\t\tif(obj==null || refreshed>obj.created()) {\n\t\t\ttry {\n\t\t\t\tobj = cnst.newInstance(new Object[]{env});\n\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\tthrow new APIException(e.getTargetException());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new APIException(e);\n\t\t\t}\n\t\t\tT destroyMe = objs.put(t,obj);\n\t\t\tif(destroyMe!=null) {\n\t\t\t\tdestroyMe.destroy(env);\n\t\t\t}\n\t\t} \n\t\treturn obj;\n\t}", "public SModel createBlankCheckpointModel(SModelReference originalModel, @Nullable CheckpointIdentity previousCheckpoint, CheckpointIdentity step) {\n final SModelName transientModelName = createCheckpointModelName(originalModel, step);\n // I'd like to have stable model id to minimize number of changes in CP models\n int mid = originalModel.getModelId().hashCode() ^ step.getName().hashCode();\n // make sure value fits into MPS reserved range, see IntegerSModelId doc.\n mid &= 0x0FFFFFFF;\n mid |= 0x0F000000;\n final SModelReference mr = PersistenceFacade.getInstance()\n .createModelReference(myModule.getModuleReference(), new IntegerSModelId(mid),\n transientModelName.getValue());\n SModel existing = myModule.getModel(mr.getModelId());\n if (existing != null) {\n // Why it's important to forget existing model? E.g. if a model being generated has been already generated and exposed as checkpoint, and\n // was renamed since. Renamed here means change of model name, e.g. due to rename of a containing language module.\n // Besides, it doesn't hurt to drop old checkpoint in any case.\n // There were few possible ways to address MPS-26174 (rename of a module breaks x-model generation).\n // - listen to changes of original model/module and react (e.g. remove related CP models or clear all CPs altogether).\n // - drop all transients as part of rename module action (likely, most safe)\n // - respect model name when building module id value, above. Leaves duplicated, hard-to-distinguish models among checkpoints.\n // - detect there's already model with same id and forget it (least destructive, keeps other CP models in place).\n myModule.forgetModel(existing, true);\n }\n SModel checkpointModel = myModule.createTransientModel(mr);\n assert checkpointModel instanceof ModelWithAttributes;\n ((ModelWithAttributes) checkpointModel).setAttribute(GENERATION_PLAN, step.getPlan().getName());\n ((ModelWithAttributes) checkpointModel).setAttribute(CHECKPOINT, step.getName());\n if (previousCheckpoint != null) {\n ((ModelWithAttributes) checkpointModel).setAttribute(PREV_GENERATION_PLAN, previousCheckpoint.getPlan().getName());\n ((ModelWithAttributes) checkpointModel).setAttribute(PREV_CHECKPOINT, previousCheckpoint.getName());\n }\n return checkpointModel;\n }", "@Override\n public BookmarkEntity create(BookmarkEntity bookmark) {\n logger.info(\"Entering create() in BookmarkDAO\");\n return bookmarkRepository.save(bookmark);\n }", "private KeyValueVersion createAppLobKVV(boolean requirePresent,\n boolean requireAbsent)\n throws ResumePutException {\n\n internalLOBKey = createInternalLobKey();\n final Value appLobValue = ilkToValue(internalLOBKey);\n final ValueVersion prevVV;\n if (requirePresent) {\n /* Inspect non destructively, must not create a new version. */\n prevVV = kvsImpl.get(appLOBKey,Consistency.ABSOLUTE,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n if (prevVV == null) {\n return null;\n }\n /* full or partial LOB */\n } else {\n prevVV = new ReturnValueVersion(Choice.ALL);\n final Version appLobVersion =\n kvsImpl.putIfAbsent(appLOBKey,\n appLobValue,\n (ReturnValueVersion)prevVV,\n CHUNK_DURABILITY,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n /* No LOB or partial LOB */\n if (appLobVersion != null) {\n return new KeyValueVersion(appLOBKey, appLobValue,\n appLobVersion);\n }\n }\n\n /*\n * Three possible alternatives for an existing key/value pair:\n *\n * 1) Partially deleted LOB: delete the LOB and start new insert\n * 2) Complete LOB: delete the LOB and start new insert\n * 3) Partially inserted LOB: resume insert\n */\n final Key extantInternalLobKey = valueToILK(prevVV.getValue());\n final Value extantAppLobValue = ilkToValue(extantInternalLobKey);\n final Version extantAppLobVersion = prevVV.getVersion();\n\n final ValueVersion metadataVV =\n kvsImpl.get(extantInternalLobKey,\n Consistency.ABSOLUTE,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n if (metadataVV == null) {\n /* Can resume with initial metadata creation. */\n internalLOBKey = extantInternalLobKey;\n return new KeyValueVersion(appLOBKey,\n extantAppLobValue,\n extantAppLobVersion);\n }\n\n /* Have old metadata */\n initMetadata(metadataVV.getValue());\n\n if (!lobProps.isPartiallyDeleted()) {\n if (!lobProps.isComplete()) {\n /*\n * A partially inserted object, resume the put operation using\n * the old metadata.\n */\n if (lobProps.isPartiallyAppended()) {\n throw new PartialLOBException(\"Partially appended LOB. Key: \" +\n UserDataControl.displayKey(appLOBKey) +\n \" Internal key: \" + internalLOBKey,\n LOBState.PARTIAL_APPEND,\n false);\n }\n\n internalLOBKey = extantInternalLobKey;\n final KeyValueVersion kvv =\n new KeyValueVersion(appLOBKey,\n extantAppLobValue,\n extantAppLobVersion);\n throw new ResumePutException(kvv, metadataVV.getVersion());\n\n } else if (requireAbsent) {\n /* Complete LOB present. */\n return null;\n }\n }\n\n /* Deleted or complete existing LOB, we are going to start a new. */\n new DeleteOperation(kvsImpl, appLOBKey, lobDurability,\n chunkTimeoutMs,\n TimeUnit.MILLISECONDS).execute(true);\n\n /*\n * App key is still present, replace it atomically, transitioning from\n * the old partial LOB without any rep in the internal lob space to the\n * new partial LOB which will be filled in by the rest of the put\n * operation.\n */\n final Version replaceAppLobVersion =\n kvsImpl.putIfVersion(appLOBKey,\n appLobValue,\n prevVV.getVersion(),\n null,\n CHUNK_DURABILITY,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n if (replaceAppLobVersion == null) {\n final String msg = \"Concurrent LOB put detected \" +\n \"for key: \" + UserDataControl.displayKey(appLOBKey);\n throw new ConcurrentModificationException(msg);\n\n }\n return new KeyValueVersion(appLOBKey, appLobValue,\n replaceAppLobVersion);\n }", "protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }", "com.google.cloud.notebooks.v1beta1.InstanceOrBuilder getInstanceOrBuilder();", "private static HashMap<String, String> getLastCheckpoint() {\n return checkpoints.remove(Thread.currentThread());\n }", "T create() throws PersistException;", "public void checkpoint(boolean hasUncommittedData) throws SQLException;", "public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }", "Training obtainTrainingById(Long trainingId);", "public void checkpoint(boolean sync, boolean fullCheckpoint) {\n try {\n if (journal == null )\n throw new IllegalStateException(\"Journal is closed.\");\n \n long now = System.currentTimeMillis();\n CountDownLatch latch = null;\n synchronized(this) {\n latch = nextCheckpointCountDownLatch;\n lastCheckpointRequest = now;\n if( fullCheckpoint ) {\n this.fullCheckPoint = true; \n }\n }\n \n checkpointTask.wakeup();\n \n if (sync) {\n log.debug(\"Waking for checkpoint to complete.\");\n latch.await();\n }\n }\n catch (InterruptedException e) {\n log.warn(\"Request to start checkpoint failed: \" + e, e);\n }\n }", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "public void initializeGraphPrueba() {\n //path to checkpoit.ckpt HACER\n //To load the checkpoint, place the checkpoint files in the device and create a Tensor\n //to the path of the checkpoint prefix\n //FALTA ******\n\n // si modelo updated se usa el checkpoints que he descargado del servidor. Si no, el del movil.\n if (isModelUpdated){\n /* //NO VA BIEN:\n checkpointPrefix = Tensors.create((file_descargado).toString());\n Toast.makeText(MainActivity.this, \"Usando el modelo actualizado\", Toast.LENGTH_SHORT).show();\n\n */\n\n //A VER SI VA\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt.meta\");\n // inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt\"); NOT FOUND\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n else {\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"checkpoint_name1.ckpt.meta\");\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n //checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString()); //PARA USAR EL CHECKPOINT DESCARGADO\n // checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n //Create a variable of class org.tensorflow.Graph:\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n // inputStream = getAssets().open(\"graph.pb\"); //MODELO SENCILLO //PROBAR CON GRAPH_PRUEBA QUE ES MI GRAPH DE O BYTES\n // inputStream = getAssets().open(\"graph5.pb\"); //MODELO SENCILLO\n if (isModelUpdated) { // ESTO ES ALGO TEMPORAL. NO ES BUENO\n inputStream = getAssets().open(\"graph_pesos.pb\");\n }\n else {\n inputStream = getAssets().open(\"graph5.pb\");\n }\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Place the .pb file generated before in the assets folder and import it as a byte[] array.\n // Let the array's name be graphdef.\n //Now, load the graph from the graphdef:\n graph.importGraphDef(graphDef);\n try {\n //Now, load the checkpoint by running the restore checkpoint op in the graph:\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n //Alternatively, initialize the graph by calling the init op:\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "public File getFileForCheckpoint(int checkpointNum) {\n return getFileForCheckpoint(rootDir, checkpointNum);\n }", "private NYCFareDataCache getOrCreateFareData () {\n if (!fareDataForTransitLayer.containsKey(transitLayer)) {\n synchronized (fareDataForTransitLayer) {\n if (!fareDataForTransitLayer.containsKey(transitLayer)) {\n LOG.info(\"Initializing NYC InRoutingFareCalculator\");\n NYCFareDataCache fareData = new NYCFareDataCache(this.transitLayer);\n fareDataForTransitLayer.put(transitLayer, fareData);\n }\n }\n }\n\n return fareDataForTransitLayer.get(transitLayer);\n }", "public String toCheckpoint() {\n return null;\n }", "public void handle(PBFTCheckpoint checkpoint){\n\n JDSUtility.debug(\"[PBFTServer:handle(checkpoint)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", received \" + checkpoint);\n\n if(isValid(checkpoint)){\n \n long seqn = checkpoint.getSequenceNumber();\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n long now = getClockValue();\n\n getCheckpointInfo().put(checkpoint);\n \n Object lpid = getLocalProcessID();\n \n CheckpointSubject cs = getDecision(checkpoint);\n \n if(getCheckpointInfo().hasEnough(seqn) && cs != null && lcwm < seqn && seqn <= hcwm){\n\n if(seqn > hcwm){\n\n JDSUtility.debug(\"[handle(checkpoint)] s\"+ lpid +\", at time \"+ now +\", detected a stable checkpoint certificate with SEQN{\"+ seqn +\"} > HCWM{\"+ hcwm +\"}.\");\n JDSUtility.debug(\"[handle(checkpoint)] s\"+ lpid +\", at time \"+ now +\", is going to start a start transfer procedure.\");\n\n emitFetch();\n return;\n\n }//end if I've a unsynchronized state\n\n if(getCheckpointInfo().getMine(lpid, seqn) != null){ \n doCheckpoint(seqn); \n }\n \n }//end if has a decision\n \n }//end if isValid(checkpoint)\n \n }", "public static VersionDetail getInstance( VotLintContext context ) {\n VOTableVersion version = context.getVersion();\n if ( VERSION_MAP.containsKey( version ) ) {\n return VERSION_MAP.get( version );\n }\n else {\n context.warning( \"No checking information available for version \"\n + version );\n return DUMMY;\n }\n }", "public MultiLayerNetwork loadCheckpointMLN(int checkpointNum) {\n return loadCheckpointMLN(rootDir, checkpointNum);\n }", "public ComputationGraph loadCheckpointCG(int checkpointNum) {\n return loadCheckpointCG(rootDir, checkpointNum);\n }", "private PlayerManager.PlayerInstance getPlayerInstance(int chunkX, int chunkZ, boolean createIfAbsent)\r\n {\r\n long var4 = (long)chunkX + 2147483647L | (long)chunkZ + 2147483647L << 32;\r\n PlayerManager.PlayerInstance var6 = (PlayerManager.PlayerInstance)this.playerInstances.getValueByKey(var4);\r\n\r\n if (var6 == null && createIfAbsent)\r\n {\r\n var6 = new PlayerManager.PlayerInstance(chunkX, chunkZ);\r\n this.playerInstances.add(var4, var6);\r\n this.playerInstanceList.add(var6);\r\n }\r\n\r\n return var6;\r\n }", "public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}", "@SneakyThrows\n public HazelcastInstance ignite () { // nice name for starting HZ))\n if (config == null) {\n config = new Config();\n }\n\n if (discoveryClient != null) {\n val selfAddress = discoveryClient.self().getAddress().getHostAddress();\n\n config.setProperty(\"hazelcast.discovery.enabled\", \"true\");\n config.setProperty(\"hazelcast.socket.server.bind.any\", \"true\");\n config.setProperty(\"hazelcast.socket.bind.any\", \"true\");\n\n val networkingConfig = config.getNetworkConfig();\n networkingConfig.setPublicAddress(selfAddress);\n networkingConfig.setPort(discoveryClient.self().getPort());\n networkingConfig.setPortAutoIncrement(false);\n networkingConfig.setInterfaces(new InterfacesConfig().addInterface(selfAddress));\n\n val joinConfig = networkingConfig.getJoin();\n\n joinConfig.getMulticastConfig().setEnabled(false);\n joinConfig.getTcpIpConfig().setEnabled(false);\n joinConfig.getAwsConfig().setEnabled(false);\n\n val discoveryStrategyFactory = new CustomDiscoveryStrategyFactory(discoveryClient);\n val discoveryStrategyConfig = new DiscoveryStrategyConfig(discoveryStrategyFactory);\n joinConfig.getDiscoveryConfig().addDiscoveryStrategyConfig(discoveryStrategyConfig);\n }\n\n ofNullable(userContext)\n .ifPresent(config::setUserContext);\n\n mapConfigs\n .forEach(config::addMapConfig);\n\n val leaderService = new LeaderService();\n val listener = new ClusterFormationChangeListener(leaderService);\n val listenerConfig = new ListenerConfig(listener);\n config.addListenerConfig(listenerConfig);\n\n onBecomeLeaderMemberActions.forEach(leaderService::addOnBecomeLeaderMemberAction);\n onBecomeRegularMemberActions.forEach(leaderService::addOnBecomeRegularMemberAction);\n\n val result = Hazelcast.newHazelcastInstance(config);\n val cluster = result.getCluster();\n val member = cluster.getLocalMember();\n val members = cluster.getMembers();\n val event = new MembershipEvent(cluster, member, MEMBER_ATTRIBUTE_CHANGED, members);\n if (members.iterator().next().localMember()) {\n leaderService.becomeLeaderMember(result, event);\n } else {\n leaderService.becomeRegularMember(result, event);\n }\n\n return result;\n }", "@GET\n @Produces({\"application/xml\", \"application/json\"})\n public ModelBase pull() throws NotFoundException {\n // ?? get latest ontModel directly from TopologyManager ??\n ModelBase model = NPSGlobalState.getModelStore().getHead();\n if (model == null)\n throw new NotFoundException(\"None!\"); \n return model;\n }", "public Session getOrCreate(String sessionKey, boolean forceCreateNew) {\n // Create new session if does not exists or replace\n if (!this.exists(sessionKey) || forceCreateNew) {\n // Create a new session with a new key if its invalid\n if (!validateKey(sessionKey))\n return create();\n\n Session session = new Session(sessionKey);\n sessions.put(sessionKey, session, POLICY, EXPIRATION_TIME, EXPIRATION_UNIT); \n return session;\n }\n\n // Return the session\n return sessions.get(sessionKey);\n }", "private void PopulateCheckpointList()\n {\n checkpoints.add(FindNextCheckpoint(startTile, directions = FindNextDirection(startTile)));\n \n int counter = 0;\n boolean cont = true;\n while (cont)\n {\n int[] currentDirection = FindNextDirection(checkpoints.get(counter).getTile());\n \n // Check if a next direction/checkpoint exists and end after 20 chekpoints(arbitrary).\n if(currentDirection[0] == 2 || counter == 20)\n {\n cont = false;\n }\n else\n {\n checkpoints.add(FindNextCheckpoint(checkpoints.get(counter).getTile(),\n directions = FindNextDirection(checkpoints.get(counter).getTile())));\n }\n counter++;\n }\n }", "public boolean isNewInstance() {\n\t\treturn newInstance;\n\t}", "JournalOutputStream getCheckpointOutputStream(long latestSequenceNumber) throws IOException;", "private Checkpoint FindNextCheckpoint(Tile start, int[] dir)\n {\n Tile next = null;\n Checkpoint check = null;\n \n // Boolean to decide if next checkpoint is found\n boolean found = false;\n int counter = 1;\n \n while(!found)\n {\n if(start.getType() != grid.GetTile(start.getXPlace() + dir[0] * counter,\n start.getYPlace() + dir[1] * counter).getType())\n {\n // Make turn in the tile prior to the one we just checked. Move counter\n // back 1.\n found = true;\n counter -= 1;\n next = grid.GetTile(start.getXPlace() + dir[0] * counter,\n start.getYPlace() + dir[1] * counter);\n }\n counter++;\n } \n check = new Checkpoint(next, dir[0], dir[1]);\n return check;\n }", "public DPSingletonLazyLoading getInstance(){ //not synchronize whole method. Instance oluşmuş olsa bile sürekli burada bekleme olur.\r\n\t\tif (instance == null){//check\r\n\t\t\tsynchronized(DPSingletonLazyLoading.class){ //critical section code NOT SYNCRONIZED(this) !!\r\n\t\t\t\tif (instance == null){ //double check\r\n\t\t\t\t\tinstance = new DPSingletonLazyLoading();//We are creating instance lazily at the time of the first request comes.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn instance;\r\n\t}", "public Boolean persistent();", "@Util\n public static CachedEntity<Interview, InProgressInterviewContext> safeGetInProgressInterviewEntity(){\n \t\n \tCachedEntity<Interview, InProgressInterviewContext> ce;\n\t\ttry {\n\t\t\tce = getInProgressInterviewEntity();\n\t\t} catch (CacheMiss e) {\n\t\t\tInterview interview = createInProgressInterview();\n\t\t\tce = new CachedEntity<Interview, InProgressInterviewContext>(interview,null);\n\t\t}\n\n return ce;\n }", "public boolean load() {\n return load(Datastore.fetchDefaultService());\n }", "public Object loadDeep(Object instance) throws RNoEntityException, RNonUniqueResultException, RNoResultException{\n\t\tEntity e = ALiteOrmBuilder.getInstance().getEntity(instance.getClass());\n\t\tif(e == null)\n\t\t\tthrow new RNoEntityException(\"For : \" + instance.getClass());\n\t\treturn e.loadDeep(this, new TravelingEntity(instance), db);\n\t}", "@Override\n\tpublic java.util.Date getCheckpoint() {\n\t\treturn _userSync.getCheckpoint();\n\t}", "@NotNull private GridCacheDatabaseSharedManager.CheckpointProgress updateCurrentCheckpointProgress() {\n final CheckpointProgress curr;\n\n synchronized (this) {\n curr = scheduledCp;\n\n curr.state(LOCK_TAKEN);\n\n if (curr.reason == null)\n curr.reason = \"timeout\";\n\n // It is important that we assign a new progress object before checkpoint mark in page memory.\n scheduledCp = new CheckpointProgress(checkpointFreq);\n\n curCpProgress = curr;\n }\n return curr;\n }", "@org.testng.annotations.Test\n public void testGetInstance() throws Exception {\n System.out.println(\"getInstance\");\n Store result = Store.getInstance();\n assertEquals(result, Store.getInstance());\n assertTrue(result instanceof Store);\n }", "public List<Checkpoint> availableCheckpoints(){\n if(!checkpointRecordFile.exists()){\n return Collections.emptyList();\n }\n\n return availableCheckpoints(rootDir);\n }", "public void resumeLC() {\n\n Consensus cons = execManager.getConsensus(tempLastHighestCID.getCID());\n Epoch e = cons.getLastEpoch();\n\n int ets = cons.getEts();\n\n if (e == null || e.getTimestamp() != ets) {\n e = cons.createEpoch(ets, controller);\n } else {\n e.clear();\n }\n\n byte[] hash = tom.computeHash(tempLastHighestCID.getDecision());\n e.propValueHash = hash;\n e.propValue = tempLastHighestCID.getDecision();\n\n e.deserializedPropValue = tom.checkProposedValue(tempLastHighestCID.getDecision(), false);\n\n finalise(tempRegency, tempLastHighestCID,\n tempSignedCollects, tempPropose, tempBatchSize, tempIAmLeader);\n\n }", "static GlassFishCloudInstance load(InstanceProperties props) {\n String name = props.getString(PROPERTY_NAME, null);\n if (name != null) {\n String host = props.getString(PROPERTY_HOST, null);\n int port = props.getInt(PROPERTY_PORT, -1);\n String localServerHome = props.getString(\n PROPERTY_LOCAL_SERVER_HOME, null);\n String localServerRoot = props.getString(\n PROPERTY_LOCAL_SERVER_ROOT, null);\n\n LOG.log(Level.FINER,\n \"Loaded GlassFishCloudInstance({0}, {1}, {2})\",\n new Object[]{name, host, port});\n GlassFishServerEntity localServer;\n try {\n localServer = new GlassFishServerEntity(name, localServerRoot,\n localServerHome,\n GlassFishUrl.url(GlassFishUrl.Id.LOCAL, name));\n } catch (DataException de) {\n localServer = null;\n }\n GlassFishCloudInstance instance\n = new GlassFishCloudInstance(name, host, port, localServer);\n instance.loadListeners.fireChange();\n return instance;\n } else {\n LOG.log(Level.WARNING,\n \"Stored GlassFishCloudInstance name is null, skipping\");\n return null;\n }\n }", "@Test\n public void findElectionInDatastore_electionDoesntExist_returnEmpty() throws Exception {\n DatastoreService ds = DatastoreServiceFactory.getDatastoreService();\n Entity electionEntity = new Entity(\"Election\");\n electionEntity.setProperty(\"id\", \"9999\");\n electionEntity.setProperty(\"name\", \"myElection\");\n electionEntity.setProperty(\"scope\", \"myScope\");\n electionEntity.setProperty(\"date\", \"myDate\");\n electionEntity.setProperty(\"contests\", new HashSet<Long>());\n electionEntity.setProperty(\"referendums\", new HashSet<Long>());\n ds.put(electionEntity);\n\n Optional<Entity> foundEntity = ServletUtils.findElectionInDatastore(ds, \"0001\");\n Assert.assertFalse(foundEntity.isPresent());\n }", "public static GitClient getOrCreate() {\n\t\tIPath path = ConfigPersistenceManager.getPathToGit();\n\t\tString reference = ConfigPersistenceManager.getBranch();\n\t\tString projectKey = ConfigPersistenceManager.getProjectKey();\n\t\treturn getOrCreate(path, reference, projectKey);\n\t}", "boolean isNew();", "public CountDownLatch fetchYAML(PitchParams pp) {\n\n final String ssmKey = SlideshowModel.genKey(pp);\n\n CountDownLatch freshLatch = new CountDownLatch(1);\n CountDownLatch activeLatch =\n yamlLatchMap.putIfAbsent(ssmKey, freshLatch);\n\n if (activeLatch != null) {\n /*\n * A non-null activeLatch implies a fetchYAML()\n * operation is already in progress for the current\n * /{user}/{repo}?b={branch}.\n */\n log.debug(\"fetchYAML: pp={}, already in progress, \" +\n \"returning existing activeLatch={}\", pp, activeLatch);\n return activeLatch;\n\n } else {\n\n CompletableFuture<Void> syncFuture =\n CompletableFuture.supplyAsync(() -> {\n\n GRS grs = grsManager.get(pp);\n GRSService grsService = grsManager.getService(grs);\n int downYAML = grsService.download(pp, PITCHME_YAML);\n boolean downOk = downYAML == STATUS_OK;\n log.debug(\"fetchYAML: pp={}, downloaded YAML={}\", pp, downYAML);\n\n /*\n * Update pitchCache with new SlideshowModel.\n */\n SlideshowModel ssm =\n SlideshowModel.build(pp, downOk, grsService, diskService);\n pitchCache.set(ssm.key(), ssm, cacheTimeout.ssm(pp));\n\n /*\n * Current operation completed, so remove latch associated\n * with operation from yamlLatchMap to permit future\n * operations on this /{user}/{repo}?b={branch}.\n */\n releaseCountDownLatch(yamlLatchMap, ssmKey);\n\n /*\n * Operation completed, valid result cached, no return required.\n */\n return null;\n\n }, backEndThreads.POOL)\n .handle((result, error) -> {\n\n if (error != null) {\n\n log.warn(\"fetchYAML: pp={}, fetch error={}\", pp, error);\n releaseCountDownLatch(yamlLatchMap, ssmKey);\n }\n\n return null;\n });\n\n return freshLatch;\n }\n\n }", "@Override public void checkpointReadLock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n long timeout = checkpointReadLockTimeout;\n\n long start = U.currentTimeMillis();\n\n boolean interruped = false;\n\n try {\n for (; ; ) {\n try {\n if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)\n failCheckpointReadLock();\n\n try {\n if (timeout > 0) {\n if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),\n TimeUnit.MILLISECONDS))\n failCheckpointReadLock();\n }\n else\n checkpointLock.readLock().lock();\n }\n catch (InterruptedException e) {\n interruped = true;\n\n continue;\n }\n\n if (stopping) {\n checkpointLock.readLock().unlock();\n\n throw new IgniteException(new NodeStoppingException(\"Failed to perform cache update: node is stopping.\"));\n }\n\n if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)\n break;\n else {\n checkpointLock.readLock().unlock();\n\n if (timeout > 0 && U.currentTimeMillis() - start >= timeout)\n failCheckpointReadLock();\n\n try {\n checkpointer.wakeupForCheckpoint(0, \"too many dirty pages\").cpBeginFut\n .getUninterruptibly();\n }\n catch (IgniteFutureTimeoutCheckedException e) {\n failCheckpointReadLock();\n }\n catch (IgniteCheckedException e) {\n throw new IgniteException(\"Failed to wait for checkpoint begin.\", e);\n }\n }\n }\n catch (CheckpointReadLockTimeoutException e) {\n log.error(e.getMessage(), e);\n\n timeout = 0;\n }\n }\n }\n finally {\n if (interruped)\n Thread.currentThread().interrupt();\n }\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n }", "protected Instance getInstance(StructureEntityVersion version, int index, boolean chunkIsFixed) {\n\t\tInstance instance = this.getInstance(version);\n\t\tfor (BugPronenessMeasure measure: this.measures) {\n\t\t\tint attributeIndex = this.attributes.getAttributeIndex(measure.getName());\n\t\t\tif (chunkIsFixed) {\n\t\t\t\tdouble bugProneness = measure.getBugProneness(index);\n\t\t\t\tinstance.setValue(attributeIndex, bugProneness);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinstance.setMissing(attributeIndex);\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "public MappedModelEVO create(MappedModelEVO evo) throws Exception {\n\t MappedModelPK local = this.server.ejbCreate(evo);\r\n MappedModelEVO newevo = this.server.getDetails(\"<UseLoadedEVOs>\");\r\n MappedModelPK pk = newevo.getPK();\r\n this.mLocals.put(pk, local);\r\n return newevo;\r\n }", "private void retrieve() {\r\n\t\ttry {\r\n\t\t\tif (store == null) {\r\n\t\t\t\tstore = Store.retrieve();\r\n\t\t\t\tif (store != null) {\r\n\t\t\t\t\tSystem.out.println(\" The store has been successfully retrieved from the file StoreData. \\n\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstore = Store.instance();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception cnfe) {\r\n\t\t\tcnfe.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract boolean retrieve();", "private Version persistMetadata() {\n\n final Value propsArray = lobProps.serialize();\n\n /* Insert the new LOB */\n final Version storedVersion =\n kvsImpl.putIfAbsent(internalLOBKey, propsArray,\n null,\n lobDurability,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n\n if (storedVersion == null) {\n final String msg = \"Metadata for internal key: \" + internalLOBKey +\n \" already exists for key: \" + appLOBKey;\n throw new ConcurrentModificationException(msg);\n }\n\n return storedVersion;\n }", "public void createNewPeer(ConfigEntry entry, NetworkManager.NodeToken token) {\n\t\tDownstreamPeerState peer = new DownstreamPeerState(entry, token);\n\t\tDownstreamPeerState stale = _downstreamPeerByUuid.put(entry.nodeUuid, peer);\n\t\tAssert.assertTrue(null == stale);\n\t\tstale = _downstreamPeerByNode.put(token, peer);\n\t\tAssert.assertTrue(null == stale);\n\t}", "public Ping dup (Ping self)\n {\n if (self == null)\n return null;\n\n Ping copy = new Ping ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.digest = new ArrayList <State> (self.digest);\n return copy;\n }", "private Optional<DatasetVersion> fetchDatasetVersion(Long id) {\n return Optional.ofNullable(id)\n .map(datasetId -> this.datasetVersion = datasetVersionService.getById(datasetId));\n }", "public static Incremental getInstance() {\n\n\t\t// o resultado da variável local parece desnecessário mas, melhora o desempenho\n\t\t// do nosso código. Nos casos em que a instância já foi\n\t\t// inicializada (na maioria das vezes), o campo volátil é acessado apenas uma\n\t\t// vez (devido ao “return resultado;” ao invés de “return instance;”)\n\n\t\t// A palavra-chave sincronizada garante que, se um objeto for procurado para\n\t\t// modificação, nenhum outro thread poderá acessar esse objeto e esperar até que\n\t\t// o thread de modificação seja concluído.\n\t\t\n\t\tIncremental resultado = instance;\n\t\tif (resultado != null) {\n\t\t\treturn resultado;\n\t\t}\n\t\tsynchronized (Incremental.class) {\n\t\t\tif (instance == null) {\n\t\t\t\t//foi necessário colocar esse \"delay\" para que houvesse o multithread \n\t\t\t\ttry {\n\t\t Thread.sleep(1000);\n\t\t } catch (InterruptedException ex) {\n\t\t ex.printStackTrace();\n\t\t }\n\t\t\t\tinstance = new Incremental();\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "public MarketStateEntry entryOrNew(final MarketEntry.Type type) {\n\n\t\tMarketStateEntry entry = entries.one(type);\n\n\t\tif (entry == null) {\n\t\t\tentry = new MarketStateEntry().type(type);\n\t\t\tentries.add(entry);\n\t\t}\n\n\t\treturn entry;\n\n\t}", "public static ComputationGraph loadCheckpointCG(File rootDir, Checkpoint checkpoint){\n return loadCheckpointCG(rootDir, checkpoint.getCheckpointNum());\n }", "ProvenanceFactory getProvenanceFactory();", "@Util\n public static Interview safeGetInProgressInterview(){\n \t\n \tInterview interview;\n\t\ttry {\n\t\t\tinterview = getInProgressInterview();\n\t\t} catch (CacheMiss e) {\n\t\t\tinterview = createInProgressInterview();\n\t\t}\n\n return interview;\n }", "public void save(){\n checkpoint = chapter;\n }", "public abstract P getNew() throws DataFault;", "@Override\n\t\tprotected Version doInBackground(Void... params) {\n\t\t\treturn new UpdateApk(getApplicationContext()).hasNewVersion();\n\t\t}" ]
[ "0.58491737", "0.5698929", "0.56659937", "0.56410587", "0.5460331", "0.5423095", "0.53105587", "0.5281253", "0.5208509", "0.51360744", "0.5121835", "0.50874895", "0.5063234", "0.50030136", "0.4992792", "0.4978462", "0.495063", "0.4949841", "0.4947786", "0.49342692", "0.4913276", "0.48503715", "0.48123625", "0.47630033", "0.47189438", "0.469472", "0.46875215", "0.46695083", "0.4650507", "0.45990944", "0.45830745", "0.45824036", "0.4576922", "0.45702478", "0.45527261", "0.45349014", "0.45213237", "0.4513893", "0.44892398", "0.44849747", "0.4484714", "0.44844443", "0.44843915", "0.44519174", "0.44506362", "0.44493884", "0.44483653", "0.4447881", "0.44449508", "0.44356266", "0.44258", "0.44257095", "0.44200245", "0.4416339", "0.43986034", "0.4394733", "0.43895403", "0.43865126", "0.43846965", "0.43737337", "0.4362011", "0.43464604", "0.4335617", "0.43206108", "0.43018478", "0.42955825", "0.42867157", "0.42857692", "0.42846945", "0.42841047", "0.4280194", "0.42646915", "0.4263841", "0.42590004", "0.4257748", "0.425596", "0.4251072", "0.42418173", "0.42255592", "0.42077014", "0.41996077", "0.41991672", "0.41893625", "0.41885012", "0.41842818", "0.4175203", "0.41614258", "0.4151407", "0.41450167", "0.41441947", "0.41440198", "0.41391963", "0.4139051", "0.4132168", "0.4125711", "0.41244504", "0.4121596", "0.4113109", "0.41097927", "0.41057217" ]
0.5598806
4
Set & Save a checkpoint attribute.
public static DaoResult setCheckpointAttr(ICheckpointDao dao, String checkpointId, String fieldName, Object fieldValue) { CheckpointBo cp = getCheckpoint(dao, checkpointId, new Date()); cp.setTimestamp(new Date()).setDataAttr(fieldName, fieldValue); return saveCheckpoint(dao, cp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save(){\n checkpoint = chapter;\n }", "@Override\n\tpublic void setCheckpoint(java.util.Date checkpoint) {\n\t\t_userSync.setCheckpoint(checkpoint);\n\t}", "void checkpoint() throws IOException;", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "public void AdjustmentSave(float slope, float offset) {\n\t\t\n\t\tSharedPreferences adjustmentPref = getSharedPreferences(\"User Define\", MODE_PRIVATE);\n\t\tSharedPreferences.Editor adjustmentedit = adjustmentPref.edit();\n\t\t\n\t\tadjustmentedit.putFloat(\"AF SlopeVal\", slope);\n\t\tadjustmentedit.putFloat(\"AF OffsetVal\", offset);\n\t\tadjustmentedit.commit();\n\t\t\n\t\tRunActivity.AF_Slope = slope;\n\t\tRunActivity.AF_Offset = offset;\n\t}", "public void save() {\n if(persistenceType == PropertyPersistenceType.Persistent) {\n if (!isSetToDefault()) {\n permanentStore.setBoolean(key, get());\n } else {\n permanentStore.remove(key);\n }\n }\n }", "protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }", "public static DaoResult setCheckpointAttrs(ICheckpointDao dao, String checkpointId,\n Map<String, Object> fieldNamesAndValues) {\n CheckpointBo cp = getCheckpoint(dao, checkpointId, new Date());\n cp.setTimestamp(new Date());\n for (Map.Entry<String, Object> entry : fieldNamesAndValues.entrySet()) {\n cp.setDataAttr(entry.getKey(), entry.getValue());\n }\n return saveCheckpoint(dao, cp);\n }", "public synchronized void writeCheckpoint() {\n\t\tflush();\n\t\tpw.println(\"CHECKPOINT \" \n\t\t\t\t\t+ TransactionManager.instance().transactionList());\n\t\tflush();\n\t}", "public synchronized long getCheckpoint() {\n return globalCheckpoint;\n }", "public String toCheckpoint() {\n return null;\n }", "public void setAttributes(FactAttributes param) {\r\n localAttributesTracker = true;\r\n\r\n this.localAttributes = param;\r\n\r\n\r\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "private void writeCheckpoint(String filename) {\n File file = new File(checkpointDir, filename);\n try {\n geneticProgram.savePopulation(new FileOutputStream(file));\n } catch (FileNotFoundException e) {\n log.log(Level.WARNING, \"Exception in dump\", e);\n }\n }", "public void attributSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "void checkpoint(Node node) throws RepositoryException;", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "public void setCheckpointInFileName(String inFileName) {\n \ttransfer.setInFileName(inFileName);\n }", "public void setAttribute(FactAttribute[] param) {\r\n\r\n validateAttribute(param);\r\n\r\n localAttributeTracker = true;\r\n\r\n this.localAttribute = param;\r\n }", "public void saveState() {\n savedPen.setValues(pm.pen);\n }", "public void testSetPersisted_Accuracy() {\r\n auditDetail.setPersisted(true);\r\n assertEquals(\"The persisted value should be set properly.\", true,\r\n Boolean.valueOf(UnitTestHelper.getPrivateField(AuditDetail.class, auditDetail, \"persisted\").toString())\r\n .booleanValue());\r\n }", "synchronized void updateCheckpointOnReplica(final long checkpoint) {\n /*\n * The global checkpoint here is a local knowledge which is updated under the mandate of the primary. It can happen that the primary\n * information is lagging compared to a replica (e.g., if a replica is promoted to primary but has stale info relative to other\n * replica shards). In these cases, the local knowledge of the global checkpoint could be higher than sync from the lagging primary.\n */\n if (this.globalCheckpoint <= checkpoint) {\n this.globalCheckpoint = checkpoint;\n logger.trace(\"global checkpoint updated from primary to [{}]\", checkpoint);\n }\n }", "@Override\r\n\t\tpublic Savepoint setSavepoint(String name) throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "void setBinaryFileAttribute(boolean flag);", "@Override\n\tpublic void setOffsetBackToFile() {\n\t\tString newXString;\n\t\tString newYString;\n\t\t newXString = String.valueOf(getX().getValueInSpecifiedUnits())+getX().getUserUnit();\n\t newYString = String.valueOf(getY().getValueInSpecifiedUnits())+getY().getUserUnit();\n\t\tjc.getElement().setAttribute(\"x\", newXString);\n\t\tjc.getElement().setAttribute(\"y\", newYString);\n\t\ttry {\n\t\t\tjc.getView().getFrame().writeFile();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\n\tpublic Serializable checkpointInfo() throws Exception {\n\t\treturn null;\n\t}", "void save() {\n File file = new File(main.myPath + \"state.xml\");\n Framework.backup(main.myPath + \"state.xml\");\n Framework.transform(stateDoc, new StreamResult(file), null);\n setDirty(false);\n }", "public void save() {\n\t\tpreferences().flush();\n\t}", "public void checkpoint(boolean hasUncommittedData) throws SQLException;", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "@Override\n\tpublic void setLastSavePoint(java.util.Date lastSavePoint) {\n\t\t_keHoachKiemDemNuoc.setLastSavePoint(lastSavePoint);\n\t}", "@Override\r\n\t\tpublic Savepoint setSavepoint() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tprotected boolean setSaveAttributes() throws Exception {\n\t\treturn false;\n\t}", "public void checkpoint(boolean sync, boolean fullCheckpoint) {\n try {\n if (journal == null )\n throw new IllegalStateException(\"Journal is closed.\");\n \n long now = System.currentTimeMillis();\n CountDownLatch latch = null;\n synchronized(this) {\n latch = nextCheckpointCountDownLatch;\n lastCheckpointRequest = now;\n if( fullCheckpoint ) {\n this.fullCheckPoint = true; \n }\n }\n \n checkpointTask.wakeup();\n \n if (sync) {\n log.debug(\"Waking for checkpoint to complete.\");\n latch.await();\n }\n }\n catch (InterruptedException e) {\n log.warn(\"Request to start checkpoint failed: \" + e, e);\n }\n }", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "public void setSaveString(String save)\n throws VisADException, RemoteException\n {\n if (save == null) throw new VisADException(\"Invalid save string\");\n setValue(Convert.getDouble(save.trim()));\n }", "public void save() {\n savePrefs();\n }", "public final void mT__82() throws RecognitionException {\n try {\n int _type = T__82;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalDSL.g:65:7: ( 'checkpoint' )\n // InternalDSL.g:65:9: 'checkpoint'\n {\n match(\"checkpoint\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setSAVETRIP(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"SAVETRIP\", value);\n\t\teditor.commit();\n\t}", "private void saveAttributes() {\n o_width = width;\n o_height = height;\n o_fps = fps;\n o_bps = bps;\n o_totalFrames = totalFrames;\n }", "void storeTraining(Training training);", "public void saveState() { }", "public void setActive(int id){\r\n\t\tif(_elementList.containsKey(id)){\r\n\t\t\t_elementList.get(id).isHit=false;\r\n\t\t\t_elementList.get(id).isActive=true;\t\t\t\r\n\t//\t\tSystem.out.println(\"active Checkpoint id\"+id);\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"Error CheckpointPool.setActive(\"+Integer.toHexString(id)+\") there is no such checkpoint\");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void persist(Seat seatHoldState, SeatState value) {\n\t\t\r\n\t}", "protected void setFixture(SaveParameters fixture) {\n\t\tthis.fixture = fixture;\n\t}", "@Override\r\n\tpublic void setElements(E2ECheckpointElements arg) {\n\t\tthis.content = arg;\r\n\r\n\t}", "public void setisTripSaving(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripSaving\", value);\n\t\teditor.commit();\n\t}", "public void setSaved(boolean saved) {\r\n\t\tthis.saved = saved;\r\n\t}", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void save(ComputationGraph net) throws Exception {\r\n ModelSerializer.writeModel(net, locationToSave, saveUpdater);\r\n }", "public void save() {\t\n\t\n\t\n\t}", "@Override\n public void save(String bucketUuid, Map<Integer, Checkpoint> vbucketToCheckpoint) throws IOException {\n final File tempDir = new File(filename).getParentFile();\n\n final File temp = File.createTempFile(\"cbes-checkpoint-\", \".tmp.json\", tempDir);\n try {\n try (FileOutputStream out = new FileOutputStream(temp)) {\n mapper.writeValue(out, prepareForSerialization(bucketUuid, vbucketToCheckpoint));\n }\n\n Files.move(temp.toPath(), Paths.get(filename), StandardCopyOption.ATOMIC_MOVE);\n\n } catch (Exception t) {\n if (temp.exists() && !temp.delete()) {\n LOGGER.warn(\"Failed to delete temp file: {}\", temp);\n }\n throw t;\n }\n }", "void setSaveStatus(boolean b) {\n int status = (b) ? 1 : 0;\n setStat(status, saveStatus);\n }", "public void onSaveInstanceState(Bundle bundle) {\n bundle.putSerializable(\"MARKLIST\", this.f5382B);\n bundle.putInt(\"save_state\", this.f5435p);\n }", "public void save(Storable storable) throws LogFile.LockException, IOException {\n // If the file has not been set, don't save.\n if (dataFile != null) {\n synchronized (dataFile) {\n // let the storable overwrite its values\n if (storable != null) {\n storable.store(properties);\n }\n if (autoStore) {\n storeProperties();\n }\n if (debug == 1) {\n System.err.println(\"save:JoinState.Join.Version=\"\n + properties.getProperty(\"JoinState.Join.Version\"));\n }\n }\n }\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "void setAttribute( String attrName, Object value ) throws FileSystemException;", "private void saveToSharedPreferences(String babyName) {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"babyName\", babyName);\n\n // commit changes made by the editor\n if (editor.commit()) {\n // update a TextView?\n } else {\n makeToast(\"Unable to set baby.\");\n }\n\n }", "public FileCheckpoint(Element config, DataAwareManagerMediator _dwareManMed) {\n super(config, _dwareManMed);\n\n chkptFile = new File(DOMUtils.getAttribute(config, FILE_NAME, true));\n try {\n // Opens the checkpoint/restart file for appending.\n this.writer = new BufferedWriter(new FileWriter(chkptFile, true));\n log.info(i18n.getString(\"checkPointEnabled\", chkptFile.getCanonicalPath()));\n } catch (IOException e) {\n throw new IllegalArgumentException(e.getMessage());\n }\n }", "private void saveState() {\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n // Store our count..\n editor.putInt(\"count\", this._tally);\n\n // Save changes\n editor.commit();\n }", "public void setSaves(int savesIn) {\r\n saves = savesIn; \r\n }", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "public void assignSavedEvent(final BwEvent val) {\n savedEvent = val;\n }", "private void currentStateSaveToSharedPref() {\n sharedPreferences = getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"nameOfActiveChallenge\", nameOfCurrentChallenge);\n editor.putInt(\"key1OfActiveChallenge\", key1OfActiveChallenge);\n editor.putString(\"dateOfLastEdit\", dateOfLastEdit);\n editor.putFloat(\"goal\", goal);\n editor.putFloat(\"carry\", carry);\n editor.putInt(\"challengeDaysRunning\", challengeDaysRunning);\n editor.commit();\n }", "public void setEatPoints(int param) {\n // setting primitive attribute tracker to true\n localEatPointsTracker = param != java.lang.Integer.MIN_VALUE;\n\n this.localEatPoints = param;\n }", "public GUIAttributeSet save(GUIAttributeSet set) throws ServerException;", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "static void setNotSaved(){saved=false;}", "private Evidence saveEvidence(Evidence evidence){\n\t\t\tdemoBuilder.getIndicators().removeIf(e -> evidence.getId().equals(e.getId()));\n\t\t\tdemoBuilder.getIndicators().add(evidence);\n\t\t\treturn evidence;\n\t}", "public boolean setProperty(String attName, Object value);", "private void writePref() {\n SharedPreferences.Editor editor = sp.edit();\n long currentTime = System.currentTimeMillis();\n editor.putLong(UPDATE, currentTime);\n editor.commit();\n System.out.println(\"Time of current update: \" + getDateFromLong(currentTime));\n }", "void saveUserSetting(UserSetting userSetting);", "public void setSaveVersion(int version)\n {\n saveVersion = version;\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public void saveUserBookmark(UserBookmark userBookmark) {\n\tDataStore.add(userBookmark);\n}", "public void setSaveString(String save)\n throws VisADException, RemoteException\n {\n if (save == null) throw new VisADException(\"Invalid save string\");\n StringTokenizer st = new StringTokenizer(save);\n if (st.countTokens() < 7) throw new VisADException(\"Invalid save string\");\n boolean[] b = new boolean[2];\n float[] f = new float[5];\n for (int i=0; i<2; i++) b[i] = Convert.getBoolean(st.nextToken());\n for (int i=0; i<5; i++) f[i] = Convert.getFloat(st.nextToken());\n setMainContours(b, f, false);\n }", "public void setSaveAction(Consumer<T> saveAction) {\n this.saveAction = saveAction;\n }", "private void setDirty(boolean flag) {\n\tdirty = flag;\n\tmain.bSave.setEnabled(dirty);\n }", "public void set(final Timestamp timestamp) {\n stamp = timestamp.get();\n }", "public void Save(){\n\t SharedPreferences prefs = getActivity().getSharedPreferences(MainActivity.SHARED_PREFS_FILE, Context.MODE_PRIVATE);\n\t Editor editor = prefs.edit();\n\t try {\n\t editor.putString(MainActivity.STOCK_LIST_TAG, ObjectSerializer.serialize(list));\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t editor.putFloat(\"balance\", (float) balance);\n\t editor.commit();\n\t}", "public void setParam0(boolean param){\n \n // setting primitive attribute tracker to true\n \n if (false) {\n localParam0Tracker = false;\n \n } else {\n localParam0Tracker = true;\n }\n \n this.localParam0=param;\n \n\n }", "public static void save()\n {\n try\n {\n FileOutputStream fOS = new FileOutputStream(propsFile); \n props.store(fOS, \"\");\n fOS.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void setIsActive(boolean param) {\n // setting primitive attribute tracker to true\n localIsActiveTracker = true;\n\n this.localIsActive = param;\n }", "alluxio.proto.journal.File.SetAttributeEntry getSetAttribute();", "private void loadCheckpointValues(int position) {\n if (position >= checkpoints.size()) {\n ((FlatEditText)findViewById(R.id.hint_text_box)).setText(\"\");\n ((ImageView)findViewById(R.id.clue_image_view)).setImageResource(android.R.color.transparent);\n recordedLoc = null;\n img = null;\n return;\n }\n Checkpoint currentCheckpoint = checkpoints.get(position);\n ((FlatEditText)findViewById(R.id.hint_text_box)).setText(currentCheckpoint.getClue().getText());\n ((ImageView)findViewById(R.id.clue_image_view)).setImageBitmap(currentCheckpoint.getClue().getImage());\n recordedLoc = currentCheckpoint.getLocation();\n }", "private void saveLocation()\n {\n willLocationBeSaved = !willLocationBeSaved;\n }", "public static void setSaveInSystem(boolean saveInSystem) {\n\t\tPropertyLoader.saveInSystem = saveInSystem;\n\t}", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "private Parameters createCheckpoint() {\n Parameters checkpoint = Parameters.create();\n checkpoint.set(\"lastDoc/identifier\", this.lastAddedDocumentIdentifier);\n checkpoint.set(\"lastDoc/number\", this.lastAddedDocumentNumber);\n checkpoint.set(\"indexBlockCount\", this.indexBlockCount);\n Parameters shards = Parameters.create();\n for (Bin b : this.geometricParts.radixBins.values()) {\n for (String indexPath : b.getBinPaths()) {\n shards.set(indexPath, b.size);\n }\n }\n checkpoint.set(\"shards\", shards);\n return checkpoint;\n }", "public void save( SessionCache otherSession,\n PreSave preSaveOperation );", "public void save() {\n SharedPreferences settings = activity.getSharedPreferences(\"Preferences\", 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putLong(\"bestDistance\", values.bestDistance);\n\n // Commit the edits!\n editor.commit();\n\n }", "public void saveFiBcoinPayconfig(FiBcoinPayconfig fiBcoinPayconfig);", "public void saveState(IMemento memento) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onSaveInstanceState(Bundle outState){\n\t\t\t\tsuper.onSaveInstanceState(outState);\n\t\t\t\toutState.putInt(\"offset\",offset);\n\t\t\t}", "public boolean writeAttributeFile();", "void setProperty(String attribute, String value);", "public void saveTraining(File datum) throws IOException, FileNotFoundException {\n bp.writer(datum);\n }", "private void saveValues() {\r\n this.pl_expert.setParam(\"displayNodeDegree\", (String) this.nodeDegreeSpinner.getValue());\r\n this.pl_expert.setParam(\"displayEdges\", (String) this.displayEdgesSpinner.getValue());\r\n this.pl_expert.setParam(\"scale\", (String) this.scaleSpinner.getValue());\r\n this.pl_expert.setParam(\"minWeight\", (String) this.minweightSpinner.getValue());\r\n this.pl_expert.setParam(\"iterations\", (String) this.iterationsSpinner.getValue());\r\n this.pl_expert.setParam(\"mutationParameter\", this.mutationParameter.getSelection().getActionCommand());\r\n this.pl_expert.setParam(\"Update_param\", this.Update_param.getSelection().getActionCommand());\r\n this.pl_expert.setParam(\"vote_value\", (String) this.vote_value.getValue());\r\n this.pl_expert.setParam(\"keep_value\", (String) this.keep_value.getValue());\r\n this.pl_expert.setParam(\"mut_value\", (String) this.mut_value.getValue());\r\n this.pl_expert.setParam(\"only_sub\", new Boolean(this.only_sub.isSelected()).toString());\r\n\r\n this.is_alg_started = false;\r\n }", "public boolean setRememberMe()\n {\n try \n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n FileOutputStream fout = new FileOutputStream(file);\n fout.write(1);\n fout.close();\n }\n catch (IOException ex) {ex.printStackTrace(); return false; }\n return true;\n }" ]
[ "0.6376332", "0.6261165", "0.5965149", "0.57478434", "0.55262345", "0.55241066", "0.54944664", "0.541756", "0.5155461", "0.5135859", "0.5126164", "0.50960934", "0.5068369", "0.50229967", "0.5016895", "0.5002015", "0.49996883", "0.49956387", "0.4968208", "0.49415526", "0.48711377", "0.48645598", "0.48529613", "0.48364082", "0.48261645", "0.4788576", "0.47639942", "0.4748323", "0.4748201", "0.47453743", "0.47367916", "0.47291625", "0.4720434", "0.47032773", "0.4702951", "0.4698367", "0.46758983", "0.46753675", "0.46733844", "0.46698764", "0.46646872", "0.46620944", "0.46608427", "0.46529233", "0.4646629", "0.46343517", "0.46198672", "0.4595129", "0.4593806", "0.45869803", "0.4584883", "0.458306", "0.45809734", "0.45798916", "0.45724237", "0.4565554", "0.45592391", "0.45483774", "0.45477232", "0.4547006", "0.4546888", "0.45462438", "0.4537475", "0.4534214", "0.45312068", "0.45240682", "0.45228437", "0.45210797", "0.45186096", "0.45183754", "0.4513241", "0.4505917", "0.45054573", "0.45034605", "0.45032704", "0.45007136", "0.44977087", "0.4496796", "0.44907087", "0.44889528", "0.4486641", "0.44729716", "0.44723138", "0.44660446", "0.44658285", "0.44578448", "0.4457269", "0.44547462", "0.44425106", "0.44415674", "0.44411066", "0.44400433", "0.443485", "0.4433478", "0.44305655", "0.44296923", "0.4428708", "0.44286144", "0.4421368", "0.44151056" ]
0.5912772
3
Set & Save checkpoint attributes.
public static DaoResult setCheckpointAttrs(ICheckpointDao dao, String checkpointId, Map<String, Object> fieldNamesAndValues) { CheckpointBo cp = getCheckpoint(dao, checkpointId, new Date()); cp.setTimestamp(new Date()); for (Map.Entry<String, Object> entry : fieldNamesAndValues.entrySet()) { cp.setDataAttr(entry.getKey(), entry.getValue()); } return saveCheckpoint(dao, cp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void checkpoint() throws IOException;", "public void save(){\n checkpoint = chapter;\n }", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "private void saveAttributes() {\n o_width = width;\n o_height = height;\n o_fps = fps;\n o_bps = bps;\n o_totalFrames = totalFrames;\n }", "@Override\n\tpublic void setCheckpoint(java.util.Date checkpoint) {\n\t\t_userSync.setCheckpoint(checkpoint);\n\t}", "protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }", "@Override\n\tpublic Serializable checkpointInfo() throws Exception {\n\t\treturn null;\n\t}", "public synchronized void writeCheckpoint() {\n\t\tflush();\n\t\tpw.println(\"CHECKPOINT \" \n\t\t\t\t\t+ TransactionManager.instance().transactionList());\n\t\tflush();\n\t}", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "public void setAttributes(FactAttributes param) {\r\n localAttributesTracker = true;\r\n\r\n this.localAttributes = param;\r\n\r\n\r\n }", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "@Override\n\tprotected boolean setSaveAttributes() throws Exception {\n\t\treturn false;\n\t}", "public void attributSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "public static DaoResult setCheckpointAttr(ICheckpointDao dao, String checkpointId, String fieldName,\n Object fieldValue) {\n CheckpointBo cp = getCheckpoint(dao, checkpointId, new Date());\n cp.setTimestamp(new Date()).setDataAttr(fieldName, fieldValue);\n return saveCheckpoint(dao, cp);\n }", "public void saveState() {\n savedPen.setValues(pm.pen);\n }", "private void saveValues() {\r\n this.pl_expert.setParam(\"displayNodeDegree\", (String) this.nodeDegreeSpinner.getValue());\r\n this.pl_expert.setParam(\"displayEdges\", (String) this.displayEdgesSpinner.getValue());\r\n this.pl_expert.setParam(\"scale\", (String) this.scaleSpinner.getValue());\r\n this.pl_expert.setParam(\"minWeight\", (String) this.minweightSpinner.getValue());\r\n this.pl_expert.setParam(\"iterations\", (String) this.iterationsSpinner.getValue());\r\n this.pl_expert.setParam(\"mutationParameter\", this.mutationParameter.getSelection().getActionCommand());\r\n this.pl_expert.setParam(\"Update_param\", this.Update_param.getSelection().getActionCommand());\r\n this.pl_expert.setParam(\"vote_value\", (String) this.vote_value.getValue());\r\n this.pl_expert.setParam(\"keep_value\", (String) this.keep_value.getValue());\r\n this.pl_expert.setParam(\"mut_value\", (String) this.mut_value.getValue());\r\n this.pl_expert.setParam(\"only_sub\", new Boolean(this.only_sub.isSelected()).toString());\r\n\r\n this.is_alg_started = false;\r\n }", "private void writeCheckpoint(String filename) {\n File file = new File(checkpointDir, filename);\n try {\n geneticProgram.savePopulation(new FileOutputStream(file));\n } catch (FileNotFoundException e) {\n log.log(Level.WARNING, \"Exception in dump\", e);\n }\n }", "private Parameters createCheckpoint() {\n Parameters checkpoint = Parameters.create();\n checkpoint.set(\"lastDoc/identifier\", this.lastAddedDocumentIdentifier);\n checkpoint.set(\"lastDoc/number\", this.lastAddedDocumentNumber);\n checkpoint.set(\"indexBlockCount\", this.indexBlockCount);\n Parameters shards = Parameters.create();\n for (Bin b : this.geometricParts.radixBins.values()) {\n for (String indexPath : b.getBinPaths()) {\n shards.set(indexPath, b.size);\n }\n }\n checkpoint.set(\"shards\", shards);\n return checkpoint;\n }", "private void saveProperties() {\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.driver\", driver);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.serverURL\", serverURL);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.username\", username);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.password\", password);\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.minConnections\",\n Integer.toString(minConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.maxConnections\",\n Integer.toString(maxConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.connectionTimeout\",\n Double.toString(connectionTimeout));\n }", "public static void save()\n {\n try\n {\n FileOutputStream fOS = new FileOutputStream(propsFile); \n props.store(fOS, \"\");\n fOS.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public synchronized long getCheckpoint() {\n return globalCheckpoint;\n }", "void save() {\n File file = new File(main.myPath + \"state.xml\");\n Framework.backup(main.myPath + \"state.xml\");\n Framework.transform(stateDoc, new StreamResult(file), null);\n setDirty(false);\n }", "protected StoreParams() {\n this.setBatchSize(BATCH_SIZE_DEFAULT);\n this.setNumSyncBatches(NUM_SYNC_BATCHES_DEFAULT);\n this.setSegmentFileSizeMB(SEGMENT_FILE_SIZE_MB_DEFAULT);\n this.setSegmentCompactFactor(SEGMENT_COMPACT_FACTOR_DEFAULT);\n this.setHashLoadFactor(HASH_LOAD_FACTOR_DEFAULT);\n this.setIndexesCached(INDEXES_CACHED_DEFAULT);\n }", "public void saveCurrentUserState(){\n\t\tCurrentUserState currState = new CurrentUserState();\n\t\tcurrState.setBatchOutput(batchState.getBatchOutput());\n\t\tcurrState.setCurrFields(batchState.getFields());\n\t\tcurrState.setCurrProject(batchState.getProject());\n\t\tcurrState.setCurrScale(display.getScale());\n\t\tcurrState.setCurrSelectedCell(batchState.getSelectedCell());\n\t\tcurrState.setErrorCells(batchState.getErrors());\n\t\t\n\t\tcurrState.setHighlight(display.isToggleOn());\n\t\tcurrState.setInverted(display.isInverted());\n\t\t\n\t\tcurrState.setCurrWindowPos(getLocationOnScreen());\n\t\tcurrState.setCurrWindowSize(getSize());\n\t\t\n\t\tcurrState.setHorizontalDiv(bottomPanel.getDividerLocation());\n\t\tcurrState.setVertivalDiv(centerPanel.getDividerLocation());\n\t\t\n\t\tcurrState.setOriginX(display.getW_originX());\n\t\tcurrState.setOriginY(display.getW_originY());\n\t\t\n\t\tcurrState.setValues(batchState.getValues());\n\t\t\n\t\t//put to xstream\n\t\tXStream xstream = new XStream(new DomDriver());\n\t\ttry {\n\t\t\n\t\t\txstream.toXML(currState, new FileOutputStream(new File(info.getUsername() + \".xml\")));\n\t\t\tSystem.out.println(\"current state is saved!\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"file not found/ couldn't go to xml\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadCheckpointValues(int position) {\n if (position >= checkpoints.size()) {\n ((FlatEditText)findViewById(R.id.hint_text_box)).setText(\"\");\n ((ImageView)findViewById(R.id.clue_image_view)).setImageResource(android.R.color.transparent);\n recordedLoc = null;\n img = null;\n return;\n }\n Checkpoint currentCheckpoint = checkpoints.get(position);\n ((FlatEditText)findViewById(R.id.hint_text_box)).setText(currentCheckpoint.getClue().getText());\n ((ImageView)findViewById(R.id.clue_image_view)).setImageBitmap(currentCheckpoint.getClue().getImage());\n recordedLoc = currentCheckpoint.getLocation();\n }", "private void setAttributes() {\n mAuth = ServerData.getInstance().getMAuth();\n user = ServerData.getInstance().getUser();\n sharedpreferences = getSharedPreferences(GOOGLE_CALENDAR_SHARED_PREFERENCES, Context.MODE_PRIVATE);\n walkingSharedPreferences = getSharedPreferences(ACTUAL_WALK, Context.MODE_PRIVATE);\n\n notificationId = 0;\n requestCode = 0;\n fragmentManager = getSupportFragmentManager();\n\n context = this;\n }", "public void save() {\n if(persistenceType == PropertyPersistenceType.Persistent) {\n if (!isSetToDefault()) {\n permanentStore.setBoolean(key, get());\n } else {\n permanentStore.remove(key);\n }\n }\n }", "private void saveProperties() throws IOException {\r\n\t\tsetProperties();\r\n\t\tOutputStream outputStream;\r\n\t\toutputStream = new FileOutputStream(configFile);\r\n\t\tconfigProps.store(outputStream, \"Lot Data Mapper Application\");\r\n\t\tString msg = \"SAVING PROPERTIES WITH VALUES: \\n\\t 1 \\t\" + dt.Root+\"\\n \\t 2 \\t\" + dt.Map+\" \\n\\t 3 \\t\" + dt.Out+\" \\n\\t 4 \\t\" + Trans.ReportTypeName+\" \\n\\t 5 \\t\"+Trans.ReportedByPersonName+\" \\n\\t 6\\t\"+Trans.ReportedDate + \"\\n PROPERTIIES SAVED\";\r\n\t\tlg.l(msg);\r\n\t\toutputStream.close();\r\n\t}", "private void saveSettings()\n {\n try\n {\n // If remember information is true then save the ip and port\n // properties to the projects config.properties file\n if ( rememberLoginIsSet_ )\n {\n properties_.setProperty( getString( R.string.saved_IP ), mIP_ );\n properties_.setProperty( getString( R.string.saved_Port ),\n mPort_ );\n }\n\n // Always save the remember login boolean\n properties_.setProperty( getString( R.string.saveInfo ),\n String.valueOf( rememberLoginIsSet_ ) );\n\n File propertiesFile =\n new File( this.getFilesDir().getPath().toString()\n + \"/properties.txt\" );\n FileOutputStream out =\n new FileOutputStream( propertiesFile );\n properties_.store( out, \"Swoop\" );\n out.close();\n }\n catch ( Exception ex )\n {\n System.err.print( ex );\n }\n }", "public void AdjustmentSave(float slope, float offset) {\n\t\t\n\t\tSharedPreferences adjustmentPref = getSharedPreferences(\"User Define\", MODE_PRIVATE);\n\t\tSharedPreferences.Editor adjustmentedit = adjustmentPref.edit();\n\t\t\n\t\tadjustmentedit.putFloat(\"AF SlopeVal\", slope);\n\t\tadjustmentedit.putFloat(\"AF OffsetVal\", offset);\n\t\tadjustmentedit.commit();\n\t\t\n\t\tRunActivity.AF_Slope = slope;\n\t\tRunActivity.AF_Offset = offset;\n\t}", "public void checkpoint(boolean hasUncommittedData) throws SQLException;", "void checkpoint(Node node) throws RepositoryException;", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "private void saveProperties()\n {\n PSConfigUtils.saveObjectToFile(m_props, getPropertiesFile());\n }", "public void storeProperties() throws LogFile.LockException, IOException {\n // If the file has not been set, don't save.\n if (dataFile != null) {\n synchronized (dataFile) {\n if (!dataFile.isDirectory()) {\n if (dataFile.getName().endsWith(EtomoDirector.USER_CONFIG_FILE_EXT)) {\n dataFile.backupOnce();\n }\n else {\n dataFile.doubleBackupOnce();\n }\n }\n if (!dataFile.exists()) {\n dataFile.create();\n }\n LogFile.OutputStreamId outputStreamId = dataFile.openOutputStream();\n dataFile.store(properties, outputStreamId);\n dataFile.closeOutputStream(outputStreamId);\n }\n }\n }", "private void save(ComputationGraph net) throws Exception {\r\n ModelSerializer.writeModel(net, locationToSave, saveUpdater);\r\n }", "public void preSaveInit() {\n persistentData.clear();\n for (int i = 0; i < getNumPoints(); i++) {\n persistentData.add(getPoint(i));\n }\n }", "public String toCheckpoint() {\n return null;\n }", "public void initializeGraphPrueba() {\n //path to checkpoit.ckpt HACER\n //To load the checkpoint, place the checkpoint files in the device and create a Tensor\n //to the path of the checkpoint prefix\n //FALTA ******\n\n // si modelo updated se usa el checkpoints que he descargado del servidor. Si no, el del movil.\n if (isModelUpdated){\n /* //NO VA BIEN:\n checkpointPrefix = Tensors.create((file_descargado).toString());\n Toast.makeText(MainActivity.this, \"Usando el modelo actualizado\", Toast.LENGTH_SHORT).show();\n\n */\n\n //A VER SI VA\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt.meta\");\n // inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt\"); NOT FOUND\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n else {\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"checkpoint_name1.ckpt.meta\");\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n //checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString()); //PARA USAR EL CHECKPOINT DESCARGADO\n // checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n //Create a variable of class org.tensorflow.Graph:\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n // inputStream = getAssets().open(\"graph.pb\"); //MODELO SENCILLO //PROBAR CON GRAPH_PRUEBA QUE ES MI GRAPH DE O BYTES\n // inputStream = getAssets().open(\"graph5.pb\"); //MODELO SENCILLO\n if (isModelUpdated) { // ESTO ES ALGO TEMPORAL. NO ES BUENO\n inputStream = getAssets().open(\"graph_pesos.pb\");\n }\n else {\n inputStream = getAssets().open(\"graph5.pb\");\n }\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Place the .pb file generated before in the assets folder and import it as a byte[] array.\n // Let the array's name be graphdef.\n //Now, load the graph from the graphdef:\n graph.importGraphDef(graphDef);\n try {\n //Now, load the checkpoint by running the restore checkpoint op in the graph:\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n //Alternatively, initialize the graph by calling the init op:\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "public void saveState() { }", "private void storeProperties() {\n storeValue(Variable.MODE);\n storeValue(Variable.ITEM);\n storeValue(Variable.DEST_PATH);\n storeValue(Variable.MAXTRACKS_ENABLED);\n storeValue(Variable.MAXTRACKS);\n storeValue(Variable.MAXSIZE_ENABLED);\n storeValue(Variable.MAXSIZE);\n storeValue(Variable.MAXLENGTH_ENABLED);\n storeValue(Variable.MAXLENGTH);\n storeValue(Variable.ONE_MEDIA_ENABLED);\n storeValue(Variable.ONE_MEDIA);\n storeValue(Variable.CONVERT_MEDIA);\n storeValue(Variable.CONVERT_COMMAND);\n storeValue(Variable.NORMALIZE_FILENAME);\n storeValue(Variable.RATING_LEVEL);\n }", "@Override\r\n\tpublic void setElements(E2ECheckpointElements arg) {\n\t\tthis.content = arg;\r\n\r\n\t}", "public Checkpoint(File checkpointDir) {\n this.directory = checkpointDir;\n readValid();\n }", "public void saveProperties()\n {\n _appContext.Configuration.save();\n }", "private void writeProperties() {\n propsMutex.writeAccess(new Runnable() {\n public void run() {\n OutputStream out = null;\n FileLock lock = null;\n try {\n FileObject pFile = file.getPrimaryFile();\n FileObject myFile = FileUtil.findBrother(pFile, extension);\n if (myFile == null) {\n myFile = FileUtil.createData(pFile.getParent(), pFile.getName() + \".\" + extension);\n }\n lock = myFile.lock();\n out = new BufferedOutputStream(myFile.getOutputStream(lock));\n props.store(out, \"\");\n out.flush();\n lastLoaded = myFile.lastModified();\n logger.log(Level.FINE, \"Written AssetData properties for {0}\", file);\n } catch (IOException e) {\n Exceptions.printStackTrace(e);\n } finally {\n if (out != null) {\n try {\n out.close();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n if (lock != null) {\n lock.releaseLock();\n }\n }\n }\n });\n }", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "public void saveProgress() {\n\t\tsaveUsers();\n\t\tsaveMaterials();\n\t\tsaveBorrowings();\n\t}", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "public void save() {\n\t\tpreferences().flush();\n\t}", "public void saveState() {\n\t\tsuper.saveState();\n\t}", "public static void saveProperties() {\n //if(debug_flag) \n //System.out.println(Util.asctime() + \" Saving properties to \" + propfilename + \" nkeys=\" + prop.size());\n try {\n try (FileOutputStream o = new FileOutputStream(propfilename)) {\n prop.store(o, propfilename + \" via Util.saveProperties() cp=\"\n + System.getProperties().getProperty(\"java.class.path\"));\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not write properties to \" + propfilename);\n System.exit(1);\n } catch (IOException e) {\n System.out.println(\"Write error on properties to \" + propfilename);\n System.exit(1);\n }\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "public static void saveProperties() {\n try {\n try (FileOutputStream out = new FileOutputStream(propFile)) {\n properties.store(out, \"BitcoinWallet Properties\");\n }\n } catch (Exception exc) {\n Main.logException(\"Exception while saving application properties\", exc);\n }\n }", "public void setCheckpointInFileName(String inFileName) {\n \ttransfer.setInFileName(inFileName);\n }", "private void setTrainingData() throws IOException {\r\n\t\ttrainIdBodyMap = readInIdBodiesMap(new File(TRAIN_BODIES_CSV_LOCATION));\r\n\t\ttrainStances = readStances(new File(TRAIN_STANCES_CSV_LOCATION));\r\n\r\n\t}", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "private void saveState() {\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n // Store our count..\n editor.putInt(\"count\", this._tally);\n\n // Save changes\n editor.commit();\n }", "@Override\n\tpublic void setOffsetBackToFile() {\n\t\tString newXString;\n\t\tString newYString;\n\t\t newXString = String.valueOf(getX().getValueInSpecifiedUnits())+getX().getUserUnit();\n\t newYString = String.valueOf(getY().getValueInSpecifiedUnits())+getY().getUserUnit();\n\t\tjc.getElement().setAttribute(\"x\", newXString);\n\t\tjc.getElement().setAttribute(\"y\", newYString);\n\t\ttry {\n\t\t\tjc.getView().getFrame().writeFile();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public void save(Storable storable) throws LogFile.LockException, IOException {\n // If the file has not been set, don't save.\n if (dataFile != null) {\n synchronized (dataFile) {\n // let the storable overwrite its values\n if (storable != null) {\n storable.store(properties);\n }\n if (autoStore) {\n storeProperties();\n }\n if (debug == 1) {\n System.err.println(\"save:JoinState.Join.Version=\"\n + properties.getProperty(\"JoinState.Join.Version\"));\n }\n }\n }\n }", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void storeProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Storing Properties to {}\", path.toString());\n try {\n final FileOutputStream fos = new FileOutputStream(path.toFile());\n final Properties properties = new Properties();\n String privateKey = this.credentials.getEcKeyPair().getPrivateKey().toString(16);\n properties.setProperty(PRIVATE_KEY, privateKey);\n properties.setProperty(CONTRACT1_ADDRESS, this.contract1Address);\n properties.setProperty(CONTRACT2_ADDRESS, this.contract2Address);\n properties.setProperty(CONTRACT3_ADDRESS, this.contract3Address);\n properties.setProperty(CONTRACT4_ADDRESS, this.contract4Address);\n properties.setProperty(CONTRACT5_ADDRESS, this.contract5Address);\n properties.setProperty(CONTRACT6_ADDRESS, this.contract6Address);\n properties.store(fos, \"Sample code properties file\");\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "protected void saveCommonAttributes(Attributes attrs) {\r\n\t\t// Save some common attributes for quick get.\r\n\t\tbind(KEY_LANG_NAME, attrs.getSessionLang());\r\n\t\tbind(KEY_AUTHC_HOST_NAME, attrs.getClientHost());\r\n\t\tbind(KEY_PARENT_SESSIONID_NAME, attrs.getParentSessionId());\r\n\t\tbind(KEY_DATA_CIPHER_NAME, attrs.getDataCipher());\r\n\t\tbind(KEY_ACCESSTOKEN_SIGN_NAME, attrs.getAccessTokenSign());\r\n\t}", "public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}", "private void saveBeforeRun() {\n if ( _helper != null && _settings.getSaveBeforeRun() )\n _helper.saveBeforeRun();\n }", "public void saveBack() {\n\t\tmodified = false;\n\n\t\t// set basics\n\t\tRubyHelper.setNum(object, \"@code\", id);\n\t\tRubyHelper.setNum(object, \"@indent\", indent);\n\n\t\t// set parameters\n\t\tRubyArray para = (RubyArray) object.getInstanceVariable(\"@parameters\");\n\t\tpara.clear();\n\n\t\tfor (IRubyObject r : parameters) {\n\t\t\tpara.add(r);\n\t\t}\n\t}", "public void save() {\n savePrefs();\n }", "private void saveState() throws IOException {\n speakerManager.saveState();\n roomManager.saveState();\n organizerManager.saveState();\n eventManager.saveState();\n chatManager.saveState();\n attendeeManager.saveState();\n\n }", "private void saveConfiguration() {\n }", "private void setCurrentUserState(CurrentUserState savedState){\n\t\t\n\t\tif(savedState.getBatchOutput() != null){\n\t\t\t\n\t\t\tbatchState.setImageID(info.getImageID());\n\t\t\tbatchState.setErrors(savedState.getErrorCells());\n\t\t\tbatchState.setFields(savedState.getCurrFields());\n\t\t\tbatchState.setBatchOutput(savedState.getBatchOutput());\n\t\t\tbatchState.setProject(savedState.getCurrProject());\n\t\t\t\n\t\t\tdisplay.setInverted(savedState.isInverted());\n\t\t\tdisplay.setToggleOn(savedState.isHighlight());\n\t\t\tbatchState.initDownloadBatch();\n\n\t\t\tbatchState.setSelectedCell(savedState.getCurrSelectedCell());\n\t\t\tbatchState.setValues(savedState.getValues());\n\t\t\t\n\t\t\tdisplay.setScale(savedState.getCurrScale());\n\t\t\tdisplay.setW_originX(savedState.getOriginX());\n\t\t\tdisplay.setW_originY(savedState.getOriginY());\n\t\t\t\n\t\t\tbuttonsPanel.toggleButtons(true);\n\t\t\tdownloadbatchMenu.setEnabled(false);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tbuttonsPanel.toggleButtons(false);\n\t\t\tdownloadbatchMenu.setEnabled(true);\n\t\t}\n\t\tthis.setLocation(savedState.getCurrWindowPos());\n\t\tthis.setSize(savedState.getCurrWindowSize());\n\t\tbottomPanel.setDividerLocation(savedState.getHorizontalDiv());\n\t\tcenterPanel.setDividerLocation(savedState.getVertivalDiv());\n\t\t\n\t}", "private void setAllAttributesFromController() {\n obsoData.setSupplier(supplier);\n \n obsoData.setEndOfOrderDate(endOfOrderDate);\n obsoData.setObsolescenceDate(obsolescenceDate);\n \n obsoData.setEndOfSupportDate(endOfSupportDate);\n obsoData.setEndOfProductionDate(endOfProductionDate);\n \n obsoData.setCurrentAction(avlBean.findAttributeValueListById(\n ActionObso.class, actionId));\n obsoData.setMtbf(mtbf);\n \n obsoData.setStrategyKept(avlBean.findAttributeValueListById(\n Strategy.class,\n strategyId));\n obsoData.setContinuityDate(continuityDate);\n \n obsoData.setManufacturerStatus(avlBean.findAttributeValueListById(\n ManufacturerStatus.class, manufacturerStatusId));\n obsoData.setAirbusStatus(avlBean.findAttributeValueListById(\n AirbusStatus.class, airbusStatusId));\n \n obsoData.setLastObsolescenceUpdate(lastObsolescenceUpdate);\n obsoData.setConsultPeriod(avlBean.findAttributeValueListById(\n ConsultPeriod.class, consultPeriodId));\n \n obsoData.setPersonInCharge(personInCharge);\n obsoData.setCommentOnStrategy(comments);\n }", "public void saveState(ObjectOutput out) throws IOException {\n\t\t// save deikto values\n\t\tdk.saveState(out);\n\t\t// save interpreter values\n\t\tout.writeFloat(interpreter.globalActorBox);\n\t\tout.writeFloat(interpreter.globalPropBox);\n\t\tout.writeFloat(interpreter.globalStageBox);\n\t\tout.writeFloat(interpreter.globalEventBox);\n\t\tout.writeFloat(interpreter.globalVerbBox);\n\t\tout.writeFloat(interpreter.globalBNumberBox);\n\n\t\t// save ticks\n\t\tout.writeInt(cMoments);\n\t\t// save inactivity counter\n\t\tout.writeInt(cInactivity);\n\t\t// save player inactivity\n\t\tout.writeInt(playerInactivity);\n\t\t// save storyIsOver\n\t\tout.writeBoolean(storyIsOver);\n\t\tout.writeBoolean(isEpilogueNow);\n\t\tout.writeBoolean(isHappilyDone);\n\t\tout.writeBoolean(isPenultimateDone);\n\n\t\t// save historyBook\n\t\tout.writeInt(historyBook.size());\n\t\tfor(Sentence s:historyBook)\n\t\t\tout.writeObject(s);\n\t\t// save random seeds\n\t\tout.writeObject(random);\n\t\tout.writeLong(interpreter.scriptRandom.getSeed());\n\t\t// save alarms\n\t\tout.writeInt(alarms.size());\n\t\tfor(Alarm a:alarms)\n\t\t\tout.writeObject(a);\n\t\tout.writeInt(storybook.size());\n\t\tfor(String s:storybook)\n\t\t\tout.writeUTF(s);\n\t}", "public void save() {\r\n try {\r\n FileOutputStream fos = new FileOutputStream(REPO_STATE_FILE_NAME);\r\n fos.write(CodecUtils.toJson(this).getBytes());\r\n fos.close();\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n }", "void storeTraining(Training training);", "@Before\n\tpublic void setBatchInfo() {\n\t\t\n\t\tthis.caliberBatch = batchDao.findOneWithDroppedTrainees(2201);\n\t\tthis.caliberBatch.setTrainees(caliberTrainees);\n\t\tlog.debug(\"CaliberBatch: \"+ caliberBatch.getResourceId());\n\t\t\n\t\tthis.salesforceTrainer.setName(\"Tom Riddle\");\n\t\tthis.salesforceTrainer.setEmail(\"[email protected]\");\n\t\tthis.salesforceTrainer.setTitle(\"Trainer\");\n\t\tthis.salesforceTrainer.setTier(TrainerRole.ROLE_TRAINER);\n\t\t\n\t\tthis.salesforceBatch.setResourceId(\"TWO\");\n\t\tthis.salesforceBatch.setTrainer(salesforceTrainer);\n\t\tthis.salesforceBatch.setTrainingName(caliberBatch.getTrainingName());\n\t\tthis.salesforceBatch.setLocation(caliberBatch.getLocation());\n\t\tthis.salesforceBatch.setWeeks(caliberBatch.getWeeks());\n\t\tthis.salesforceBatch.setSkillType(caliberBatch.getSkillType());\n\t\tthis.salesforceBatch.setTrainees(caliberBatch.getTrainees());\n\t\tthis.salesforceBatch.setAddress(caliberBatch.getAddress());\n\t\tthis.salesforceBatch.setEndDate(caliberBatch.getEndDate());\n\t\tthis.salesforceBatch.setStartDate(caliberBatch.getStartDate());\n\t\tthis.salesforceBatch.setBatchId(caliberBatch.getBatchId());\n\t\tthis.salesforceBatch.setTrainees(salesforceTrainees);\n\t}", "public void storePreferences() throws Exception {\n\t\tupdatePreferences();\n\t\tPortletPreferences preferences = getPreferences();\n\t\tpreferences.store();\n\t}", "private void currentStateSaveToSharedPref() {\n sharedPreferences = getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"nameOfActiveChallenge\", nameOfCurrentChallenge);\n editor.putInt(\"key1OfActiveChallenge\", key1OfActiveChallenge);\n editor.putString(\"dateOfLastEdit\", dateOfLastEdit);\n editor.putFloat(\"goal\", goal);\n editor.putFloat(\"carry\", carry);\n editor.putInt(\"challengeDaysRunning\", challengeDaysRunning);\n editor.commit();\n }", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void initializeGraph() {\n checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString());\n checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n inputStream = getAssets().open(\"final_graph_hdd.pb\");\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n graph.importGraphDef(graphDef);\n try {\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "void savePreferences() throws OntimizeJEERuntimeException;", "private void saveState() {\n // Increase capacity if necessary\n if (nSaved == savedC.length) {\n Object tmp;\n tmp = savedC;\n savedC = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedC,0,nSaved);\n tmp = savedCT;\n savedCT = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedCT,0,nSaved);\n tmp = savedA;\n savedA = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedA,0,nSaved);\n tmp = savedB;\n savedB = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedB,0,nSaved);\n tmp = savedDelFF;\n savedDelFF = new boolean[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedDelFF,0,nSaved);\n }\n // Save the current sate\n savedC[nSaved] = c;\n savedCT[nSaved] = cT;\n savedA[nSaved] = a;\n savedB[nSaved] = b;\n savedDelFF[nSaved] = delFF;\n nSaved++;\n }", "protected void serializeState() {\n\t\tint ii = 0;\n\t\t\n\t\tfor(GEditorPanel gep : editorPanels) {\n\t\t\tif(gep.getFilePath() != null && gep.getFilePath().length() > 0) {\n\t\t\t\tPreference.PREFERENCES_NODE.put(\"editSession\" + ++ii, gep.getFilePath());\n\t\t\t}\n\t\t}\n\t\t\n\t\tAccessors.INT_ACCESSOR.put(\"numberOfFiles\", ii);\n\t}", "protected void save(DataOutputStream os) throws IOException {\n\n super.save(os);\n os.writeFloat(StartingFunds);\n os.writeInt(NumTestTraders);\n os.writeInt(NumSteps);\n }", "public FileCheckpoint(Element config, DataAwareManagerMediator _dwareManMed) {\n super(config, _dwareManMed);\n\n chkptFile = new File(DOMUtils.getAttribute(config, FILE_NAME, true));\n try {\n // Opens the checkpoint/restart file for appending.\n this.writer = new BufferedWriter(new FileWriter(chkptFile, true));\n log.info(i18n.getString(\"checkPointEnabled\", chkptFile.getCanonicalPath()));\n } catch (IOException e) {\n throw new IllegalArgumentException(e.getMessage());\n }\n }", "protected void setMeAndMyParentsAsDirty() {\n dirtyS = true;\n modelRoot.incrementNumberOfDirtySNodes();\n dirtyD = true;\n modelRoot.incrementNumberOfDirtyDNodes();\n if (parent != null) {\n parent.setMeAndMyParentsAsDirty();\n }\n }", "public void onSaveInstanceState(Bundle bundle) {\n bundle.putSerializable(\"MARKLIST\", this.f5382B);\n bundle.putInt(\"save_state\", this.f5435p);\n }", "private void saveGeneralData() {\n Settings.CRAWL_TIMEOUT = Integer.parseInt(spCrawlTimeout.getValue().toString()) * 1000;\n Settings.RETRY_POLICY = Integer.parseInt(spRetryPolicy.getValue().toString());\n Settings.RECRAWL_TIME = Integer.parseInt(spRecrawlInterval.getValue().toString()) * 3600000;\n Settings.RECRAWL_CHECK_TIME = Integer.parseInt(spRecrawlCheckTime.getValue().toString()) * 60000;\n\n Settings.saveSettings();\n }", "protected void onBeforeStoreProperties() throws IOException {\n }", "private void serializeBeforeOpen() {\r\n sr.save(this.path);\r\n }", "private static void persistSettings() {\n\t\ttry {\n\t\t\tBufferedWriter userConf = new BufferedWriter(new FileWriter(\n\t\t\t\t\tconf.getAbsolutePath()));\n\t\t\tproperties.store(userConf, null);\n\t\t\t// flush and close streams\n\t\t\tuserConf.flush();\n\t\t\tuserConf.close();\n\t\t} catch (IOException e) {\n\t\t\tlog.severe(\"Couldn't save config file.\");\n\t\t}\n\t}", "public void checkpointStateChanged(final CheckpointState newCheckpointState) {\n \t\tthis.taskManager.checkpointStateChanged(this.environment.getJobID(), this.vertexID, newCheckpointState);\n \t}", "@Override\n\tprotected void prepareForSave() throws WorkflowException {\n\n\t}", "private void saveInfoFields() {\n\n\t\tString name = ((EditText) getActivity().findViewById(R.id.profileTable_name))\n\t\t\t\t.getText().toString();\n\t\tint weight = Integer\n\t\t\t\t.parseInt(((EditText) getActivity().findViewById(R.id.profileTable_weight))\n\t\t\t\t\t\t.getText().toString());\n\t\tboolean isMale = ((RadioButton) getActivity().findViewById(R.id.profileTable_male))\n\t\t\t\t.isChecked();\n\t\tboolean smoker = ((CheckBox) getActivity().findViewById(R.id.profileTable_smoker))\n\t\t\t\t.isChecked();\n\t\tint drinker = (int) ((RatingBar) getActivity().findViewById(R.id.profileTable_drinker))\n\t\t\t\t.getRating();\n\n\t\tif (!name.equals(storageMan.PrefsName)) {\n\t\t\tstorageMan = new StorageMan(getActivity(), name);\n\t\t}\n\n\t\tstorageMan.saveProfile(new Profile(weight, drinker, smoker, isMale));\n\t\t\n\t\ttoast(\"pref saved\");\n\t}", "public void save() {\t\n\t\n\t\n\t}", "public void saveState() {\n\t\tFileOutputStream fos = null;\n\t\tObjectOutputStream out = null;\n\t\ttry {\n\t\t\tFile savefile = new File(getServletContext().getRealPath(\"/WEB-INF/\"), SAVED_RECEPTOR_FILE_NAME);\n\t\t\tfos = new FileOutputStream(savefile);\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(pgtMap);\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"IO Exception saving proxyTicket cache\");\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception e) { //don't think this is possible, but I'm seeing some goofy behavior, so...\n\t\t\tSystem.err.println(\"Non-IO Exception saving proxyTicket cache\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public GUIAttributeSet save(GUIAttributeSet set) throws ServerException;", "public void saveState(IMemento memento) {\n\t\t\r\n\t}", "private void saveStateToArguments() {\n if (getView() != null)\n savedState = saveState();\n if (savedState != null) {\n Bundle b = getArguments();\n if (b != null)\n b.putBundle(\"internalSavedViewState8954201239547\", savedState);\n }\n }", "@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState) {\n\n\t\tsuper.onSaveInstanceState(savedInstanceState);\n\n\t\t/* save variables */\n\t\tsavedInstanceState.putLong(\"NumberOfSignalStrengthUpdates\",\n\t\t\t\tNumberOfSignalStrengthUpdates);\n\n\t\tsavedInstanceState.putLong(\"LastCellId\", LastCellId);\n\t\tsavedInstanceState.putLong(\"NumberOfCellChanges\", NumberOfCellChanges);\n\n\t\tsavedInstanceState.putLong(\"LastLacId\", LastLacId);\n\t\tsavedInstanceState.putLong(\"NumberOfLacChanges\", NumberOfLacChanges);\n\n\t\tsavedInstanceState.putLongArray(\"PreviousCells\", PreviousCells);\n\t\tsavedInstanceState.putInt(\"PreviousCellsIndex\", PreviousCellsIndex);\n\t\tsavedInstanceState.putLong(\"NumberOfUniqueCellChanges\",\n\t\t\t\tNumberOfUniqueCellChanges);\n\n\t\tsavedInstanceState.putBoolean(\"outputDebugInfo\", outputDebugInfo);\n\n\t\t/* save the trace data still in the write buffer into a file */\n\t\tsaveDataToFile(FileWriteBufferStr, \"---in save instance, \"\n\t\t\t\t+ DateFormat.getTimeInstance().format(new Date()) + \"\\r\\n\",\n\t\t\t\tcellLogFilename);\n\t\tFileWriteBufferStr = \"\";\n\n\t}" ]
[ "0.625597", "0.60619307", "0.6002395", "0.5839531", "0.57723486", "0.56540096", "0.55500174", "0.5395963", "0.53956056", "0.52957606", "0.5275556", "0.52044", "0.5170772", "0.51363003", "0.51218456", "0.5109069", "0.5100732", "0.5090121", "0.5085098", "0.50686383", "0.50616133", "0.50454354", "0.5044686", "0.4982641", "0.49620458", "0.49609235", "0.49380055", "0.49342212", "0.49141768", "0.48975486", "0.48867065", "0.48750705", "0.48737803", "0.48737586", "0.48660362", "0.48455444", "0.48250052", "0.4808908", "0.48067862", "0.4795564", "0.47721457", "0.4771563", "0.47640544", "0.4761635", "0.4760691", "0.47604552", "0.4756608", "0.4753515", "0.47496012", "0.4748024", "0.47446588", "0.47438762", "0.47410363", "0.4737743", "0.47330156", "0.47091126", "0.47069225", "0.4702586", "0.47024542", "0.47005928", "0.46989092", "0.469207", "0.46804422", "0.46781835", "0.46748072", "0.466735", "0.46665567", "0.46641427", "0.4656127", "0.46304095", "0.46262127", "0.46210825", "0.46177807", "0.46110922", "0.46055448", "0.46010375", "0.46001256", "0.459438", "0.45891076", "0.4584505", "0.45766822", "0.4571172", "0.4569468", "0.45683467", "0.45576623", "0.45514742", "0.4544534", "0.45443416", "0.45408127", "0.45374793", "0.4536606", "0.45366013", "0.45364967", "0.45314407", "0.45294103", "0.4529265", "0.45196566", "0.45152754", "0.44939992", "0.4490904" ]
0.57019645
5
Get a checkpoint attribute.
public static <T> Optional<T> getCheckpointAttr(ICheckpointDao dao, String checkpointId, String fieldName, Class<T> clazz) { return getCheckpoint(dao, checkpointId, new Date()).getDataAttrOptional(fieldName, clazz); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Attribute getAttribute();", "public synchronized long getCheckpoint() {\n return globalCheckpoint;\n }", "java.lang.String getAttribute();", "String getAttribute();", "Object getAttribute(int attribute);", "com.google.protobuf.ByteString getAttributeBytes();", "public Checkpoint lastCheckpoint(){\n if(!checkpointRecordFile.exists()){\n return null;\n }\n return lastCheckpoint(rootDir);\n }", "public AttrCheck getAttrchk()\n {\n return this.attrchk;\n }", "public int getAttribute() {\n return Attribute;\n }", "Object getAttribute(String name);", "Object getAttribute(String name);", "Object getAttribute(String name);", "public File getFileForCheckpoint(Checkpoint checkpoint){\n return getFileForCheckpoint(checkpoint.getCheckpointNum());\n }", "public org.omg.uml.foundation.core.Attribute getAttribute();", "public Object getProperty(String attName);", "Object getAttribute( String attrName ) throws FileSystemException;", "@NonNull\n String getNecessaryAttribute();", "public String getAttribute() {\n return attribute;\n }", "public String getAttribute() {\n\t\treturn attribute;\n\t}", "public String getAttribute() {\n\t\treturn attribute;\n\t}", "Object getAttribute(String key);", "Object getAttribute(String key);", "public FactAttribute[] getAttribute() {\r\n return localAttribute;\r\n }", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Attrib getAttrib() {\r\n return attrib;\r\n }", "public Object getAttribute(String name);", "public final Object getAttribute(String attribute) {\r\n\t\tfor (String key:annotations.keySet()) {\r\n\t\t\tAnnotationDefinition defn = annotations.get(key);\r\n\t\t\tif (defn.getParams() != null && defn.getParams().containsKey(attribute))\r\n\t\t\t\treturn defn.getParams().get(attribute);\t\t\t\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "@Override\n\tpublic java.util.Date getCheckpoint() {\n\t\treturn _userSync.getCheckpoint();\n\t}", "public int getAtt(){ \r\n return att;\r\n }", "public String getAttribute(String name);", "public GenericAttribute getAttribute () {\n return attribute;\n }", "public Byte getByteAttribute();", "public int getAtt() {\n\t\treturn att;\n\t}", "public String attribute() {\n return this.attribute;\n }", "public final String attributeNameRef ()\r\n {\r\n return _value.xmlTreePath().attribute();\r\n }", "public String getAttr() {\n return attr;\n }", "public Integer getIntegerAttribute();", "@Override\n public int[] getAttributeIndexToRead()\n {\n java.util.ArrayList<Integer> attributes = new java.util.ArrayList<Integer>();\n //LN is static and read only once.\n if (LogicalName == null || LogicalName.compareTo(\"\") == 0)\n {\n attributes.add(1);\n }\n //ScalerUnit\n if (!isRead(3))\n {\n attributes.add(3);\n }\n //Value\n if (canRead(2))\n {\n attributes.add(2);\n } \n return toIntArray(attributes);\n }", "public Object getAttribute(Object key);", "public String getAttribute3() {\n return attribute3;\n }", "public String getNodeAttribute() {\n\treturn nodeAttribute;\n }", "public TLAttribute getAttribute(String attributeName);", "public Object attribute(String name) {\n return Classes.getFieldValue(this, name);\n }", "final public float getFloatAttr() {\r\n\t\t\tif(mName.length() == 0)\r\n\t\t\t\treturn -1;\r\n\t\t\tif(mSaveAttr == null)\r\n\t\t\t\treturn getAttr(mName).Value;\r\n\t\t\treturn mSaveAttr.Value;\r\n\t\t}", "RakudoObject get_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint);", "public String getAttribute3()\n {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }", "public String getRetentionFlag() {\n return (String) getAttributeInternal(RETENTIONFLAG);\n }", "public double get(int index) {\n\t\treturn attrs.getQuick(index);\n\t}", "public String toCheckpoint() {\n return null;\n }", "String attributeToGetter(String name);", "Object getAttribute(String key)\n throws ProcessingException;", "public String getLocalAttribute(String name) {\n\t\treturn localAttributes.get(name);\n\t}", "public String getModelXMLAttribute(String attrib_name) {\n\t\tassert attrib_name != null;\n\n\t\tif (modelnode != null) {\n\t\t\treturn getNodeAttributeValue(modelnode, attrib_name);\n\t\t}\n\t\treturn null;\n\t}", "public FactAttributes getAttributes() {\r\n return localAttributes;\r\n }", "public Attribute fetchAttributeById(int attribId);", "public Object getAttribute(Object key) {\n return getAttributes().get(key);\n }", "public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }", "public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }", "public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }", "public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }", "public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }", "public Number getIdx() {\n return (Number)getAttributeInternal(IDX);\n }", "public String getAttribute3() {\n return (String) getAttributeInternal(ATTRIBUTE3);\n }", "public double getReading() {\n return this.getDataRef().get();\n }", "public String getAttributeValue(Node node, String attributeName) throws Exception;", "public Integer getAttendPoint() {\n return attendPoint;\n }", "public String getIntAttribute3() {\n return (String) getAttributeInternal(INTATTRIBUTE3);\n }", "@Override\n\tpublic Serializable checkpointInfo() throws Exception {\n\t\treturn null;\n\t}", "RakudoObject get_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name);", "public Integer getBaselineForEarnedValue()\r\n {\r\n return (m_baselineForEarnedValue);\r\n }", "public String getattribut() \n\t{\n\t\treturn attribut;\n\t}", "public String getReadWriteAttribute();", "public Integer getdocverificationflag() {\n return (Integer) getAttributeInternal(DOCVERIFICATIONFLAG);\n }", "public AttributeFactElements getAttributeFactAccess() {\n\t\treturn pAttributeFact;\n\t}", "public synchronized Object getAttribute(String key) {\n return attributes.get(key);\n }", "public String getAttribute(String name) {\n return _getAttribute(name);\n }", "com.google.ads.googleads.v4.common.StoreAttribute getStoreAttribute();", "public long get() {\n return stamp;\n }", "@Override\n public ConfigurationNode getAttribute(int index)\n {\n return attributes.getNode(index);\n }", "public ByteArrayAttribute getValue() {\n return value;\n }", "Pair<String, String> getAdditionalAttribute();", "public SourceAttribute getSourceAttribute(int i){\n\t\tif(source==null){\n\t\t\t//no source predicate is associated with this pred\n\t\t\t//just return the variable name\n\t\t\treturn new SourceAttribute(getVars().get(i), \"string\", \"F\");\n\t\t}\n \treturn source.getAttr(i);\n }", "Property getProperty();", "Property getProperty();", "public double getReading() {\r\n\t\tresult = clicks;\r\n\t\tif(metric) result *= 0.2;\r\n\t\telse result *= 0.01;\r\n\t\treturn result;\r\n\t\t\r\n\t}", "public Boolean getCheckBox() {\n return (Boolean) getAttributeInternal(CHECKBOX);\n }", "public Attraction getCurrentAttractionInScope() {\n return currentAttractionInScope;\n }", "public String getLable () {\n return getString(ATTRIBUTE_LABEL);\n }", "public File getFileForCheckpoint(int checkpointNum) {\n return getFileForCheckpoint(rootDir, checkpointNum);\n }", "@Override\n public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException {\n if (attribute.equals(\"UpTime\")) {\n return upTime();\n }\n return null;\n }", "@Nonnull\n public final synchronized String getAttributeName() {\n return attributeName;\n }", "public String getActiveFlag() {\n return (String) getAttributeInternal(ACTIVEFLAG);\n }", "public message.Figure.FigureData.FigureProperty getProperty() {\n return property_;\n }", "public String getRetentionMFlag() {\n return (String) getAttributeInternal(RETENTIONMFLAG);\n }", "boolean getBinaryFileAttribute();", "public Integer getIdAttraction() {\r\n return idAttraction;\r\n }", "public HbAttributeInternal getAttribute(String name);", "public static Object getAttribute(String name) {\n\t\treturn GPortalExecutionContext.getRequest().getSessionContext().getAttribute(name);\n\t}", "public String getAttr3() {\n return attr3;\n }", "public String getAttr3() {\n return attr3;\n }", "public String getTransactionAttribute() {\n\treturn this.transactionAttribute;\n }" ]
[ "0.5782292", "0.57755405", "0.57046944", "0.563562", "0.55764633", "0.55328596", "0.54419947", "0.5397155", "0.5351826", "0.5305776", "0.5305776", "0.5305776", "0.5274622", "0.5249275", "0.52208424", "0.52167374", "0.5210022", "0.5156881", "0.51189065", "0.51189065", "0.51061904", "0.51061904", "0.50952595", "0.5082287", "0.50786585", "0.5040038", "0.50397384", "0.50049114", "0.4995553", "0.49949905", "0.49854758", "0.49821076", "0.49700296", "0.4950175", "0.49454507", "0.4943345", "0.4931735", "0.49217486", "0.48975515", "0.48465845", "0.48464605", "0.4846179", "0.4842496", "0.484227", "0.483518", "0.48317266", "0.4831265", "0.4825709", "0.48191538", "0.4804074", "0.47947702", "0.47937804", "0.47837016", "0.4778664", "0.47692156", "0.47593808", "0.47593808", "0.47593808", "0.47593808", "0.47593808", "0.47593093", "0.4756663", "0.47556046", "0.47538146", "0.47422335", "0.47410005", "0.4740915", "0.47344258", "0.47325826", "0.47298256", "0.4725963", "0.47215942", "0.47146058", "0.4698464", "0.46977627", "0.46965045", "0.46934232", "0.4689731", "0.4685699", "0.46766093", "0.46705154", "0.46698028", "0.46698028", "0.4651412", "0.46357024", "0.46343464", "0.46268874", "0.4622376", "0.46022472", "0.46017498", "0.46005943", "0.46002546", "0.45974448", "0.45946673", "0.45946157", "0.45941722", "0.4592505", "0.45901972", "0.45901972", "0.4583221" ]
0.6032079
0
TODO: check that number type includes integer type as described in the spec
@Test public void testNumberType() throws Exception { assertThat(0, is(0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }", "@Override\n public abstract JsonParser.NumberType numberType();", "public abstract Number getPrimitiveType();", "public void testInferNumber1a() throws Exception {\n assertType(\"10 \", 0, 2, \"java.lang.Integer\");\n }", "public Number getNumberValue();", "private\tNum(int num) { value = num; }", "void mo107677b(Integer num);", "@Override\n public JsonParser.NumberType numberType() {\n // most types non-numeric, so:\n return null;\n }", "long getNumericField();", "public int getNumericValue() {\n return value;\n }", "IntegerValue getValueObject();", "public boolean isInteger();", "public void handleIntValue(int type, int val) {\n\t\t\n\t}", "@Override\n public int intValue(int numId) {\n return 0;\n }", "NumberValue createNumberValue();", "@Override\n public double numValue(int numId) {\n return 0;\n }", "public Object visitIntegerConstant(GNode n) {\n xtc.type.Type result;\n \n result = cops.typeInteger(n.getString(0));\n \n return result.getConstant().bigIntValue().longValue();\n }", "long mo107678c(Integer num);", "private void valueOfInt(Instruction o, Type value){\n\t\tif (! value.equals(Type.INT))\n\t\t\t\tconstraintViolated(o, \"The 'value' is not of type int but of type \"+value+\".\");\n\t}", "Integer getValue();", "Integer getValue();", "public IntType asInt(){\n return TypeFactory.getIntType(this.toInt(this.getValue()));\n }", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "private double IntegerParseIn(double Precio) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic Type getType() {\n\t\treturn Type.INT_TYPE;\n\t}", "int getSimpleType() {\n\t\treturn ((type / 1000)) * 1000;\n\t}", "public T caseNumber(org.uis.lenguajegrafico.lenguajegrafico.Number object)\n {\n return null;\n }", "public void testInt2bi()\n {\n assertEquals( Util.int2bi(15), new BigInteger(\"15\") );\n assertEquals( Util.int2bi(new Integer(15)), new BigInteger(\"15\") );\n }", "public int getNumericValue() {\n return value;\n }", "public NumberP(ErrorTypesNumber error) { Error = error; }", "@Override\n\t\t\tpublic boolean test(Integer t) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\tpublic int getNumericCode() {\n\t\treturn 0;\n\t}", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "@Test\n public void intFromFloat() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.INT, new DecimalNode(new BigDecimal(\"-13.9\")));\n assertEquals(retVal, \"-13\");\n }", "@Override\n public IntType multiplyToInt(IntType multiplicand) {\n int intMultiplier = this.asInt().getValue();\n int intMultiplicand = multiplicand.getValue();\n return TypeFactory.getIntType(intMultiplicand * intMultiplier);\n }", "@Test\n public void intInvalidType() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.INT, new TextNode(\"-13\"));\n assertNull(retVal);\n }", "@RepeatedTest(20)\n void transformtoIntTest() {\n assertEquals(bi.transformtoInt(), new Int(bi.toInt(binary)));\n assertEquals(i.transformtoInt(),i);\n\n //Nulls\n assertEquals(f.transformtoInt(),Null);\n assertEquals(st.transformtoInt(),Null);\n assertEquals(bot.transformtoInt(),Null);\n assertEquals(bof.transformtoInt(),Null);\n assertEquals(Null.transformtoInt(),Null);\n }", "public interface Numeric extends DataType {\n}", "Astro leafInteger(Number integralData, SourceSpan optSpan);", "@Test\n public void testTypeOf() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst);\n Utils.testTypeOf(context, ConstraintType.TYPE_OF, cValue);\n cValue.release();\n }", "int intOf();", "Num\t\tgetNumValue();", "public abstract boolean isNumeric();", "@Test\n public void testParseInt() {\n IntegerSpec integerSpec = new IntegerSpec();\n integerSpec.setDefaultValue(0);\n dataTypeParser.setDataTypeSpec(integerSpec);\n dataTypeParser.parse();\n IntegerSpec parsedIntegerSpec = (IntegerSpec) dataTypeParser.getDataTypeSpec();\n\n assertNull(parsedIntegerSpec.getMinValue());\n assertNull(parsedIntegerSpec.getMaxValue());\n }", "private Object getTypeObjectPair() throws MathLinkException, NumberRangeException {\n Object result = null;\n int type = this.getInteger();\n if (type % -17 == -15) {\n type = -7 + -17 * (type / -17);\n } else if (type % -17 == -16) {\n type = -8 + -17 * (type / -17);\n }\n switch (type) {\n case -5: {\n result = new Integer(this.getInteger());\n break;\n }\n case -6: {\n result = new Long(this.getLongInteger());\n break;\n }\n case -4: {\n int i = this.getInteger();\n if (i < -32768 || i > 32767) {\n throw new NumberRangeException(i, \"short\");\n }\n result = new Short((short)i);\n break;\n }\n case -2: {\n int i = this.getInteger();\n if (i < -128 || i > 127) {\n throw new NumberRangeException(i, \"byte\");\n }\n result = new Byte((byte)i);\n break;\n }\n case -3: {\n int i = this.getInteger();\n if (i < 0 || i > 65535) {\n throw new NumberRangeException(i, \"char\");\n }\n result = new Character((char)i);\n break;\n }\n case -15: \n case -7: {\n double d = this.getDouble();\n if (d < -3.4028234663852886E38 || d > 3.4028234663852886E38) {\n throw new NumberRangeException(d, \"float\");\n }\n result = new Float((float)d);\n break;\n }\n case -16: \n case -8: {\n result = new Double(this.getDouble());\n break;\n }\n case -9: {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n result = this.getString();\n if (tok != 35 || !result.equals(\"Null\")) break;\n result = null;\n break;\n }\n case -1: {\n String s = this.getSymbol();\n if (s.equals(\"True\")) {\n result = Boolean.TRUE;\n break;\n }\n result = Boolean.FALSE;\n break;\n }\n case -13: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -10: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = new BigInteger((String)result);\n break;\n }\n result = new BigInteger(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -11: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = Utils.bigDecimalFromString((String)result);\n break;\n }\n result = Utils.bigDecimalFromString(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -12: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000 && (result = this.getObject()) != null) break;\n this.seekMark(mark);\n result = this.getExpr();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -14: {\n result = this.getObject();\n break;\n }\n case -10000: {\n break;\n }\n default: {\n int tok = this.getNext();\n result = tok == 100000 || tok == 35 ? this.getObject() : (type > -34 ? this.getArray(type - -17, 1) : (type > -51 ? this.getArray(type - -34, 2) : (type > -68 ? this.getArray(type - -51, 3) : (type > -85 ? this.getArray(type - -68, 4) : this.getArray(type - -85, 5)))));\n }\n }\n return result;\n }", "@Test\n public void test_column_type_detection_integer_02() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDint), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertTrue(info.isSigned());\n }", "public int intValue();", "public int castToIntegerValue() {\n throw new IteratorFlowException(\"Cannot call castToDouble on non numeric\");\n }", "public static Value makeAnyNum() {\n return theNumAny;\n }", "java.lang.String getNumber();", "java.lang.String getNumber();", "java.lang.String getNumber();", "public LlvmValue visit(IntegerType n){\n\t\treturn LlvmPrimitiveType.I32;\n\t}", "private Token number() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t}\n\t\t//处理小数\n\t\tif(this.currentChar == '.') {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t\t\n\t\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\t\tsb.append(this.currentChar);\n\t\t\t\tnext_char();\n\t\t\t}\n\t\t\treturn new Token(Type.REAL_CONST, sb.toString());\n\t\t}else {\n\t\t\treturn new Token(Type.INTEGER_CONST, sb.toString());\n\t\t}\n\t}", "public Class<?> getPrimitiveType();", "IntValue createIntValue();", "IntValue createIntValue();", "List<C45111a> mo107674a(Integer num);", "@Test\n public void test_column_type_detection_integer_01() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactoryExtra.intToNode(1234), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertTrue(info.isSigned());\n }", "private void processNumericModifier() {\n\n Token token = tokens.get(currentTokenPointer);\n\n if (currentVersionComponent == 3) {\n\n raiseParseProblem(\"cannot specify a numerical +/- value for the qualifier, found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n }\n\n String tokenString = string(token);\n\n try {\n\n Integer value = null;\n\n if (token.kind == TokenKind.PLUSNUMBER) {\n\n value = Integer.parseInt(tokenString.substring(1));\n\n } else {\n\n value = Integer.parseInt(tokenString);\n\n }\n\n pushIt(new SumTransformer(value));\n\n } catch (NumberFormatException nfe) {\n\n raiseParseProblem(\"cannot parse numerical value '\" + tokenString + \"' at position \" + token.start, token.start);\n\n }\n\n }", "void visitIntValue(IntValue value);", "@Test\n\tpublic void test_TCM__int_getIntValue() {\n final Attribute attribute = new Attribute(\"test\", \"\");\n int summand = 3;\n for(int i = 0; i < 28; i++) {\n summand <<= 1;\n final int value = Integer.MIN_VALUE + summand;\n\n attribute.setValue(\"\" + value);\n try {\n assertEquals(\"incorrect int conversion\", attribute.getIntValue(), value);\n } catch (final DataConversionException e) {\n fail(\"couldn't convert to int\");\n }\n }\n\n\t\t//test an invalid int\n TCM__int_getIntValue_invalidInt(\"\" + Long.MIN_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Long.MAX_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Float.MIN_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Float.MAX_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Double.MIN_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Double.MAX_VALUE);\n\t}", "@Test\n public void test_column_type_detection_integer_03() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDlong), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertTrue(info.isSigned());\n }", "int intValue();", "public NumberToNumber(Class<T> targetType)\r\n/* 21: */ {\r\n/* 22:52 */ this.targetType = targetType;\r\n/* 23: */ }", "public interface NumberLatticeElement extends MiddleCandidateLatticeElement<NumberLatticeElement>, Coercible {\n NumberLatticeElement bottom = new BottomNumberLatticeElementImpl();\n NumberLatticeElement top = new TopNumberLatticeElementImpl();\n NumberLatticeElement uIntTop = new UIntTopNumberLatticeElementImpl();\n NumberLatticeElement notUIntTop = new NotUIntTopNumberLatticeElementImpl();\n static NumberLatticeElement generateNumberLatticeElement(Number i){\n if(i.doubleValue() == i.intValue() && i.intValue() >= 0){\n return new UIntNumberLatticeElementImpl(i.intValue());\n }\n return new NotUIntNumberLatticeElementImpl(i);\n }\n\n static Number parseNumberString(String text){\n if(text.matches(\"^(([-+]?[1-9][0-9]*)|0)$\")){\n return Integer.parseInt(text);\n }\n\n if(text.matches(\"^([+-]?(0[xX][0-9a-fA-F]+))$\")){\n return Long.decode(text);\n }\n\n if(text.matches(\"^([+-]?(0[0-7]+)$)\")){\n return Long.decode(text);\n }\n\n if(text.matches(\"^([+-](0b[01]+))$\")) {\n return Integer.parseInt(text.substring(3), 2);\n }\n if(text.matches(\"^(0b[01]+)$\")){\n return Integer.parseInt(text.substring(2), 2);\n }\n\n if(text.matches(\"^([+-]?(([0-9]*[\\\\.][0-9]+)|([0-9]+[\\\\.][0-9]*)))$\")){\n return Double.parseDouble(text);\n }\n\n if(text.matches(\"^([+-]?(([0-9]+|([0-9]*[\\\\.][0-9]+)|([0-9]+[\\\\.][0-9]*))[eE][+-]?[0-9]+))$\")){\n return Double.valueOf(text).longValue();\n }\n return null;\n }\n\n NumberLatticeElement increment();\n NumberLatticeElement decrement();\n\n NumberLatticeElement add(NumberLatticeElement other);\n\n NumberLatticeElement subtract(NumberLatticeElement other);\n\n NumberLatticeElement multiply(NumberLatticeElement other);\n\n ValueLatticeElement divide(NumberLatticeElement other);\n\n ValueLatticeElement modulo(NumberLatticeElement other);\n\n NumberLatticeElement exponent(NumberLatticeElement other);\n\n BooleanLatticeElement equalOperation(NumberLatticeElement other);\n\n BooleanLatticeElement notEqual(NumberLatticeElement other);\n\n BooleanLatticeElement greaterThan(NumberLatticeElement other);\n\n BooleanLatticeElement lessThan(NumberLatticeElement other);\n\n BooleanLatticeElement greaterThanOrEqual(NumberLatticeElement other);\n\n BooleanLatticeElement lessThanOrEqual(NumberLatticeElement numberLatticeElement);\n\n NumberLatticeElement minus();\n}", "@Test\n void shouldReturnPrimitiveTypeOnly() {\n assertThat(TypeVisitor.gatherAllTypes(int.class), contains(int.class));\n assertThat(TypeVisitor.gatherAllTypes(double.class), contains(double.class));\n assertThat(TypeVisitor.gatherAllTypes(char.class), contains(char.class));\n }", "private static Number transform(Object value) {\n\t\tif (value == null) {\n\t\t\treturn Integer.valueOf(0);\n\t\t}\n\t\tif (value instanceof String) {\n\t\t\ttry {\n\t\t\t\treturn Integer.parseInt((String)value);\n\t\t\t} catch(NumberFormatException ex) {\n\t\t\t\ttry {\n\t\t\t\t\treturn Double.parseDouble((String)value);\n\t\t\t\t} catch (NumberFormatException ex2) {\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"String \" + value + \" cannot be interpreted as a number\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!(value instanceof Double || value instanceof Integer)) {\n\t\t\tthrow new RuntimeException(value.toString() + \" cannot be interpreted as a number.\");\n\t\t}\n\t\treturn (Number)value;\n\t}", "private static int m6082a(Class<?> cls) {\n if (cls == Double.TYPE) {\n return 1;\n }\n if (cls == Float.TYPE) {\n return 2;\n }\n if (cls == Long.TYPE) {\n return 3;\n }\n if (cls == Integer.TYPE) {\n return 4;\n }\n if (cls == Short.TYPE) {\n return 5;\n }\n if (cls == Character.TYPE) {\n return 6;\n }\n if (cls == Byte.TYPE) {\n return 7;\n }\n if (cls == Boolean.TYPE) {\n return 99;\n }\n return 8;\n }", "public boolean isInteger() {\n return false;\n }", "@Test\n public void test_column_type_detection_integer_04() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDunsignedInt), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertFalse(info.isSigned());\n }", "@Test\n public void test_column_type_detection_integer_06() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDshort), true, Types.INTEGER, Integer.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertTrue(info.isSigned());\n }", "com.google.protobuf.ByteString getNumberBytes();", "@Override\n\tpublic Class<Number> getAcceptedBinClass () {\n\t\treturn Number.class;\n\t}", "public Class<?> getType()\r\n {\r\n return Integer.class;\r\n }", "@Override\n\tpublic Type visit(TLANumber tlaNumber) throws RuntimeException {\n\t\tif (tlaNumber.getVal().contains(\".\")) {\n\t\t\treturn new RealType(Collections.singletonList(tlaNumber));\n\t\t}\n\t\treturn TLABuiltins.getPolymorphicNumberType(tlaNumber, solver, generator);\n\t}", "public static void main(String[] args) {\n byte byteValue = 20;\n\n\n // 16 bits\n short shortValue = 55;\n\n // 32 bits\n int intValue = 888;\n\n //\n long longValue = 23355;\n\n // need the f after a decimal to make it\n // read as a float\n float floatValue = 8834.8f;\n float floatValue2 = (float)99.3;\n\n // greater precision then float\n double doubleValue = 32.4;\n\n System.out.println(Byte.MAX_VALUE);\n\n\n intValue = (int)longValue;\n\n System.out.println(intValue);\n\n doubleValue = intValue;\n System.out.println(doubleValue);\n\n // chopped off the end so the point 8 is gone\n // not rounded either -- need Math.Rnd for for tht\n intValue = (int)floatValue;\n System.out.println(intValue);\n\n\n\n // The following won't work as we expect it to!!\n // 128 is too big for a byte.\n // Make sure your casting something into in\n // a vslue it will fit in!! Or else\n // you got weird results\n byteValue = (byte)128;\n System.out.println(byteValue);\n\n\n // You cant convert a String to an int or back again\n /// these videos are old though and from Java 7\n // I kknw aboout String.valueOf() would convert just about\n // anything I knw there are Double.valueOf()\n // or parseDouble()?? not sure which its called or\n // if its both but ill add them later\n\n\n System.out.println(\"////////// MY CODE //////////////////////\");\n\n System.out.println(\"\\nByte min value: \" + Byte.MIN_VALUE +\n \"\\nByte max value: \" + Byte.MAX_VALUE);\n\n\n System.out.println(\"\\nShort min value: \" + Short.MIN_VALUE +\n \"\\nShort max value: \" + Short.MAX_VALUE);\n\n\n System.out.println(\"\\nInt min value: \" + Integer.MIN_VALUE +\n \"\\nInt max value: \" + Integer.MAX_VALUE);\n\n\n System.out.println(\"\\nLong min value: \" + Long.MIN_VALUE +\n \"\\nLong max value: \" + Long.MAX_VALUE);\n\n\n System.out.println(\"\\nFloat min value: \" + Float.MIN_VALUE +\n \"\\nFloat max value: \" + Float.MAX_VALUE);\n\n System.out.println(\"\\nDouble min value: \" + Double.MIN_VALUE +\n \"\\nDouble max value: \" + Double.MAX_VALUE);\n\n\n\n\n\n\n }", "public static Integer toInteger(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case BOOLEAN:\n if (((Boolean)o) == true) {\n return Integer.valueOf(1);\n } else {\n return Integer.valueOf(0);\n }\n\n case BYTE:\n return Integer.valueOf(((Byte)o).intValue());\n\n case INTEGER:\n return (Integer)o;\n\n case LONG:\n return Integer.valueOf(((Long)o).intValue());\n\n case FLOAT:\n return Integer.valueOf(((Float)o).intValue());\n\n case DOUBLE:\n return Integer.valueOf(((Double)o).intValue());\n\n case BYTEARRAY:\n return Integer.valueOf(((DataByteArray)o).toString());\n\n case CHARARRAY:\n return Integer.valueOf((String)o);\n\n case BIGINTEGER:\n return Integer.valueOf(((BigInteger)o).intValue());\n\n case BIGDECIMAL:\n return Integer.valueOf(((BigDecimal)o).intValue());\n\n case NULL:\n return null;\n\n case DATETIME:\n return Integer.valueOf(Long.valueOf(((DateTime)o).getMillis()).intValue());\n\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to an Integer\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Integer.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Integer.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n }", "default int asInt() {\n\t\tthrow new EvaluatorException(\"Expecting an integer value\");\n\t}", "public interface CalcPrimitive<T extends Number> {\n\t/**\n\t * Basic arithmetic operation which adds two numbers\n\t * \n\t * @param first\n\t * the addition operand\n\t * @param second\n\t * the addition operand\n\t * @return first + second\n\t */\n\tpublic T sum(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which subtracts two numbers\n\t * \n\t * @param first\n\t * the subtraction operand\n\t * @param second\n\t * the subtraction operand\n\t * @return first - second\n\t */\n\tpublic T sub(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which multiplies two numbers\n\t * \n\t * @param first\n\t * the multiplication operand\n\t * @param second\n\t * the multiplication operand\n\t * @return first * second\n\t */\n\tpublic T mul(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which divides two numbers\n\t * \n\t * @param first\n\t * the division operand\n\t * @param second\n\t * the division operand\n\t * @return first / second\n\t */\n\tpublic T div(T first, T second);\n\n\t/**\n\t * Basic operation which calculates the cosine of the value\n\t * \n\t * @param value\n\t * the operand of the cosine function in radians\n\t * @return the cosine of the value\n\t */\n\tpublic T cos(T value);\n\n\t/**\n\t * Basic operation which calculates the (value)^e\n\t * \n\t * @param value\n\t * the operand of the calculation\n\t * @return (value)^e\n\t */\n\tpublic T exp(T value);\n\n\t/**\n\t * Basic operation which calculates the square root of a value.\n\t * \n\t * @param value\n\t * the operand of the square root function\n\t * @return the square root of value\n\t */\n\tpublic T sqrt(T value);\n\n\t/**\n\t * Convert a String to a T value\n\t * \n\t * @param str\n\t * a String for converting\n\t * @return the value of the specified String as a T\n\t * @throws NumberFormatException\n\t * when str is incorrect\n\t */\n\tpublic T getFromString(String str) throws NumberFormatException;\n\n\t/**\n\t * Check a String on a possibility of converting\n\t * \n\t * @param str\n\t * a String for check\n\t * @return true for correct str and false for incorrect\n\t */\n\tpublic boolean isCorrect(String str);\n\n\t/**\n\t * Convert a T value to a String\n\t * \n\t * @param value\n\t * a T object to converting\n\t * @return the value of the specified number as a String\n\t */\n\tpublic String getString(T value);\n}", "public String get_integer_part();", "public int getNumberValue() {\r\n return number;\r\n }", "public Object accept(Visitor v) {\n\t\treturn v.visitIntegerType(this);\n\t}", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default int asInt() {\n \n return notSupportedCast(BasicTypeID.INT);\n }", "default T handleNumber(double val) {\n throw new UnsupportedOperationException();\n }", "public Number(final T theVal)\n {\n if (theVal instanceof Integer) {\n myInt = (Integer) theVal;\n isInt = true;\n } else if (theVal instanceof Double) {\n myDouble = (Double) theVal;\n isDouble = true;\n } else if (theVal instanceof Float) {\n myFloat = (Float) theVal;\n isFloat = true;\n } else if (theVal instanceof Long) {\n myLong = (Long) theVal;\n isLong = true;\n }\n }", "@Override\r\n public Element toNumber(int numberType, Ring ring) {\r\n if (numberType == numbElementType()) { return this;}\r\n if (numberType >= Ring.Complex) { \r\n numberType = numberType ^ Ring.Complex;}\r\n return new Complex(re.toNumber(numberType, ring), im.toNumber(numberType, ring));\r\n }" ]
[ "0.6835378", "0.6733985", "0.6704735", "0.6599687", "0.6559749", "0.6394041", "0.6367362", "0.63434064", "0.6270825", "0.6262801", "0.62446463", "0.62384886", "0.62324363", "0.62241834", "0.6216717", "0.616922", "0.61556137", "0.6127949", "0.6124302", "0.6122745", "0.6122745", "0.608646", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.6057403", "0.605482", "0.60547614", "0.59973466", "0.5995936", "0.5990979", "0.59608775", "0.5938992", "0.5937542", "0.59282446", "0.59196293", "0.59196293", "0.5909119", "0.5902445", "0.58921635", "0.5876623", "0.5864299", "0.58632916", "0.5848253", "0.58376235", "0.58224946", "0.58180296", "0.5814067", "0.57976985", "0.5794334", "0.5782672", "0.5779922", "0.5779545", "0.5768534", "0.5768534", "0.5768534", "0.57606864", "0.57543236", "0.5754287", "0.57407016", "0.57407016", "0.5728016", "0.57235056", "0.57139885", "0.5709571", "0.57086134", "0.5699745", "0.56986105", "0.56948555", "0.5693291", "0.5687368", "0.5687246", "0.56764793", "0.5673055", "0.5665265", "0.5662015", "0.56605166", "0.5655316", "0.5650267", "0.5641504", "0.56381696", "0.56351525", "0.5635132", "0.5627166", "0.56112134", "0.5604791", "0.5601667", "0.5601178", "0.55918795", "0.55885595", "0.5585893" ]
0.6338994
8
Coleccion de enemigos a salir en el nivel
public Horda(int q, Mapa m) { for(int i = 0; i < q; i++) { Celda c = new Celda(10, i); Enemigo e = new Enemigo1(10, i, m); c.SetObjetoActual(e); m.AgregarEnemigo(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void subirDeNivel(int n) //A cada 100 de xp, sobe de nivel\n {\n this.nivel = nivel + n;\n }", "public void subirNivelAtaque(){\n\tif(contadorNivel==5){\n\t nivelAtaque++;\n\t System.out.println(\"El ataque \"+obtenerNombreAtaque()+\" ha subido de nivel\");\n\t contadorNivel=0;\n\t dano+=5;\n\t} else {\n\t nivelAtaque=nivelAtaque;\n\t}\n }", "@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }", "public void verificarNivel (int nivel) {\n this.nivelUsuario = nivel;\n }", "public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }", "private void añadirEnemigo() {\n\t\t\n\t\tif(enemigo.isVivo()==false){\n\t\t\tint k;\n\t\t\tk = (int)(Math.random()*1000)+1;\n\t\t\tif(k<=200){\n\t\t\t\tif(this.puntuacion<10000){\n\t\t\t\t\tenemigo.setTipo(0);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tenemigo.setTipo(1);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void siguienteNivel(){ \n\t\tnivel++;\n\t\tcontador = 0;\n\t\tcontadorE = 0;\n\t\treiniciar = false;\n\t\t\n\t\tnumDisparos=0; \n\t\tpausa=false;\n\t\tdisparando=false;\n\t\t\n\t\tif(nivel<9){\n\t\t\tasteroides =new Asteroide [(2+(nivel*2)) *(int)Math.pow(astNumDivision,astNumDisparos-1)+1];\n\t\t\tnumAsteroides = 2+(nivel*2);\n\t\t}\n\t\telse{\n\t\t\tasteroides =new Asteroide [12 *(int)Math.pow(astNumDivision,astNumDisparos-1)+1];\n\t\t\tnumAsteroides = 12;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<numAsteroides;i++){\n\t\t\tasteroides[i]=new Asteroide(this, Math.random()*this.getWidth(), Math.random()*this.getHeight(), \n\t\t\t\t\tastRadio,minAstVel, maxAstVel, astNumDisparos, astNumDivision, 1);\n\t\t}\n\t}", "public void imprimirNivelSuperior(){\n\t\tmodCons.imprimirNivelSuperior();\n\t}", "@Override\n public int getSalida() {\n return 0;\n }", "public void Nivel(Nodo nodo){\r\n\t\tif(cont<(int)Math.pow(2,base)){\r\n\t\t\tnodo.setNivel(nivel);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnivel++;\r\n\t\t\tbase++;\r\n\t\t\tnodo.setNivel(nivel);\r\n\t\t}\r\n\t}", "void modificarSaldo(int cantidad){\n this.saldo = this.saldo + cantidad;\n }", "private void salvar() {\n setaCidadeBean();\n //Instanciamos o DAO\n CidadeDAO dao = new CidadeDAO();\n //verifica qual será a operação de peristência a ser realizada\n if (operacao == 1) {\n dao.inserir(cidadeBean);\n }\n if (operacao == 2) {\n dao.alterar(cidadeBean);\n }\n habilitaBotoesParaEdicao(false);\n reiniciaTela();\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "@Override\n public int nivel() {\n return this.altura() - 1;\n }", "private void inicializarPartida(int nivel) {\r\n\t\tif(nivel == PRINCIPIANTE) {\r\n\t\t\tcasillas = new Casilla [FILAS_PRINCIPIANTE] [COLUMNAS_PRINCIPIANTE];\r\n\t\t\tcantidadMinas = CANTIDAD_MINAS_PRINCIPANTE;\r\n\t\t\t\r\n\t\t}\r\n\t\tif(nivel == INTERMEDIO) {\r\n\t\t\tcasillas = new Casilla [FILAS_INTERMEDIO] [COLUMNAS_INTERMEDIO];\r\n\t\t\tcantidadMinas = CANTIDAD_MINAS_INTERMEDIO;\r\n\t\t}\r\n\t\tif(nivel == EXPERTO) {\r\n\t\t\tcasillas = new Casilla [FILAS_EXPERTO] [COLUMNAS_EXPERTO] ;\r\n\t\t\tcantidadMinas = CANTIDAD_MINAS_EXPERTO;\r\n\t\t\t\r\n\t\t}\r\n\t}", "public long obtenerNoSalida() throws GenericPersistenceEAOException;", "public void setNivel (int nivel)\r\n\t{\r\n\t\tthis.nivel = nivel;\r\n\t}", "@Override\n public void buildNivel(int nivel) {\n \n if(nivel < 6)\n this.personaje.setNivel(nivel);\n }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "@Override\n void procesarSalida(Simulacion s, Evento e) {\n e.consulta.estadistEjec_Sentencias.tiempoSalidaModulo = e.tiempo;\n e.consulta.estadistEjec_Sentencias.tiempoEnModulo = e.tiempo - e.consulta.estadistEjec_Sentencias.tiempoLlegadaModulo;\n Evento evento = new Evento(e.consulta);\n evento.tipoE = Evento.TipoEvento.ENTRADA;\n evento.modulo = Evento.TipoModulo.ADM_CONEXIONES;\n evento.tiempo = e.tiempo;\n numServOcupados--;\n s.listaE.add(evento);\n\n if (!colaC.isEmpty()) { //Si despues de una salida hay algo en cola\n Consulta consulta = colaC.remove();\n consulta.estadistEjec_Sentencias.tiempoSalidaCola = e.tiempo - consulta.estadistEjec_Sentencias.tiempoLlegadaModulo;\n s.estadisticasT.promedioColaES += colaC.size();\n Evento eventoS = new Evento(consulta);\n eventoS.tipoE = Evento.TipoEvento.SALIDA;\n eventoS.modulo = Evento.TipoModulo.EJEC_SENTENCIAS;\n ejecucionSentencia(consulta);\n eventoS.tiempo = e.tiempo + tiempoEjecucion;\n s.listaE.add(eventoS);\n numServOcupados++;\n }\n\n }", "@Override\r\n public Resultado salvar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"SALVAR\");\r\n //chamando DAO em caso de todas as validações atendidas\r\n if (msg.isEmpty()) {\r\n IDAO dao = daos.get(nmClass);\r\n dao.salvar(entidade);\r\n resultado.setMsg(\"Dados salvos no Banco de Dados\");\r\n List<EntidadeDominio> entidades = new ArrayList<>();\r\n entidades.add(entidade);\r\n resultado.setEntidades(entidades);\r\n // retornando msg de falha de validação sem poder acessar o DAO\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "public int gradoSalida() {\n \t//crear e inicializar el array de contadores\n \tint[] cont = new int[numV];\n \tfor(int i = 0; i<numV; i++) {\n \t\t//actualizar el contador de grados con la talla de cada elemento del array \n \t\tListaConPI<Adyacente> v = elArray[i];\n \t\tcont[i] = v.talla();\n \t}\n \treturn maximo(cont);\n }", "public void setNivel(String nivel)\r\n/* 254: */ {\r\n/* 255:282 */ this.nivel = nivel;\r\n/* 256: */ }", "public void setNivel(int nivel) {\n this.nivel = nivel;\n }", "public int getSistemaSalud() {\r\n\t\treturn sistemaSalud;\r\n\t}", "public void salvar() throws Exception {\n if(stb == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n // Restrição provisória para aumentar a performance do programa\n if(stb.getIdSubTipoBanca() != -1)\n return;\n\n // Primeiro verifica se existe o subtipo de banca\n Transacao.consultar(\"SELECT idSubTipoBanca FROM subTipoBanca WHERE nome LIKE '\"+ stb.getNome() +\"'\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"idSubTipoBanca\"));\n\n String sql = \"\";\n\n if(stb.getIdSubTipoBanca() == -1)\n sql = \"INSERT INTO subTipoBanca VALUES(null, '\"+ stb.getNome() +\"')\";\n else\n sql = \"UPDATE subTipoBanca SET nome = '\"+ stb.getNome() +\"' WHERE idSubTipoBanca = \" + stb.getIdSubTipoBanca();\n\n \n Transacao.executar(sql);\n \n // Se foi uma inserção, deve trazer o id do subtipo para o objeto\n if(stb.getIdSubTipoBanca() == -1){\n Transacao.consultar(\"SELECT LAST_INSERT_ID() AS ultimo_id\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"ultimo_id\"));\n }\n }", "public void salvarFornecedor()\r\n {\r\n /*\r\n * Implementação da lógica de salvar um fornecedor. Tratando as\r\n * mensagens conforme solicitado no desafio 1\r\n */\r\n try\r\n {\r\n fornecedorBusiness.salvarFornecedor(fornecedorResource);\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_INFO, \"Fornecedor Adicionado com Sucesso!\", \"\"));\r\n } catch (RuntimeException e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), \"\"));\r\n }\r\n }", "@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }", "@Override\n\tpublic void salir() {\n\t\t\n\t}", "public Integer minerar(int nivelAldeao) {\n\n\t\treturn Utils.calculaOuro(nivelAldeao);\n\t}", "public void salvarNoBanco() {\n\n try {\n ofertaDisciplinaFacade.save(oferta);\n// JsfUtil.addSuccessMessage(\"Pessoa \" + pessoa.getNome() + \" criado com sucesso!\");\n oferta= null;\n// recriarModelo();\n } catch (Exception e) {\n JsfUtil.addErrorMessage(e, \"Ocorreu um erro de persistência\");\n }\n }", "public void setNivel(int nivel) {\n\t\tthis.nivel = nivel;\n\t}", "@Override\r\n\tpublic Sexo salvar(Sexo entidade) throws Exception {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void salvar(Registro registro) {\n\t\t\r\n\t}", "@Override\n public void buildHabilidadSecundaria(int tipo) {\n \n String habilidad;\n \n habilidad = switch (tipo) {\n case 1 -> \"Burbuja\";\n case 2 -> \"Corriente marina\";\n case 3 -> \"Compresion\";\n default -> \"Tsunami\";\n };\n \n this.personaje.setHabilidadSecundaria(habilidad);\n }", "public int getNivel() {\n return this.nivel;\n }", "@Override\n public void salvar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n if(paciente.getIdPaciente() == 0){\n em.persist(paciente);\n }else{\n em.merge(paciente);\n }\n em.getTransaction().commit();\n em.close();\n factory.close();\n }", "public void salvarAluno() {\n \n this.aluno.setName(nome);\n this.aluno.setEmail(email);\n this.aluno.setSenha(senha);\n\n try {\n \n this.alunoServico.persistence(this.aluno);\n \n } catch (CadastroUsuarioException ex) {\n \n //Precisa tratar aqui!\n }\n \n setNome(null);\n setEmail(null);\n setSenha(null);\n\n }", "@Override\n public void setExperiencia(){\n experiencia1=Math.random()*50*nivel;\n experiencia=experiencia+experiencia1;\n subida();\n }", "public boolean salvarVeiculo(Veiculo veiculo){\n\t\treturn veiculoDAO.persist(veiculo);\n\t\t\n\t}", "public void salvarProfessor(){\n \n this.professor.setName(nome);\n this.professor.setEmail(email);\n this.professor.setSenha(senha);\n\n try {\n \n this.professorServico.persistence(this.professor);\n \n } catch (CadastroUsuarioException ex) {\n \n //Precisa tratar aqui!\n }\n \n setNome(null);\n setEmail(null);\n setSenha(null);\n }", "public void insercionMasiva() {\r\n\t\tif (!precondInsert())\r\n\t\t\treturn;\r\n\t\tUploadItem fileItem = seleccionUtilFormController.crearUploadItem(\r\n\t\t\t\tfName, uFile.length, cType, uFile);\r\n\t\ttry {\r\n\t\t\tlLineasArch = FileUtils.readLines(fileItem.getFile(), \"ISO-8859-1\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Error al subir el archivo\");\r\n\t\t}\r\n\r\n\t\tStringBuilder cadenaSalida = new StringBuilder();\r\n\t\tString estado = \"EXITO\";\r\n\t\tcantidadLineas = 0;\r\n\t\t//Ciclo para contar la cantdad de adjudicados o seleccionados que se reciben\r\n\t\tfor (String linea : lLineasArch) {\r\n\t\t\tcantidadLineas++;\r\n\t\t\tif(cantidadLineas > 1){\r\n\t\t\t\tseleccionados++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Condicion para verificar si la cantidad de seleccionados es mayor a la cantidad de vacancias (en cuyo caso se procede a abortar el proceso e imprimir\r\n\t\t//un mensaje de error) o verificar si esta es menor (se imprime el mensaje pero se continua)\r\n\t\t\r\n\t\tif(seleccionados > concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\testado = \"FRACASO\";\r\n\t\t\tcadenaSalida.append(estado + \" - CANTIDAD DE AJUDICADOS ES SUPERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\telse if(seleccionados < concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\tcadenaSalida.append(\"ADVERTENCIA - CANTIDAD DE ADJUDICADOS ES INFERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\tseleccionados = 0;\r\n\t\t\r\n\t\tif(!estado.equals(\"FRACASO\")){\r\n\r\n\t\tcantidadLineas = 0;\r\n\t\tfor (String linea : lLineasArch) {\r\n\r\n\t\t\tcantidadLineas++;\r\n\t\t\testado = \"EXITO\";\r\n\t\t\tString observacion = \"\";\r\n\t\t\tFilaPostulante fp = new FilaPostulante(linea);\r\n\t\t\tList<Persona> lista = null;\r\n\t\t\tif (cantidadLineas > 1 && fp != null && fp.valido) {\r\n\t\t\t\t//Verifica si la persona leida en el registro del archivo CSV existe en la Tabla Persona\r\n\t\t\t\tString sqlPersona = \"select * from general.persona where persona.documento_identidad = '\"+fp.getDocumento()+ \"'\";\r\n\t\t\t\tQuery q1 = em.createNativeQuery(sqlPersona, Persona.class);\r\n\t\t\t\tPersona personaLocal = new Persona();\r\n\t\t\t\tint banderaEncontroPersonas = 0;\r\n\t\t\t\t//Si existe, se almacena el registro de la tabla\r\n\t\t\t\tif(!q1.getResultList().isEmpty()){\r\n\t\t\t\t\tlista = q1.getResultList();\r\n\t\t\t\t\tif (compararNomApe(lista.get(0).getNombres(), removeCadenasEspeciales(fp.getNombres()))\r\n\t\t\t\t\t\t\t&& compararNomApe(lista.get(0).getApellidos(), removeCadenasEspeciales(fp.getApellidos())) ) {\r\n\t\t\t\t\t\t\tbanderaEncontroPersonas = 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\t\tobservacion += \" PERSONA NO REGISTRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\tobservacion += \" PERSONA NO REGITRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t}\r\n\t\t\t\t//Verificamos que la persona figure en la lista corta como seleccionado\r\n\t\t\t\tif(!estado.equals(\"FRACASO\")){\r\n\t\t\t\t\tint banderaExisteEnListaCorta = 0;\t\t\t\t\t\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tif (banderaEncontroPersonas == 1) {\r\n\t\t\t\t\t\twhile(i<lista.size()){\r\n\t\t\t\t\t\t\tpersonaLocal = (Persona) lista.get(i);\r\n\t\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\t\tList<EvalReferencialPostulante> listaEvalRefPost = p.getResultList();\r\n\t\t\t\t\t\t\tif (!listaEvalRefPost.isEmpty()) {\r\n\t\t\t\t\t\t\t\tbanderaExisteEnListaCorta = 1;\r\n\t\t\t\t\t\t\t\ti = lista.size();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (banderaExisteEnListaCorta == 0) {\r\n\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\tobservacion += \" NO SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t} else if (banderaExisteEnListaCorta == 1){\r\n\t\t\t\t\t\tobservacion += \" SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\tEvalReferencialPostulante auxEvalReferencialPostulante = (EvalReferencialPostulante) p.getResultList().get(0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validaciones para actualizaciones\r\n\t\t\t\t\t\t//Bandera indicadora de actualizaciones hechas\r\n\t\t\t\t\t\tint bandera = 0;\r\n\t\t\t\t\t\tif(auxEvalReferencialPostulante.getSelAdjudicado() == null){\r\n\t\t\t\t\t\t\testado = \"EXITO\";\r\n\t\t\t\t\t\t\tauxEvalReferencialPostulante.setSelAdjudicado(true);;\r\n\t\t\t\t\t\t\tbandera = 1;\r\n\t\t\t\t\t\t\tem.merge(auxEvalReferencialPostulante);\r\n\t\t\t\t\t\t\tem.flush();\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\tagregarEstadoMotivo(linea, estado, observacion, cadenaSalida);\r\n\t\t\t}\r\n\t\t\tif (cantidadLineas > 1 && !fp.valido) {\r\n\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\tcadenaSalida\r\n\t\t\t\t\t\t.append(estado\r\n\t\t\t\t\t\t\t\t+ \" - ARCHIVO INGRESADO CON MENOS CAMPOS DE LOS NECESARIOS. DATOS INCORRECTOS EN ALGUNA COLUMNA.\");\r\n\t\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\r\n\t\t\t// FIN FOR\r\n\t\t}\r\n\t\t//FIN IF\r\n\t\t}\r\n\t\tif (lLineasArch.isEmpty()) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Archivo inválido\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\r\n\t\t\tString nArchivo = sdf2.format(new Date()) + \"_\" + fName;\r\n\t\t\tString direccion = System.getProperty(\"jboss.home.dir\") + System.getProperty(\"file.separator\") + \"temp\" + System.getProperty(\"file.separator\");\r\n\t\t\tFile archSalida = new File(direccion + nArchivo);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileUtils\r\n\t\t\t\t\t\t.writeStringToFile(archSalida, cadenaSalida.toString());\r\n\t\t\t\tif (archSalida.length() > 0) {\r\n\t\t\t\t\tstatusMessages.add(Severity.INFO, \"Insercion Exitosa\");\r\n\t\t\t\t}\r\n\t\t\t\tJasperReportUtils.respondFile(archSalida, nArchivo, false,\r\n\t\t\t\t\t\t\"application/vnd.ms-excel\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstatusMessages.add(Severity.ERROR, \"IOException\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void encerrarSistema() {\r\n\t\tthis.salvarXML();\r\n\t}", "public void verSesionAdministrador(Administrador actualadmin)\r\n\t{\r\n\t\tSesion sesio = new Sesion();\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tString fechasesion = calendario.get(Calendar.YEAR)+\"-\"+(calendario.get(Calendar.MONTH)+1)+\"-\"+calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString horainicial = calendario.get(Calendar.HOUR_OF_DAY)+\":\"+calendario.get(Calendar.MINUTE)+\":\"+calendario.get(Calendar.SECOND);\r\n\t\tsesio.setFechasesion(fechasesion);\r\n\t\tsesio.setHorainicial(horainicial);\r\n\t\tsesio.setHorafinal(\"NULL\");\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tSesionBD.insertar(sesio, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tSesion sesioningr = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tsesioningr = SesionBD.buscarFechaHora(fechasesion, horainicial, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(sesioningr != null)\r\n\t\t{\r\n\t\t\tSesionAdministrador nuevasesion = new SesionAdministrador();\r\n\t\t\tnuevasesion.setIdsesion(sesioningr.getIdsesion());\r\n\t\t\tnuevasesion.setIdadministrador(actualadmin.getIdadmin());\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conector = new Conector();\r\n\t\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\t\tSesionAdministradorBD.insertar(nuevasesion, conector);\r\n\t\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tsesionadministrador = new SesionAdministradorI(this, actualadmin, sesioningr);\r\n\t\t\t\tsesionadministrador.setVisible(true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getNivel() {\n\t\treturn nivel;\n\t}", "public int getNivel() {\n\t\treturn nivel;\n\t}", "public EncabezadoRespuesta salidaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"salidaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.salidaAsistencia(uid, asistencia);\n\t\t} catch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"salidaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"salidaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"salidaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "public void asignarClase(int clase);", "@Override\n public void salvar(EntidadeDominio entidade) throws SQLException\n {\n\t\n }", "public logicaEnemigos(){\n\t\t//le damos una velocidad inicial al enemigo\n\t\tsuVelocidad = 50;\n\t\tsuDireccionActual = 0.0;\n\t\tposX = 500 ;\n\t\tposY = 10;\n\t}", "Long crear(Espacio espacio);", "private void salir(){\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Salir\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.exit(0);\r\n\t}", "boolean agregarSalida(Salida s) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(s);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }", "@Override\r\n public void salir() {\n }", "public String getNivel()\r\n/* 249: */ {\r\n/* 250:278 */ return this.nivel;\r\n/* 251: */ }", "@Test\n\tpublic void deveAtualizarSaldoAoEcluirMovimentacao(){\n\t\tAssert.assertEquals(\"534.00\", home.obterSaldoConta(\"Conta para saldo\"));\n\t\t\n\t\t//ir para resumo\n\t\tmenuSB.acessarResumo();\n\t\t\n\t\t//excluir Movimentacao 3\n\t\tresumo.excluirMovimentacao(\"Movimentacao 3, calculo saldo\");\n\t\t\n\t\t//validar a mensagem \"Movimentação removida com sucesso\"\n\t\tAssert.assertTrue(resumo.existeElementoPorTexto(\"Movimentação removida com sucesso!\"));\n\t\t\n\t\t//voltar home\n\t\tmenuSB.acessarHome();\n\t\t\n\t\t//atualizar saldos\n\t\tesperar(1000);\n\t\thome.scroll(0.2, 0.9);\n\t\t\n\t\t//verificar saldo = -1000.00\n\t\tAssert.assertEquals(\"-1000.00\", home.obterSaldoConta(\"Conta para saldo\"));\n\t}", "@Override\n\tpublic void salvar() {\n\t\t\n\t\tPedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\n\t\tPedidoCompra.setAtivo(true);\n//\t\tPedidoCompra.setNome(nome.getText());\n\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\tPedidoCompra.setSaldoinicial(\"0.00\");\n\t\t\n\t\tPedidoCompra.setData(new Date());\n\t\tPedidoCompra.setIspago(false);\n\t\tPedidoCompra.setData_criacao(new Date());\n\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\n\t\tgetservice().save(PedidoCompra);\n\t\tsaveAlert(PedidoCompra);\n\t\tclearFields();\n\t\tdesligarLuz();\n\t\tloadEntityDetails();\n\t\tatualizar.setDisable(true);\n\t\tsalvar.setDisable(false);\n\t\t\n\t\tsuper.salvar();\n\t}", "@Override\n\tpublic void AlterarSenha(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "public String accionemergencia(){\n\t\tString resp=\"\";\n\t\tif(puntosvida<=5 && acc!=1){\n\t\t\tpuntosvida=puntosvida+15;\n\t\t\tresp=\"\\nAccion de emergencia \"+ tipo +\"activada vida +15\";\n\t\t\tacc=1;\n\t\t}\n\t\treturn resp;\n\t}", "public void cumplirAños(){\n this.setEdad(((byte)(this.getEdad()+1)));\n }", "public Sesiones() {\n\t\tentradasVendidas = 0;\n\t}", "public void salvar() {\n\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Salvar(cliente);\n\n cliente = new Cliente();\n//mesagem para saber se foi salvo com sucesso\n JSFUtil.AdicionarMensagemSucesso(\"Clente salvo com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "private String salvarAnexo(BodyPart bodyPart) throws Exception {\n File diretorio = new File(\"Anexos\");\n if (diretorio.mkdir() || diretorio.exists()) {// Cria um diretório que retorna true se criou e verifica se diretório existe\n try {\n InputStream in = bodyPart.getInputStream();\n FileOutputStream out = new FileOutputStream(new File(diretorio, bodyPart.getFileName()));\n int b;\n while ((b = in.read()) > -1) {\n out.write(b);\n }\n in.close();\n out.close();\n return bodyPart.getFileName();\n } catch (Exception ex) {\n throw new Exception(\"Erro ao salvar o anexo\");\n }\n }\n throw new Exception(\"Não é posível salvar o anexo\");\n }", "public int aleatorioSeis(){\n\t\t\n\t\treturn (int)(Math.random() * 6) + 1;\n\t}", "boolean insertarRol(String nombre) throws Exception;", "public void encerrarJogo(){\n if (isAndamento()) {\n situacao = SituacaoJogoEnum.ENCERRADO;\n }\n }", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "Bicho evolucionar(int bicho);", "public void salvaElezione(ArrayList<Elezione> elezioni) {\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Elezione> map = db.getTreeMap(\"elezione\");\n\t\t\tmap.clear();\n\t\t\tint contatore = 0;\n\t\t\tfor (Elezione lista : elezioni) {\n\t\t\t\tmap.put(contatore++, lista);\n\t\t\t}\n\t\t\t\n\t\t\tdb.commit(); // commit dopo le modifiche\n\t\t\t\n\t\t}", "@Override\r\n public void ingresarCapacidad(){\r\n double capacidad = Math.pow(alto, 3);\r\n int capacidadInt = Double.valueOf(capacidad).intValue();\r\n super.capacidad = capacidadInt;\r\n super.cantidadRestante = capacidadInt;\r\n System.out.println(capacidadInt);\r\n }", "public void hacerPedido(){\n this.sucursal.procesarPedido(this.pedido, this.id);\n this.pedido = new Integer[5];\n contadorPedido = 0;\n }", "public String salirEdPerfil() {\n\t\tofer_id = null;\n\t\tofer_valor_oferta = null;\n\t\tofer_fecha_oferta = null;\n\t\titem = null;\n\t\tpostulante = null;\n\t\titem_nombre = \"\";\n\t\titem_caracteristicas = \"\";\n\t\titem_imagen = \"\";\n\t\tpos_nombre = \"\";\n\t\tpos_apellido = \"\";\n\t\tpos_direccion = \"\";\n\t\tpos_correo = \"\";\n\t\tpos_telefono = \"\";\n\t\tpos_password = \"\";\n\t\tpos_celular = \"\";\n\t\tpos_institucion = \"\";\n\t\tpos_gerencia = \"\";\n\t\tpos_area = \"\";\n\t\tgetListaItems().clear();\n\t\tgetListaItems().addAll(managergest.findAllItems());\n\t\treturn \"home?faces-redirect=true\";\n\t}", "public void salvar() throws Exception {\n // Verifica se o bean existe\n if(b == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n // Primeiro salva o subtipo de banca\n new SubTipoBancaBD(b.getSubTipoBanca()).salvar();\n\n String sql = \"INSERT INTO banca (idBanca, idTipoBanca, idSubTipoBanca, descricao, ano, idCurriculoLattes, idLattes) \" +\n \"VALUES (null, \"+ b.getTipoBanca().getIdTipoBanca() +\", \"+ b.getSubTipoBanca().getIdSubTipoBanca() +\", \" +\n \"'\"+ b.getDescricao() +\"', \"+ b.getAno() +\", \"+ idCurriculoLattes + \" , \"+ b.getIdLattes() +\")\";\n\n\n Transacao.executar(sql);\n }", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "private synchronized void actualizarEnemigo(){\n\t\tcontadorE++;\n\t\tenemigo.mover(this.getWidth(), this.getHeight());\n\t\t\n\t\ttry{\n\t\t\tif(contadorE==100){\n\t\t\t\tenemigo.setAngulo(Math.random()*(2 * Math.PI));\n\t\t\t\tdisparosE[numDisparosE]=enemigo.dispara();\n\t\t\t\tnumDisparosE++;\n\t\t\t\tcontadorE=0;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<numDisparosE;i++){\n\t\t\t\t disparosE[i].mover(this.getWidth(), this.getHeight());\n\t\t\t\t \n\t\t\t\t if(disparosE[i].getVidaDisparo()<=0){\n\t\t\t\t\t eliminarDisparosE(i); \n\t\t\t\t\t i--; \n\t\t\t\t }\n\t\t\t}\n\t\t\t\n\t\t\tif(enemigo.naveColisionE(nave)){\n\t\t\t\tanadirPuntos(enemigo.getPuntuacion());\n\t\t\t\tquitarVida();\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=0;j<numDisparos;j++){\n\t\t\t\tif(enemigo.disparoColisionE(disparos[j])){\n\t\t\t\t\t\n\t\t\t\t\tif(disparos[j]!=null){\n\t\t\t\t\t\teliminarDisparos(j);\n\t\t\t\t\t}\n\t\t\t\t\tanadirPuntos(enemigo.getPuntuacion());\n\t\t\t\t\tenemigo.setVivo(false);\n\t\t\t\t\tj=numDisparos;\n\t\t\t\t\n\t\t\t\t\tj--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int j=0;j<numDisparosE;j++){\n\t\t\t\tif(nave.recibirDisparo(disparosE[j])){\n\t\t\t\t\tif(disparos[j]!=null){\n\t\t\t\t\t\teliminarDisparos(j);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tj=numDisparosE; \n\t\t\t\t\tj--;\n\t\t\t\t\n\t\t\t\t\tquitarVida();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {}\n\t}", "public Buscaminas(int nivel) {\r\n\t\tthis.nivel = nivel;\r\n\t\tperdio = false;\r\n\t\tinicializarPartida(nivel);\r\n\t\tgenerarMinas();\r\n\t\tinicializarCasillasLibres();\r\n\t}", "private String insertarCartaHealingSign() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 0,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 2,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 0,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n false,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n true,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }", "public void imprimirNivelMedio(){\n\t\tmodCons.imprimirNivelMedio();\n\t}", "private void saveEncLactancias(String estado) {\n int c = mLactanciasMaternas.size();\n for (LactanciaMaterna enclactancia : mLactanciasMaternas) {\n enclactancia.getMovilInfo().setEstado(estado);\n estudioAdapter.updateLacMatSent(enclactancia);\n publishProgress(\"Actualizando encuestas lactancia\", Integer.valueOf(mLactanciasMaternas.indexOf(enclactancia)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }", "private static void privilegio(int tipo) {\n String nome;\r\n Scanner sc = new Scanner(System.in);\r\n if (tipo == 1)\r\n System.out.println(\"Qual o utilizador a quem quer dar privilégios de editor?\");\r\n else\r\n System.out.println(\"Qual o utilizador a quem quer dar privilégios de editor?\");\r\n nome = sc.nextLine();\r\n PreparedStatement stmt;\r\n if (verificaUser(nome)) {\r\n try {\r\n c.setAutoCommit(false);\r\n if (tipo == 1)\r\n stmt = c.prepareStatement(\"UPDATE utilizador SET utilizador_tipo = true WHERE nome=?\");\r\n else\r\n stmt = c.prepareStatement(\"UPDATE utilizador SET utilizador_tipo = false WHERE nome=?\");\r\n stmt.setString(1, nome);\r\n stmt.executeUpdate();\r\n\r\n stmt.close();\r\n c.commit();\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n System.out.println(\"Privilégios atualizados\");\r\n } else {\r\n System.out.println(\"Utilizador não encontrado\");\r\n }\r\n }", "public String getNivelAuditoria() {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNivelAuditoria() - start\");\n\t\t}\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNivelAuditoria() - end\");\n\t\t}\n\t\treturn nivelAuditoria;\n\t}", "@Override\n\tpublic long actualizar(Account entidad) {\n\t\treturn 0;\n\t}", "public int modificar(TratamientoVO tratamiento) {\n\t\treturn 0;\n\t}", "private void saveEncuestaSatisfaccions(String estado) {\n int c = mEncuestaSatisfaccions.size();\n for (EncuestaSatisfaccion encuesta : mEncuestaSatisfaccions) {\n encuesta.getMovilInfo().setEstado(estado);\n estudioAdapter.updateEncSatSent(encuesta);\n publishProgress(\"Actualizando Encuestas Satisfaccion\", Integer.valueOf(mEncuestaSatisfaccions.indexOf(encuesta)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }", "public void cambioNivel(int nivel) {\n\t\tthis.reDimensionar(fondoJuego, new ImageIcon(Gui.class.getResource(\"/RecursosGraficosNiveles/FONDO-LVL0\"+nivel+\".png\")));\n\t\tpanelJuego.moveToBack(fondoJuego);\n\t\tpanelJuego.pantallaNivel(nivel - 1);\n\t\tjuego.pausa();\n\t\tpanelJuego.CambioDeLvl();\n\t\tpanelJuego.repaint();\n\t}", "public void AsignarPermiso(Permiso p){\n\t\tPermisoRol pr = new PermisoRol(p,this);\n\t\tpermisos.add(pr);\n\t}", "public abstract void leerPersistencia();", "@Override\n\tpublic void salvaSuFile() {\n\t\tString path = \"alimenti.txt\";\n\t\tString allergeni = Alimento.getStringaAllergeni(getElencoAllergeni());\n\t\ttry {\n\t\t\tFile file = new File(path);\n\t\t\tFileWriter fw = new FileWriter(file, true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\tbw.write(getNome() + \" - \" + getPrezzo() + \"€\\n\");\n\t\t\tbw.write(\"Adatto a vegani: \" + (getVegano() ? \"sì\\n\" : \"no\\n\"));\n\t\t\tbw.write(\"Adatto a vegetariani: \" + (getVegetariano() ? \"sì\\n\" : \"no\\n\"));\n\t\t\tbw.write(\"Tipologia: \" + getTipoPortata().getNome().toUpperCase() + \"\\n\");\n\t\t\tbw.write(\"Cottura: \" + getTipoCottura().getNome().toUpperCase() + \"\\n\");\n\t\t\tbw.write(\"Allergeni: \" + (allergeni.isEmpty() ? \"--\" : allergeni) + \"\\n\\n\");\n\t\t\tbw.flush();\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public List<EUsuario> findByNivelAcesso(int nivelAcesso);", "@Override\n public int anularAsientosContables(Boleto boleto) throws CRUDException {\n //Anulamos las transacciones contables para el id_boleto y su respectivo Libro\n //Eso para tener en cuenta los tipos de Asientos Contables\n //AD Asiento Diario\n //CI Comprobante Ingreso\n //CE Comprobante Egreso\n //CT Comprobante de Traspso\n //AJ Asiento de Ajuste\n Query q = em.createNamedQuery(\"AsientoContable.updateEstadoFromBoleto\");\n q.setParameter(\"idBoleto\", boleto.getIdBoleto());\n q.setParameter(\"estado\", ComprobanteContable.ANULADO);\n q.executeUpdate();\n\n // Actualiza los totales del comprobante Contable. y si ya no tiene \n //transacciones, anula el Comprobante Contable\n StoredProcedureQuery spq = em.createNamedStoredProcedureQuery(\"ComprobanteContable.updateComprobanteContable\");\n spq.setParameter(\"in_id_boleto\", boleto.getIdBoleto());\n spq.executeUpdate();\n\n return Operacion.REALIZADA;\n }", "public void ataque(Enemigo enem, Jugador player, int n) {\r\n\t\tint seis;\r\n\t\tint veinte=0;\r\n\t\tint damage;\r\n\t\t\r\n\t\tif(n == 0) {\r\n\t\t\tif(enem.getModopelea() == 1){\r\n\t\t\t\tSystem.out.println( enem.getName() +\" esta en modo defensa \" + enem.getName()+ \" lanza el dado 2 veces\");\r\n\t\t\t\tint try1 = Juego.lanzarDados(3);\r\n\t\t\t\tint try2 = Juego.lanzarDados(3);\r\n\t\t\t\tif (enem.getRaza() == \"Humano\"){\r\n\t\t\t\t\ttry1 = enem.cartaTrampa(try1, 3);\r\n\t\t\t\t\ttry2 = enem.cartaTrampa(try2, 3);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Lanzamiento 1: \"+try1);\r\n\t\t\t\tSystem.out.println(\"Lanzamiento 2: \"+try2);\r\n\t\t\t\tif(try1 > try2){\r\n\t\t\t\t\tveinte = try1;\r\n\t\t\t\t\tSystem.out.println(try1+ \" es mayor\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(try2+ \" es mayor\");\r\n\t\t\t\t\tveinte = try2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{ \r\n\t\t\t\tveinte = Juego.lanzarDados(3);\t\r\n\t\t\t\tif(enem.getRaza()== \"Humano\"){\r\n\t\t\t\t\tveinte = enem.cartaTrampa(veinte,3);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"El valor del lanzamiento de \"+enem.getName() +\" del dado de 20 para esquivar es: \"+ veinte);\r\n\r\n\t\t\tif(enem.getRaza() == \"Elfo\"){\r\n\t\t\t\tveinte = enem.cartaTrampa(veinte, 1);\r\n\t\t\t}\r\n\t\t\tif (veinte+enem.getCon() < 13){\r\n\t\t\t\tSystem.out.println(enem.getName() + \" No logro esquivar el ataque\");\r\n\t\t\t\tseis = Juego.lanzarDados(1);\r\n\t\t\t\t\r\n\t\t\t\tif(player.getRaza()== \"Humano\"){\r\n\t\t\t\t\tseis = player.cartaTrampa(seis,1);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"El valor del lanzamiento de \"+player.getName() + \" del d6 es: \"+seis);\r\n\t\t\t\t\r\n\t\t\t\tdamage = seis;\r\n\t\t\t\tenem.asignarVida(enem.getVida()-damage);\r\n\t\t\t\tSystem.out.println(enem.getName() +\" recibe \"+ damage + \" de danio\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(veinte == 20) {\r\n\t\t\t\t\tSystem.out.println(enem.getName() + \" esquivo el ataque\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(enem.getName() + \" logro resistir el ataque\");\r\n\t\t\t\t\tseis = Juego.lanzarDados(1);\t\t\t\t\r\n\t\t\t\t\tif(player.getRaza()== \"Humano\"){\r\n\t\t\t\t\t\tseis = player.cartaTrampa(seis,1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"El valor del lanzamiento de \" + player.getName() + \" del d6 es: \"+seis);\r\n\t\t\t\t\tdamage = Juego.lanzarDados(1)/2;\r\n\t\t\t\t\tenem.asignarVida(enem.getVida()-damage);\r\n\t\t\t\t\tSystem.out.println(enem.getName() +\" recibe \"+ damage + \" de danio\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(player.getModopelea() == 1){\r\n\t\t\t\tSystem.out.println( player.getName() +\" esta en modo defensa, \"+ player.getName()+ \" lanza el dado 2 veces\");\r\n\t\t\t\tint try1 = Juego.lanzarDados(3);\r\n\t\t\t\tint try2 = Juego.lanzarDados(3);\r\n\t\t\t\tif (player.getRaza() == \"Humano\"){\r\n\t\t\t\t\ttry1 = player.cartaTrampa(try1, 3);\r\n\t\t\t\t\ttry2 = player.cartaTrampa(try2, 3);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Lanzamiento 1: \"+try1);\r\n\t\t\t\tSystem.out.println(\"Lanzamiento 2: \"+try2);\r\n\t\t\t\tif(try1 > try2){\r\n\t\t\t\t\tveinte = try1;\r\n\t\t\t\t\tSystem.out.println(try1+ \" es mayor\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(try2+ \" es mayor\");\r\n\t\t\t\t\tveinte = try2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse{ \r\n\t\t\t\tveinte = Juego.lanzarDados(3);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(player.getRaza()== \"Humano\"){\r\n\t\t\t\t\tveinte = player.cartaTrampa(veinte,3);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"El valor del lanzamiento de \" + player.getName() +\" del dado de 20 para esquivar es: \"+ veinte);\r\n\t\t\tif(player.getRaza() == \"Elfo\"){\r\n\t\t\t\tveinte = player.cartaTrampa(veinte, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (veinte + player.getCon() < 13) {\r\n\t\t\t\tSystem.out.println(player.getName() + \" No logro esquivar el ataque\");\r\n\t\t\t\tseis = Juego.lanzarDados(1);\r\n\t\t\t\t\r\n\t\t\t\tif(enem.getRaza()== \"Humano\"){\r\n\t\t\t\t\tseis = enem.cartaTrampa(seis,1);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"El valor del lanzamiento de \" + enem.getName() + \" del d6 es: \"+seis);\r\n\t\t\t\tdamage = seis;\r\n\t\t\t\tplayer.asignarVida(player.getVida()-damage);\r\n\t\t\t\tSystem.out.println(player.getName() +\" recibe \"+ damage + \" de danio\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(veinte == 20) {\r\n\t\t\t\t\tSystem.out.println(player.getName() + \" esquivo el ataque\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(player.getName() + \" logro resistir el ataque\");\r\n\t\t\t\t\tseis = Juego.lanzarDados(1);\r\n\r\n\t\t\t\t\tif(enem.getRaza()== \"Humano\"){\r\n\t\t\t\t\t\tseis = enem.cartaTrampa(seis,1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"El valor del lanzamiento de \" + enem.getName() + \" del d6 es: \"+seis);\r\n\r\n\t\t\t\t\tdamage = seis/2;\r\n\t\t\t\t\tplayer.asignarVida(player.getVida()-damage);\r\n\t\t\t\t\tSystem.out.println(player.getName() +\" recibe \"+ damage + \" de danio\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void suplantarIdUsuer(String nombre) throws Exception {\n\t\tLibro[] librosPres = new Libro[Const.MAXLIBROSPRES];\n\t\tint bpn = busquedaPrimerNulo();\n\t\tUsuario[] vu = ArrayObject.listadoUsuarios();\n\n\t\tMiObjectInputStream oi = null;\n\n\t\ttry { // comprueba que el archivo FUSUARIOS existe antes de leerlo\n\t\t\toi = new MiObjectInputStream(new FileInputStream(Const.FUSUARIOS));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Archivo no encontrado - suplantarIdUsuer - \" + e.toString());\n\t\t}\n\n\t\t// busca donde se encuentra el primer usuario null del archivo para crear un\n\t\t// usuario nuevo en ese mismo lugar para obtener un id ordenado. Del mismo modo\n\t\t// la primera vez que esto se ustiliza llena el archivode usuarios de nulos pero\n\t\t// no elimna los usuarios que se encuentran por debajo\n\t\tUsuario u = (Usuario) oi.readObject();\n\t\tu = new Usuario(bpn, nombre, librosPres);\n\t\tvu[bpn] = u;\n\n\t\ttry {\n\t\t\tFileOutputStream fo = new FileOutputStream(Const.FUSUARIOSAUX, true);\n\t\t\tMiObjectOutputStream oo = new MiObjectOutputStream(fo);\n\t\t\tint i = 0;\n\t\t\twhile (i < vu.length) {\n\t\t\t\tu = vu[i];\n\t\t\t\too.writeObject(u);\n\t\t\t\ti++;\n\t\t\t} // finaliza el while para la lectura\n\t\t\too.close();\n\n\t\t} catch (Exception e) { // encaso de encontrar el archivos pero no puede leerlo\n\t\t\tSystem.out.println(\"Problemas al leer el archivo - suplantarIdUsuer - \" + e.toString());\n\t\t}\n\t\toi.close();\n\t}", "public int gradoSalida(int i) {\n \treturn elArray[i].talla();\n }", "private void configurarPalabra(int nivel, int identificador) {\n\t\tPalabra palabra = nivel1.get(identificador);\n\t\tthis.crearLogicaDelNivel(palabra);\n\t\tthis.crearInterfazDelNivel(palabra);\n\n\t}", "public Ej_varclase1() {\n\t\t//contador++; \n\t\tcontador = contador + 1;\n\t\t\n\t}", "int updateNavegacionSalida(final Long srvcId);", "@Override\n\tpublic int alterarCanal(int Canal) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic Parcela salvar(Parcela entidade) {\n\t\treturn null;\n\t}" ]
[ "0.62749875", "0.6263814", "0.62159085", "0.59018123", "0.57797086", "0.57647103", "0.57550156", "0.57302517", "0.5675032", "0.5630366", "0.55793107", "0.55550116", "0.5549563", "0.55434585", "0.5493827", "0.5478083", "0.54707813", "0.54654896", "0.5444767", "0.54308116", "0.5418268", "0.5411019", "0.54080874", "0.5402227", "0.5393987", "0.53865343", "0.5361133", "0.526841", "0.5258746", "0.5255864", "0.5250817", "0.5230138", "0.5215872", "0.5206446", "0.5203508", "0.5192713", "0.51715267", "0.5167019", "0.5120291", "0.5100283", "0.5096749", "0.5085389", "0.5085", "0.5081765", "0.5078444", "0.5078444", "0.5050108", "0.5049632", "0.5047981", "0.5043471", "0.5034614", "0.5028286", "0.5027531", "0.50269216", "0.5014085", "0.5007407", "0.49974436", "0.49913535", "0.4985777", "0.4981524", "0.49710563", "0.49553606", "0.49528798", "0.49487734", "0.4947468", "0.4943737", "0.49380502", "0.49351963", "0.49344143", "0.4930659", "0.49147424", "0.4911904", "0.49084532", "0.49064928", "0.49060616", "0.49054366", "0.49012756", "0.48970905", "0.48948687", "0.48894343", "0.4886662", "0.48852956", "0.4878394", "0.48766017", "0.48601022", "0.4847122", "0.48470405", "0.48424098", "0.48414955", "0.4841421", "0.4840888", "0.48401242", "0.483458", "0.4818493", "0.4818042", "0.4816543", "0.48137593", "0.4804083", "0.48035312", "0.48025003", "0.48013747" ]
0.0
-1
Return all header key.
public abstract List<String> getAllKeys();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String[] getHeader(String key);", "public Set<String> keySet()\r\n/* 421: */ {\r\n/* 422:584 */ return this.headers.keySet();\r\n/* 423: */ }", "public Header getHeaderByKey(String key);", "protected Convention.Key getConventionKeysKey()\n {\n return ConventionKeys.HEADER_KEYS;\n }", "public Set<String> getHeaderNames() {\n return headers.keySet();\n }", "Collection<String> getHeaderNames();", "public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }", "Set<String> getHeaderNames();", "public HashMap<String, String> getHeaderList() {\n return headerList;\n }", "public Set<K> keySet() {\r\n\t\t\tSet<K> keySet = new HashSet<K>();\r\n\t\t\tListNode current = header;\r\n\t\t\twhile (current != null) {\r\n\t\t\t\tkeySet.add(current.key);\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\treturn keySet;\r\n }", "public Map<String, String> getHeaderList() {\n return headerMap;\n }", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }", "@Override\n List<String> keys();", "public List<String> getHeader(String key) {\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders.get(key);\n }", "public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }", "@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic Enumeration getHeaderNames() {\n\t\t\treturn null;\n\t\t}", "public String[] composeHeader() {\n\t\treturn null;\n\t}", "public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}", "List<String> getKeys();", "StringList keys();", "public String getHeaderNames(){return header.namesText;}", "Map<String, List<String>> getHeaders();", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}", "public Iterable<String> keys()\r\n { return keysWithPrefix(\"\"); }", "static String[] getKey() {\n return key;\n }", "List<? extends Header> getAllHeaders();", "public String[] getKeys(){\n int paddingCount = 1;\n List<String> result = new ArrayList<String>();\n String lastKey = null;\n for (Property x : this.getProperties()) {\n String newKey = new String(x.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.add(newKey);\n lastKey = newKey;\n }\n return result.toArray(new String[]{});\n }", "public String getHeader();", "java.lang.String getHeader();", "public Map<String,List<String>> getHeaderMap() {\n\n\t\treturn headers;\n\t}", "public Iterable<String> keys() { return keysWithPrefix(\"\"); }", "java.util.List<com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key> getKeyList();", "protected Convention.Key getUseKey()\n {\n return ConventionKeys.HEADER;\n }", "public byte[] getHeader() {\n\treturn header;\n }", "public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }", "public Enumeration<Object> keys ();", "public String[] getHeaders()\n\t{\n\t\tString[] lines = this.header.split(\"\\\\r\\\\n\");\n\t\treturn lines;\n\t}", "public java.util.List<ConnectionHeaderParameter> getHeaderParameters() {\n return headerParameters;\n }", "public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}", "public String[] getKeyColumns()\n {\n return KEY_COLUMNS;\n }", "public String getHeader(String key) {\n for (int i = 0; i < nFields; i++) {\n if (key.equalsIgnoreCase(keys[i])) {\n return extractRange(valueRanges[i]);\n }\n }\n return \"\"; // no point returning null\n }", "public String[] getKeyNames() \n {\n DBField f[] = this.getKeyFields();\n String kn[] = new String[f.length];\n for (int i = 0; i < f.length; i++) {\n kn[i] = f[i].getName();\n }\n return kn;\n }", "@Override\n public RaftNode getHeader() {\n return allNodes.getHeader();\n }", "public List<Label> getHeaderLabels() {\r\n return headerLabels;\r\n }", "List<String> getHeaders() {\n return forensicsTable.getHeaders();\n }", "String getHeader(String headerName);", "Map<String, String> getHeaders();", "public Iterable<Key> keys();", "public Iterable<Key> keys();", "public Set<String> keySet() {\r\n return keys.keySet();\r\n }", "public Header[] getRequestHeaders() {\n return getRequestHeaderGroup().getAllHeaders();\n }", "public List<K> keys();", "Integer[] getKeys();", "public String[] getKeys() {\n\t\treturn _keys;\n\t}", "@Override\n public Enumeration<String> getHeaderNames() {\n List<String> names = new ArrayList<String>();\n names.addAll(Collections.list(super.getHeaderNames()));\n names.add(\"Authorization\");\n return Collections.enumeration(names);\n }", "public Set<String> keySet() {\n return index.keySet();\n }", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "public String getHeaderFieldKey(int paramInt) {\n/* 286 */ return this.delegate.getHeaderFieldKey(paramInt);\n/* */ }", "public String getHeader() {\n\t\treturn header.toString();\n\t}", "public Set keyNames() {\n return new LinkedHashSet<>( asList( idName() ) );\n }", "List<Header> headers();", "List<String> headerColumns();", "public List getRowKeys() { return this.underlying.getRowKeys(); }", "public Map<String, Header> getHeaderMap() {\n return headerMap;\n }", "public Enumeration getKeys() throws AspException\n {\n return Contents.keys();\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "public abstract Enumeration keys();", "Set<String> getKeys();", "public Set<String> keySet() {\n return this.index.keySet();\n }", "public ListIterator getHeaderNames() {\n ListIterator li = this.headers.listIterator();\n LinkedList retval = new LinkedList();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n String name = sipHeader.getName();\n retval.add(name);\n }\n return retval.listIterator();\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "public String getHeaderName() {\n\tString value = getString(ATTR_HEADER_NAME, null);\n\treturn value;\n }", "com.didiyun.base.v1.Header getHeader();", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public Enumeration getKeys() throws AspException\n {\n return Contents.getKeys();\n }", "public Enumeration getKeys() throws AspException\n {\n return Contents.getKeys();\n }", "@Override\r\n\t\t\t\t\t\tpublic Enumeration<String> getKeys() {\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}", "public List<Header> getHeaderList() {\n return mHeaderList;\n }", "public String getKeys() {\r\n return keys;\r\n }", "@Override\r\n public String[] headers() {\n return new String[]{\"فاکتور\", \"تاریخ\", \"شناسه مخاطب\", \"نام مخاطب\", \"نوع\", \"شناسه کالا\", \"شرح کالا\", \"مقدار کل\", \"واحد\", \"فی\", \"مقدار جزء\", \"مبلغ کل\", \"مانده\"};\r\n }", "public List<String> get(Object key)\r\n/* 396: */ {\r\n/* 397:564 */ return (List)this.headers.get(key);\r\n/* 398: */ }", "public Iterable<K> keys();", "public static String getKey(){\n\t\treturn key;\n\t}", "@ZAttr(id=1074)\n public String[] getResponseHeader() {\n return getMultiAttr(Provisioning.A_zimbraResponseHeader);\n }", "public java.lang.String getHeaderName() {\r\n return headerName;\r\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> keys = new HashMap<String, String>();\n keys.put(\"token\", TOKEN);\n return keys;\n }", "public String[] fetchAllKeys();", "public String[] getHeaders(){\n String[] headers={\"Owner Unit ID\",\"Origin Geoloc\",\"Origin Name\",\"Number of Assets\",};\n return headers;\n }", "public Set<String> keySet()\n\t{\n\t\tverifyParseState();\n\t\t\n\t\treturn values.keySet();\n\t}", "public Iterator<Key> keys() ;", "public Object getHeader() {\n return header;\n }", "public Enumeration getAllHeaders() throws MessagingException {\n/* 451 */ if (this.headers == null)\n/* 452 */ loadHeaders(); \n/* 453 */ return this.headers.getAllHeaders();\n/* */ }", "public List<String> keys()\n {\n return new ArrayList<String>(keys);\n }", "public Header[] getRequestHeaders();", "public String getHeader() {\n\t\t\treturn header;\n\t\t}", "protected String getColumnHeader(Integer index){\n for (Map.Entry<String, Integer> entry: headerMap.entrySet()){\n if (index.equals(entry.getValue())) return entry.getKey();\n }\n return null;\n }" ]
[ "0.7370392", "0.7023346", "0.69882524", "0.6871897", "0.6831776", "0.67662925", "0.66777974", "0.6636218", "0.656651", "0.6528198", "0.6519111", "0.64958584", "0.6471914", "0.64598477", "0.6428883", "0.6417052", "0.6404935", "0.6332244", "0.632163", "0.63117117", "0.6295454", "0.62822646", "0.6235881", "0.6234948", "0.62325066", "0.62323064", "0.62145287", "0.62020105", "0.6192791", "0.61796075", "0.61723477", "0.61622643", "0.61560535", "0.61524445", "0.61453193", "0.61438787", "0.6143448", "0.6139219", "0.6138352", "0.6129086", "0.6102059", "0.60994756", "0.6069915", "0.6061146", "0.60602695", "0.6049879", "0.6043734", "0.60339713", "0.6031861", "0.6031341", "0.6031341", "0.6023717", "0.60209894", "0.60185343", "0.6016534", "0.60155135", "0.6007978", "0.59880644", "0.5980855", "0.5980855", "0.59773326", "0.5967244", "0.5960372", "0.59594357", "0.59527534", "0.59488434", "0.59475815", "0.59434277", "0.5939545", "0.5914517", "0.5913093", "0.59078795", "0.59043545", "0.58967686", "0.58967686", "0.589375", "0.5893129", "0.58894706", "0.58839965", "0.58839965", "0.5881973", "0.5881143", "0.58759093", "0.5869585", "0.58560514", "0.58538383", "0.58534026", "0.58524746", "0.58484554", "0.58383113", "0.58364064", "0.58305645", "0.58274555", "0.58196473", "0.5818908", "0.5818373", "0.58160025", "0.58155197", "0.58113146", "0.58107895" ]
0.62961453
20
Get all request header holders.
public static HeaderHolder getRequestHeaderHolder() { return requestHeaderHolder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Header[] getRequestHeaders() {\n return getRequestHeaderGroup().getAllHeaders();\n }", "public Header[] getRequestHeaders();", "List<? extends Header> getAllHeaders();", "protected HeaderGroup getRequestHeaderGroup() {\n return requestHeaders;\n }", "public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }", "Map<String, List<String>> getHeaders();", "public Set<String> getHeaderNames() {\n return headers.keySet();\n }", "List<Header> headers();", "public String[] getHeaders(){\n String[] headers={\"Owner Unit ID\",\"Origin Geoloc\",\"Origin Name\",\"Number of Assets\",};\n return headers;\n }", "public List<HttpHeaderOption> getRequestHeadersToAddList() {\n return requestHeadersToAdd;\n }", "Map<String, String> getHeaders();", "Map<String, String> getRequestHeaders();", "public List<HttpHeaderOption> getRequestHeadersToAddList() {\n return requestHeadersToAdd;\n }", "public Map<String, String> getRequestHeaders(HttpServletRequest request) {\n Map<String, String> headers = new HashMap<String, String>();\n\n if (request == null)\n return headers;\n\n Enumeration headerNames = request.getHeaderNames();\n while (headerNames.hasMoreElements()) {\n String headerName = (String) headerNames.nextElement();\n String headerVal = request.getHeader(headerName);\n\n headers.put(headerName, headerVal);\n }\n\n\n return headers;\n }", "@Test\n\tprivate void get_all_headers() {\n\t\tRestAssured.baseURI = \"https://reqres.in\";\n\t\tRequestSpecification httpRequest = RestAssured.given();\n\t\tResponse response = httpRequest.request(Method.GET, \"/api/users?page=2\");\n\t\tHeaders headers = response.getHeaders();\n\t\tfor (Header header : headers) {\n\t\t\tSystem.out.println(header.getName() + \" \\t : \" + header.getValue());\n\t\t}\n\t}", "public List<Header> getSessionHeaders() {\n\t\treturn Collections.unmodifiableList(sessionHeaders);\n\t}", "Headers getHeaders();", "public Map getHeaders() {\r\n if (headers == null) {\r\n headers = new HashMap();\r\n }\r\n\r\n return headers;\r\n }", "public MultiMap getHeaders() {\n return headers;\n }", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public Enumeration getAllHeaders() throws MessagingException {\n/* 451 */ if (this.headers == null)\n/* 452 */ loadHeaders(); \n/* 453 */ return this.headers.getAllHeaders();\n/* */ }", "private Header[] requestHeadMaker() {\n\t\tHeader[] header = {\n\t\t\t\tnew BasicHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t\t//new BasicHeader(HttpHeaders.USER_AGENT, \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t, new BasicHeader(\"Accpet-Language\", \"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6\")\n\t\t\t, new BasicHeader(\"Accept-Charset\", \"application/x-www-form-urlencoded; charset=UTF-8\")\n\t\t\t, new BasicHeader(\"Origin\", \"https://developer.riotgames.com\")\n\t\t\t, //new BasicHeader(\"X-Riot-Token\", riotApiKey)\n\t\t};\n\t\treturn header;\n\t}", "List<? extends Header> getHeaders(String name);", "public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}", "public HttpHeaders getHeaders()\r\n/* 63: */ {\r\n/* 64: 93 */ if (this.headers == null)\r\n/* 65: */ {\r\n/* 66: 94 */ this.headers = new HttpHeaders();\r\n/* 67: */ Enumeration headerValues;\r\n/* 68: 95 */ for (Enumeration headerNames = this.servletRequest.getHeaderNames(); headerNames.hasMoreElements(); \r\n/* 69: 98 */ headerValues.hasMoreElements())\r\n/* 70: */ {\r\n/* 71: 96 */ String headerName = (String)headerNames.nextElement();\r\n/* 72: 97 */ headerValues = this.servletRequest.getHeaders(headerName);\r\n/* 73: 98 */ continue;\r\n/* 74: 99 */ String headerValue = (String)headerValues.nextElement();\r\n/* 75:100 */ this.headers.add(headerName, headerValue);\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:104 */ return this.headers;\r\n/* 79: */ }", "public final Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "@Override public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "@Override\n\tpublic Collection<String> getHeaders(String name) {\n\t\treturn null;\n\t}", "public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "public Map<String,List<String>> getHeaderMap() {\n\n\t\treturn headers;\n\t}", "public Map<String, List<String>> getHeaders() {\n\t\t\treturn headers;\n\t\t}", "public Map<String, String> headers() {\n return this.header.headers();\n }", "public Map<String, HeaderInfo> getHeaders() {\n\t\treturn headers;\n\t}", "@Override\n public Enumeration<String> getHeaders(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return Collections.enumeration(Arrays.asList(getHeader(name)));\n } else {\n return super.getHeaders(name);\n }\n }", "Collection<String> getHeaderNames();", "public VersionedMap getHeaders ()\n {\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return httpClientRequest.getHeaders();\n }", "@Override\n public Enumeration<String> getHeaderNames() {\n List<String> names = new ArrayList<String>();\n names.addAll(Collections.list(super.getHeaderNames()));\n names.add(\"Authorization\");\n return Collections.enumeration(names);\n }", "public Header[] getResponseHeaders() {\n return getResponseHeaderGroup().getAllHeaders();\n }", "public Map<String, AbstractHeader> getHeaders()\n\t{\n\t\treturn headers;\n\t}", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "Set<String> getHeaderNames();", "public Map<String, String> getHeaderList() {\n return headerMap;\n }", "public Set<QName> getHeaders() {\n\t\treturn headers;\n\t}", "public List<Div> getHeaders()\n {\n if (headers == null)\n {\n headers = new ArrayList<>();\n }\n return headers;\n }", "private static void addAdditionalHttpHeaders(Request.Builder requestBuilder) {\n for (Map.Entry<String, String> entry : Parley.getInstance().getNetwork().headers.entrySet()) {\n String name = entry.getKey();\n String value = entry.getValue();\n\n requestBuilder.addHeader(name, value);\n }\n }", "public List<String> getRequestHeadersToRemoveList() {\n return requestHeadersToRemove;\n }", "protected Map<String, String> getRequiredResponseHeaders()\n {\n if (requiredHttpHeaders != null)\n {\n return requiredHttpHeaders;\n }\n if (scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders() != null)\n {\n return scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders();\n }\n Map<String, String> requiredHttpHeaders = new HashMap<>();\n requiredHttpHeaders.put(HttpHeader.CONTENT_TYPE_HEADER, HttpHeader.SCIM_CONTENT_TYPE);\n return requiredHttpHeaders;\n }", "private static void addAdditionalHttpHeaders(LazyHeaders.Builder requestBuilder) {\n for (Map.Entry<String, String> entry : Parley.getInstance().getNetwork().headers.entrySet()) {\n String name = entry.getKey();\n String value = entry.getValue();\n\n requestBuilder.addHeader(name, value);\n }\n }", "public List<String> getRequestHeadersToRemoveList() {\n return requestHeadersToRemove;\n }", "public Map<String, List<String>> getInitialHeaders() {\n return mInitialHeaders;\n }", "Collection<AuthorizationHeader> getCachedAuthorizationHeaders(\n String callid) {\n if (callid == null)\n throw new NullPointerException(\"Null arg!\");\n return this.authorizationHeaders.get(callid);\n\n }", "@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}", "public java.lang.String getReqHeaders() {\n return req_headers;\n }", "public HashMap<String, String> getHeaderList() {\n return headerList;\n }", "public static Map<String, String> getHeaders() {\n if (headers == null) {\n headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"X-Custom-Header\", \"application/json\");\n }\n return headers;\n }", "public java.lang.String getReqHeaders() {\n return req_headers;\n }", "public List<HttpHeaderOption> getResponseHeadersToAddList() {\n return responseHeadersToAdd;\n }", "public abstract HttpHeaders headers();", "public Headers getHeaders() {\n if (headers == null) {\n headers = new DefaultHeaders();\n }\n return headers;\n }", "public HeaderSet getReceivedHeaders() throws IOException {\n ensureOpen();\n\n return replyHeaders;\n }", "@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n private static Map<String, String> sortHeaders( HttpServletRequest request ) {\n Map<String, String> sortedHeaders = new TreeMap<String, String>();\n Enumeration<String> attrEnum = request.getHeaderNames();\n while ( attrEnum.hasMoreElements() ) {\n String s = attrEnum.nextElement();\n sortedHeaders.put( s, request.getHeader( s ) );\n }\n return sortedHeaders;\n }", "public List<HttpHeaderOption> getResponseHeadersToAddList() {\n return responseHeadersToAdd;\n }", "List<String> getHeaders() {\n return forensicsTable.getHeaders();\n }", "RequestHeaders headers();", "public static HeaderHolder getResponseHeaderHolder() {\n return responseHeaderHolder;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return (mHeaders != null && mHeaders.size() > 3) ? mHeaders : NetworkUtils.this.getHeaders();\n }", "public Set<String> keySet()\r\n/* 421: */ {\r\n/* 422:584 */ return this.headers.keySet();\r\n/* 423: */ }", "public ListIterator getHeaderNames() {\n ListIterator li = this.headers.listIterator();\n LinkedList retval = new LinkedList();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n String name = sipHeader.getName();\n retval.add(name);\n }\n return retval.listIterator();\n }", "public Map<String, String> getExtraHeaders() {\n return Collections.unmodifiableMap(extraHeaders);\n }", "private HashMap<String, String> getHeaders() {\n mHeaders = new HashMap<>();\n // set user'token if user token is not set\n if ((this.mToken == null || this.mToken.isEmpty()) && mProfile != null)\n this.mToken = mProfile.getToken();\n\n if (this.mToken != null && !this.mToken.isEmpty()) {\n mHeaders.put(\"Authorization\", \"Token \" + this.mToken);\n Log.e(\"TOKEN\", mToken);\n }\n\n mHeaders.put(\"Content-Type\", \"application/form-data\");\n mHeaders.put(\"Accept\", \"application/json\");\n return mHeaders;\n }", "public AsyncResult<List<OfflineMessageHeader>> requestMessageHeaders() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverItems(null, OfflineMessage.NAMESPACE).thenApply(itemNode ->\r\n itemNode.getItems().stream()\r\n .map(item -> new OfflineMessageHeader(Jid.of(item.getName()), item.getNode()))\r\n .collect(Collectors.toList())\r\n );\r\n }", "public List<Header> getHeaderList() {\n return mHeaderList;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return authenticator.getVolleyHttpHeaders();\n }", "public Map<String, List<String>> getHeaders(){\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders;\n }", "public Map<String, List<String>> getHeaders() throws NullPointerException {\n if (headers != null) {\n return headers;\n }\n throw new NullPointerException(\"getHeaders must be called after asArray or asObject\");\n }", "@Nonnull @NonnullElements @NotLive @Unmodifiable public List<Pair<String,String>> getHeaders() {\n return headerList;\n }", "@Override\n public Collection<String> getRestHeaders() {\n return Arrays.asList(KerberosRealm.AUTHENTICATION_HEADER, KrbConstants.WWW_AUTHENTICATE );\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"authorization\", apikey);\n\n\n return params;\n }", "protected HeaderGroup getResponseHeaderGroup() {\n return responseHeaders;\n }", "public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }", "public Enumeration getAllHeaderLines() throws MessagingException {\n/* 504 */ if (this.headers == null)\n/* 505 */ loadHeaders(); \n/* 506 */ return this.headers.getAllHeaderLines();\n/* */ }", "private HttpHeaders getHttpHeaders()\r\n\t{\n HttpHeaders lHttpHeaders = new HttpHeaders();\r\n lHttpHeaders.setContentType(MediaType.APPLICATION_JSON);\r\n lHttpHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\r\n // set basic authorization with api key and its value\r\n lHttpHeaders.setBasicAuth( PaymentConstant.API_KEY_ID, PaymentConstant.API_KEY_PASSWORD );\r\n return lHttpHeaders;\r\n\t}", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n setRetryPolicy(new DefaultRetryPolicy(5 * DefaultRetryPolicy.DEFAULT_TIMEOUT_MS, 0, 0));\n setRetryPolicy(new DefaultRetryPolicy(0, 0, 0));\n headers = MyShortcuts.AunthenticationHeaders(getBaseContext());\n return headers;\n }", "public Map<String, List<String>> getResponseHeaders() {\n return responseHeaders == null ? Collections.EMPTY_MAP : responseHeaders;\n }", "public String[] getParticularResponseHeaders() {\n return null;\n }", "public abstract Iterator getAllMimeHeaders();", "public Map<String, Header> getHeaderMap() {\n return headerMap;\n }", "public Optional<List<Headers>> headers() {\n return Codegen.objectProp(\"headers\", TypeShape.<List<Headers>>builder(List.class).addParameter(Headers.class).build()).config(config).get();\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "public HttpResponseHeaders getHeaders() {\n return mHeaders;\n }", "@Override\n\t\tpublic Enumeration getHeaders(String name) {\n\t\t\treturn null;\n\t\t}", "public Header[] generateHeaders(HttpMessage httpRequest) {\n Iterator<Map.Entry<String, String>> it = petition.getHeadersMap()\n .entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<String, String> e = (Entry<String, String>) it.next();\n String key = e.getKey();// URLEncoder.encode(e.getKey());\n String value = e.getValue();// URLEncoder.encode(e.getValue());\n httpRequest.addHeader(key, value);\n }\n return httpRequest.getAllHeaders();\n\n }", "@Override\n\t\tpublic Enumeration getHeaderNames() {\n\t\t\treturn null;\n\t\t}", "private HttpHeaders prepareLoginHeaders() {\n ResponseEntity<TokenLoginResponse> loginResponse = requestLoginResponse();\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(\"Authorization\", \"Bearer \" + loginResponse.getBody().getToken());\n return httpHeaders;\n }" ]
[ "0.722085", "0.68106276", "0.6634087", "0.66214645", "0.66209584", "0.65688187", "0.6502986", "0.640865", "0.64030164", "0.6378131", "0.635068", "0.63441104", "0.6338562", "0.6329857", "0.6248952", "0.62159264", "0.61903554", "0.6190048", "0.6154052", "0.6153719", "0.6118968", "0.6098041", "0.6097841", "0.60804415", "0.6053376", "0.6021136", "0.6019483", "0.60009074", "0.59966165", "0.59962016", "0.59893477", "0.59889925", "0.59576535", "0.59570706", "0.5955702", "0.59472436", "0.59428066", "0.5940649", "0.5924399", "0.5912786", "0.58913", "0.58822656", "0.58756447", "0.58671683", "0.5854994", "0.5845339", "0.58220774", "0.5815642", "0.5799342", "0.5785224", "0.5750275", "0.57446134", "0.5729158", "0.5729158", "0.5712765", "0.570808", "0.569163", "0.568188", "0.5675841", "0.5672277", "0.56639725", "0.5658187", "0.5642938", "0.5642654", "0.5640587", "0.5638909", "0.5620691", "0.56187284", "0.5594682", "0.55759877", "0.5564214", "0.55623144", "0.5561696", "0.55417264", "0.55306995", "0.55191404", "0.5510145", "0.5504837", "0.5495306", "0.54884493", "0.54855704", "0.5444731", "0.54353327", "0.5433702", "0.5412884", "0.5409691", "0.5409691", "0.5394376", "0.5393341", "0.5367198", "0.5356295", "0.5351711", "0.5349946", "0.53468746", "0.53468746", "0.53452754", "0.53405046", "0.5335898", "0.53292984", "0.53189194" ]
0.6833789
1
Get all response header holders.
public static HeaderHolder getResponseHeaderHolder() { return responseHeaderHolder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<? extends Header> getAllHeaders();", "public Header[] getResponseHeaders() {\n return getResponseHeaderGroup().getAllHeaders();\n }", "Map<String, List<String>> getHeaders();", "public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }", "List<Header> headers();", "protected HeaderGroup getResponseHeaderGroup() {\n return responseHeaders;\n }", "public Set<String> getHeaderNames() {\n return headers.keySet();\n }", "@Test\n\tprivate void get_all_headers() {\n\t\tRestAssured.baseURI = \"https://reqres.in\";\n\t\tRequestSpecification httpRequest = RestAssured.given();\n\t\tResponse response = httpRequest.request(Method.GET, \"/api/users?page=2\");\n\t\tHeaders headers = response.getHeaders();\n\t\tfor (Header header : headers) {\n\t\t\tSystem.out.println(header.getName() + \" \\t : \" + header.getValue());\n\t\t}\n\t}", "public Header[] getRequestHeaders() {\n return getRequestHeaderGroup().getAllHeaders();\n }", "public List<Div> getHeaders()\n {\n if (headers == null)\n {\n headers = new ArrayList<>();\n }\n return headers;\n }", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}", "Map<String, String> getHeaders();", "Headers getHeaders();", "public Map<String, List<String>> getResponseHeaders() {\n return responseHeaders == null ? Collections.EMPTY_MAP : responseHeaders;\n }", "public Header[] getRequestHeaders();", "public synchronized List<Header> takeResponseHeaders() throws IOException {\n List<Header> list;\n if (isLocallyInitiated()) {\n this.readTimeout.enter();\n while (this.responseHeaders == null && this.errorCode == null) {\n try {\n waitForIo();\n } catch (Throwable th) {\n this.readTimeout.exitAndThrowIfTimedOut();\n throw th;\n }\n }\n this.readTimeout.exitAndThrowIfTimedOut();\n list = this.responseHeaders;\n if (list != null) {\n this.responseHeaders = null;\n } else {\n throw new StreamResetException(this.errorCode);\n }\n } else {\n throw new IllegalStateException(\"servers cannot read response headers\");\n }\n return list;\n }", "List<? extends Header> getHeaders(String name);", "@Override\n\tpublic Collection<String> getHeaders(String name) {\n\t\treturn null;\n\t}", "public String[] getHeaders(){\n String[] headers={\"Owner Unit ID\",\"Origin Geoloc\",\"Origin Name\",\"Number of Assets\",};\n return headers;\n }", "public MultiMap getHeaders() {\n return headers;\n }", "public Enumeration getAllHeaders() throws MessagingException {\n/* 451 */ if (this.headers == null)\n/* 452 */ loadHeaders(); \n/* 453 */ return this.headers.getAllHeaders();\n/* */ }", "public Header[] getResponseFooters() {\n return getResponseTrailerHeaderGroup().getAllHeaders();\n }", "public Map getHeaders() {\r\n if (headers == null) {\r\n headers = new HashMap();\r\n }\r\n\r\n return headers;\r\n }", "public List<HttpHeaderOption> getResponseHeadersToAddList() {\n return responseHeadersToAdd;\n }", "public Map<String, AbstractHeader> getHeaders()\n\t{\n\t\treturn headers;\n\t}", "public List<HttpHeaderOption> getResponseHeadersToAddList() {\n return responseHeadersToAdd;\n }", "public Map<String, String> headers() {\n return this.header.headers();\n }", "public String[] getParticularResponseHeaders() {\n return null;\n }", "public VersionedMap getHeaders ()\n {\n return headers;\n }", "public Map<String, List<String>> getHeaders() {\n\t\t\treturn headers;\n\t\t}", "public List<Header> getSessionHeaders() {\n\t\treturn Collections.unmodifiableList(sessionHeaders);\n\t}", "public Map<String, List<String>> getHeaders(){\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders;\n }", "public HeaderSet getReceivedHeaders() throws IOException {\n ensureOpen();\n\n return replyHeaders;\n }", "public Map<String, HeaderInfo> getHeaders() {\n\t\treturn headers;\n\t}", "Collection<String> getHeaderNames();", "@Override public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "@ZAttr(id=1074)\n public String[] getResponseHeader() {\n return getMultiAttr(Provisioning.A_zimbraResponseHeader);\n }", "public final Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "protected Map<String, String> getRequiredResponseHeaders()\n {\n if (requiredHttpHeaders != null)\n {\n return requiredHttpHeaders;\n }\n if (scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders() != null)\n {\n return scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders();\n }\n Map<String, String> requiredHttpHeaders = new HashMap<>();\n requiredHttpHeaders.put(HttpHeader.CONTENT_TYPE_HEADER, HttpHeader.SCIM_CONTENT_TYPE);\n return requiredHttpHeaders;\n }", "public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "Set<String> getHeaderNames();", "@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}", "public Map<String,List<String>> getHeaderMap() {\n\n\t\treturn headers;\n\t}", "public Set<QName> getHeaders() {\n\t\treturn headers;\n\t}", "public List<Header> nextHeader(JSONResponse response){\n\t\tList<Header> headers = getHeaders();\n if(response.token == null){\n return headers;\n } else {\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + response.token));\n return headers;\n }\n }", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "public Map<String, String> getHeaderList() {\n return headerMap;\n }", "@Override\n public Enumeration<String> getHeaderNames() {\n List<String> names = new ArrayList<String>();\n names.addAll(Collections.list(super.getHeaderNames()));\n names.add(\"Authorization\");\n return Collections.enumeration(names);\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return httpClientRequest.getHeaders();\n }", "public static HeaderHolder getRequestHeaderHolder() {\n return requestHeaderHolder;\n }", "public abstract HttpHeaders headers();", "public HttpResponseHeaders getHeaders() {\n return mHeaders;\n }", "@Override\n public Enumeration<String> getHeaders(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return Collections.enumeration(Arrays.asList(getHeader(name)));\n } else {\n return super.getHeaders(name);\n }\n }", "public Optional<List<Headers>> headers() {\n return Codegen.objectProp(\"headers\", TypeShape.<List<Headers>>builder(List.class).addParameter(Headers.class).build()).config(config).get();\n }", "@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}", "public HashMap<String, String> getHeaderList() {\n return headerList;\n }", "public Map<String, List<String>> getHeaders() throws NullPointerException {\n if (headers != null) {\n return headers;\n }\n throw new NullPointerException(\"getHeaders must be called after asArray or asObject\");\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return (mHeaders != null && mHeaders.size() > 3) ? mHeaders : NetworkUtils.this.getHeaders();\n }", "@Override\n\t\tpublic Enumeration getHeaderNames() {\n\t\t\treturn null;\n\t\t}", "@Nonnull @NonnullElements @NotLive @Unmodifiable public List<Pair<String,String>> getHeaders() {\n return headerList;\n }", "List<String> getHeaders() {\n return forensicsTable.getHeaders();\n }", "public Headers getHeaders() {\n if (headers == null) {\n headers = new DefaultHeaders();\n }\n return headers;\n }", "Collection<AuthorizationHeader> getCachedAuthorizationHeaders(\n String callid) {\n if (callid == null)\n throw new NullPointerException(\"Null arg!\");\n return this.authorizationHeaders.get(callid);\n\n }", "public Enumeration getAllHeaderLines() throws MessagingException {\n/* 504 */ if (this.headers == null)\n/* 505 */ loadHeaders(); \n/* 506 */ return this.headers.getAllHeaderLines();\n/* */ }", "public interface HttpResponseHeaders {\n\n /**\n * Http status code\n */\n int statusCode();\n\n /**\n * all commons headers(exclude request line)\n */\n List<Header> headers();\n}", "private Header[] requestHeadMaker() {\n\t\tHeader[] header = {\n\t\t\t\tnew BasicHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t\t//new BasicHeader(HttpHeaders.USER_AGENT, \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t, new BasicHeader(\"Accpet-Language\", \"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6\")\n\t\t\t, new BasicHeader(\"Accept-Charset\", \"application/x-www-form-urlencoded; charset=UTF-8\")\n\t\t\t, new BasicHeader(\"Origin\", \"https://developer.riotgames.com\")\n\t\t\t, //new BasicHeader(\"X-Riot-Token\", riotApiKey)\n\t\t};\n\t\treturn header;\n\t}", "public HttpHeaders getHeaders()\r\n/* 63: */ {\r\n/* 64: 93 */ if (this.headers == null)\r\n/* 65: */ {\r\n/* 66: 94 */ this.headers = new HttpHeaders();\r\n/* 67: */ Enumeration headerValues;\r\n/* 68: 95 */ for (Enumeration headerNames = this.servletRequest.getHeaderNames(); headerNames.hasMoreElements(); \r\n/* 69: 98 */ headerValues.hasMoreElements())\r\n/* 70: */ {\r\n/* 71: 96 */ String headerName = (String)headerNames.nextElement();\r\n/* 72: 97 */ headerValues = this.servletRequest.getHeaders(headerName);\r\n/* 73: 98 */ continue;\r\n/* 74: 99 */ String headerValue = (String)headerValues.nextElement();\r\n/* 75:100 */ this.headers.add(headerName, headerValue);\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:104 */ return this.headers;\r\n/* 79: */ }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return authenticator.getVolleyHttpHeaders();\n }", "public List<Header> getHeaderList() {\n return mHeaderList;\n }", "protected HeaderGroup getRequestHeaderGroup() {\n return requestHeaders;\n }", "public ListIterator getHeaderNames() {\n ListIterator li = this.headers.listIterator();\n LinkedList retval = new LinkedList();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n String name = sipHeader.getName();\n retval.add(name);\n }\n return retval.listIterator();\n }", "public List<String> getHeader(String key) {\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders.get(key);\n }", "@Override\n\t\tpublic Enumeration getHeaders(String name) {\n\t\t\treturn null;\n\t\t}", "public static Map<String, String> getHeaders() {\n if (headers == null) {\n headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"X-Custom-Header\", \"application/json\");\n }\n return headers;\n }", "Map<String, String> getRequestHeaders();", "public abstract Iterator getAllMimeHeaders();", "public Map<String, List<String>> getInitialHeaders() {\n return mInitialHeaders;\n }", "public List<String> getResponseHeadersToRemoveList() {\n return responseHeadersToRemove;\n }", "public static Header[] getAllResponseHeaders(URL url) throws Exception {\n HttpClient httpClient = new DefaultHttpClient();\n HttpHead httpHead = new HttpHead(url.toString());\n HttpResponse response = httpClient.execute(httpHead);\n return response.getAllHeaders();\n }", "public List<String> getResponseHeadersToRemoveList() {\n return responseHeadersToRemove;\n }", "public String[] getHeaders()\n\t{\n\t\tString[] lines = this.header.split(\"\\\\r\\\\n\");\n\t\treturn lines;\n\t}", "private HttpHeaders prepareLoginHeaders() {\n ResponseEntity<TokenLoginResponse> loginResponse = requestLoginResponse();\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(\"Authorization\", \"Bearer \" + loginResponse.getBody().getToken());\n return httpHeaders;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n setRetryPolicy(new DefaultRetryPolicy(5 * DefaultRetryPolicy.DEFAULT_TIMEOUT_MS, 0, 0));\n setRetryPolicy(new DefaultRetryPolicy(0, 0, 0));\n headers = MyShortcuts.AunthenticationHeaders(getBaseContext());\n return headers;\n }", "public Set<String> keySet()\r\n/* 421: */ {\r\n/* 422:584 */ return this.headers.keySet();\r\n/* 423: */ }", "@Override\n public Collection<String> getRestHeaders() {\n return Arrays.asList(KerberosRealm.AUTHENTICATION_HEADER, KrbConstants.WWW_AUTHENTICATE );\n }", "public List<HttpHeaderOption> getRequestHeadersToAddList() {\n return requestHeadersToAdd;\n }", "public List<HttpHeaderOption> getRequestHeadersToAddList() {\n return requestHeadersToAdd;\n }", "public String getHeaderNames(){return header.namesText;}", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }", "public Collection<List<String>> values()\r\n/* 426: */ {\r\n/* 427:588 */ return this.headers.values();\r\n/* 428: */ }", "public ListIterator getUnrecognizedHeaders() {\n return this.unrecognizedHeaders.listIterator();\n }", "public Map<String, String> getExtraHeaders() {\n return Collections.unmodifiableMap(extraHeaders);\n }", "public Map<String, Header> getHeaderMap() {\n return headerMap;\n }", "public AsyncResult<List<OfflineMessageHeader>> requestMessageHeaders() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverItems(null, OfflineMessage.NAMESPACE).thenApply(itemNode ->\r\n itemNode.getItems().stream()\r\n .map(item -> new OfflineMessageHeader(Jid.of(item.getName()), item.getNode()))\r\n .collect(Collectors.toList())\r\n );\r\n }", "public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }", "private static void addAdditionalHttpHeaders(LazyHeaders.Builder requestBuilder) {\n for (Map.Entry<String, String> entry : Parley.getInstance().getNetwork().headers.entrySet()) {\n String name = entry.getKey();\n String value = entry.getValue();\n\n requestBuilder.addHeader(name, value);\n }\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/json\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/json\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }" ]
[ "0.71392924", "0.71274996", "0.69810057", "0.6949183", "0.69189525", "0.68929857", "0.6856623", "0.6795428", "0.67836887", "0.6768878", "0.6699688", "0.66913795", "0.66809887", "0.6649707", "0.66104335", "0.6606174", "0.65948665", "0.65854436", "0.6579638", "0.65574265", "0.64899397", "0.6486416", "0.64761454", "0.64722437", "0.64699817", "0.64563936", "0.64461523", "0.6433931", "0.6430508", "0.64109623", "0.64082235", "0.6392783", "0.6390021", "0.6373721", "0.6371392", "0.6366842", "0.6357982", "0.6337579", "0.6330914", "0.63177", "0.6311179", "0.6298847", "0.62898564", "0.6260536", "0.62500733", "0.6241907", "0.6208489", "0.62009746", "0.61923903", "0.618631", "0.6182632", "0.61724716", "0.6159017", "0.61558694", "0.61289096", "0.6124578", "0.6124578", "0.60789114", "0.6078543", "0.60673785", "0.60140187", "0.60110414", "0.6007439", "0.60032886", "0.5999648", "0.5998945", "0.5998014", "0.5994236", "0.5992918", "0.59906775", "0.5989071", "0.5963155", "0.59592086", "0.5958153", "0.59504986", "0.59265053", "0.5855459", "0.58468574", "0.5832978", "0.5829828", "0.58167094", "0.5801808", "0.5800604", "0.5789783", "0.57723236", "0.5763652", "0.57402194", "0.57309663", "0.57230484", "0.57120776", "0.5710848", "0.57001835", "0.56828105", "0.56801724", "0.5675991", "0.5675683", "0.565984", "0.56564206", "0.56468916", "0.56468916" ]
0.69571745
3
Constructor used to define the board. It instanciates a 2d array if tiles representing the games board.
public ThreeStonesBoard(int size) { this.size = size; this.board = new Tile[size][size]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Board() {\n this.board = new byte[][] { new byte[3], new byte[3], new byte[3] };\n }", "Board() {\n\t\tswitch (Board.boardType) {\n\t\tcase Tiny:\n\t\t\tthis.dimensions = TinyBoard; break;\n\t\tcase Giant:\n\t\t\tthis.dimensions = GiantBoard; break;\n\t\tdefault:\n\t\t\tthis.dimensions = StandardBoard; break;\n\t\t}\n\t\tboard = new Square[dimensions.x][dimensions.y];\n\t\tinit();\n\t}", "public Board() {\n tiles = new int[3][3];\n int[] values = genValues(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 0});\n\n int offset;\n for (int i = 0; i < 3; i++) {\n offset = 2 * i;\n tiles[i] = Arrays.copyOfRange(values, i + offset, i + offset + 3);\n }\n }", "public Board()\r\n {\r\n board = new Piece[8][8];\r\n xLength = yLength = 8;\r\n }", "public Board(int[][] tiles) {\n n = tiles.length;\n this.tiles = deepCopy(tiles);\n }", "public Board() {\n\t\tdimension = 9;\n\t\tpuzzle = new int[dimension][dimension];\n\t}", "public Board(int[][] tiles) {\n N = tiles.length; // Store dimension of passed tiles array\n this.tiles = new int[N][N]; // Instantiate instance grid of N x N size\n for (int i = 0; i < N; i++)\n this.tiles[i] = tiles[i].clone(); // Copy passed grid to instance grid\n }", "public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "public GameBoard(){\r\n boardCells = new GameCell[NUMBER_OF_CELLS];\r\n for( int i= 0; i< NUMBER_OF_CELLS; i++ ){\r\n boardCells[i] = new GameCell(i);//\r\n }\r\n }", "public Board() {\r\n\t\tthis.size = 4;\r\n\t\tthis.gameBoard = createBoard(4);\r\n\t\tthis.openTiles = 16;\r\n\t\tthis.moves = 0;\r\n\t\tthis.xValues = new boolean[4][4];\r\n\t\tthis.yValues = new boolean[4][4];\r\n\t\tthis.complete = false;\r\n\t}", "public Board() {\n\t\tboard = new char[9][9];\n\t}", "public Board(int[][] tiles) {\n _N = tiles.length;\n _tiles = new int[_N][_N];\n _goal = new int[_N][_N];\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n _tiles[i][j] = tiles[i][j];\n _goal[i][j] = 1 + j + i * _N;\n }\n }\n _goal[_N-1][_N-1] = 0;\n }", "public TicTacToeBoard() {board = new int[rows][columns];}", "public UIBoard()\r\n\t{\r\n\t\t//Creates a 10x10 \"Board\" object\r\n\t\tsuper(10,10);\r\n\t\tgrid = new int[getLength()][getWidth()];\r\n\t\t\r\n\t\t//Sets all coordinates to the value 0, which corresponds to \"not hit yet\"\r\n\t\tfor(int i=0; i<grid.length; i++)\r\n\t\t\tfor(int j=0; j<grid[i].length; j++)\r\n\t\t\t\tgrid[i][j] = 0;\t\t\r\n\t}", "public Board() {\n for (int y = 0; y < spaces.length; y++) {\n for (int x = 0; x < spaces[0].length; x++) {\n spaces[y][x] = new SubBoard();\n wonBoards[y][x] = ' ';\n }\n }\n }", "public Board()\r\n\t{\r\n\t\tthis.grid = new CellState[GRID_SIZE][GRID_SIZE];\r\n\t\tthis.whiteMarblesCount = MARBLES_COUNT;\r\n\t\tthis.blackMarblesCount = MARBLES_COUNT;\r\n\t\t\r\n\t\t/**\r\n\t\t * Initializes the board with empty value\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < GRID_SIZE; indexcol++)\r\n\t\t{\r\n\t\t\tfor (int indexrow = 0; indexrow < GRID_SIZE; indexrow++)\r\n\t\t\t{\r\n\t\t\t\tthis.grid[indexrow][indexcol] = CellState.EMPTY;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Sets marbles on the board with default style\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[0][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[8][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 0; indexcol < 6; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[1][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[7][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 2; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[2][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[6][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tthis.grid[3][8] = CellState.INVALID;\r\n\t\tthis.grid[2][7] = CellState.INVALID;\r\n\t\tthis.grid[1][6] = CellState.INVALID;\r\n\t\tthis.grid[0][5] = CellState.INVALID;\r\n\t\tthis.grid[5][0] = CellState.INVALID;\r\n\t\tthis.grid[6][1] = CellState.INVALID;\r\n\t\tthis.grid[7][2] = CellState.INVALID;\r\n\t\tthis.grid[8][3] = CellState.INVALID;\r\n\t}", "public Board() {\n\t\tboardState = new Field[DIMENSION][DIMENSION];\n\t\tfor(int i = 0; i < DIMENSION; i++) {\n\t\t\tfor(int j = 0; j < DIMENSION; j++) {\n\t\t\t\tboardState[i][j] = new Field();\n\t\t\t}\n\t\t}\n\t}", "public Board(int[][] tiles) {\n int n = tiles.length;\n if (n < 2 || n >= 128)\n throw new IllegalArgumentException(\"Tiles size must be 2 ≤ n < 128\");\n for (int i = 0; i < n; i++)\n if (tiles[i].length != n)\n throw new IllegalArgumentException(\"Incorrect size of tile at index \" + i);\n\n this.dimension = n;\n this.tiles = new int[n][n];\n for (int i = 0; i < n; i++)\n System.arraycopy(tiles[i], 0, this.tiles[i], 0, n);\n }", "public Board(int[][] tiles) {\n // CHECK IF CONTAINS RIGHT NUMBERS\n this.tiles = new char[tiles.length * tiles.length];\n int counter = 0;\n this.dim = tiles.length;\n for (int i = 0; i < tiles.length; i++) {\n for (int j = 0; j < tiles.length; j++)\n this.tiles[counter++] = (char) tiles[i][j];\n }\n }", "public Board(char[][] board) {\n this.boardWidth = board.length;\n this.boardHeight = board[0].length;\n this.board = board;\n this.numShips = 0;\n boardInit();\n }", "public Board() {\n this.board = new Piece[16];\n }", "public Board(int boardHeight, int boardWidth) {\n this.boardWidth = boardHeight+1;\n this.boardHeight = boardWidth+1;\n this.board = new char[this.boardHeight][this.boardWidth];\n this.numShips = 0;\n boardInit();\n }", "private void initGameBoard(int rows, int cols)\n {\n //GameBoard = new Cell[ROWS][COLS];\n\n for(int i = 0; i < rows; i++)\n {\n for(int j = 0; j < cols; j++)\n {\n GameBoard[i][j] = new Cell(i,j, Color.BLUE,false);\n }\n\n }\n }", "public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "public TicTacToeBoard() {\n grid = new Cell[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++)\n grid[i][j] = new Cell(i, j, '-');\n }\n }", "public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}", "public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}", "public GameBoard(){\r\n\t\tboard = new Box[boardSize];\r\n\t\tfor(int i = 0; i < boardSize; i++){\r\n\t\t\tboard[i] = Box.EMPTY;\r\n\t\t}\r\n\t}", "public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }", "public TicTacToe(){ \r\n\t\tboard = new char[3][3];\r\n\t}", "public Gameboard() {\n\n\t\tturn = 0;\n\n\t\tboard = new Cell[4][4][4];\n\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\tfor (int k = 0; k < board.length; k++) {\n\n\t\t\t\t\tboard[i][j][k] = Cell.E;\n\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Board() {\n\n for(int row = 0; row < size; row++) {\n for(int col = 0; col < size; col++) {\n\n grid[row][col] = \"-\";\n\n }\n }\n\n }", "public Board(int[][] tiles) {\n N = tiles.length;\n L = N * N;\n\n short[] res1d = new short[L];\n short k = 0;\n for (short i = 0; i < N; i++) {\n for (short j = 0; j < N; j++) {\n res1d[k] = (short) tiles[i][j];\n if (res1d[k] == 0) {\n blank_r = i;\n blank_c = j;\n }\n k++;\n }\n }\n arr1d = res1d;\n }", "public Board(){\n for(int holeIndex = 0; holeIndex<holes.length; holeIndex++)\n holes[holeIndex] = new Hole(holeIndex);\n for(int kazanIndex = 0; kazanIndex<kazans.length; kazanIndex++)\n kazans[kazanIndex] = new Kazan(kazanIndex);\n nextToPlay = Side.WHITE;\n }", "public AIPlayer(Board board) {\n cells = board.squares;\n }", "public Board() {\n playerNumber = 2;\n deadBlackCount = 0;\n deadWhiteCount = 0;\n deadRedCount = 0;\n deadBlueCount = 0;\n\n fields = new Field[DIMENSION][DIMENSION];\n // init fields\n for (int i = 0; i < DIMENSION; i++) {\n for (int j = 0; j < DIMENSION; j++) {\n fields[i][j] = new Field();\n fields[i][j].setX(i);\n fields[i][j].setY(j);\n }\n }\n }", "public Board() {\n\t\tboard = new int[8][8];\n\t\tbombs = 64 / 3;\n\t\tdifficulty = GlobalModel.BESTSCORE_EASY;\n\t\tfillBoard();\n\t\tsetDefaultScores();\n\t}", "private Board()\r\n {\r\n this.grid = new Box[Config.GRID_SIZE][Config.GRID_SIZE];\r\n \r\n for(int i = 0; i < Config.NB_WALLS; i++)\r\n {\r\n this.initBoxes(Wall.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_CHAIR; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_PLAYER; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n }", "public Board() {\n\t\tthis.table = new int[Constants.SIZE][Constants.SIZE];\n\t\tthis.P1Movable = new boolean[Constants.SIZE][Constants.SIZE];\n\t\tthis.P2Movable = new boolean[Constants.SIZE][Constants.SIZE];\n\t\tP1turn = true;\n\t\tnumPieces = 0;\n\t\t\n\t\tfor(int i=0; i<table.length; i++) {\n\t\t\tfor(int j=0; j<table[i].length; j++) {\n\t\t\t\ttable[i][j] = Constants.EMPTY;\n\t\t\t\tP1Movable[i][j] = true;\n\t\t\t\tP2Movable[i][j] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Board() {\n\t\tfor(int i = 0; i < board.length; i++){\n\t\t\tfor(int j = 0; j < board[i].length; j++){\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "public Board() {\n //Create all pieces\n board[0][0] = new Rook(\"black\", 0, 0);\n board[0][1] = new Knight(\"black\", 0, 1);\n board[0][2] = new Bishop(\"black\", 0, 2);\n board[0][3] = new Queen(\"black\", 0, 3);\n board[0][4] = new King(\"black\", 0, 4);\n board[0][5] = new Bishop(\"black\", 0, 5);\n board[0][6] = new Knight(\"black\", 0, 6);\n board[0][7] = new Rook(\"black\", 0, 7);\n\n board[7][0] = new Rook(\"white\", 7, 0);\n board[7][1] = new Knight(\"white\", 7, 1);\n board[7][2] = new Bishop(\"white\", 7, 2);\n board[7][3] = new Queen(\"white\", 7, 3);\n board[7][4] = new King(\"white\", 7, 4);\n board[7][5] = new Bishop(\"white\", 7, 5);\n board[7][6] = new Knight(\"white\", 7, 6);\n board[7][7] = new Rook(\"white\", 7, 7);\n\n for (int j = 0; j < 8; j++) {\n board[1][j] = new Pawn(\"black\", 1, j);\n board[6][j] = new Pawn(\"white\", 6, j);\n }\n\n //Printing everything\n for (Piece[] a : board) {\n for (Piece b : a) {\n System.out.printf(\"%-15s\", \"[\" + b + \"]\");\n }\n System.out.println(\"\");\n }\n }", "public Sudoku() {\n this.board = new int[size][size];\n }", "public Board() {\n\t\tthis.myBoard = new BlockFor2048[4][4];\n\t\tint randomInserted = 0;\n\t\tint colInd = 0;\n\t\tint rowInd = 0;\n\t\twhile (randomInserted != 2){\n\t\t\tcolInd = (int)(Math.random() * 4);\n\t\t\trowInd = (int)(Math.random() * 4);\n\t\t\tif (this.myBoard[colInd][rowInd] == null){\n\t\t\t\tthis.myBoard[colInd][rowInd] = new BlockFor2048(2);\n\t\t\t\trandomInserted++;\n\t\t\t}\n\t\t}\t\t\n\t\tthis.ScoreValue = 0;\n\t}", "public Board() {\n initialize(3, null);\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public Board(String gameType) {\n propertyFactory = new TileFactory(gameType);\n createBoard();\n }", "public Board(int xLen, int yLen)\r\n {\r\n if(xLen <= 0 || yLen <= 0)\r\n xLen = yLen = 8;\r\n board = new Piece[xLen][yLen];\r\n xLength = xLen;\r\n yLength = yLen;\r\n }", "private void layTiles() {\n board = new Tile[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n layTile(new Tile(i, j));\n }\n }\n }", "public Board() {\n\t\tmarkCount = 0;\n\t\ttheBoard = new char[3][];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\ttheBoard[i] = new char[3];\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\ttheBoard[i][j] = SPACE_CHAR;\n\t\t}\n\t}", "public GameBoard() {\r\n boards = new ArrayList<GameBoard>();\r\n }", "public Board(int x, int y){\n player1 = \"Player 1\";\n player2 = \"Player 2\";\n randomPlayer1 = \"CPU 1\";\n randomPlayer2 = \"CPU 2\";\n board = new Square[x][y];\n for (int i = 0; i < board.length;i++){\n row++;\n for(int j = 0; j < board.length; j++){\n if(column == y){\n column = 0;\n }\n column++;\n board[i][j] = new Square(row, column);\n }\n }\n row = x;\n column = y;\n }", "private void initializeBoard() {\n\n squares = new Square[8][8];\n\n // Sets the initial turn to the White Player\n turn = white;\n\n final int maxSquares = 8;\n for(int i = 0; i < maxSquares; i ++) {\n for (int j = 0; j < maxSquares; j ++) {\n\n Square square = new Square(j, i);\n Piece piece;\n Player player;\n\n if (i < 2) {\n player = black;\n } else {\n player = white;\n }\n\n if (i == 0 || i == 7) {\n switch(j) {\n case 3:\n piece = new Queen(player, square);\n break;\n case 4:\n piece = new King(player, square);\n break;\n case 2:\n case 5:\n piece = new Bishop(player, square);\n break;\n case 1:\n case 6:\n piece = new Knight(player, square);\n break;\n default:\n piece = new Rook(player, square);\n }\n square.setPiece(piece);\n } else if (i == 1 || i == 6) {\n piece = new Pawn(player, square);\n square.setPiece(piece);\n }\n squares[j][i] = square;\n }\n }\n }", "public Board() {\n this.x = 0;\n this.o = 0;\n }", "public Board(int boardSize) {\n\n sounds = new GameSounds();\n gridSize = boardSize;\n newGame = 0;\n titleScreen = true;\n traversedTiles = new boolean[gridSize][gridSize];\n pellets = new boolean[gridSize][gridSize];\n ghosts.add(new Ghost(180, 180, ghostImage1));\n ghosts.add(new Ghost(200, 180, ghostImage2));\n ghosts.add(new Ghost(220, 180, ghostImage3));\n map = getMapFromFile(\"first.txt\");\n// ghosts.add(new Ghost(220,180,ghostImage4));\n reset();\n }", "public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }", "public void initBasicBoardTiles() {\n\t\ttry {\n\t\t\tfor(int i = 1 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.BLACK).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.WHITE).build());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 2 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.WHITE).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.BLACK).build());\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(LocationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "TetrisBoard() {\n\t\t// create new board \n\t\tblockMatrix = new boolean[NUM_ROWS][NUM_COLS];\n\t\t\n\t\t// fill in values for board\n\t\tinitBoard();\n\t\t\n\t\t// add new piece to fall\n\t\taddNewPiece();\n\t\t\n\t\t// start scores at 0\n\t\tnumLines = 0;\n\t\tnumTetrises = 0;\n\t}", "public OthelloBoard (int height, int width){\n super(height, width);\n m_Pieces = new OthelloPiece[WIDTH][HEIGHT];\n m_PieceCount+=4;\n \n }", "private Board create5by5Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 5);\n Tile t2 = new Tile(1, 5);\n Tile t3 = new Tile(2, 5);\n Tile t4 = new Tile(3, 5);\n Tile t5 = new Tile(4, 5);\n Tile t6 = new Tile(5, 5);\n Tile t7 = new Tile(6, 5);\n Tile t8 = new Tile(7, 5);\n Tile t9 = new Tile(8, 5);\n Tile t10 = new Tile(9, 5);\n Tile t11 = new Tile(10, 5);\n Tile t12 = new Tile(11, 5);\n Tile t13 = new Tile(12, 5);\n Tile t14 = new Tile(13, 5);\n Tile t15 = new Tile(14, 5);\n Tile t16 = new Tile(15, 5);\n Tile t17 = new Tile(16, 5);\n Tile t18 = new Tile(17, 5);\n Tile t19 = new Tile(18, 5);\n Tile t20 = new Tile(19, 5);\n Tile t21 = new Tile(20, 5);\n Tile t22 = new Tile(21, 5);\n Tile t23 = new Tile(22, 5);\n Tile t24 = new Tile(23, 5);\n Tile t25 = new Tile(24, 5);\n tiles = new Tile[5][5];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[0][3] = t5;\n tiles[0][4] = t9;\n tiles[1][0] = t3;\n tiles[1][1] = t1;\n tiles[1][2] = t8;\n tiles[1][3] = t4;\n tiles[1][4] = t11;\n tiles[2][0] = t17;\n tiles[2][1] = t18;\n tiles[2][2] = t10;\n tiles[2][3] = t25;\n tiles[2][4] = t20;\n tiles[3][0] = t23;\n tiles[3][1] = t21;\n tiles[3][2] = t12;\n tiles[3][3] = t15;\n tiles[3][4] = t13;\n tiles[4][0] = t22;\n tiles[4][1] = t24;\n tiles[4][2] = t14;\n tiles[4][3] = t16;\n tiles[4][4] = t19;\n return new Board(tiles);\n }", "public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }", "public ThreeStonesBoard(Tile[][] board) {\r\n this.board = board;\r\n }", "public void initializeBoard() {\r\n int x;\r\n int y;\r\n\r\n this.loc = this.userColors();\r\n\r\n this.board = new ArrayList<ACell>();\r\n\r\n for (y = -1; y < this.blocks + 1; y += 1) {\r\n for (x = -1; x < this.blocks + 1; x += 1) {\r\n ACell nextCell;\r\n\r\n if (x == -1 || x == this.blocks || y == -1 || y == this.blocks) {\r\n nextCell = new EndCell(x, y);\r\n } else {\r\n nextCell = new Cell(x, y, this.randColor(), false);\r\n }\r\n if (x == 0 && y == 0) {\r\n nextCell.flood();\r\n }\r\n this.board.add(nextCell);\r\n }\r\n }\r\n this.stitchCells();\r\n this.indexHelp(0, 0).floodInitStarter();\r\n }", "public GameBoard() {\n this.gameStarted = false;\n this.turn = 1; \n this.boardState = new char[3][3];\n this.winner = 0; \n this.isDraw = false; \n\n }", "public Game() {\n board = new TileState[BOARD_SIZE][BOARD_SIZE];\n for(int i=0; i<BOARD_SIZE; i++)\n for(int j=0; j<BOARD_SIZE; j++)\n board[i][j] = TileState.BLANK;\n movesPlayed = 0;\n playerOneTurn = true;\n gameOver = false;\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n drawLines();\n \n for( int r = 0; r < board.length; r++ )\n {\n for( int c = 0; c < board[r].length; c++)\n {\n board[r][c] = \"\"; \n \n }\n }\n }", "Board() {\n\t\tSpace[][] temp = new Space[xDim][yDim];\n\t\tfor (int i = 0; i < xDim; i++) {\n\t\t\tfor (int j = 0; j < yDim; j++) {\n\n\t\t\t\ttemp[i][j] = new Space();\n\t\t\t}\n\t\t}\n\n\t\thead = temp[0][0];\n\n\t\tfor (int x = 0; x < xDim; x++) {\n\t\t\tfor (int y = 0; y < yDim; y++) {\n\t\t\t\tif (x != 0) {\n\t\t\t\t\t// Left\n\t\t\t\t\ttemp[x][y].join(2, temp[x - 1][y]);\n\t\t\t\t}\n\n\t\t\t\tif (y != 0) {\n\t\t\t\t\t// Top\n\t\t\t\t\ttemp[x][y].join(1, temp[x][y - 1]);\n\t\t\t\t}\n\n\t\t\t\tif (x != xDim - 1) {\n\t\t\t\t\t// Right\n\t\t\t\t\ttemp[x][y].join(0, temp[x + 1][y]);\n\t\t\t\t}\n\n\t\t\t\tif (y != yDim - 1) {\n\t\t\t\t\t// Bottom\n\t\t\t\t\ttemp[x][y].join(3, temp[x][y + 1]);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tdevs = new ArrayList<Developer>();\n\t\tmountains = new ArrayList<Coordinates>();\n\n\t\tfor (int x = 0; x < xDim; x++) {\n\t\t\tif (x == 0 || x == xDim - 1)\n\t\t\t\tfor (int y = 0; y < Math.round(yDim / 2); y++) {\n\t\t\t\t\tmountains.add(new Coordinates(x, y));\n\t\t\t\t}\n\t\t\telse\n\t\t\t\tmountains.add(new Coordinates(x, 0));\n\t\t}\n\n\t}", "public GameBoard (int height, int width)\n {\n mHeight = height;\n mWidth = width;\n }", "private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }", "public Board(int[][] blocks) {\n if (blocks == null) {\n throw new NullPointerException();\n }\n N = blocks.length;\n tiles = copy2d(blocks);\n }", "public Board() {\n\t\t\n\t\tchar letter = 'A';\n\t\tint letterValue;\n\t\tint tempNum;\n\t\tString position;\n\t\tString number;\n\t\t\n\t\t\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tfor(int j = 0; j < 10; j++) {\n\t\t\t\ttempNum = j+1;\n\t\t\t\tnumber = Integer.toString(tempNum);\n\t\t\t\tposition = Character.toString(letter) + number;\n\t\t\t\t//position += Character.toString(number);\n\t\t\t\tradar[i][j] = position;\n\t\t\t}\n\t\t\tletterValue = (int) letter;\n\t\t\tletterValue++;\n\t\t\tletter = (char) letterValue;\n\t\t}\n\t\trefRadar = backup(radar);\n\t}", "public Board(int[][] tiles) {\n this.tiles = tiles;\n n = tiles.length;\n ham = 0;\n man = 0;\n zero = new int[2];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (tiles[i][j] == 0) {\n zero[0] = i;\n zero[1] = j;\n continue;\n }\n if (i*n+j+1 != tiles[i][j]) {\n int val = tiles[i][j]-1;\n man += Math.abs(i-val/n) + Math.abs(j-val%n);\n ham++;\n }\n }\n }\n }", "private void initializeBoard(){\r\n checks =new int[][]{{0,2,0,2,0,2,0,2},\r\n {2,0,2,0,2,0,2,0},\r\n {0,2,0,2,0,2,0,2},\r\n {0,0,0,0,0,0,0,0},\r\n {0,0,0,0,0,0,0,0},\r\n {1,0,1,0,1,0,1,0},\r\n {0,1,0,1,0,1,0,1},\r\n {1,0,1,0,1,0,1,0}};\r\n }", "public void makeBoard2d() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board2d[i][j] = this.board[(i * 3) + j];\n }\n }\n }", "public Board(int[][] values) {\n tiles = new int[3][];\n for (int i = 0; i < 3; i++) {\n tiles[i] = Arrays.copyOf(values[i], 3);\n }\n }", "public Board(int dimensions){\n this.dimensions = dimensions;\n createBoard(dimensions);\n this.status = Status.CREATED;\n this.hitsLeft = 15;\n }", "private void initObjects()\n {\n //creating a new board of 8x8 array \n board = new Disc[Constants.ROWS][Constants.COLUMNS];\n //loops through and creates all empty discs to be filled\n for(int row = 0; row < Constants.ROWS; row++)\n {\n for(int col = 0; col < Constants.COLUMNS; col++)\n {\n board[row][col] = new Disc();\n }\n }\n//initial board setup \n board[3][3].setDisColor(Constants.LIGHT);\n board[3][4].setDisColor(Constants.DARK);\n board[4][3].setDisColor(Constants.DARK);\n board[4][4].setDisColor(Constants.LIGHT);\n \n }", "public TetrisBoard() {\n super();\n\n myBoard = new Board();\n myHeight = myBoard.getHeight() * BLOCK_SIZE;\n myWidth = myBoard.getWidth() * BLOCK_SIZE;\n myGameMode = CLASSIC_MODE;\n myBoardString = myBoard.toString();\n myGameOver = false;\n myWelcome = true;\n myTimer = new Timer(INITIAL_TIMER_DELAY, new TimerListener());\n\n setupBoard();\n }", "public Board(Piece[] board) {\n this.board = copyOf(board);\n }", "public static void initialiseGameBoard(){\n\n for ( int row = 0 ; row < 6 ; row++ ){\n for ( int column = 0 ; column < 7 ; column++ ){\n gameBoard[row][column] = \"-\";\n }\n }\n }", "private MyGameState(int[][] board, int turn) {\n this.board = board;\n this.turn = turn;\n }", "private Board create3by3Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 3);\n Tile t2 = new Tile(1, 3);\n Tile t3 = new Tile(2, 3);\n Tile t4 = new Tile(3, 3);\n Tile t5 = new Tile(4, 3);\n Tile t6 = new Tile(5, 3);\n Tile t7 = new Tile(6, 3);\n Tile t8 = new Tile(7, 3);\n Tile t9 = new Tile(8, 3);\n tiles = new Tile[3][3];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[1][0] = t5;\n tiles[1][1] = t9;\n tiles[1][2] = t3;\n tiles[2][0] = t1;\n tiles[2][1] = t8;\n tiles[2][2] = t4;\n return new Board(tiles);\n }", "private Board create4by4Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 4);\n Tile t2 = new Tile(1, 4);\n Tile t3 = new Tile(2, 4);\n Tile t4 = new Tile(3, 4);\n Tile t5 = new Tile(4, 4);\n Tile t6 = new Tile(5, 4);\n Tile t7 = new Tile(6, 4);\n Tile t8 = new Tile(7, 4);\n Tile t9 = new Tile(8, 4);\n Tile t10 = new Tile(9, 4);\n Tile t11 = new Tile(10, 4);\n Tile t12 = new Tile(11, 4);\n Tile t13 = new Tile(12, 4);\n Tile t14 = new Tile(13, 4);\n Tile t15 = new Tile(14, 4);\n Tile t16 = new Tile(15, 4);\n tiles = new Tile[4][4];\n tiles[0][0] = t5;\n tiles[0][1] = t16;\n tiles[0][2] = t1;\n tiles[0][3] = t3;\n tiles[1][0] = t13;\n tiles[1][1] = t15;\n tiles[1][2] = t9;\n tiles[1][3] = t12;\n tiles[2][0] = t2;\n tiles[2][1] = t6;\n tiles[2][2] = t7;\n tiles[2][3] = t14;\n tiles[3][0] = t10;\n tiles[3][1] = t4;\n tiles[3][2] = t8;\n tiles[3][3] = t11;\n return new Board(tiles);\n }", "public Sudoku(int[][] board){\n setBoard(board);\n }", "public Board(Character[][] matrix) {\n this.matrix = matrix;\n }", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "public Board(int boardSize, Random random)\n {\n this.random = random;\n GRID_SIZE = boardSize; \n this.grid = new int[boardSize][boardSize];\n for ( int i=0; i < NUM_START_TILES; i++) {\n this.addRandomTile();\n }\n }", "public Board(int rows, int cols) {\n\t\t_board = new ArrayList<ArrayList<String>>();\n\t\t_rand = new Random();\n\t\t_colorFileNames = new ArrayList<String>();\n\t\tfor (int i=0; i<MAX_COLORS; i=i+1) {\n\t\t\t_colorFileNames.add(\"Images/Tile-\"+i+\".png\");\n\t\t}\n\t\tfor (int r=0; r<rows; r=r+1) {\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tfor (int c=0; c<cols; c=c+1) {\n\t\t\t\trow.add(_colorFileNames.get(_rand.nextInt(_colorFileNames.size())));\n\t\t\t}\n\t\t\t_board.add(row);\n\t\t\t\n\t\t\tif(_board.size()==rows) { //board is complete\n\t\t\t\tboolean istrue = false;\n\t\t\t\tif(match(3).size()>0 || end()){ //(1)there are match //(2)there is no valid move\n\t\t\t\t\tistrue = true;\n\t\t\t\t}\n\t\t\t\tif (istrue) {\n\t\t\t\t\t_board.clear();\t\t// if istrue clear the board\n\t\t\t\t\tr=-1;\t\t\t\t// restart; r=-1, at the end of loop will add 1\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\t\n\t}", "public Grid(int[] intBoard)\n\t{\n\t\tfor (int x =0;x<=8;x++)\n\t\t\tthis.grid[x]= intBoard[x];\n\t}", "GameBoard(){\r\n int i, j;\r\n char first = '0';\r\n grid = new char[yMax][xMax];\r\n\r\n grid[0][0] = ' ';\r\n\r\n //labels rows\r\n for(i = 1; i < yMax; i++){\r\n j = 0;\r\n grid[i][j] = first;\r\n first++;\r\n }\r\n\r\n //labels columns\r\n first = '0';\r\n for(j = 1; j < xMax; j++){\r\n i = 0;\r\n if(j % 2 == 0) {\r\n grid[i][j] = first;\r\n first++;\r\n }\r\n else\r\n grid[i][j] = ' ';\r\n }\r\n\r\n //separates squares with '|'\r\n for(i = 1; i < yMax; i++){\r\n for(j = 1; j < xMax; j++){\r\n if(j % 2 != 0)\r\n grid[i][j] = '|';\r\n else\r\n grid[i][j] = ' ';\r\n }\r\n }\r\n }", "public Board(int[][] blocks) {\n N = blocks.length;\n tiles = new int[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n tiles[i][j] = blocks[i][j];\n }\n }\n }", "@Override\r\n\tpublic void init() \r\n\t{\r\n\t\tthis.board = new GameBoard();\r\n\t}", "private void initializeGameBoard()\n\t{\n\t\tboard = new State[3][3];\n\t\tfor (int r = 0; r < 3; r++)\n\t\t\tfor (int c = 0; c < 3; c++)\n\t\t\t\tboard[r][c] = State.EMPTY;\n\t}", "public XOBoard() {\n\t\t// initialise the boards\n\t\tboard = new int[4][4];\n\t\trenders = new XOPiece[4][4];\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tboard[i][j] = EMPTY;\n\t\t\t\trenders[i][j] = null;\n\t\t\t}\n\t\tcurrent_player = XPIECE;\n\n\t\t// initialise the rectangle and lines\n\t\tback = new Rectangle();\n\t\tback.setFill(Color.GREEN);\n\t\th1 = new Line();\n\t\th2 = new Line();\n\t\th3 = new Line();\n\t\tv1 = new Line();\n\t\tv2 = new Line();\n\t\tv3 = new Line();\n\t\th1.setStroke(Color.WHITE);\n\t\th2.setStroke(Color.WHITE);\n\t\th3.setStroke(Color.WHITE);\n\t\tv1.setStroke(Color.WHITE);\n\t\tv2.setStroke(Color.WHITE);\n\t\tv3.setStroke(Color.WHITE);\n\n\t\t// the horizontal lines only need the endx value modified the rest of //\n\t\t// the values can be zero\n\t\th1.setStartX(0);\n\t\th1.setStartY(0);\n\t\th1.setEndY(0);\n\t\th2.setStartX(0);\n\t\th2.setStartY(0);\n\t\th2.setEndY(0);\n\t\th3.setStartX(0);\n\t\th3.setStartY(0);\n\t\th3.setEndY(0);\n\n\t\t// the vertical lines only need the endy value modified the rest of the\n\t\t// values can be zero\n\t\tv1.setStartX(0);\n\t\tv1.setStartY(0);\n\t\tv1.setEndX(0);\n\t\tv2.setStartX(0);\n\t\tv2.setStartY(0);\n\t\tv2.setEndX(0);\n\t\tv3.setStartX(0);\n\t\tv3.setStartY(0);\n\t\tv3.setEndX(0);\n\n\t\t// setup the translation of one cell height and two cell heights\n\t\tch_one = new Translate(0, 0);\n\t\tch_two = new Translate(0, 0);\n\t\tch_three = new Translate(0, 0);\n\t\th1.getTransforms().add(ch_one);\n\t\th2.getTransforms().add(ch_two);\n\t\th3.getTransforms().add(ch_three);\n\n\t\t// setup the translation of one cell width and two cell widths\n\t\tcw_one = new Translate(0, 0);\n\t\tcw_two = new Translate(0, 0);\n\t\tcw_three = new Translate(0, 0);\n\t\tv1.getTransforms().add(cw_one);\n\t\tv2.getTransforms().add(cw_two);\n\t\tv3.getTransforms().add(cw_three);\n\n\t\t// add the rectangles and lines to this group\n\t\tgetChildren().addAll(back, h1, h2, h3, v1, v2, v3);\n\n\t}", "Board() {\r\n init();\r\n }", "Board() {\n this(INITIAL_PIECES, BLACK);\n _countBlack = 12;\n _countWhite = 12;\n _moveHistory = new ArrayList<Move>();\n _movesMade = 0;\n }", "private void initialiseBoard() {\r\n\t\thorizontal = new char[width];\r\n\t\tvertical = new int[height];\r\n\t\tfor (int i=0; i<horizontal.length; i++) {\r\n\t\t\thorizontal[i] = (char)(i+65);\r\n\t\t}\r\n\t\tfor (int i=0; i<vertical.length; i++) {\r\n\t\t\tvertical[i] = i+1;\r\n\t\t}\r\n\t}", "public FloorTile[][] getBoard(){\r\n return board;\r\n }", "public Board (int rSize, int cSize)\r\n\t{\r\n\t\tint i, x;\r\n\t\tRow_Size = rSize;\r\n\t\tColumn_Size = cSize;\r\n\t\tLayout = new int [Row_Size][Column_Size];\r\n\r\n\t\tfor(i=0;i<Row_Size;i++)\r\n\t\t{\r\n\t\t\tfor(x=0;x<Column_Size;x++)\r\n\t\t\t{\r\n\t\t\t\tLayout[i][x] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}" ]
[ "0.80434483", "0.7948174", "0.78797716", "0.78210217", "0.7805433", "0.7791842", "0.777407", "0.77423465", "0.7660698", "0.76590174", "0.7645128", "0.76323396", "0.7627814", "0.7617253", "0.76087767", "0.75691706", "0.75602984", "0.7515259", "0.75126487", "0.7490688", "0.7478743", "0.7456725", "0.74395484", "0.74203444", "0.7409125", "0.7404856", "0.73756695", "0.7372063", "0.73530304", "0.73289824", "0.73187464", "0.7314197", "0.7308667", "0.7287341", "0.7275056", "0.7262573", "0.72591096", "0.7249686", "0.7241858", "0.72211784", "0.72157294", "0.7200188", "0.7183569", "0.71805173", "0.7173782", "0.7171452", "0.7157061", "0.71389073", "0.71010953", "0.7092862", "0.7085854", "0.7073222", "0.70675033", "0.7066522", "0.7031937", "0.7013078", "0.69977295", "0.69857424", "0.69670004", "0.6964367", "0.69553393", "0.6943552", "0.69316375", "0.69236726", "0.6908185", "0.6907595", "0.6898966", "0.68871385", "0.6885528", "0.6864876", "0.68639165", "0.6856029", "0.6845557", "0.6832073", "0.683171", "0.6830463", "0.6829633", "0.68292224", "0.6819145", "0.6816707", "0.6814522", "0.6812717", "0.6795781", "0.6786439", "0.67840713", "0.67832816", "0.67814076", "0.67704046", "0.6764099", "0.67537075", "0.6749765", "0.67497236", "0.67437965", "0.67337906", "0.671973", "0.6713227", "0.6708333", "0.67049587", "0.67045045", "0.6701894", "0.6695755" ]
0.0
-1
alternate constructor to create a board based on a 2d array of tiles.
public ThreeStonesBoard(Tile[][] board) { this.board = board; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Board(int[][] tiles) {\n N = tiles.length; // Store dimension of passed tiles array\n this.tiles = new int[N][N]; // Instantiate instance grid of N x N size\n for (int i = 0; i < N; i++)\n this.tiles[i] = tiles[i].clone(); // Copy passed grid to instance grid\n }", "public Board(int[][] tiles) {\n n = tiles.length;\n this.tiles = deepCopy(tiles);\n }", "public Board(int[][] tiles) {\n int n = tiles.length;\n if (n < 2 || n >= 128)\n throw new IllegalArgumentException(\"Tiles size must be 2 ≤ n < 128\");\n for (int i = 0; i < n; i++)\n if (tiles[i].length != n)\n throw new IllegalArgumentException(\"Incorrect size of tile at index \" + i);\n\n this.dimension = n;\n this.tiles = new int[n][n];\n for (int i = 0; i < n; i++)\n System.arraycopy(tiles[i], 0, this.tiles[i], 0, n);\n }", "public Board(int[][] tiles) {\n // CHECK IF CONTAINS RIGHT NUMBERS\n this.tiles = new char[tiles.length * tiles.length];\n int counter = 0;\n this.dim = tiles.length;\n for (int i = 0; i < tiles.length; i++) {\n for (int j = 0; j < tiles.length; j++)\n this.tiles[counter++] = (char) tiles[i][j];\n }\n }", "public Board(int[][] tiles) {\n _N = tiles.length;\n _tiles = new int[_N][_N];\n _goal = new int[_N][_N];\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n _tiles[i][j] = tiles[i][j];\n _goal[i][j] = 1 + j + i * _N;\n }\n }\n _goal[_N-1][_N-1] = 0;\n }", "public Board() {\n tiles = new int[3][3];\n int[] values = genValues(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 0});\n\n int offset;\n for (int i = 0; i < 3; i++) {\n offset = 2 * i;\n tiles[i] = Arrays.copyOfRange(values, i + offset, i + offset + 3);\n }\n }", "public Board(int[][] tiles) {\n N = tiles.length;\n L = N * N;\n\n short[] res1d = new short[L];\n short k = 0;\n for (short i = 0; i < N; i++) {\n for (short j = 0; j < N; j++) {\n res1d[k] = (short) tiles[i][j];\n if (res1d[k] == 0) {\n blank_r = i;\n blank_c = j;\n }\n k++;\n }\n }\n arr1d = res1d;\n }", "public Board(char[][] board) {\n this.boardWidth = board.length;\n this.boardHeight = board[0].length;\n this.board = board;\n this.numShips = 0;\n boardInit();\n }", "public Board(int[][] blocks) {\n if (blocks == null) {\n throw new NullPointerException();\n }\n N = blocks.length;\n tiles = copy2d(blocks);\n }", "public Board(int[][] blocks) {\n N = blocks.length;\n tiles = new int[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n tiles[i][j] = blocks[i][j];\n }\n }\n }", "private Board create5by5Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 5);\n Tile t2 = new Tile(1, 5);\n Tile t3 = new Tile(2, 5);\n Tile t4 = new Tile(3, 5);\n Tile t5 = new Tile(4, 5);\n Tile t6 = new Tile(5, 5);\n Tile t7 = new Tile(6, 5);\n Tile t8 = new Tile(7, 5);\n Tile t9 = new Tile(8, 5);\n Tile t10 = new Tile(9, 5);\n Tile t11 = new Tile(10, 5);\n Tile t12 = new Tile(11, 5);\n Tile t13 = new Tile(12, 5);\n Tile t14 = new Tile(13, 5);\n Tile t15 = new Tile(14, 5);\n Tile t16 = new Tile(15, 5);\n Tile t17 = new Tile(16, 5);\n Tile t18 = new Tile(17, 5);\n Tile t19 = new Tile(18, 5);\n Tile t20 = new Tile(19, 5);\n Tile t21 = new Tile(20, 5);\n Tile t22 = new Tile(21, 5);\n Tile t23 = new Tile(22, 5);\n Tile t24 = new Tile(23, 5);\n Tile t25 = new Tile(24, 5);\n tiles = new Tile[5][5];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[0][3] = t5;\n tiles[0][4] = t9;\n tiles[1][0] = t3;\n tiles[1][1] = t1;\n tiles[1][2] = t8;\n tiles[1][3] = t4;\n tiles[1][4] = t11;\n tiles[2][0] = t17;\n tiles[2][1] = t18;\n tiles[2][2] = t10;\n tiles[2][3] = t25;\n tiles[2][4] = t20;\n tiles[3][0] = t23;\n tiles[3][1] = t21;\n tiles[3][2] = t12;\n tiles[3][3] = t15;\n tiles[3][4] = t13;\n tiles[4][0] = t22;\n tiles[4][1] = t24;\n tiles[4][2] = t14;\n tiles[4][3] = t16;\n tiles[4][4] = t19;\n return new Board(tiles);\n }", "public TicTacToeBoard() {board = new int[rows][columns];}", "private Board create3by3Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 3);\n Tile t2 = new Tile(1, 3);\n Tile t3 = new Tile(2, 3);\n Tile t4 = new Tile(3, 3);\n Tile t5 = new Tile(4, 3);\n Tile t6 = new Tile(5, 3);\n Tile t7 = new Tile(6, 3);\n Tile t8 = new Tile(7, 3);\n Tile t9 = new Tile(8, 3);\n tiles = new Tile[3][3];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[1][0] = t5;\n tiles[1][1] = t9;\n tiles[1][2] = t3;\n tiles[2][0] = t1;\n tiles[2][1] = t8;\n tiles[2][2] = t4;\n return new Board(tiles);\n }", "public Board(int[][] values) {\n tiles = new int[3][];\n for (int i = 0; i < 3; i++) {\n tiles[i] = Arrays.copyOf(values[i], 3);\n }\n }", "public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }", "public Board(int boardHeight, int boardWidth) {\n this.boardWidth = boardHeight+1;\n this.boardHeight = boardWidth+1;\n this.board = new char[this.boardHeight][this.boardWidth];\n this.numShips = 0;\n boardInit();\n }", "public SlidingTilesBoard(List<Tile> tiles) {\n Iterator<Tile> iter = tiles.iterator();\n\n for (int row = 0; row != SlidingTilesBoard.NUM_ROWS; row++) {\n for (int col = 0; col != SlidingTilesBoard.NUM_COLS; col++) {\n this.tiles[row][col] = iter.next();\n }\n }\n }", "public TicTacToeBoard() {\n grid = new Cell[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++)\n grid[i][j] = new Cell(i, j, '-');\n }\n }", "public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }", "public Board() {\n this.board = new byte[][] { new byte[3], new byte[3], new byte[3] };\n }", "private Board create4by4Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 4);\n Tile t2 = new Tile(1, 4);\n Tile t3 = new Tile(2, 4);\n Tile t4 = new Tile(3, 4);\n Tile t5 = new Tile(4, 4);\n Tile t6 = new Tile(5, 4);\n Tile t7 = new Tile(6, 4);\n Tile t8 = new Tile(7, 4);\n Tile t9 = new Tile(8, 4);\n Tile t10 = new Tile(9, 4);\n Tile t11 = new Tile(10, 4);\n Tile t12 = new Tile(11, 4);\n Tile t13 = new Tile(12, 4);\n Tile t14 = new Tile(13, 4);\n Tile t15 = new Tile(14, 4);\n Tile t16 = new Tile(15, 4);\n tiles = new Tile[4][4];\n tiles[0][0] = t5;\n tiles[0][1] = t16;\n tiles[0][2] = t1;\n tiles[0][3] = t3;\n tiles[1][0] = t13;\n tiles[1][1] = t15;\n tiles[1][2] = t9;\n tiles[1][3] = t12;\n tiles[2][0] = t2;\n tiles[2][1] = t6;\n tiles[2][2] = t7;\n tiles[2][3] = t14;\n tiles[3][0] = t10;\n tiles[3][1] = t4;\n tiles[3][2] = t8;\n tiles[3][3] = t11;\n return new Board(tiles);\n }", "public Board(int[][] tiles) {\n this.tiles = tiles;\n n = tiles.length;\n ham = 0;\n man = 0;\n zero = new int[2];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (tiles[i][j] == 0) {\n zero[0] = i;\n zero[1] = j;\n continue;\n }\n if (i*n+j+1 != tiles[i][j]) {\n int val = tiles[i][j]-1;\n man += Math.abs(i-val/n) + Math.abs(j-val%n);\n ham++;\n }\n }\n }\n }", "public Board() {\n //Create all pieces\n board[0][0] = new Rook(\"black\", 0, 0);\n board[0][1] = new Knight(\"black\", 0, 1);\n board[0][2] = new Bishop(\"black\", 0, 2);\n board[0][3] = new Queen(\"black\", 0, 3);\n board[0][4] = new King(\"black\", 0, 4);\n board[0][5] = new Bishop(\"black\", 0, 5);\n board[0][6] = new Knight(\"black\", 0, 6);\n board[0][7] = new Rook(\"black\", 0, 7);\n\n board[7][0] = new Rook(\"white\", 7, 0);\n board[7][1] = new Knight(\"white\", 7, 1);\n board[7][2] = new Bishop(\"white\", 7, 2);\n board[7][3] = new Queen(\"white\", 7, 3);\n board[7][4] = new King(\"white\", 7, 4);\n board[7][5] = new Bishop(\"white\", 7, 5);\n board[7][6] = new Knight(\"white\", 7, 6);\n board[7][7] = new Rook(\"white\", 7, 7);\n\n for (int j = 0; j < 8; j++) {\n board[1][j] = new Pawn(\"black\", 1, j);\n board[6][j] = new Pawn(\"white\", 6, j);\n }\n\n //Printing everything\n for (Piece[] a : board) {\n for (Piece b : a) {\n System.out.printf(\"%-15s\", \"[\" + b + \"]\");\n }\n System.out.println(\"\");\n }\n }", "public Board() {\n for (int y = 0; y < spaces.length; y++) {\n for (int x = 0; x < spaces[0].length; x++) {\n spaces[y][x] = new SubBoard();\n wonBoards[y][x] = ' ';\n }\n }\n }", "public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "private Board(int[][] tiles, Position first, Position second) {\n this.dimension = tiles.length;\n this.tiles = new int[dimension][dimension];\n for (int i = 0; i < dimension; i++)\n System.arraycopy(tiles[i], 0, this.tiles[i], 0, dimension);\n\n int temp = this.tiles[first.i][first.j];\n this.tiles[first.i][first.j] = this.tiles[second.i][second.j];\n this.tiles[second.i][second.j] = temp;\n }", "public void initBasicBoardTiles() {\n\t\ttry {\n\t\t\tfor(int i = 1 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.BLACK).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.WHITE).build());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 2 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.WHITE).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.BLACK).build());\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(LocationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private Board(int[][] array)\n\t{\n\t\tcols = 0;\n\t\trows = array.length;\n\t\tif (rows > 0)\n\t\t\tcols = array[0].length;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = array[i][j];\n\t\t}\n\t}", "public Board(Character[][] matrix) {\n this.matrix = matrix;\n }", "public Board() {\n\n for(int row = 0; row < size; row++) {\n for(int col = 0; col < size; col++) {\n\n grid[row][col] = \"-\";\n\n }\n }\n\n }", "public TicTacToe(){ \r\n\t\tboard = new char[3][3];\r\n\t}", "public Board() {\n\t\tdimension = 9;\n\t\tpuzzle = new int[dimension][dimension];\n\t}", "public Grid(int[] intBoard)\n\t{\n\t\tfor (int x =0;x<=8;x++)\n\t\t\tthis.grid[x]= intBoard[x];\n\t}", "public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}", "public Board(Piece[] board) {\n this.board = copyOf(board);\n }", "public Tile(int row, int column){\n this.row = row;\n this.column = column;\n this.piece = null;\n }", "public GameBoard(){\r\n boardCells = new GameCell[NUMBER_OF_CELLS];\r\n for( int i= 0; i< NUMBER_OF_CELLS; i++ ){\r\n boardCells[i] = new GameCell(i);//\r\n }\r\n }", "public UIBoard()\r\n\t{\r\n\t\t//Creates a 10x10 \"Board\" object\r\n\t\tsuper(10,10);\r\n\t\tgrid = new int[getLength()][getWidth()];\r\n\t\t\r\n\t\t//Sets all coordinates to the value 0, which corresponds to \"not hit yet\"\r\n\t\tfor(int i=0; i<grid.length; i++)\r\n\t\t\tfor(int j=0; j<grid[i].length; j++)\r\n\t\t\t\tgrid[i][j] = 0;\t\t\r\n\t}", "public Board(String[][] grid) {\n this.grid = grid;\n }", "public Board()\r\n {\r\n board = new Piece[8][8];\r\n xLength = yLength = 8;\r\n }", "public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }", "private void layTiles() {\n board = new Tile[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n layTile(new Tile(i, j));\n }\n }\n }", "public Board() {\n\t\tboard = new char[9][9];\n\t}", "public static StackPane createBoard() {\n StackPane stackPane = new StackPane();\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n Tile tile = new Tile();\n Coordinates coordinates = new Coordinates(i, j);\n tile.setTextValue(\"\");\n tile.setTranslateX(i * 50);\n tile.setTranslateY(j * 50);\n tile.setEditable(true);\n tile.setTileId(coordinates);\n stackPane.getChildren().add(tile);\n tiles.put(coordinates, tile);\n }\n }\n return stackPane;\n }", "Board() {\n\t\tswitch (Board.boardType) {\n\t\tcase Tiny:\n\t\t\tthis.dimensions = TinyBoard; break;\n\t\tcase Giant:\n\t\t\tthis.dimensions = GiantBoard; break;\n\t\tdefault:\n\t\t\tthis.dimensions = StandardBoard; break;\n\t\t}\n\t\tboard = new Square[dimensions.x][dimensions.y];\n\t\tinit();\n\t}", "public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }", "public IImage createCheckerboard() {\n List<List<Pixel>> grid = new ArrayList<>();\n for (int i = 0; i < this.height; i++) {\n List<Pixel> row;\n // alternating between making rows starting with black or white tiles\n if (i % 2 == 0) {\n // start white\n for (int j = 0; j < this.tileSize; j++) {\n row = createRow(255, 0, (i * this.tileSize) + j);\n grid.add(row);\n }\n }\n else {\n // start black\n for (int m = 0; m < this.tileSize; m++) {\n row = createRow(0, 255, (i * this.tileSize) + m);\n grid.add(row);\n }\n }\n }\n return new Image(grid, 255);\n }", "public Sudoku(int[][] board){\n setBoard(board);\n }", "public Board()\r\n\t{\r\n\t\tthis.grid = new CellState[GRID_SIZE][GRID_SIZE];\r\n\t\tthis.whiteMarblesCount = MARBLES_COUNT;\r\n\t\tthis.blackMarblesCount = MARBLES_COUNT;\r\n\t\t\r\n\t\t/**\r\n\t\t * Initializes the board with empty value\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < GRID_SIZE; indexcol++)\r\n\t\t{\r\n\t\t\tfor (int indexrow = 0; indexrow < GRID_SIZE; indexrow++)\r\n\t\t\t{\r\n\t\t\t\tthis.grid[indexrow][indexcol] = CellState.EMPTY;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Sets marbles on the board with default style\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[0][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[8][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 0; indexcol < 6; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[1][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[7][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 2; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[2][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[6][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tthis.grid[3][8] = CellState.INVALID;\r\n\t\tthis.grid[2][7] = CellState.INVALID;\r\n\t\tthis.grid[1][6] = CellState.INVALID;\r\n\t\tthis.grid[0][5] = CellState.INVALID;\r\n\t\tthis.grid[5][0] = CellState.INVALID;\r\n\t\tthis.grid[6][1] = CellState.INVALID;\r\n\t\tthis.grid[7][2] = CellState.INVALID;\r\n\t\tthis.grid[8][3] = CellState.INVALID;\r\n\t}", "private void initGameBoard(int rows, int cols)\n {\n //GameBoard = new Cell[ROWS][COLS];\n\n for(int i = 0; i < rows; i++)\n {\n for(int j = 0; j < cols; j++)\n {\n GameBoard[i][j] = new Cell(i,j, Color.BLUE,false);\n }\n\n }\n }", "public TileBoard(int n){\n\t\tsize = n;\n\t\tinitTiles();\n\t\torganizeTiles();\n\t\tsetUpInputListenerDelegator();\n\t}", "public void makeBoard2d() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board2d[i][j] = this.board[(i * 3) + j];\n }\n }\n }", "private void createTiles() {\n\t\tint tile_width = bitmap.getWidth() / gridSize;\n\t\tint tile_height = bitmap.getHeight() / gridSize;\n\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tBitmap bm = Bitmap.createBitmap(bitmap, column * tile_width,\n\t\t\t\t\t\trow * tile_height, tile_width, tile_height);\n\n\t\t\t\t// if final, Tile -> blank\n\t\t\t\tif ((row == gridSize - 1) && (column == gridSize - 1)) {\n\t\t\t\t\tbm = Bitmap.createBitmap(tile_width, tile_height,\n\t\t\t\t\t\t\tbm.getConfig());\n\t\t\t\t\tbm.eraseColor(Color.WHITE);\n\t\t\t\t\ttheBlankTile = new Tile(bm, row, column);\n\t\t\t\t\ttiles.add(theBlankTile);\n\t\t\t\t} else {\n\t\t\t\t\ttiles.add(new Tile(bm, row, column));\n\t\t\t\t}\n\t\t\t} // end column\n\t\t} // end row\n\t\tbitmap.recycle();\n\n\t}", "public Board(int x, int y){\n player1 = \"Player 1\";\n player2 = \"Player 2\";\n randomPlayer1 = \"CPU 1\";\n randomPlayer2 = \"CPU 2\";\n board = new Square[x][y];\n for (int i = 0; i < board.length;i++){\n row++;\n for(int j = 0; j < board.length; j++){\n if(column == y){\n column = 0;\n }\n column++;\n board[i][j] = new Square(row, column);\n }\n }\n row = x;\n column = y;\n }", "public GameBoard(PlayerPiece[] playerPieces, Position[] playerPiecePositions,\n FloorTile[] tiles, int nCols, int nRows, String name) {\n this.playerPieces = playerPieces;\n this.playerPiecePositions = playerPiecePositions;\n this.name = name;\n this.nRows = nRows;\n this.nCols = nCols;\n this.board = new FloorTile[nRows][nCols];\n\n insertTiles(tiles);\n }", "public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}", "public Board(){\r\n \r\n //fill tile list with tile objects\r\n tiles.add(new Tile(new Coordinate(0,0)));\r\n tiles.add(new Tile(new Coordinate(0,1)));\r\n tiles.add(new Tile(new Coordinate(0,2)));\r\n tiles.add(new Tile(new Coordinate(1,0)));\r\n tiles.add(new Tile(new Coordinate(1,1)));\r\n tiles.add(new Tile(new Coordinate(1,2)));\r\n tiles.add(new Tile(new Coordinate(1,3)));\r\n tiles.add(new Tile(new Coordinate(2,0)));\r\n tiles.add(new Tile(new Coordinate(2,1)));\r\n tiles.add(new Tile(new Coordinate(2,2)));\r\n tiles.add(new Tile(new Coordinate(2,3)));\r\n tiles.add(new Tile(new Coordinate(2,4)));\r\n tiles.add(new Tile(new Coordinate(3,1)));\r\n tiles.add(new Tile(new Coordinate(3,2)));\r\n tiles.add(new Tile(new Coordinate(3,3)));\r\n tiles.add(new Tile(new Coordinate(3,4)));\r\n tiles.add(new Tile(new Coordinate(4,2)));\r\n tiles.add(new Tile(new Coordinate(4,3)));\r\n tiles.add(new Tile(new Coordinate(4,4)));\r\n \r\n //fills corner list with corner objects\r\n List<Coordinate> cornercoords = new ArrayList<>();\r\n for(Tile t : tiles){\r\n for(Coordinate c : t.getAdjacentCornerCoords()){\r\n if(cornercoords.contains(c)==false) cornercoords.add(c);\r\n }\r\n }\r\n for(Coordinate c : cornercoords){\r\n corners.add(new Corner(c));\r\n }\r\n \r\n //fills adjacent corner/tile fields\r\n for(Tile t: tiles){\r\n t.fillAdjacents(tiles,corners);\r\n }\r\n for(Corner c: corners){\r\n c.fillAdjacents(tiles,corners);\r\n }\r\n \r\n //generates an edge between each corner and fills the list of edges\r\n //results in lots of duplicates\r\n for(Corner c: corners){\r\n for(Corner adjacent: c.getAdjacentCorners()){\r\n edges.add(new Edge(c,adjacent));\r\n }\r\n }\r\n \r\n //hopefully removes duplicates from the edge list\r\n Iterator<Edge> iter = edges.iterator();\r\n boolean b = false;\r\n while (iter.hasNext()) {\r\n Edge e = iter.next();\r\n for(Edge edge : edges){\r\n if(e.sharesCorners(edge)==true && edge!=e){\r\n b = true;\r\n }\r\n }\r\n if(b==true) iter.remove();\r\n b = false;\r\n }\r\n \r\n //give each tile a token number and resource type \r\n ArrayList<Tile> randomtiles = randomize(tiles);\r\n int sheep = 3;\r\n int wood = 3;\r\n int rock = 2;\r\n int brick = 2;\r\n int wheat = 3;\r\n for(Tile t : randomtiles){\r\n if(sheep>0){\r\n t.setResource(Resource.SHEEP);\r\n sheep--;\r\n }\r\n if(wood>0){\r\n t.setResource(Resource.WOOD);\r\n wood--;\r\n }\r\n if(brick>0){\r\n t.setResource(Resource.CLAY);\r\n brick--;\r\n }\r\n if(wheat>0){\r\n t.setResource(Resource.WHEAT);\r\n wheat--;\r\n }\r\n if(rock>0){\r\n t.setResource(Resource.ROCK);\r\n rock--;\r\n }\r\n else t.setResource(Resource.DESERT); \r\n } \r\n randomtiles = randomize(randomtiles);\r\n int twos = 1;\r\n int twelves = 1;\r\n int threes = 2;\r\n int fours = 2;\r\n int fives = 2;\r\n int sixes = 2;\r\n int sevens = 2;\r\n int eights = 2;\r\n int nines = 2;\r\n int tens = 2;\r\n int elevens = 2; \r\n for(Tile t : randomtiles){\r\n if(t.getResource() != Resource.DESERT){\r\n if(twos != 0){\r\n t.setToken(2);\r\n twos--;\r\n }\r\n else if(threes !=0){\r\n t.setToken(3);\r\n threes--;\r\n }\r\n else if(fours !=0){\r\n t.setToken(4);\r\n fours--;\r\n } \r\n else if(fives !=0){\r\n t.setToken(5);\r\n fives--;\r\n } \r\n else if(sixes !=0){\r\n t.setToken(6);\r\n sixes--;\r\n } \r\n else if(sevens !=0){\r\n t.setToken(7);\r\n sevens--;\r\n } \r\n else if(eights !=0){\r\n t.setToken(8);\r\n eights--;\r\n } \r\n else if(nines !=0){\r\n t.setToken(9);\r\n nines--;\r\n } \r\n else if(tens !=0){\r\n t.setToken(10);\r\n tens--;\r\n } \r\n else if(elevens !=0){\r\n t.setToken(11);\r\n elevens--;\r\n } \r\n else if(twelves !=0){\r\n t.setToken(12);\r\n twelves--;\r\n } \r\n }\r\n }\r\n }", "public Board(int dimensions){\n this.dimensions = dimensions;\n createBoard(dimensions);\n this.status = Status.CREATED;\n this.hitsLeft = 15;\n }", "public Board(int rows, int cols) {\n\t\t_board = new ArrayList<ArrayList<String>>();\n\t\t_rand = new Random();\n\t\t_colorFileNames = new ArrayList<String>();\n\t\tfor (int i=0; i<MAX_COLORS; i=i+1) {\n\t\t\t_colorFileNames.add(\"Images/Tile-\"+i+\".png\");\n\t\t}\n\t\tfor (int r=0; r<rows; r=r+1) {\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tfor (int c=0; c<cols; c=c+1) {\n\t\t\t\trow.add(_colorFileNames.get(_rand.nextInt(_colorFileNames.size())));\n\t\t\t}\n\t\t\t_board.add(row);\n\t\t\t\n\t\t\tif(_board.size()==rows) { //board is complete\n\t\t\t\tboolean istrue = false;\n\t\t\t\tif(match(3).size()>0 || end()){ //(1)there are match //(2)there is no valid move\n\t\t\t\t\tistrue = true;\n\t\t\t\t}\n\t\t\t\tif (istrue) {\n\t\t\t\t\t_board.clear();\t\t// if istrue clear the board\n\t\t\t\t\tr=-1;\t\t\t\t// restart; r=-1, at the end of loop will add 1\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\t\n\t}", "public Board(int[][] n) {\n\t\tdimension = n.length;\n\t\tif(n.length != n[0].length) \n\t\t\tthrow new IllegalArgumentException(\"Parameter must be a square 2D array\");\n\t\tif(!isPerfectSquare(dimension))\n\t\t\tthrow new IllegalArgumentException(\"Parameter must have dimensions of a perfect square\");\n\t\tpuzzle = new int[dimension][dimension];\n\t\t//Deep copy of 2D Array\n\t\tfor(int row = 0; row < n.length; row++) {\n\t\t\tfor(int col = 0; col < n[0].length; col++) {\n\t\t\t\tpuzzle[row][col] = n[row][col];\n\t\t\t\tif(puzzle[row][col] < 0 || puzzle[row][col] > dimension)\n\t\t\t\t\tthrow new IllegalArgumentException(\"All values must be between 0-dimension inclusive\");\n\t\t\t}\n\t\t}\n\t}", "public AIPlayer(Board board) {\n cells = board.squares;\n }", "public Board(int xLen, int yLen)\r\n {\r\n if(xLen <= 0 || yLen <= 0)\r\n xLen = yLen = 8;\r\n board = new Piece[xLen][yLen];\r\n xLength = xLen;\r\n yLength = yLen;\r\n }", "public Board() {\r\n\t\tthis.size = 4;\r\n\t\tthis.gameBoard = createBoard(4);\r\n\t\tthis.openTiles = 16;\r\n\t\tthis.moves = 0;\r\n\t\tthis.xValues = new boolean[4][4];\r\n\t\tthis.yValues = new boolean[4][4];\r\n\t\tthis.complete = false;\r\n\t}", "public Board(int height, int width, Player... players) {\n this.players = new ArrayList<>(Arrays.asList(players));\n this.docks = new ArrayList<>();\n this.lasers = new ArrayList<>();\n this.height = height;\n this.width = width;\n\n layTiles();\n\n for (Player player : players) {\n getTile(player).setPlayer(player);\n }\n }", "public GameBoard(PlayerPiece[] playerPieces, Position[] playerPiecePositions,\n FloorTile[] fixedTiles, Position[] fixedTilePositions,\n FloorTile[] tiles, int nCols, int nRows, String name) {\n this.playerPieces = playerPieces;\n this.playerPiecePositions = playerPiecePositions;\n this.name = name;\n this.nRows = nRows;\n this.nCols = nCols;\n this.board = new FloorTile[nRows][nCols];\n\n insertTilesAtPositions(fixedTiles, fixedTilePositions);\n insertTiles(tiles);\n }", "public Row(Context context, boolean black, int x, int y, int tileWidth, int tileHeight, int index) {\n this.blackFirst = black;\n this.context = context;\n this.index = index;\n this.x = x;\n this.y = y;\n dy = GamePanel.gameSpeed;\n\n\n// BLACK_BITMAP_TILE = BitmapFactory.decodeResource(context.getResources(), R.drawable.black);\n// WHITE_BITMAP_TILE = BitmapFactory.decodeResource(context.getResources(), R.drawable.white);\n\n tiles = new ArrayList<>();\n if (blackFirst) {\n// for(int i = 0; i < ChessBoard.COLUMN_NUM; i ++){\n// Tile tile;\n// if((i % 2) == 0) {\n// tile = new Tile(BLACK_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, true );\n// } else {\n// tile = new Tile(WHITE_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, false );\n// }\n// tiles.add(i, tile);\n// }\n for (int i = 0; i < GamePanel.COLUMN_NUM; i++) {\n Tile tile;\n if ((i % 2) == 0) {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, true, i, index);\n } else {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, false, i, index);\n }\n tiles.add(i, tile);\n }\n } else {\n// for(int i = 0; i < ChessBoard.COLUMN_NUM; i ++){\n// Tile tile;\n// if((i % 2) == 0) {\n// tile = new Tile(WHITE_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, false );\n// } else {\n// tile = new Tile(BLACK_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, true );\n// }\n// tiles.add(i, tile);\n// }\n\n for (int i = 0; i < GamePanel.COLUMN_NUM; i++) {\n Tile tile;\n if ((i % 2) == 0) {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, false, i, index);\n } else {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, true, i, index);\n }\n tiles.add(i, tile);\n }\n }\n\n\n }", "public Board(int[][] b) {\n neighbors = new LinkedList<>();\n tiles = b;\n n = b.length;\n goal = new int[n][n];\n\n int counter = 1;\n for(int x = 0; x < n; x++){\n for(int y = 0; y < n; y++){\n goal[x][y] = counter;\n counter++;\n }\n }\n goal[n-1][n-1] = 0;\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "public Board(String blocks) { this(blocks, Heuristic.INT, null); }", "private TilePane createGrid() {\n\t\tTilePane board = new TilePane();\n\t\tboard.setPrefRows(9);\n\t\tboard.setPrefColumns(9);\n\t\tboard.setPadding(new Insets(3,3,3,3));\n\t\tboard.setHgap(3); //Horisontal gap between tiles\n\t\tboard.setVgap(3); //Vertical gap between tiles\n\t\t\n\t\t//Creates and colors tiles\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tLetterTextField text = new LetterTextField();\n\t\t\t\ttext.setPrefColumnCount(1);\n\t\t\t\t\n\t\t\t\tif(!(i/3 == 1 || k/3 == 1) || (i/3 == 1 && k/3 == 1)){\n\t\t\t\t\ttext.setStyle(\"-fx-background-color: #daa520;\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfield[i][k] = text;\n\t\t\t\tboard.getChildren().add(text);\n\t\t\t}\n\t\t}\t\t\n\t\treturn board;\n\t}", "public ThreeStonesBoard(int size) {\r\n this.size = size;\r\n this.board = new Tile[size][size];\r\n }", "public Board(int[][] grid, Tetrimino piece) {\n //initComponents();\n this.grid = grid;\n this.piece = piece;\n setLayout(new GridLayout(grid.length-4, grid[0].length));\n init();\n }", "public OthelloBoard (int height, int width){\n super(height, width);\n m_Pieces = new OthelloPiece[WIDTH][HEIGHT];\n m_PieceCount+=4;\n \n }", "public void createCellBoard(int rows, int cols) {\n\t\trowcount = rows;\n\t\tcolcount = cols;\n\t\tcells = new int[rows][cols];\n\t}", "public Board(String gameType) {\n propertyFactory = new TileFactory(gameType);\n createBoard();\n }", "@Override\r\n\tpublic Board createBoard(long width, long height)\r\n\t{\r\n\t\treturn new Board(width, height);\r\n\t}", "public Board() {\n\t\tboardState = new Field[DIMENSION][DIMENSION];\n\t\tfor(int i = 0; i < DIMENSION; i++) {\n\t\t\tfor(int j = 0; j < DIMENSION; j++) {\n\t\t\t\tboardState[i][j] = new Field();\n\t\t\t}\n\t\t}\n\t}", "public Board(int rows, int columns) throws Exception {\n\t\tif (rows >= 8 && columns >= 8) {\n\t\t\tthis.rows = rows;\n\t\t\tthis.columns = columns;\n\t\t\tboard = new int[rows][columns];\n\t\t\tthis.bombs = (rows * columns) / 3;\n\t\t\tfillBoard();\n\t\t} else {\n\t\t\tthrow new Exception(\"Minesweeper dimensions invalid:\\nWidth: from 8 to 100\\nHeight: from 8 to 100\\nBombs: 1 to 1/3 of squares\");\n\t\t}\n\t}", "public Board(int[][] blocks)\n {\n this.N = blocks[0].length;\n this.SIZE = N * N;\n this.blocks = new char[SIZE];\n \n for (int i = 0; i < N; i++)\n {\n for (int j = 0; j < N; j++)\n {\n this.blocks[i * N + j] = (char) blocks[i][j];\n }\n }\n }", "public Board() {\n\t\tmarkCount = 0;\n\t\ttheBoard = new char[3][];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\ttheBoard[i] = new char[3];\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\ttheBoard[i][j] = SPACE_CHAR;\n\t\t}\n\t}", "public Board() {\n this.board = new Piece[16];\n }", "public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}", "public Board() {\n initialize(3, null);\n }", "public Board(int boardSize, Random random)\n {\n this.random = random;\n GRID_SIZE = boardSize; \n this.grid = new int[boardSize][boardSize];\n for ( int i=0; i < NUM_START_TILES; i++) {\n this.addRandomTile();\n }\n }", "public Tile(int row, int column, Piece piece) {\n this.row = row;\n this.column = column;\n this.piece = piece;\n this.setBorder(javax.swing.BorderFactory.createEmptyBorder());\n }", "public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }", "public Board(int lines, int columns, List<String> board) {\r\n\t\tif (lines == 0 || lines % 2 != 0 || lines < 2 || lines > 98) {\r\n\t\t\tthrow new IllegalArgumentException(\"Error! Line length is invalid.\");\r\n\t\t} else if (columns == 0 || columns % 2 != 0 || columns < 2 || columns > 26) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Error! Column length is invalid.\");\r\n\t\t} else if (board != null) {\r\n\r\n\t\t\tfor (String s : board) {\r\n\t\t\t\tif (!s.matches(\"[W,B,#,,-]+\")) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\t\t\"Error! Invalid board parameters.\");\r\n\t\t\t\t} else if (s.length() != columns) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\t\t\"Error! Board columns not equal to columns.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (board.size() != lines) {\r\n\t\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\t\"Error! Board lines not equal to lines.\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.playBoard = new char[lines][columns];\r\n\t\tthis.possibleMoves = new ArrayList<PossibleMove>();\r\n\r\n\t\tif (board == null) {\r\n\t\t\tthis.init();\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < playBoard.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < playBoard[0].length; j++) {\r\n\t\t\t\t\tplayBoard[i][j] = board.get(i).charAt(j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Map(Tile[][] tiles) {\n terrains = new String[]{\"r\", \"p\", \"m1\", \"m2\", \"m3\"};\n this.tiles = tiles;\n }", "private List<Tile> makeTiles() {\n List<Tile> tiles = new ArrayList<>();\n Board board = (Board) boardManager.getBoard();\n final int numTiles = board.getNumRows() * board.getNumCols();\n for (int tileNum = 0; tileNum != numTiles; tileNum++) {\n tiles.add(new Tile(tileNum + 1, tileNum, 4));\n }\n\n return tiles;\n }", "public ThirteensBoard()\n {\n super(BOARD_SIZE, RANKS, SUITS, POINT_VALUES);\n }", "public Board(){\n for(int holeIndex = 0; holeIndex<holes.length; holeIndex++)\n holes[holeIndex] = new Hole(holeIndex);\n for(int kazanIndex = 0; kazanIndex<kazans.length; kazanIndex++)\n kazans[kazanIndex] = new Kazan(kazanIndex);\n nextToPlay = Side.WHITE;\n }", "public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}", "public Sudoku() {\n this.board = new int[size][size];\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n drawLines();\n \n for( int r = 0; r < board.length; r++ )\n {\n for( int c = 0; c < board[r].length; c++)\n {\n board[r][c] = \"\"; \n \n }\n }\n }", "public JumbleBoard(char[][] dice, int rows, int cols)\n {\n this.dice = dice;\n this.rows = rows;\n this.cols = cols;\n }", "public MinesweeperBoard(int rowsCount, int colsCount){\n this.rowsCount = rowsCount;\n this.colsCount = colsCount;\n this.cells = new Cell[rowsCount][colsCount];\n }", "Board(int left, int right, int vert, Field[][] map) {\n this.map = map;\n for (int i = 0; i < map.length; i++) {\n for (int j = 0; j < map[0].length; j++) {\n if (map[i][j] instanceof Piece) {\n pieceList.add((Piece) map[i][j]);\n }\n }\n }\n validator = new CoordValidator(left, right, vert);\n renderer = new BoardRenderer(left, right, vert);\n }", "public GameBoard (int height, int width)\n {\n mHeight = height;\n mWidth = width;\n }" ]
[ "0.8103299", "0.80744493", "0.79039633", "0.78387785", "0.7772786", "0.7481022", "0.74657637", "0.73451996", "0.7131735", "0.7130076", "0.71231836", "0.70931756", "0.70896494", "0.70717424", "0.7065005", "0.7048423", "0.70353156", "0.70321596", "0.70190954", "0.696117", "0.69507736", "0.6911613", "0.68941194", "0.6891833", "0.6858746", "0.68240887", "0.6796602", "0.67802167", "0.6765261", "0.67638475", "0.6758536", "0.6756808", "0.67432743", "0.67214555", "0.6701498", "0.6700151", "0.66789925", "0.6670701", "0.66660583", "0.6665394", "0.66653895", "0.6659228", "0.6655928", "0.6651322", "0.6647425", "0.6645145", "0.66367954", "0.66248226", "0.65920186", "0.6572125", "0.65670174", "0.6564452", "0.6556243", "0.6542332", "0.6535781", "0.6532355", "0.65259266", "0.6519419", "0.65128964", "0.6507069", "0.65028596", "0.646435", "0.6457673", "0.64547634", "0.64533967", "0.6447514", "0.64472455", "0.6445131", "0.6444878", "0.64397275", "0.6439489", "0.64389056", "0.64384955", "0.64245194", "0.641144", "0.6411261", "0.640688", "0.64048", "0.6404776", "0.6390926", "0.63847905", "0.638139", "0.6358509", "0.635752", "0.6350035", "0.633863", "0.6336931", "0.63335216", "0.63245094", "0.6323869", "0.631411", "0.6313694", "0.63090616", "0.63079315", "0.6306139", "0.6304875", "0.6292315", "0.6292166", "0.62854", "0.62846094" ]
0.6939023
21
getter to return the objects board.
public Tile[][] getBoard() { return board; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Board getBoardObject() {\n return boardObject;\n }", "public Board getBoard ();", "public Board getBoard() {\r\n return board;\r\n }", "public Board getBoard() {\n return board;\n }", "public static Board getBoard(){\n\t\treturn board;\n\t}", "public Board getBoard() {\n return board;\n }", "public Board getBoard() {\n return this.board;\n }", "public Board getBoard() {\n return this.board;\n }", "protected Board getBoard() { // nao vou deixar public, vou deixar privado\n\t\treturn board;\n\t}", "public Board getBoard(){\n return m_board;\n }", "public FloorTile[][] getBoard(){\r\n return board;\r\n }", "private Board getBoard() {\n return gameStatus.getBoard();\n }", "public Set<BoardObject> boardObjects(){\r\n\t\treturn boardObjects;\r\n\t}", "Board getBoard() {\r\n return _board;\r\n }", "public Board getBoard(){\n return board;\n }", "public Board getBoard()\r\n {\r\n return gameBoard;\r\n }", "public Board getBoard() {\n\t\treturn this.board;\n\t}", "public Board getBoard(){return board;}", "Board getBoard() {\n return _board;\n }", "public Board getBoard() {\n\t\treturn board;\n\t}", "public Board getBoard() {\n\t\treturn board;\n\t}", "public Board getBoard() {\n\t\treturn (this.gameBoard);\n\t}", "public GameBoard getBoard() {\n return board;\n }", "public Piece[][] getBoard() {\n return _board;\n }", "public Board getBoard() {\n return gameBoard;\n }", "public Piece[][] getBoard(){\r\n\t\treturn this.board;\r\n\t}", "public Piece[] getBoard() {\n return board;\n }", "public Integer[][] getBoard() {\n\t\treturn _board;\n\t}", "protected int[][] getBoard() {\n\t// EDIT: usar directamente .clone() referencia al mismo objeto, para\n\t// reutilizar el método en las rotaciones copiamos la matriz de forma\n\t// que no se referencien entre sí.\n\treturn deepCopy(board);\n }", "public Board getPlayersBoard() {\n return playersBoard;\n }", "public List<GameBoard> getBoardList() {\r\n return new ArrayList<GameBoard>(this.boards);\r\n }", "public int[][] getBoard() {\r\n\t\treturn board;\r\n\t}", "public int[][] getBoard() {\n\t\treturn board;\n\t}", "public BoardInterface[] getBoards();", "public GUIBoard getBoard() {\n return board;\n }", "public GameCell[] getBoardCells(){\r\n return this.boardCells;\r\n }", "public Marker[][] getBoard() { return board; }", "public static WildBoard getBoard()\n {\n System.out.println(\"*** WildApp.getBoard() called\");\n \n return myBoard;\n }", "@Override\r\n\tpublic ArrayList<BoardVO> getBoardList() {\n\t\treturn boardDao.getBoardList();\r\n\t}", "public FourBoard getBoard() {\n return board;\n }", "public Board aiGetBoard() {\n return b;\n }", "public int[] getBoard() {\n\t return board;\n }", "public EditableBoard getBoard() {\n\treturn board;\n }", "public Board getCurrentBoard() {\n return boardIterator.board;\n }", "public GameToken[][] getBoard() {\n\t\treturn this.board;\n\t}", "public Board getOpponentsBoard() {\n return opponentsBoard;\n }", "private void getBoard() {\n gameBoard = BoardFactory.makeBoard();\n }", "public BlockFor2048[][] getBoard() {\n\t\treturn this.myBoard;\n\t}", "public int[][] getBoard();", "public Board getBoard(){\n return undoBoards.peek();\n }", "public int[] getBoard() {\n return board.clone(); //return board.clone();\n }", "public boolean[][] getBoard() {\r\n return board;\r\n }", "public SudokuBoard getBoard() {\n return board;\n }", "public char[][] getBoard() {\n return board;\n\t}", "String getBoard();", "public static char[][] getBoard() {\n\t\treturn board;\n\t}", "public SudokuBoard getBoard() {\n return sb;\n }", "public BoardView getActiveBoard() {\n if (activePlayer == Piece.COLOR.RED)\n return getRedBoard();\n else\n return getWhiteBoard();\n }", "@Override\n\tpublic List<Map> boardList() {\n\t\treturn dao.boardList(session);\n\t}", "public int[][] get() {\r\n return gameBoard;\r\n }", "public GoPlayingBoard getCurrentBoard() {\n \t\treturn currentBoard.clone();\n \t}", "public JButton[][] getBoard(){\n return jbtnBoard;\n }", "Data<List<Boards>> getBoards();", "public String getBoard() {\r\n\t\tString r = \"\";\r\n\t\tfor (int y = 0; y < 3; y++) {\r\n\t\t\tfor (int x = 0; x < 3; x++) {\r\n\t\t\t\tr = r + board[y][x];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "private CurrentBoard board() throws IOException, EncodeException {\n\n //obtain current board state to init POJO\n boolean[][] player = new boolean[model.BOARD_SIZE][model.BOARD_SIZE];\n boolean[][] occupied = new boolean[model.BOARD_SIZE][model.BOARD_SIZE];\n boolean[][] king = new boolean[model.BOARD_SIZE][model.BOARD_SIZE];\n for(int row = 0; row < model.getBoard().length; row++){\n for(int col = 0; col < model.getBoard()[row].length; col++) {\n player[row][col] = model.isPlayerOne(row, col);\n occupied[row][col] = model.squareIsOccupied(row, col);\n king[row][col] = model.squareHoldsKing(row,col);\n }\n }\n currentBoard.setDoubleJump(model.canDoubleJump);\n currentBoard.setPlayerOne(player);\n currentBoard.setKing(king);\n currentBoard.setOccupied(occupied);\n return currentBoard;\n }", "@Override\n\tpublic List<Board2DTO> getBoardList() throws Exception {\n\t\treturn board2Mapper.getBoardList();\n\t}", "@Override\n public BlockGrid getBoard() {\n return checkersBoard;\n }", "public Integer[][] GetCurrentBoard()\n {\n return new Integer[2][3];\n }", "public GraphicalBoard getGraphicalBoard() {\n\treturn gb;\n }", "public Pawn[][] getBoardGrid() {\n\t\treturn boardGrid;\n\t}", "@Override\n public Board getBoard(int id) {\n Board b = boardDataGateway.getBoardByID(id);\n if (b != null)\n b.setPins(getPinsOnBoard(b.getCreator().getUsername(), b.getName()));\n return b;\n }", "public List<Building> getBoardBuildings() {\n return mPersonalBoardCards.getBoardBuildings();\n }", "public Scoreboard getScoreboard ( ) {\n\t\treturn extract ( handle -> handle.getScoreboard ( ) );\n\t}", "public PentagoBoard getPentagoBoard() {\n return board;\n }", "@Override\n\tpublic List<BoardVO> getArticle() {\n\t\tString sql = \"SELECT * FROM board ORDER BY board_id ASC\";\n\t\t\n\t\treturn template.query(sql, new BoardMapper());\n\t}", "public int getBoardLocation() {return boardLocation;}", "public java.util.Set getChildBoards () {\n\t\treturn this._childBoards;\n\t}", "public ArrayList<Integer> getCurBoard() {\n return curBoard;\n }", "public BoardView getRedBoard() {\n return redBoard;\n }", "public int getBoard_id(){\n return Board_id;\n }", "public static Board getInstance() {\n\t\t\n\t\tif(boardObj == null)\n\t\t\tboardObj = new Board();\n\t\t\n\t\treturn boardObj;\n\t}", "public BoardView getWhiteBoard() {\n return whiteBoard;\n }", "public Node getBoardNode() {\r\n return tilesNode;\r\n }", "@Override\n public Board getBoard(String username, String boardname) {\n return boardDataGateway.getBoard(username, boardname);\n }", "String[][] getBoard();", "public Blackboard getBlackboard() {\r\n return blackboard;\r\n }", "public static Board getInstance(){\n\t\treturn instance;\n\t}", "Board() {\n\t\tSpace[][] temp = new Space[xDim][yDim];\n\t\tfor (int i = 0; i < xDim; i++) {\n\t\t\tfor (int j = 0; j < yDim; j++) {\n\n\t\t\t\ttemp[i][j] = new Space();\n\t\t\t}\n\t\t}\n\n\t\thead = temp[0][0];\n\n\t\tfor (int x = 0; x < xDim; x++) {\n\t\t\tfor (int y = 0; y < yDim; y++) {\n\t\t\t\tif (x != 0) {\n\t\t\t\t\t// Left\n\t\t\t\t\ttemp[x][y].join(2, temp[x - 1][y]);\n\t\t\t\t}\n\n\t\t\t\tif (y != 0) {\n\t\t\t\t\t// Top\n\t\t\t\t\ttemp[x][y].join(1, temp[x][y - 1]);\n\t\t\t\t}\n\n\t\t\t\tif (x != xDim - 1) {\n\t\t\t\t\t// Right\n\t\t\t\t\ttemp[x][y].join(0, temp[x + 1][y]);\n\t\t\t\t}\n\n\t\t\t\tif (y != yDim - 1) {\n\t\t\t\t\t// Bottom\n\t\t\t\t\ttemp[x][y].join(3, temp[x][y + 1]);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tdevs = new ArrayList<Developer>();\n\t\tmountains = new ArrayList<Coordinates>();\n\n\t\tfor (int x = 0; x < xDim; x++) {\n\t\t\tif (x == 0 || x == xDim - 1)\n\t\t\t\tfor (int y = 0; y < Math.round(yDim / 2); y++) {\n\t\t\t\t\tmountains.add(new Coordinates(x, y));\n\t\t\t\t}\n\t\t\telse\n\t\t\t\tmountains.add(new Coordinates(x, 0));\n\t\t}\n\n\t}", "protected BoardGrid getGrid() {\n return GameController.getInstance().getGrid();\n }", "public BufferedImage getImage() {\n return boardImage;\n }", "public Playboard getPlayboard();", "public static SquareBoard getFullBoard() {\n\n\t\tSquareBoard fullBoard = new SquareBoard(BOARD_SIZE);\n\t\t\n\t\tfor (int ctr = 0; ctr < (BOARD_SIZE * BOARD_SIZE); ctr++) {\n\t\t\tfullBoard.getSpaceByIndex(ctr).setPiece(\n\t\t\t\t\tnew BasicPieceHelper(String.valueOf(ctr), null));\n\t\t}\n\t\t\n\t\treturn fullBoard;\n\t}", "@Override\n public BoardFramework copyBoard() {\n List<List<GamePiece>> pieceCopies= new ArrayList<>();\n for(List<GamePiece> row: myGamePieces){\n List<GamePiece> rowOfPieceCopies = new ArrayList<>();\n for(GamePiece piece: row){\n rowOfPieceCopies.add(piece.copy());\n }\n pieceCopies.add(rowOfPieceCopies);\n }\n return new Board(pieceCopies,new ArrayList<>(myNeighborhoods),myEmptyState);\n }", "public char[][] getBoardState(){\n return board;\n }", "public char[][] getBoardState(){\n\t\treturn board;\n\t}", "public static Board getInstance() {\n\t\treturn theInstance;\n\t}", "public BoardType getBoardType() {\r\n return this.boardType;\r\n }", "public static GameBoard getGame(){\n\t\t\treturn gameBoard;\n\t\t}", "public Board<?> makeBoard() throws EscapeException {\n\t\tswitch (bi.getCoordinateId()) {\n\t\t\tcase HEX:\n\t\t\t\treturn makeHexBoard();\n\t\t\tcase ORTHOSQUARE:\n\t\t\t\treturn makeOrthoBoard();\n\t\t\tcase SQUARE:\n\t\t\t\treturn makeSquareBoard();\n\t\t\tdefault:\n\t\t\t\tthrow new EscapeException(\"Board does not exist!\");\n\t\t}\n\t}", "public OthelloPiece[][] getPieces() {\n \t return m_Pieces;\n \t}" ]
[ "0.821404", "0.7896136", "0.77560484", "0.7756029", "0.7733277", "0.7732101", "0.7728661", "0.7728661", "0.7685777", "0.76850116", "0.7627179", "0.7605921", "0.75600183", "0.75487655", "0.7523103", "0.7516542", "0.7496647", "0.7491461", "0.74727607", "0.7458145", "0.7458145", "0.7437874", "0.74292463", "0.7397103", "0.73837084", "0.7383052", "0.7339972", "0.7309473", "0.7283767", "0.7278093", "0.7244042", "0.72335637", "0.7219351", "0.72168404", "0.71957403", "0.71952546", "0.71622497", "0.71479666", "0.7107897", "0.70871043", "0.70440793", "0.70394754", "0.7024199", "0.6998666", "0.69885534", "0.6985255", "0.69812113", "0.6967256", "0.6965614", "0.6959713", "0.6957014", "0.69556534", "0.6939188", "0.69214636", "0.69192046", "0.6881739", "0.6856021", "0.6744296", "0.67359513", "0.6694958", "0.6670614", "0.6667291", "0.6651933", "0.6649921", "0.6620394", "0.6615828", "0.660258", "0.6591805", "0.658006", "0.65277934", "0.6524882", "0.65186477", "0.64731586", "0.64660263", "0.6455862", "0.6453364", "0.64466655", "0.64421505", "0.6429349", "0.64074296", "0.6397326", "0.6392332", "0.638465", "0.6384219", "0.6378001", "0.63414395", "0.6327963", "0.63165975", "0.6308256", "0.6288648", "0.6277535", "0.6276303", "0.6244085", "0.6239655", "0.6238068", "0.6210869", "0.61838454", "0.6175563", "0.6154772", "0.61387026" ]
0.7592828
12
getter to retrieve the size of the board
public int getSize() { return this.size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize() {\n return board.getSize();\n }", "int getBoardSize() {\n return row * column;\n }", "protected int getBoardSize(){\n\t\treturn boardSize;\n\t}", "public int getBoardSize(){\r\n\t\treturn boardSize;\r\n\t}", "int getBoardSize() {\n return this.boardSize;\n }", "public int getBoardSize() {\n return BOARD_SIZE;\n }", "public int getBoardSize(){\n\t\treturn grids.getRows();\n\t}", "public int getBoardSize() {\n\t\treturn board.length;\n\t}", "public int getBoardLength() {\n return boardLength;\n }", "public int getBoardWidth(){\n return Cols;\n }", "public int getWidthOfBoard() {\r\n return board[0].length;\r\n }", "public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}", "public int getLength() {\n\t\treturn boardArray.size();\n\t}", "public int getSize() {\n return rows * cols;\n }", "int getTileSize();", "public int getHeightOfBoard() {\r\n return board.length;\r\n }", "public static int getBoardSize() {\n\t\t\n\t\treturn Board.COLS;\n\t}", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public int dimension() {\n return N; // Return Board instance variable for dimension size\n }", "private double getCellSize() {\n double wr = canvas.getWidth() / board.getWidth();\n double hr = canvas.getHeight() / board.getHeight();\n\n return Math.min(wr, hr);\n }", "public abstract int getPuzzleLengthSize();", "public int dimension() // board dimension n\n {\n return dim;\n }", "@Override\r\n\tpublic int getSize() {\n\t\treturn gridSize;\r\n\t}", "public int getCellSize()\n {\n return cellSize;\n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "public static int getSIZE() {\n return SIZE;\n }", "Dimension getSize();", "Dimension getSize();", "public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getCellSize(){\n return cellSize;\n }", "public int getWidth() {\n return mySize.getWidth();\n }", "public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}", "private int getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getSize(){\n\treturn Cells.size();\n }", "private int squareWidth() {\n return (int) getSize().getWidth() / BOARD_WIDTH;\n }", "public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}", "public int getSize()\n {\n return this.size;\n }", "public int getSize() {\n return this.size;\n }", "public int getSize(){\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NODES IN THE TREE AND STORE THE VALUE IN CLASS VARIABLE \"size\"\n * RETURN THE \"size\" VALUE\n *\n * HINT: THE NMBER OF NODES CAN BE UPDATED IN THE \"size\" VARIABLE EVERY TIME A NODE IS INSERTED OR DELETED FROM THE TREE.\n */\n\n return size;\n }", "public static int getTileSize(){\n\t\treturn tileDim;\n\t}", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\r\n return size;\r\n }", "private int getSize() {\n\t\t\treturn size;\n\t\t}", "private int squareHeight() {\n return (int) getSize().getHeight() / BOARD_HEIGHT;\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getWidth() {\n return getTileWidth() * getWidthInTiles();\n }", "int getCurrentSize();", "public int getSize() {\n return size;\n }", "public int getSize() {\n\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "int getSize(){\n return this.matrixSize;\n }", "public int getSize() {\r\n return size;\r\n }", "public int getSize(){\n\t\treturn this.size;\n\t}", "public int getTileSize() {\r\n\t\treturn tSize;\r\n\t}", "int getSize() {\n return size;\n }", "public double getSize() \n {\n return size;\n }", "public double getWidth() {\n return this.size * 2.0; \n }", "public int getSize()\r\n {\r\n return size;\r\n }", "@Override\n\tpublic int size() {\n\t\treturn grid.length;\n\t}", "public int getTileSize() {\r\n\t\treturn this.tileSize;\r\n\t}", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public static int size() {\n return cells.size();\n }", "public int getSize() { \n return size;\n }", "public Integer getSize() {\n return size;\n }", "int getNumberOfStonesOnBoard();", "public GridSize getGridSize()\n {\n return this.gridSize.clone();\n }", "public int getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int Size(){\n \treturn size;\n\t}", "int getSize() {\n return size;\n }", "public int getSize( )\n {\n return size;\n }", "public int getSize() {\r\n return _size;\r\n }", "public int getSize() {\n return this.r;\n }", "public Dimension getSize() {\n\t\treturn size.getCopy();\n\t}", "public int getSize() {\n\t\treturn WORLD_SIZE;\n\t}" ]
[ "0.87243783", "0.8593759", "0.8497435", "0.8493688", "0.8435187", "0.828439", "0.82329047", "0.816633", "0.8077144", "0.78255963", "0.7809111", "0.77919734", "0.7638273", "0.7527684", "0.7468494", "0.74504745", "0.7444772", "0.74049735", "0.7374736", "0.73176837", "0.72726697", "0.7230462", "0.72169036", "0.7186973", "0.71752065", "0.7156642", "0.7156359", "0.7156359", "0.71511847", "0.7113385", "0.7091435", "0.7063682", "0.7060549", "0.702785", "0.7023819", "0.7021621", "0.7015946", "0.70010394", "0.6998722", "0.69972616", "0.6986891", "0.6955706", "0.6955706", "0.6955706", "0.6955706", "0.6955706", "0.6955706", "0.6955706", "0.6955706", "0.69542", "0.6947867", "0.6945685", "0.6944953", "0.6940311", "0.69363934", "0.6928158", "0.69271696", "0.69247574", "0.6923358", "0.6923358", "0.6923358", "0.6917269", "0.6902898", "0.69016075", "0.68993723", "0.6897119", "0.68911785", "0.6890956", "0.68851477", "0.68842876", "0.6881009", "0.68809396", "0.68809396", "0.68809396", "0.68809396", "0.68809396", "0.68809396", "0.68809396", "0.68809396", "0.68809396", "0.68809396", "0.6880936", "0.68775296", "0.68769425", "0.68746", "0.68744403", "0.6864373", "0.6864373", "0.68631685", "0.68631685", "0.68631685", "0.68631685", "0.68631685", "0.68620646", "0.6859276", "0.6858717", "0.68511045", "0.6850748", "0.685059", "0.6849764" ]
0.6977422
41
the placeStone method is used to update the board model with new stones
public void placeStone(Stone stone) { if(board[stone.getY()][stone.getX()].isPlayable()){ Slot slot = (Slot) board[stone.getY()][stone.getX()]; if (stone.getType()==PlayerType.COMPUTER) { if (lastStone !=null) { lastStone.setType(PlayerType.COMPUTER); } stone.setType(PlayerType.COMPUTER_LASTPLACE); lastStone=stone; } slot.placeStone(stone); board[stone.getY()][stone.getX()] = slot; // l.log(Level.INFO, "Placed at "+ stone.getY() + " " + stone.getX()); //l.log(Level.INFO, "tostring is:" + board[stone.getY()][stone.getX()].toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void placeStones(int numStones) {\n\n\t\tShape pitBounds = this.getShape();\n\t\tdouble pitW = pitBounds.getBounds().getWidth();\n\t\tdouble pitH = pitBounds.getBounds().getHeight();\n\t\t\n\n\t\tint stoneWidth = this.stoneIcon.getIconWidth();\n\t\tint stoneHeight = this.stoneIcon.getIconHeight();\n\n\t\t\t\n\t\tfor (int i = 0; i < numStones; i++){\n\t\t\tboolean locationFound = false;\n\t\t\tdo{\n\t\t\t\tfloat x = (float) Math.random();\n\t\t\t\tfloat y = (float) Math.random();\n\n\t\t\t\tx *= pitW;\n\t\t\t\ty *= pitH;\n\t\t\t\t\n\t\t\t\tEllipse2D.Float stoneBounds = new Ellipse2D.Float((float) (x+pitBounds.getBounds().getX()), (float) (y+pitBounds.getBounds().getY()), (float) (stoneWidth), (float) (stoneHeight));\n\n\t\t\t\tSystem.out.println(stoneBounds.getBounds());\n\t\t\t\tpitBounds.getBounds().setLocation(0, 0);\n\t\t\t\tArea pitArea = new Area(pitBounds);\n\t\t\t\tArea pendingStoneLocation = new Area(stoneBounds);\n\t\t\t\tArea intersectionArea = (Area) pitArea.clone();\n\t\t\t\tintersectionArea.add(pendingStoneLocation);\n\t\t\t\tintersectionArea.subtract(pitArea);\n\t\t\t\t\n\t\t\t\tif(intersectionArea.isEmpty() ){\n\t\t\t\t\tlocationFound = true;\n\t\t\t\t\tPoint2D p = new Point2D.Float((float) (x/pitW), (float) (y/pitH));\n\t\t\t\t\trelativeStoneLocations.add(p);\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} while(!locationFound);\n\t\n\t\t}\n\t}", "void setStone(int x, int y, int color);", "public void grabStone() {\n }", "boolean setStone(int x, int y);", "public void setStone(int stoneIn){\r\n\t\tstone = stoneIn;\r\n\t}", "public void putStone() {\n contents += 1;\n }", "private void Stingboard(Point2 position) {\r\n GameBoard Stingboard = new GameBoard(position, BoardColor, BoardType.Sting);\r\n boards.add(Stingboard);\r\n }", "void placePowerStation() {\n this.board.get(powerRow).get(powerCol).placePowerStation();\n }", "@Override\n public Game apply(AMove move, Game game) throws ApplyMoveException {\n PlayCardMove newMove = (PlayCardMove) move;\n\n // Retrieving the Player\n Player player = game.getPlayerByPlayerNr(game.getCurrentPlayer());\n // removing the current Player from the List of all Players\n game.getPlayers().remove(player);\n\n // Removing the marketCard from the players deck of cards\n player.getHandCards().remove(player.getMarketCardById(newMove.getCardId()));\n\n /* PART ONE: GET STONES */\n\n // Retrieving the SupplySled and the StoneQuarry of the current Player\n SupplySled supplySled = player.getSupplySled();\n StoneQuarry stoneQuarry = game.getStoneQuarry();\n\n // Calculating the number of Stones from the StoneQuarry to be moved to the SupplySled\n int stonesOnSupplySled = player.getSupplySled().getStones().size();\n int nrOfNewStones = GameConstants.MAX_STONES_SUPPLY_SLED - stonesOnSupplySled;\n\n // The current Stones on the SupplySled\n List<Stone> updatedStones = supplySled.getStones ();\n\n // Adding at most 3 stones to the SupplySled\n for (int i = 0; i < nrOfNewStones && i != GameConstants.MAX_STONES_ADDED_PER_MOVE; i++) {\n Stone stone = stoneQuarry.getStonesByPlayerNr(player.getPlayerNumber()).remove(0);\n updatedStones.add(stone);\n }\n\n // Adding the updated StoneQuarry to the Game\n game.setStoneQuarry(stoneQuarry);\n\n\n /* PART TWO: PLACE STONE */\n\n // removing one stone from players' sled\n Stone stone = updatedStones.remove(0);\n\n // Adding the position to selected stone\n stone.setPlaceOnShip(newMove.getPlaceOnShip());\n\n // Find the assigned ship\n Ship assignedShip = game.getRoundByRoundCounter().getShipById(newMove.getShipId());\n\n // Remove the assigned ship\n game.getRoundByRoundCounter().getShips().remove(assignedShip);\n\n // Adding stone on ship\n assignedShip.getStones().add(stone);\n\n // Adding the updated sled to the game\n supplySled.setStones(updatedStones);\n\n // Adding the updated ship back to the game\n game.getRoundByRoundCounter().getShips().add(assignedShip);\n\n // Adding the updated SupplySled to the Player\n player.setSupplySled(supplySled);\n\n // Adding the updated Player back to the Game\n game.getPlayers().add(player);\n\n return game;\n }", "public void updateStone(int stoneIn){\r\n\t\tstone = stone + stoneIn;\r\n\t\tif (stone < 0){\r\n\t\t\tstone = 0;\r\n\t\t}\r\n\t}", "public boolean place(boolean isWhite, boolean isWall, boolean isCapstone, Point point){\n // START CONDITIONS\n //----------------\n // Is the space empty that we are trying to place\n if(getStack(point).size() > 0) return false;\n // Is the player trying to place the opponet's piece post turn 2\n // if(isWhite != whiteTurn) return false;\n // // Is the player trying to move their piece during the first 2 turns\n // if(firstTwoTurnCounter < 2){\n // if(isWhite != !whiteTurn) return false;\n // }\n\n // Checks to see if the player has the piece to place\n if(whiteTurn && isCapstone && isWhite && (whiteCapPool == 0)){return false;}\n if(whiteTurn && isWhite && (whitePool == 0)){return false;}\n if(!whiteTurn && isCapstone && !isWhite && (blackCapPool == 0)){return false;}\n if(!whiteTurn && !isWhite && (blackCapPool == 0)){return false;}\n\n //----------------\n // END CONDITIONS\n\n // Valid - move start operation\n // Add new piece to the stack\n getStack(point).add(new TakPiece(isWhite, isWall, isCapstone));\n // Switch the player's turn\n switchPlayer();\n // Increment the firstTwoTurnCounter if it's the first 2 turns\n if(firstTwoTurnCounter < 2) firstTwoTurnCounter++;\n // Remove the piece placed from the pool\n if(isWhite && isCapstone){whiteCapPool--;}\n else if(isWhite){whitePool--;}\n\n if(!isWhite & isCapstone){blackCapPool--;}\n else if(!isWhite){blackPool--;}\n\n turn++;\n return true;\n }", "public void placePiece(Piece newPiece){pieceAtVertex = newPiece;}", "Stone create();", "public void updateBoard() {\n for(SnakePart s : snakePartList) {\n board[s.getSnakePartRowsOld()][s.getSnakePartCollsOld()] = ' ';\n board[s.getSnakePartRowsNew()][s.getSnakePartCollsNew()] = 'S';\n }\n \n for (SnakeEnemyPart e : snakeEnemyPartList) {\n board[e.getSnakeEnemyPartRowsOld()][e.getSnakeEnemyPartCollsOld()] = ' ';\n board[e.getSnakeEnemyPartRowsNew()][e.getSnakeEnemyPartCollsNew()] = 'E';\n }\n }", "private void placePiece() {\r\n pieces[numPieces] = getRandomPoint();\r\n Game.movePiece(new PositionData(-1,-1,Constants.PLAYER_A_ID), pieces[numPieces]);\r\n numPieces++;\r\n }", "public void takeStone(Stone stone){\r\n\t\tint pos = 0;\r\n\t\tboolean cont = true;\r\n\t\twhile(cont) {\r\n\t\t\tfor(Stone s: hand) {\r\n\t\t\t\tif(cont == true) {\r\n\t\t\t\t\tif(!(s.toString().equals(stone.toString()))) {\r\n\t\t\t\t\t\tpos++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcont = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(pos != MAXHANDSIZE) {\r\n\t\t\thand.remove(pos);\r\n\t\t}\r\n\t}", "public void PlaceRandomBoard(){\r\n\r\n\t\tString whichShip;\r\n\t\tString coordinate;\r\n\t\t\r\n\t\t\t// Display the random board and the random board menu \r\n\t\t// DISPLAY BOARDS!!!!!\r\n\t\tint whichInput=0;\r\n\t\tShip temp = new Ship();\r\n\t\tRandom generator = new Random();\r\n\t\tint randomIndex = generator.nextInt();\r\n\t\twhile (!this.myBoard.carrier.placed || !this.myBoard.battleship.placed\r\n\t\t\t\t|| !this.myBoard.cruiser.placed || !this.myBoard.submarine.placed\r\n\t\t\t\t|| !this.myBoard.patrolboat.placed) {\r\n\r\n\t\t\twhichInput++;\r\n\r\n\t\t\twhichShip = String.valueOf(whichInput);\r\n\t\t\t\r\n\t\t\tint direction=0;\r\n\r\n\t\t\tboolean placed = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\trandomIndex = generator.nextInt(10);\r\n\t\t\t\tcoordinate = this.indexToLetter(randomIndex);\r\n\t\t\t\tcoordinate += String.valueOf(generator.nextInt(10)+1);\r\n\t\t\t\tdirection = generator.nextInt(4) + 1;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tswitch (Integer.parseInt(whichShip)) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\ttemp = new Carrier();\r\n\t\t\t\t\ttemp.name=\"Carrier\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\ttemp = new Battleship();\r\n\t\t\t\t\ttemp.name=\"Battleship\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\ttemp = new Cruiser();\r\n\t\t\t\t\ttemp.name=\"Cruiser\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\ttemp = new Submarine();\r\n\t\t\t\t\ttemp.name=\"Submarine\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\ttemp = new PatrolBoat();\r\n\t\t\t\t\ttemp.name=\"Patrol Boat\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\tplaced = this.validateShipPlacement(temp, coordinate, direction);\r\n\r\n\t\t\t\tif (placed) {\r\n\t//\t\t\t\tSystem.out.println(\"Success\");\r\n\t\t\t\t\tthis.placeShip(temp, coordinate, direction);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t//\t\t\t\tdisplay.scroll(\"Invalid coordinate, please enter another\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void setBoard() {\n bestPieceToMove = null;\n bestPieceFound = false;\n bestMoveDirectionX = 0;\n bestMoveDirectionY = 0;\n bestMoveFound = false;\n killAvailable = false;\n lightCounter = 12;\n darkCounter = 12;\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n board[y][x] = new Field(x, y);\n if (y < 3 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.DARK, PieceType.MEN));\n } else if (y > 4 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.LIGHT, PieceType.MEN));\n }\n }\n }\n }", "public MancalaStone(int num)\n\t{\n\t\tnumStone = num;\n\t}", "private void prepareBoard(){\n gameBoard.arrangeShips();\n }", "@Override\n public void run() {\n try {\n preparePlacedBoard();\n } catch (AllShipsPlacedSuccesfully ex) {\n placedBoard.setAsTargetBoard();\n }\n }", "private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }", "public void refactor() {\n this.maxX = SnakeGame.getxSquares();\n this.maxY = SnakeGame.getySquares();\n snakeSquares = new int[this.maxX][this.maxY];\n fillSnakeSquaresWithZeros();\n createStartSnake();\n }", "void placeTower();", "void doPlaceObject() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (currentBaseTile != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.basemap, renderer.placementRectangle, false);\r\n\t\t\tSurfaceFeature sf = new SurfaceFeature();\r\n\t\t\tsf.id = currentBaseTile.id;\r\n\t\t\tsf.type = currentBaseTile.type;\r\n\t\t\tsf.tile = currentBaseTile.tile;\r\n\t\t\tsf.location = Location.of(renderer.placementRectangle.x, renderer.placementRectangle.y);\r\n\t\t\trenderer.surface.features.add(sf);\r\n\t\t\t\r\n\t\t\tplaceTile(currentBaseTile.tile, renderer.placementRectangle.x, renderer.placementRectangle.y, SurfaceEntityType.BASE, null);\r\n\t\t\t\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trenderer.repaint();\r\n\t\t} else\r\n\t\tif (currentBuildingType != null && renderer.canPlaceBuilding(renderer.placementRectangle) && renderer.placementRectangle.width > 0) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tBuilding bld = new Building(currentBuildingType, currentBuildingRace);\r\n\t\t\tbld.makeFullyBuilt();\r\n\t\t\tbld.location = Location.of(renderer.placementRectangle.x + 1, renderer.placementRectangle.y - 1); // leave room for the roads!\r\n\t\t\trenderer.surface.buildings.add(bld);\r\n\t\t\t\r\n\t\t\tplaceTile(bld.tileset.normal, bld.location.x, bld.location.y, SurfaceEntityType.BUILDING, bld);\r\n\t\t\tplaceRoads(currentBuildingRace);\r\n\t\t\t\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trenderer.repaint();\r\n\t\t}\r\n\t}", "public void swapGameStones(ArrayList<Integer> stoneIDs){\n\t\tint turn = DBCommunicator.requestInt(\"SELECT id FROM beurt WHERE spel_id = \" + id + \" ORDER BY id DESC\");\n\t\tturn ++;\n\t\t\n\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) Values(\" + turn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"',0 , 'Swap')\");\n\t\t\n\t\tfor(int stoneID : stoneIDs){\n\t\t\tboolean swapped = false;\n\t\t\twhile(!swapped){\n\t\t\t\tint letterID = (int) (Math.random() * 105);\n\t\t\t\t\n\t\t\t\tString character = DBCommunicator.requestData(\"SELECT karakter FROM pot WHERE spel_id = \" + id + \" AND letter_id = \" + letterID);\n\t\t\t\tif(character != null){\n\t\t\t\t\tboolean inStones = false;\n\t\t\t\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\t\t\t\tif(gameStones.get(e) == letterID){\n\t\t\t\t\t\t\tinStones = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!inStones){\n\t\t\t\t\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\t\t\t\t\tif(gameStones.get(e) == stoneID){\n\t\t\t\t\t\t\t\tswapped = true;\n\t\t\t\t\t\t\t\tgameStones.set(e, letterID);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int stoneID : gameStones){\n\t\t\tif(stoneID != 0){\n\t\t\t\tSystem.out.println(\"PLACE \" + id + \" \" + stoneID + \" \" + turn);\n\t\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + stoneID + \", \" + turn + \")\");\n\t\t\t}\n\t\t}\n\t\tthis.setStoneLetters();\n\t\tthis.fillStoneChars();\n\t}", "public void testPlaceNormalTile() {\n \tPlacement placement1 = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n \tPlacement placement2 = new Placement(Color.GREEN, 5, 19, Color.BLUE, 5, 18);\n \t\n try {\n \t\tboard.place(placement1);\n \t\tboard.place(placement2);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n \n Placement placement3 = new Placement(Color.GREEN, 4, 15, Color.BLUE, 3, 12);\n Score score = null;\n try {\n \t\tscore = board.calculate(placement3);\n \t\tboard.place(placement3);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected = new Score();\n expected.setValue(Color.BLUE, 1);\n expected.setValue(Color.GREEN, 1);\n assertEquals(expected, score);\n }", "public void moveStone(char column, int line, char color) {\r\n\t\tif (!this.containsPoint(column, line)) {\r\n\t\t\tthrow new IllegalArgumentException(\"Error! Point does not exist.\");\r\n\t\t} else if (color != 'B' && color != 'W') {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Error! Invalid color. Expected B or W.\");\r\n\t\t}\r\n\r\n\t\tboolean move = true;\r\n\t\tplayBoard[line - 1][this.getColumn(column)] = color;\r\n\t\tthis.vectorMoveRoutine(line - 1, this.getColumn(column), color, move);\r\n\t}", "public void placeTile(Tile t){\n\t\t//System.out.println(t.toString() + \" was placed\");\n\t\toccupied = true;\n\t\tcurrentTile = t;\n\t}", "public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }", "public void moveTo(int stonesInHand, int pit) {\n\t\t/*System.out.println(madeMove);\n\t\tprintBoard();\n\t\tSystem.out.println(currentPit);*/\n\t\t\n\t\tcurrentPit = pit; \n\t\twhile(stonesInHand>1){ \n\t\t\tif (currentPit == 14)\n\t\t\t\tcurrentPit = 0;\n\t\tif (isPlayer1() && currentPit == 13 || !isPlayer1() && currentPit == 6) {\n\t\t\t\tcurrentPit++; \n\t\t}\n\t\t\tboard[currentPit]++;\n\t\t\tstonesInHand--;\n\t\t\tcurrentPit++; \n\t\t\tprintBoard();\n\t\t\t\n\t\t}\n\t\t\n\t\t// dropping last stone, so check if landing in own scoring pit or\n\t\t// side for bonus turn or stones\n\t\tif (isValid() && board[currentPit] == 0) { \t\t\t\t// landed on empty of\n\t\t\t// pit of own side,\n\t\t\t// so bonus!\n\t\t\tbonusStones();\n\t\t}\n\t\t//check if extra turn is earned\n\t\tif (extraTurn()) {\n\t\t\tif(currentPlayer.getPlayNum() == 1){\n\t\t\t\t\tboard[6]++;\n\t\t\t}\n\t\t\telse \n\t\t\t\tboard[13]++;\n\t\t\tmadeMove = true;\n\t\t\tstonesInHand = 0;\n\t\t\tSystem.out.println(\"Extra turn!\");\n\t\t}\n\t\t// no bonus or extra turn, so drop last stone in pit and turn is over\n\t\telse {\n\t\t\tboard[currentPit]++;\n\t\t\tstonesInHand = 0;\n\t\t\t//endTurn();\n\t\t\tturnEnd = true;\n\t\t}\n\t}", "public boolean placePiece(Piece piece,String side, int row, int col)\n {\n\tboolean placed = true;\n\tint[][] shape = piece.getShape(); //shape of the piece\n\tString[][] fBoard = new String[rows][cols]; //temp front board\n\tString[][] bBoard = new String[rows][cols]; //temp back board\n\tfor(int i=0;i<rows;i++)\n\t {\n\t\tfor(int j=0;j<cols;j++)\n\t\t {\n\t\t\tfBoard[i][j] = frontBoard[i][j];\n\t\t\tbBoard[i][j] = backBoard[i][j];\n\t\t }\n\t }\n\tint insertRow = row; //row on the board being altered\n\tint insertCol = col; //column on the board being altered\n\tfor(int i=0;i<piece.getPieceRows();i++)\n\t {\n\t\tfor(int j=0;j<piece.getPieceCols();j++)\n\t\t {\n\t\t\tif(insertRow<0 || insertRow>rows-1 || insertCol<0 || insertCol>cols-1) //checks that the row and column numbers are valid\n\t\t\t {\n\t\t\t\tplaced = false;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\tif(side==\"front\") //places the piece relative to the front of the board\n\t\t\t\t {\n\t\t\t\t\tif(fBoard[insertRow][insertCol].equals(\"0\") || fBoard[insertRow][insertCol].charAt(1)=='0') \n\t\t\t\t\t //if the front board has a 0\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=0)//if the piece does not have a 0 in the spot\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tfBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2; //front gets a color and a 2\n\t\t\t\t\t\t\tbBoard[insertRow][rows-insertCol] = piece.getColor().charAt(0) + \"\" + shape[i][j]; //back gets a color and a 1\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\telse if(fBoard[insertRow][insertCol].charAt(1)=='1')\n\t\t\t\t\t //if the front board has a 1\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=2) //if the piece does not have a 2\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tfBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2; //front of the board gets a 2\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\tplaced = false;\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\telse\n\t\t\t\t\t //if the front of the board has a 2, only a piece with a 0 can be placed there\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=0)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t placed = false;\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 }\n\t\t\t\telse //places the piece relative to the back of the board (same rules as above only reversed)\n\t\t\t\t {\n\t\t\t\t\tif(bBoard[insertRow][insertCol].equals(\"0\") || bBoard[insertRow][insertCol].charAt(1)=='0')\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=0)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tbBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2;\n\t\t\t\t\t\t\tfBoard[insertRow][rows-insertCol] = piece.getColor().charAt(0) + \"\" + shape[i][j];\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\telse if(bBoard[insertRow][insertCol].charAt(1)=='1')\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=2)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tbBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2;\t \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\tplaced = false;\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\telse\n\t\t\t\t\t {\n\t\t\t\t\t if(shape[i][j]!=0)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t placed = false;\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 }\n\t\t\t }\n\t\t\tinsertCol++;\n\t\t }\n\t\tinsertRow++;\n\t\tinsertCol = col;\n\t }\n\tif(placed) //if the piece did not encounter a collision, change the actual front and back of the board\n\t{\n\t\tfrontBoard = fBoard;\n\t\tbackBoard = bBoard;\n\t\tString color = piece.getColor();\n\t\tint index = 0;\n\t\twhile(!unused[index].getColor().equals(color))\n\t\t{\n\t\t\tindex++;\n\t\t}\n\t\tfor(int j=index;j<unused.length-1;j++)\n\t {\n\t\t\tunused[j] = unused[j+1];\n\t }\n\t\tunused[unused.length-1] = null;\n\t\tindex = 0;\n\t\tif(onBoard.length>0)\n\t\t{\n\t\t\twhile(onBoard[index]!=null && index<10)\n\t\t\t{\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tif(index<10)\n\t\t{\n\t\t\tonBoard[index] = color;\n\t\t}\n\t}\n\treturn placed;\n }", "public void newBoard(LiteBoard board) {\n }", "public void setToPlaceTowerState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Grass) {\n cells.set(i, CellState.ToPlaceTower);\n } else if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n }\n }\n }", "@Override\r\n\tpublic void placePiece(JumpInButton[][] square) {\r\n\t\tsquare[this.x][this.y].setBackground(Color.RED);\r\n\t}", "public ThreeStonesPlayer(Stone stoneColour, int numStones) {\n this.score = 0;\n this.stoneColour = stoneColour;\n this.numStones = numStones;\n }", "public ThreeStonesBoard(Tile[][] board) {\r\n this.board = board;\r\n }", "public StoneSword() {\n\t\tthis.ID = ItemReference.STONESWORD;\n\t\tthis.name = \"Stone Sword\";\n\t\tthis.attack = 50;\n\t\tthis.cost = Prices.STONE_SWORD;\n\t}", "public void testPlaceNormalTile2() {\n \tPlacement placement1 = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n \tPlacement placement2 = new Placement(Color.GREEN, 5, 19, Color.BLUE, 5, 18);\n \t\n try {\n \t\tboard.place(placement1);\n \t\tboard.place(placement2);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n \t\n Placement placement3 = new Placement(Color.GREEN, 4, 20, Color.BLUE, 4, 21);\n Score score3 = null;\n try {\n \t\tscore3 = board.calculate(placement3);\n \t\tboard.place(placement3);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected3 = new Score();\n expected3.setValue(Color.BLUE, 1);\n expected3.setValue(Color.GREEN, 3);\n assertEquals(expected3, score3);\n \n Placement placement4 = new Placement(Color.GREEN, 4, 19, Color.BLUE, 3, 15);\n Score score4 = null;\n try {\n \t\tscore4 = board.calculate(placement4);\n \t\tboard.place(placement4);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected4 = new Score();\n expected4.setValue(Color.BLUE, 2);\n expected4.setValue(Color.GREEN, 4);\n assertEquals(expected4, score4);\n }", "public void bonusStones() {\n\t\tint bonus = 1; // final pit player had when landing on empty pit\n\t\tbonus += board[12 - currentPit]; // (12 - currentPit) will get us pit directly across board\n\t\tboard[12 - currentPit] = 0;\n\t\tif (isPlayer1()) { // if player one, place bonus stones in pit 6\n\t\t\tboard[6] += bonus;\n\t\t} else { // if player 2, place stones in pit 13\n\t\t\tboard[13] += bonus;\n\t\t}\n\t}", "@Override\r\n\tpublic int insertBackStone(BackStone backStone) {\n\t\tLOGGER.info(\"插入一条退石记录:>>\" );\r\n\t\treturn backStoneDao.insertBackStone(backStone);\r\n\t}", "protected void placeRandomly ( Thing thing ) {\n\t\tfor ( ; true ; ) {\n\t\t\tint row = (int) (Math.random() * numrows_);\n\t\t\tint col = (int) (Math.random() * numcols_);\n\t\t\tif ( field_[row][col] == null ) {\n\t\t\t\tfield_[row][col] = thing;\n\t\t\t\tif ( thing instanceof Animal ) {\n\t\t\t\t\t((Animal) thing).setPosition(row,col);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void prepareBoardBeforePlacement( Board board );", "public void setBoard(Board board){this.board = board;}", "final void put(Piece p, Square s) {\r\n if (p == KING) {\r\n map.put(kingPosition(), EMPTY);\r\n king = s;\r\n }\r\n board[s.col()][s.row()] = p;\r\n }", "public int getStone(){\r\n\t\treturn stone;\r\n\t}", "void doPlaceBuilding() {\r\n\t\tint idx = buildingTable.getSelectedRow();\r\n\t\tif (idx >= 0) {\r\n\t\t\tidx = buildingTable.convertRowIndexToModel(idx);\r\n\t\t\tTileEntry te = buildingTableModel.rows.get(idx);\r\n\t\t\tif (renderer.selectedRectangle != null && renderer.selectedRectangle.width > 0) {\r\n\t\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\t\t\r\n\t\t\t\tRectangle clearRect = new Rectangle(renderer.selectedRectangle);\r\n\t\t\t\tclearRect.width = ((clearRect.width + te.tile.width) / (te.tile.width + 1)) * (te.tile.width + 1) + 1;\r\n\t\t\t\tclearRect.height = ((clearRect.height + te.tile.height) / (te.tile.height + 1)) * (te.tile.height + 1) + 1;\r\n\t\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, clearRect, true);\r\n\t\t\t\t\r\n\t\t\t\tfor (int x = renderer.selectedRectangle.x; x < renderer.selectedRectangle.x + renderer.selectedRectangle.width; x += te.tile.width + 1) {\r\n\t\t\t\t\tfor (int y = renderer.selectedRectangle.y; y > renderer.selectedRectangle.y - renderer.selectedRectangle.height; y -= te.tile.height + 1) {\r\n\t\t\t\t\t\tBuilding bld = new Building(te.buildingType, te.surface);\r\n\t\t\t\t\t\tbld.makeFullyBuilt();\r\n\t\t\t\t\t\tbld.location = Location.of(x + 1, y - 1);\r\n\t\t\t\t\t\trenderer.surface.buildings.add(bld);\r\n\t\t\t\t\t\tplaceTile(te.tile, bld.location.x, bld.location.y, SurfaceEntityType.BUILDING, bld);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tplaceRoads(te.surface);\r\n\t\t\t\tundo.setAfter();\r\n\t\t\t\taddUndo(undo);\r\n\t\t\t\trenderer.repaint();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }", "@Test\n\tpublic void pieceMovesToSandwichPosition()\n\t{\n\t\tData d=new Data();\n\t\td.set(9,93);\n\t\td.set(32,103);\n\t\td.set(9,104);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(104);\n\t\tassertEquals(test_arr.size(),0);\n\t}", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "@Test\n void should_place_ships_scenario_1() {\n Board board = BoardData.getBoard(15, 15);\n\n List<ShipType> shipConfigs = Arrays.asList(\n ShipType.ONE,\n ShipType.ONE,\n ShipType.TWO,\n ShipType.THREE\n );\n\n AutomaticShipPlacer automaticShipPlacer = new AutomaticShipPlacer();\n automaticShipPlacer.placeShips(shipConfigs, board);\n\n assertSame(4, board.getShips().size());\n BoardPrinter.print(board);\n }", "private void insertSouth(State state)\r\n\t{\r\n\t\tif (southElem == 0)\r\n\t\t{\r\n\t\t\tsouthQueue[southElem++] = state;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint i;\t\r\n for (i = southElem - 1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tif (state.getPopulation() > southQueue[i].getPopulation())\r\n\t\t\t\t\tsouthQueue[i+1] = southQueue[i];\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tsouthQueue[i+1] = state;\r\n southElem++;\r\n\t\t}\r\n\t}", "public void boardSetUp(){\n\t}", "public void placeWormOnAgar()\n {\n for (int x = 0; x < Agar.GRID_SIZE.width; x++)\n {\n for (int y = 0; y < Agar.GRID_SIZE.height; y++)\n {\n agar.wormCells[x][y] = SectorDisplay.EMPTY_CELL_VALUE;\n }\n }\n agar.wormCells[headSegment.x][headSegment.y] = Agar.WORM_SEGMENT_VALUE;\n for (int i = 0; i < NUM_BODY_SEGMENTS; i++)\n {\n BodySegment segment = bodySegments[i];\n agar.wormCells[segment.x][segment.y] = Agar.WORM_SEGMENT_VALUE;\n }\n }", "public void startSnake() {\n createBoard();\n generateFirstSnake();\n generateEnemy();\n spawnApples();\n printBoard();\n keepMoving();\n }", "private void placeBomb(int x, int y, int newValue) {\n setCell(x, y, newValue); // a: Turns this cell into a bomb\n ++bombsPlaced; // b: increments bombs placed\n GridHelper.oneUpAll(x, y, hiddenGrid); // b: Increments all cells surrounding the new bomb\n }", "public void save(){\n BoardSerializer.serialize(this);\n }", "private void swellForests(Square[][]Squares, int rows, int columns, int[][] terrainLoc)\n {\n // for loop to go through every second column\n for (int a = 1; a < rows-1; a=a+2)\n {\n // for loop to go through every row\n for (int b = 1 ; b < columns-1 ; b++)\n {\n // checking for seeds\n if (terrainLoc[a][b] == 2)\n {\n // randoming the amount of forests to add around the found seed\n int rand = (int ) (Math.random() * 8 +1);\n \n // for loop to random the locations and place the new forest tiles\n for (int c = 0 ; c<=rand;c++)\n { \n int randvalue = (int ) (Math.random() * 8 +1);\n \n switch (randvalue)\n {\n case 1: Squares[a-1][b-1].setTerrain(2); // vasen ylänurkka\n case 2: Squares[a][b-1].setTerrain(2); // yläpuoli\n case 3: Squares[a+1][b-1].setTerrain(2); // oikea ylänurkka\n case 4: Squares[a-1][b].setTerrain(2); // vasen\n case 5: Squares[a+1][b].setTerrain(2); // oikea\n case 6: Squares[a-1][b+1].setTerrain(2); // vasen alanurkka\n case 7: Squares[a][b+1].setTerrain(2); // alapuoli\n case 8: Squares[a+1][b+1].setTerrain(2); // oikea alanurkka\n }\n }\n }\n }\n }\n }", "void setBoard(Board board);", "@Test\n void RookMoveToFriendlyOccupied() {\n Board board = new Board(8, 8);\n Piece rook1 = new Rook(board, 4, 3, 1);\n Piece rook2 = new Rook(board, 4, 6, 1);\n\n board.getBoard()[4][3] = rook1;\n board.getBoard()[4][6] = rook2;\n\n board.movePiece(rook1, 4, 6);\n\n Assertions.assertEquals(rook1, board.getBoard()[4][3]);\n Assertions.assertEquals(rook2, board.getBoard()[4][6]);\n }", "public void placeShip(Ship thisShip, String coordinate, int direction){\r\n\t\tthisShip.placed = true;\r\n\t\tint letterCoord = letterToIndex(coordinate.charAt(0));\r\n\t\tint numberCoord = Integer.parseInt(coordinate.substring(1))-1;\r\n\t\t\r\n\t\t\r\n\t\t\tif (direction == 1) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\t\tthisShip.set_position(numberCoord+i, letterCoord);\r\n\t\t\t\t\t}\r\n\t\t\t} else if (direction == 2) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\tthisShip.set_position(numberCoord, letterCoord+i);\r\n\t\t\t\t\t}\r\n\t\t\t} else if (direction == 3) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\tthisShip.set_position(numberCoord-i, letterCoord);\r\n\t\t\t\t}\r\n\t\t\t} else if (direction == 4) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\tthisShip.set_position(numberCoord, letterCoord - i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\tif(thisShip.name == \"Carrier\"){\r\n\t\t\tmyBoard.carrier.placed=thisShip.placed;\r\n\t\t\tmyBoard.carrier.position=thisShip.position;\r\n\t\t\t}\r\n\t\t\t\r\n\t\telse if(thisShip.name == \"Battleship\"){\r\n\t\t\tmyBoard.battleship.placed=thisShip.placed;\r\n\t\t\tmyBoard.battleship.position=thisShip.position;\r\n\t\t}\r\n\t\telse if(thisShip.name == \"Cruiser\"){\r\n\t\t\tmyBoard.cruiser.placed=thisShip.placed;\r\n\t\t\tmyBoard.cruiser.position=thisShip.position;\r\n\t\t}\r\n\t\telse if(thisShip.name == \"Submarine\"){\r\n\t\t\tmyBoard.submarine.placed=thisShip.placed;\r\n\t\t\tmyBoard.submarine.position=thisShip.position;\r\n\t\t}\r\n\t\telse if(thisShip.name == \"Patrol Boat\"){\r\n\t\t\t\tmyBoard.patrolboat.placed=thisShip.placed;\r\n\t\t\t\tmyBoard.patrolboat.position=thisShip.position;\r\n\t\t}\r\n\t\t\t\r\n\t\t}", "public void setInitialPosition()\n {\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.a2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.b2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.c2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.d2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.e2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.f2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.g2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.h2);\n //Se colocan los peones negros en la séptima fila\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.a7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.b7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.c7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.d7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.e7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.f7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.g7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.h7);\n //Se colocan las torres blancas en a1 y h1\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.a1);\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.h1);\n //Se colocan las torres negras en a8 y h9\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.a8);\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.h8);\n //Se colocan los caballos blancos en b1 y g1\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.b1);\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.g1);\n //Se colocan los caballos negros en b8 y g8\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.b8);\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.g8);\n //Se colocan los alfiles blancos en c1 y f1\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.c1);\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.f1);\n //Se colocan los alfiles negros en c8 y f8\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.c8);\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.f8);\n //Se coloca la dama blanca en d1\n putGenericPiece(GenericPiece.QUEEN,Colour.WHITE,Square.d1);\n //Se coloca la dama negra en d8\n putGenericPiece(GenericPiece.QUEEN,Colour.BLACK,Square.d8);\n //Se coloca el rey blanco en e1\n putGenericPiece(GenericPiece.KING,Colour.WHITE,Square.e1);\n //Se coloca el rey negro en e8\n putGenericPiece(GenericPiece.KING,Colour.BLACK,Square.e8);\n \n //Se permiten los enroques para ambos jugadores\n setCastlingShort(Colour.WHITE,true);\n setCastlingShort(Colour.BLACK,true);\n setCastlingLong(Colour.WHITE,true);\n setCastlingLong(Colour.BLACK,true);\n \n //Se da el turno a las blancas\n setTurn(Colour.WHITE);\n \n gamePositionsHash.clear();\n gamePositionsHash.put(zobristKey.getKey(), 1);\n }", "public StoneSummon() {\n// ArrayList<BufferedImage> images = SprssssssaasssssaddddddddwiteUtils.loadImages(\"\"\n createStones();\n\n }", "@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}", "public void place(GamePiece teil, QPosition pos) { // old German method name: platziere\n for (int x = teil.getMinX(); x <= teil.getMaxX(); x++) {\n for (int y = teil.getMinY(); y <= teil.getMaxY(); y++) {\n if (teil.filled(x, y)) {\n int ax = pos.getX() + x - teil.getMinX();\n int ay = pos.getY() + y - teil.getMinY();\n set(ax, ay, teil.getBlockType(x, y));\n }\n }\n }\n view.draw();\n }", "public void placeShip(Board board, Ship ship) {\n\n\n Point startPoint = null;\n boolean validPoint = false;\n while (!validPoint) {\n System.out.printf(\"Place your %s (%d spaces).%n\", ship.getName(), ship.getLength());\n try {\n startPoint = returnPointFromInput(board);\n if (startPoint != null && !startPoint.hasShip()) {\n validPoint = true;\n } else {\n System.out.println(\"Invalid input. Please enter a coordinate pair. Ex: 1A (Case insensitive).\");\n }\n } catch (IllegalArgumentException | NoSuchElementException e) {\n System.out.println(e.getMessage());\n }\n }\n\n int emptySpaces = 0;\n boolean validBranch = false;\n Point[] branch = null;\n while (!validBranch) {\n\n String direction = null;\n boolean validDirection = false;\n while (!validDirection) {\n try {\n direction = directionFromInput();\n validDirection = true;\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }\n\n branch = makeBranch(board, startPoint, ship.getLength(), direction);\n for (Point point : branch) {\n if (!point.hasShip()) {\n emptySpaces++;\n }\n }\n if (emptySpaces == ship.getLength()) {\n validBranch = true;\n } else {\n System.out.println(\"You can't put a ship there. Not enough room\");\n emptySpaces = 0;\n }\n }\n\n // pass ship to point\n for (Point point : branch) {\n point.setShip(ship);\n point.setHasShip(true);\n }\n }", "@Test\n void should_place_ships_scenario_2() {\n Board board = BoardData.getBoard(15, 15);\n\n List<ShipType> shipConfigs = Arrays.asList(\n ShipType.ONE,\n ShipType.ONE,\n ShipType.ONE,\n ShipType.ONE,\n ShipType.TWO,\n ShipType.TWO\n );\n\n AutomaticShipPlacer automaticShipPlacer = new AutomaticShipPlacer();\n automaticShipPlacer.placeShips(shipConfigs, board);\n\n assertSame(6, board.getShips().size());\n BoardPrinter.print(board);\n }", "public void setBoardLocation(int boardLocation) {this.boardLocation = boardLocation;}", "public void skystonePos1() {\n // This method will drive the robot to Skystone Position 1 (Closest to the bridge)\n // Blinked in: Change color SOLID BLUE to indicate we successfully Drove to the stone\n }", "public void shipPlacer(Board board, ShipTeam fleet){\r\n\r\n\t\tArrayList<Ship> theShips = fleet.getShips();\r\n\r\n\t\tint randomX, randomY;\r\n\t\tfor (Ship s : theShips){\r\n\t\t\tboolean goodPlace = false;\r\n\t\t\twhile (goodPlace == false){\r\n\t\t\t\tRandom randCoords = new Random();\r\n\t\t\t\trandomX = randCoords.nextInt(10);\r\n\t\t\t\trandomY = randCoords.nextInt(10);\r\n\t\t\t\tif (randomX % 2 == 0)\r\n\t\t\t\t\tgoodPlace = board.placeShip(randomX, randomY, s, 1);\r\n\t\t\t\telse\r\n\t\t\t\t\tgoodPlace = board.placeShip(randomX, randomY, s, 2);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void testPlaceFirstTile3() {\n \tPlacement placement = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n Score score = null;\n try {\n \t\tscore = board.calculate(placement);\n \t\tboard.place(placement);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n \n Score expected = new Score();\n expected.setValue(Color.GREEN, 1);\n assertEquals(expected, score);\n \n Placement placement2 = new Placement(Color.GREEN, 5, 19, Color.BLUE, 5, 18);\n Score score2 = null;\n try {\n \t\tscore2 = board.calculate(placement2);\n \t\tboard.place(placement2);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected2 = new Score();\n expected2.setValue(Color.RED, 1);\n assertEquals(expected2, score2);\n }", "@Before\r\n public void setUpBoard(){\r\n board3 = new Board(makeTiles(3*3), boardManager3, 3);\r\n board4 = new Board(makeTiles(4*4), boardManager4, 4);\r\n board5 = new Board(makeTiles(5*5), boardManager5, 5);\r\n boardManager3.setBoard(board3);\r\n boardManager4.setBoard(board4);\r\n boardManager5.setBoard(board5);\r\n board3.setSlidingScoreBoard(slidingScoreBoard3);\r\n board4.setSlidingScoreBoard(slidingScoreBoard4);\r\n board5.setSlidingScoreBoard(slidingScoreBoard5);\r\n }", "private void addAnotherElement() {\n\t\t SnakeSquare ss = sSquare.get(sSquare.size() - 1);\n\t\t double velX = ss.getDX();\n\t\t double velY = ss.getDY();\n\t\t \n\t\t double x = ss.getX();\n\t\t double y = ss.getY();\n\t\t double len = ss.getLength();\n\t\t Color c = ss.getColor();\n//\t\t double snakeSize = 10.0f;\n\t\t \n\t\t if(velX == 0 && velY == 0){sSquare.add(new SnakeSquare(x, y + snakeSize, c, len));}\n\t\t if(velX == 0 && velY == 1){sSquare.add(new SnakeSquare(x, y - snakeSize, c, len));}//move down;\n\t\t if(velX == 0 && velY == -1){sSquare.add(new SnakeSquare(x, y + snakeSize, c, len));}//move up;\n\t\t if(velX == 1 && velY == 0){sSquare.add(new SnakeSquare(x+ snakeSize, y, c, len));}//move right;\n\t\t if(velX == -1 && velY == 0){sSquare.add(new SnakeSquare(x - snakeSize, y, c, len));}// move left;\n\t\t\n\t}", "public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }", "public void setStoneCount(int stoneCount)\n {\n if(stoneCount < 0) throw new RuntimeException(\"Stone count must be >= 0\");\n this.stoneCount = stoneCount;\n repaint();\n }", "void placeTile(Tile tile, int x, int y, SurfaceEntityType type, Building building) {\r\n\t\tfor (int a = x; a < x + tile.width; a++) {\r\n\t\t\tfor (int b = y; b > y - tile.height; b--) {\r\n\t\t\t\tSurfaceEntity se = new SurfaceEntity();\r\n\t\t\t\tse.type = type;\r\n\t\t\t\tse.virtualRow = y - b;\r\n\t\t\t\tse.virtualColumn = a - x;\r\n\t\t\t\tse.tile = tile;\r\n\t\t\t\tse.tile.alpha = alpha;\r\n\t\t\t\tse.building = building;\r\n\t\t\t\tif (type != SurfaceEntityType.BASE) {\r\n\t\t\t\t\trenderer.surface.buildingmap.put(Location.of(a, b), se);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trenderer.surface.basemap.put(Location.of(a, b), se);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void createSnake() {\r\n int halfWidth = gridWidth / 2;\r\n int halfHeight = gridHeight / 2;\r\n \r\n snake = new Snake(new Coordinates(halfWidth, halfHeight), 5, Direction.WEST);\r\n }", "public void gossipGirl(){\n\t\tfor(Point p: currentPiece){\n\t\t\twell[p.x + pieceOrigin.x][p.y + pieceOrigin.y] = currentColor;\n\t\t}\n\t\trowChecked();\n\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}", "public boolean move(int x, int y, CheckersBoard board) {\n if (whiteTurn == true && team == Constants.TeamId.team1Id) {\n return false;\n }\n if (whiteTurn == false && team == Constants.TeamId.team2Id) {\n return false;\n }\n /**\n * then change the x - y coords of the piece\n * update the UI to remove the highlighted squares then move the piece\n * if chess and shared square you take a piece\n * if checkers you jumped them you take the piece\n * return new x - y components\n *\n * if this is too high up in the tree you can override this implementation or update it\n * to fit specific pieces if its not working for some reason\n */\n if (possible(x, y, gameBoard)) {\n int changex = this.getX()-x;\n int changey = this.getY()-y;\n CheckersPiece temp = gameBoard.boardPositions[getX()][getY()];\n gameBoard.boardPositions[getX()][getY()] = null;\n gameBoard.boardPositions[x][y] = temp;\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] != null) {\n System.out.println(\"Here\");\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].team != this.team) {\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].imageView.setVisibility(View.GONE);\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] = null;\n }\n }\n this.setX(x);\n this.setY(y);/*\n if (Math.abs(changex) == 2) {\n gameBoard.boardPositions[x + (changex/2)][y + (changey/2)] = null;\n if (team == Constants.TeamId.team1Id) {\n board.numPieces1--;\n } else if (team == Constants.TeamId.team2Id) {\n board.numPieces0--;\n }\n }*/\n\n gameBoard.boardPositions[x][y].imageView.setX(142*x);\n gameBoard.boardPositions[x][y].imageView.setY(142*y);\n // flips after move is\n whiteTurn = !whiteTurn;\n gameBoard.startTimer();\n }\n //setUpUI(gameBoard);\n if (getY() == 7 && team == Constants.TeamId.team2Id) {\n board.crown(this);\n }\n if (getY() == 0 && team == Constants.TeamId.team1Id) {\n board.crown(this);\n }\n return possible(x, y, gameBoard);\n }", "private void makeMove() {\r\n //if not all pieces placed, place a new piece\r\n if(numPieces < 3) {\r\n if(pieces == null)\r\n pieces = new PositionData[Constants.NUM_PIECES];\r\n placePiece();\r\n return;\r\n }\r\n //move a random piece to a random location\r\n int pieceNumber = getRandomPiece();\r\n PositionData randomPoint = getRandomPoint();\r\n //move the piece\r\n Game.movePiece(pieces[pieceNumber], randomPoint);\r\n }", "void placeFruit()\n\t{\n\t\t// .first is x-coordinate, it gets a number between 1 and 16\n\t\tfruit[0] = randomPoint();\n\t\t// .second is y-coordinate, it gets a number between 1 and 16\n\t\tfruit[1] = randomPoint();\n\t\tfruit[2] = randomPoint();\n\n\t\t// loops the snakes length\n\t\tfor (int i = 0; i < theSnake.getLength(); i++)\n\t\t{\n\t\t\t// checks for fruit being on/under snake\n\t\t\tif (theSnake.getXofPartI(i) == fruit[0] && theSnake.getYofPartI(i) == fruit[1] && theSnake.getZofPartI(i) == fruit[2])\n\t\t\t{\n\t\t\t\t// Picks new spot for fruit, because it was found on the snake\n\t\t\t\tfruit[0] = randomPoint();\n\t\t\t\tfruit[1] = randomPoint();\n\t\t\t\tfruit[2] = randomPoint();\n\t\t\t\t// just in case the fruit landed on the snake again\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t}\n\t}", "public void assignmines() {\n\n for(int row = 0; row < mineBoard.length; row++) {\n for(int col = 0; col < mineBoard[0].length; col++) {\n mineBoard[row][col] = 0;\n }\n }\n\n int minesPlaced = 0;\n Random t = new Random();\n while(minesPlaced < nummines) {\n int row = t.nextInt(10);\n int col = t.nextInt(10);\n if(mineBoard[row][col] == Empty) {\n setmine(true);\n mineBoard[row][col] = Mine;\n minesPlaced++;\n }\n }\n }", "public void initializeDebugBoard() {\n\t\tboolean hasNotMoved = false;\n\t\tboolean hasMoved = true;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set empty rows\n\t\tfor (int row = 0; row < 8; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\tboard[5][4] = new Piece('k', white, hasMoved, 5, 4, PieceArray.E_kingId);\n//\t\tboard[1][4] = new Piece(\"rook\", white, hasMoved, 1, 4);\n\t\tboard[2][2] = new Piece('q', black, hasMoved, 2, 2, PieceArray.A_rookId);\n//\t\tboard[3][2] = new Piece('q', black, hasMoved, 3, 2, PieceArray.H_rookId);\n\t\t\n\n\t\tboard[0][0] = new Piece('k', black, hasMoved, 0, 0, PieceArray.E_kingId);\n//\t\tboard[7][7] = new Piece('r', black, hasNotMoved, 7, 7, PieceArray.A_rookId);\n//\t\tboard[6][7] = new Piece('p', black, hasNotMoved, 6, 7, PieceArray.A_pawnId);\n//\t\tboard[6][6] = new Piece('p', black, hasNotMoved, 6, 6, PieceArray.B_pawnId);\n//\t\tboard[6][5] = new Piece('p', black, hasNotMoved, 6, 5, PieceArray.C_pawnId);\n//\t\tboard[6][4] = new Piece('p', black, hasNotMoved, 6, 4, PieceArray.D_pawnId);\n\t\n//\t\tboard[6][6] = new Piece(\"pawn\", black, hasMoved, 6, 6);\n//\t\tboard[6][7] = new Piece(\"pawn\", black, hasMoved, 6, 7);\n//\t\tboard[6][4] = new Piece(\"pawn\", black, hasMoved, 6, 4);\n//\t\t\t\n//\t\t\n//\t\tboard[4][4] = new Piece(\"pawn\", black, hasMoved, 4,4);\n//\t\tboard[3][5] = new Piece(\"rook\", white,hasMoved,3,5);\n//\t\tboard[1][7] = new Piece(\"pawn\",black,hasMoved,1,7);\n\n\t}", "private ArrayList<Move> generatePossibleMovesFor(Player player) {\n ArrayList<Point> selfStonePlacements = new ArrayList<>();\n ArrayList<Point> opponentStonePlacements = new ArrayList<>();\n for (int x = 0; x < field.length; x++)\n for (int y = 0; y < field[x].length; y++) {\n if (field[x][y] == null)\n continue;\n if (field[x][y] == this.color)\n selfStonePlacements.add(new FieldPoint(x, y));\n if (field[x][y] == opponent.getColor())\n opponentStonePlacements.add(new FieldPoint(x, y));\n }\n\n ArrayList<Move> possibleMoves = new ArrayList<>();\n\n // Check if player is in set phase or only has three stones left\n if (!player.isDoneSetting()) {\n // Every free field is a possible move\n for (Point point : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(null, point));\n }\n } else if (player.isDoneSetting() && getCountOfStonesFor(player) > 3) {\n // Move is only possible if the neighbour field of a stone is free\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point neighbour : neighbourPoints.get(point)) {\n if (opponentStonePlacements.contains(neighbour) || selfStonePlacements.contains(neighbour))\n continue;\n possibleMoves.add(new StoneMove(point, neighbour));\n }\n }\n } else {\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point another : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(point, another));\n }\n }\n }\n\n Collections.shuffle(possibleMoves);\n return possibleMoves;\n }", "public ThreeStonesBoard(int size) {\r\n this.size = size;\r\n this.board = new Tile[size][size];\r\n }", "@Test\n void RookMoveUp() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 5, 4, 1);\n\n board.getBoard()[5][4] = rook;\n\n board.movePiece(rook, 5, 2);\n\n Assertions.assertEquals(rook, board.getBoard()[5][2]);\n Assertions.assertNull(board.getBoard()[5][4]);\n }", "private void setUpCorrect() {\n List<Tile> tiles = makeTiles();\n Board board = new Board(tiles, 4, 4);\n boardManager = new BoardManager(board);\n }", "public void testPlaceFirstTile1() {\n \tPlacement placement1 = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n Score score1 = null;\n try {\n \t\tscore1 = board.calculate(placement1);\n \t\tboard.place(placement1);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n assertEquals(1, (int)score1.get(Color.GREEN));\n assertEquals(0, (int)score1.get(Color.BLUE));\n \n Placement placement2 = new Placement(Color.GREEN, 5, 28, Color.BLUE, 4, 22);\n Score score2 = null;\n try {\n \t\tscore2 = board.calculate(placement2);\n \t\tboard.place(placement2);\n \t\tfail(\"It's not legal to place a first turn tile adjacent to another player's tile\");\n } catch (ContractAssertionError e) {\n //passed\n }\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tmainBoard.commitNewValues();\n\t\t\t}", "public void insert() {\r\n\t\tinitFinish = false;\r\n\t\twhile (isEmpty()) {\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\tfor (int j = 0; j < size; j++) {\r\n\t\t\t\t\tif (candyBoard[i][j] == null||!(candyBoard[i][j] instanceof RegularCandy)) {\r\n\t\t\t\t\t\tcandyBoard[i][j] = candyRandom();\r\n\t\t\t\t\t\tcandyBoard[i][j].setCoord(i, j);\r\n\t\t\t\t\t\tactiveCandies.add(candyBoard[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}// for j\r\n\t\t\t}// for i\r\n\t\t\tfor (Candy candy : activeCandies) {\r\n\t\t\t\tif (move(candy, candy)) {\r\n\t\t\t\t\tincreaseMulty();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}// while\r\n\t\tactiveCandies.removeAllElements();\r\n\t\tinitFinish = true;\r\n\t}", "@Test\n void should_place_ships_scenario_3() {\n Board board = BoardData.getBoard(15, 15);\n\n List<ShipType> shipConfigs = Arrays.asList(\n ShipType.ONE,\n ShipType.ONE,\n ShipType.FOUR\n );\n\n AutomaticShipPlacer automaticShipPlacer = new AutomaticShipPlacer();\n automaticShipPlacer.placeShips(shipConfigs, board);\n\n assertSame(3, board.getShips().size());\n BoardPrinter.print(board);\n }", "private void reproduce(State s) {\r\n\t\tmoveToOpen(new WaTorCell(this.getBlock(), s, this.ageToReproduce, this.baseEnergy));\r\n\t}", "public void place(Chip chip, int row, int column) {\n ImmutablePair<Integer, Integer> from = new ImmutablePair<Integer, Integer>(row, column);\n // Step 2. Generating appropriate processing event\n PlaceChipAction action = new PlaceChipAction(getPlayer(), chip, from);\n // Step 3. Actually performing action\n perform(action);\n }", "private void newPiece() {\n curPiece.setRandomShape();\n//compute the initial curX and curY values \n curX = BOARD_WIDTH / 2 + 1;\n curY = BOARD_HEIGHT - 1 + curPiece.minY();\n//if a piece reaches the top and cannot drop any more piece\n if (!tryMove(curPiece, curX, curY)) {\n//cancel timer and display game over\n curPiece.setShape(Tetrominoe.NoShape);\n timer.cancel();\n isStarted = false;\n statusbar.setText(\"Game over\");\n }\n }", "public void onPlaced(BlockPos p, IBlockState bs, EntityLivingBase elb, ItemStack st) {\n\t}", "public void updateBoard() {\n notifyBoardUpdate(board);\n }", "private void placePlayerShip(int x, int y) {\n\t\tif (shipsToPlace == 3) {\n\t\t\tlongShipCoords = new int[2];\n\t\t\tlongShipCoords[0] = x;\n\t\t\tlongShipCoords[1] = y;\n\n\t\t\t// creates long ship at x,y on egrid\n\t\t\tfor (int i = 0; i < 5; i++)\n\t\t\t\tegrid[x + i][y] = 1;\n\n\t\t\t// makes ship tiles blue on enemy's board\n\t\t\tfor (int counter = 0; counter < 5; counter++)\n\t\t\t\tenemyBoard[x + counter][y].setIcon(createImageIcon(\"tileship.jpg\"));\n\n\t\t}\n\n\t\telse if (shipsToPlace == 2) {\n\t\t\t// create medium ship at x,y on egrid\n\n\t\t\tegrid[x][y] = 1;\n\t\t\tegrid[x][y + 1] = 1;\n\t\t\tegrid[x][y + 2] = 1;\n\n\t\t\t// make ship tiles blue on enemy's board\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tileship.jpg\"));\n\t\t\tenemyBoard[x][y + 1].setIcon(createImageIcon(\"tileship.jpg\"));\n\t\t\tenemyBoard[x][y + 2].setIcon(createImageIcon(\"tileship.jpg\"));\n\t\t}\n\n\t\telse if (shipsToPlace == 1) {\n\t\t\t// create small ship at x,y on egrid\n\t\t\tegrid[x][y] = 1;\n\t\t\tegrid[x][y + 1] = 1;\n\n\t\t\t// make ship tiles blue on enemy's board\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tileship.jpg\"));\n\t\t\tenemyBoard[x][y + 1].setIcon(createImageIcon(\"tileship.jpg\"));\n\n\t\t\tstatus.setText(\" Click to attack\");\n\t\t}\n\t\tshipsToPlace--;\n\t\tenableAllTiles();\n\t\tdisableRestrictedTiles(x, y);\n\t}", "public void resetBoard(Board b, Team t) {\n\t\tstart = new ArrayList<Node>();\n\t\tpossibleSmart = new ArrayList<Integer>();\n\t\tbetterSmart = new ArrayList<Integer>();\n\t\tsmartIndex = -1;\n\t\tmaxType = -1;\n\t\tminType = 7;\n\t\tcheckMate = false;\n\t\tmaxProtect = -1;\n\t\tmaxRow = -1;\n\t\tmaxCol = -1;\n\n\t\tb.setProtections();\n\t\tb.setLocations();\n\t\tPiece[][] board = b.getBoard();\n\n\t\tPiece[][] newBoard = new Piece[board.length][board[0].length];\n\n\t\tfor (int r = 0; r < newBoard.length; r++)\n\t\t\tfor (int c = 0; c < newBoard[r].length; c++)\n\t\t\t\tnewBoard[r][c] = new Piece(board[r][c]);\n\n\t\tTeam op = (t == Team.WHITE) ? Team.BLACK : Team.WHITE;\n\n\t\tfor (int i = 0; i < newBoard.length; i++) {\n\t\t\tfor (int j = 0; j < newBoard[i].length; j++) {\n\t\t\t\tif (newBoard[i][j].getColor() == t) {\n\t\t\t\t\tif ((!newBoard[i][j].isProtected(t) && newBoard[i][j]\n\t\t\t\t\t\t\t.isProtected(op))\n\t\t\t\t\t\t\t|| newBoard[i][j].amountProtect(t) < newBoard[i][j]\n\t\t\t\t\t\t\t\t\t.amountProtect(op)) {\n\t\t\t\t\t\tif (newBoard[i][j].valueProtect(t) > maxProtect) {\n\t\t\t\t\t\t\tmaxProtect = newBoard[i][j].valueProtect(t);\n\t\t\t\t\t\t\tmaxRow = i;\n\t\t\t\t\t\t\tmaxCol = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int r = 0; r < newBoard.length; r++) {\n\t\t\tfor (int c = 0; c < newBoard[r].length; c++) {\n\t\t\t\tif (newBoard[r][c].getColor() == t) {\n\t\t\t\t\tPiece p = new Piece(newBoard[r][c]);\n\t\t\t\t\tList<Location> loc = p.getMoveLoc();\n\t\t\t\t\tfor (Location l : loc) {\n\t\t\t\t\t\tstart.add(createNode(new Board(newBoard, t), p, r, c,\n\t\t\t\t\t\t\t\tl, t));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (smartIndex == -1) {\n\t\t\tif(betterSmart.size() > 0)\n\t\t\t\tsmartIndex = (int) (Math.random() * betterSmart.size());\n\t\t\telse if (possibleSmart.size() > 0)\n\t\t\t\tsmartIndex = (int) (Math.random() * possibleSmart.size());\n\t\t\telse\n\t\t\t\tsmartIndex = (int) (Math.random() * start.size());\n\t\t}\n\t}", "private void setupBoard(int size) {\n\t\t\n\t\tthis.board = new Disc[size][size];\n\t\t// COMPLETE THIS METHOD\n\t\tDisc currentDisc = getCurrentPlayerDisc();\n\t\tint halfway = (board.length / 2) - 1;\n\t\tint halfwayIncre = halfway + 1;\n\t\t\n\t\t\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\t\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\t\n\t\t\t\tboard[i][j] = null;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n if (currentDisc == Disc.BLACK) {\n\t\t\t\n\t\t\tplaceDiscAt(halfway, halfway);\n\t\t\tplaceDiscAt(halfway, halfwayIncre);\n\t\t\tplaceDiscAt(halfwayIncre, halfwayIncre);\t\t\t\n\t\t\tplaceDiscAt(halfwayIncre, halfway);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tplaceDiscAt(halfway, halfwayIncre);\n\t\t\tplaceDiscAt(halfway, halfway);\n\t\t\tplaceDiscAt(halfwayIncre, halfway);\n\t\t\tplaceDiscAt(halfwayIncre, halfwayIncre);\n\t\t\t\n\t\t} \n\t\t\n\t\t\n\t\t\n\t}" ]
[ "0.68298", "0.66605866", "0.6601546", "0.6446114", "0.6428102", "0.6396203", "0.6324673", "0.63219863", "0.6302673", "0.62149", "0.6152263", "0.6141046", "0.61396474", "0.60972303", "0.6052569", "0.6042172", "0.5969621", "0.59571415", "0.59538156", "0.5884138", "0.58816046", "0.58712083", "0.58609724", "0.583844", "0.5806435", "0.5802759", "0.5771424", "0.57239354", "0.572351", "0.5715296", "0.57109755", "0.57042086", "0.5692695", "0.569239", "0.56629395", "0.5660425", "0.56515706", "0.5649536", "0.56274796", "0.5625721", "0.5623626", "0.56063807", "0.5600763", "0.5598296", "0.5589479", "0.5584568", "0.5584275", "0.558187", "0.55700964", "0.55667776", "0.5556189", "0.5542383", "0.55397195", "0.5537954", "0.5534599", "0.5526727", "0.55078185", "0.55037665", "0.54938585", "0.54888815", "0.548281", "0.5474268", "0.5471978", "0.54717165", "0.5468478", "0.5464788", "0.54605097", "0.5458769", "0.54583377", "0.5447535", "0.5444366", "0.5444236", "0.5443756", "0.5442968", "0.5441192", "0.5439537", "0.5403372", "0.54016984", "0.5394612", "0.53945285", "0.5392276", "0.5385871", "0.53855735", "0.5381077", "0.53772575", "0.5369273", "0.5362146", "0.5357669", "0.535282", "0.5350815", "0.53495735", "0.5344297", "0.53440183", "0.5341104", "0.5335478", "0.53348327", "0.5332714", "0.532807", "0.53262097", "0.53239316" ]
0.8117505
0
the fillBoardFromCSV method is used to fill the 2d tile array with the appropriate tiles based on a specified csv file.
public void fillBoardFromCSV(String pathToCSV){ BufferedReader br = null; String line = " "; int index = 0; try{ br = new BufferedReader(new FileReader(pathToCSV)); while ((line = br.readLine()) != null) { String[] lines = line.split(","); System.out.println(lines.length); for(int i = 0; i < 11; i++){ if(lines[i].equals("f")){ board[index][i] = new Flat(index,i); } if(lines[i].equals("s")){ board[index][i] = new Slot(index,i); } } index++; } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { if (br != null) { try { br.close(); } catch (IOException e) { e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"resource\")\n\tpublic void loadLayoutConfig() throws IOException, BadConfigFormatException {\n\t\tFileReader layoutInput = new FileReader(layoutConfigFile);\t\t\t\t\t\t\t// File reader to parse the layout file\n\t\tScanner input = new Scanner(layoutInput);\t\t\t\t\t\t\t\t\t\t\t// Scanner to use the data from the File Reader\n\n\t\tArrayList<String[]> inputGrid = new ArrayList<String[]>();\t\t\t\t\t\t\t// Arraylist of an Array of Strings This is necessary because we want a dynamic size\n\t\twhile(input.hasNextLine()) {\n\t\t\tString thisLine = input.nextLine();\t\t\t\t\t\t\t\t\t\t\t\t// Gather the next line from the layout file\n\t\t\tString grid[] = thisLine.split(\",\"); \t\t\t\t\t\t\t\t\t\t\t// Separating the items separated by commas and turning them into an array of strings\n\t\t\tinputGrid.add(grid); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ads csv input to the grid\n\t\t}\n\t\tsetNumColumns(inputGrid.get(0).length);\t\t\t\t\t\t\t\t\t\t\t\t// Setting the number of columns to be the length of the first row\n\t\tsetNumRows(inputGrid.size());\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Setting the number of rows to the number of elements in the input grid\n\n\t\tthis.grid = new BoardCell[numRows][numColumns];\t\t\t\t\t\t\t\t\t\t// Declaring the unpopulated grid and it's size\n\n\t\tfor(int r = 0; r < numRows; r++) { \t\t\t\t\t\t\t\t\t\t\t\t\t// iterating through each row\n\t\t\tString temp[] = inputGrid.get(r);\t\t\t\t\t\t\t\t\t\t\t\t// grabbing a row from the input grid\n\t\t\tif(temp.length != numColumns) {\t\t\t\t\t\t\t\t\t\t\t\t\t// test to see if any of the rows are of incorrect length\n\t\t\t\tthrow new BadConfigFormatException(\"uneven rows.\"); \t\t\t\t\t\t// Custom exception for BadConfigFormatException\n\t\t\t} else {\n\t\t\t\tif(temp[0].contains(\"\")) {\t// get rid of\t\t\t\t\t\t\t\t// test to see if the file conversion from CSV standard to UTF-8 has added artifacts\n\t\t\t\t\tString replace = temp[0].replace(\"\",\"\");\t\t\t\t\t\t\t\t// creates a temporary string that does not contain the artifact\n\t\t\t\t\ttemp[0] = replace;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sets the original string to be the temporary string, removing the artifact from the array\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int c = 0; c < numColumns; c++) {\t\t\t\t\t\t\t\t\t\t\t// iterating through each element in the particular row\n\t\t\t\tthis.grid[r][c] = new BoardCell(r,c);\t\t\t\t\t\t\t\t\t\t// creates a BoardCell for each location on the board\n\t\t\t\tString auto = temp[c];\t\t\t\t\t\t\t\t\t\t\t\t\t\t// creates a temporary string for each location on the board\n\t\t\t\tif(!(roomMap.containsKey(auto.charAt(0)))) {\t\t\t\t\t\t\t\t// Checks and makes sure each cell is a cell type identified in the setup document\n\t\t\t\t\tthrow new BadConfigFormatException(\"unspecified room detected.\"); \t\t// Custom exception for BadConfigFormatException\n\t\t\t\t} else {\n\t\t\t\t\tif(auto.length() > 1) { \t\t\t\t\t\t\t\t\t\t\t\t// Identifying Special cell (more than one initial per cell)\n\t\t\t\t\t\tString directions = \"^><v\";\n\t\t\t\t\t\tif(directions.indexOf(auto.charAt(1)) != -1) { \t\t\t\t\t\t// Handling doorways\n\t\t\t\t\t\t\tthis.grid[r][c].setDoorDirection(auto.charAt(1));\t\t\t\t// Setting the door direction of the cell to be wherever the arrow points\n\t\t\t\t\t\t\tthis.grid[r][c].isDoorway();\t\t\t\t\t\t\t\t\t// Setting the cell to identify as a door\n\t\t\t\t\t\t\tthis.grid[r][c].setInitial(auto.charAt(0));\t\t\t\t\t\t// Setting the initial of the cell \n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(auto.charAt(1) == '#') { \t\t\t\t\t\t\t\t\t// Handling a room label\n\t\t\t\t\t\t\tthis.grid[r][c].setLabel(true);\t\t\t\t\t\t\t\t\t// Setting the cell to identify as a room label\n\t\t\t\t\t\t\tthis.grid[r][c].setInitial(auto.charAt(0));\t\t\t\t\t\t// Setting the initial of the cell \n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(auto.charAt(1) == '*') { \t\t\t\t\t\t\t\t\t// Handling a room center\n\t\t\t\t\t\t\tthis.grid[r][c].setCenter(true);\t\t\t\t\t\t\t\t// Setting the cell to identify as a room center\n\t\t\t\t\t\t\tthis.grid[r][c].setInitial(auto.charAt(0));\t\t\t\t\t\t// Setting the initial of the cell \n\t\t\t\t\t\t}\n\t\t\t\t\t\telse { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Handling a secret passageway\n\t\t\t\t\t\t\tthis.grid[r][c].setSecretPassage(auto.charAt(1));\t\t\t\t// Setting the cell to identify as a secret passage\n\t\t\t\t\t\t\tthis.grid[r][c].setInitial(auto.charAt(0));\t\t\t\t\t\t// Setting the initial of the cell \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Handling normal cells (only one initial per cell)\n\t\t\t\t\t\tthis.grid[r][c].setInitial(auto.charAt(0));\t\t\t\t\t\t\t// Setting the initial of the cell \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Iterating back through each cell after they have all been assigned\n\t\t// This is done so that when making the door map there are no cells that are still null\n\t\tfor(int i = 0; i < this.numRows ; i++){\t\t\t\t\t\t\t\t\t\t\t\t// Iterating through the rows\n\t\t\tfor(int j = 0; j < this.numColumns ; j++){\t\t\t\t\t\t\t\t\t\t// Iterating through each cell per row\n\t\t\t\tif(this.getCell(i,j).isDoorway()) {\t\t\t\t\t\t\t\t\t\t\t// Getting each of the doorways\n\t\t\t\t\tswitch (this.getCell(i,j).getDoorDirection()) {\n\t\t\t\t\tcase UP:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getting the doors that point up\n\t\t\t\t\t\troomMap.get(this.getCell(i-1,j).getInitial()).addDoor(this.getCell(i,j)); // Assigning each door to the room it points to\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LEFT:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getting the doors that point left\n\t\t\t\t\t\troomMap.get(this.getCell(i,j-1).getInitial()).addDoor(this.getCell(i,j)); // Assigning each door to the room it points to\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DOWN:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getting the doors that point down\n\t\t\t\t\t\troomMap.get(this.getCell(i+1,j).getInitial()).addDoor(this.getCell(i,j)); // Assigning each door to the room it points to\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RIGHT:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getting the doors that point right\n\t\t\t\t\t\troomMap.get(this.getCell(i,j+1).getInitial()).addDoor(this.getCell(i,j)); // Assigning each door to the room it points to\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse if(this.getCell(i,j).isLabel()) {\t\t\t\t\t\t\t\t\t\t// getting the label cells\n\t\t\t\t\troomMap.get(this.getCell(i,j).getInitial()).setLabelCell(this.getCell(i,j)); // adding the label cells to each room\n\t\t\t\t}\n\t\t\t\telse if(this.getCell(i,j).isRoomCenter()) {\t\t\t\t\t\t\t\t\t// getting the center cells\n\t\t\t\t\troomMap.get(this.getCell(i,j).getInitial()).setCenterCell(this.getCell(i,j)); // adding the center cells to each room\n\t\t\t\t}\n\t\t\t\telse if(this.getCell(i,j).getSecretPassage() != 0) {\t\t\t\t\t\t// getting the secret passage cells\n\t\t\t\t\troomMap.get(this.getCell(i,j).getInitial()).setSecretPassage(this.getCell(i,j).getSecretPassage()); // adding the secret passage char to each room\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < this.numRows ; i++){\t\t\t\t\t\t\t\t\t\t\t\t// Iterating through the rows\n\t\t\tfor(int j = 0; j < this.numColumns ; j++){\t\t\t\t\t\t\t\t\t\t// Iterating through each cell per row\n\t\t\t\tgenerateAdjList(i, j);\n\t\t\t}\n\t\t}\n\t\tlayoutInput.close();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Closing the layout document\n\t}", "public boolean readGrid() throws IOException{\n\n String[] row = null;\n Piece piece;\n\n while((row = m_CSVReader.readNext()) != null) {\n if (row[0].equals(\"C4\")) {\n if (row[THIRD_ROW].equals(\"Red\")){\n piece = new Piece(\"Red\");\n m_LoadName1 = row[FOURTH_ROW];\n m_LoadPlayerType1 = row[FIFTH_ROW];\n } else if (row[THIRD_ROW].equals(\"Yellow\")){\n m_LoadName2 = row[FOURTH_ROW];\n m_LoadPlayerType2 = row[FIFTH_ROW];\n piece = new Piece(\"Yellow\");\n } else {\n piece = new Piece(\"\");\n }\n m_LoadGameType = row[0];\n m_LoadTime = Integer.parseInt(row[SEVENTH_ROW]);\n m_LoadTurn = Integer.parseInt(row[SIXTH_ROW]);\n m_Connect4GameLogic.getBoard().setPiece2(piece, Integer.parseInt(row[1]), Integer.parseInt(row[2]));\n } else {\n JOptionPane.showMessageDialog(null, \"Incorrect File\");\n return false;\n }\n }\n System.out.println(\"Load Test Data (C4):\");\n m_CSVReader.close();\n\n for (int i = 0; i < BOARD_ROWS; i++) {\n for (int j = 0; j < BOARD_COLS; j++) {\n System.out.println(m_LoadGameType + j+\", \" +i + \", \"+ m_Connect4GameLogic.getBoard().getBoard()[j][i].getColour()\n + \", \"+ m_LoadTime+ \", \"+ m_LoadName1+ \", \"+ m_LoadName2+ \", \"+ m_LoadPlayerType1+\n \", \"+ m_LoadPlayerType2 + \", \" + m_LoadTurn);\n }\n }\n return true;\n }", "public GameBoard()\n\t{\n\t\tint i = 0;\n\t\tboard = new int[9][9];\n\t\tString s = ReadCSV.readCSV(); //data in CSV file is turned into a string\n\t\tfor(int r = 0; r < board.length; r++)\n\t\t{\n\t\t\tfor(int c = 0; c < board.length; c++)\n\t\t\t{\n\t\t\t\twhile((s.charAt(i) == ',') || (s.charAt(i) == '\\n')) //passes over enters and commas\n\t\t\t\t{\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tif(s.charAt(i) == '-') //dashes represent 0\n\t\t\t\t\tboard[r][c] = 0;\n\t\t\t\telse\n\t\t\t\t\tboard[r][c] = (int)s.charAt(i) - 48; //int value of the character which is a number \n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n \r\n public void initGrid(String filename)\r\n throws FileNotFoundException, IOException\r\n {\r\n \tFile fileToParse = new File(filename);\r\n \tScanner scanner = new Scanner(fileToParse);\r\n \tint linePositionInFile = 0;\r\n \tfinal int MAZE_SIZE_LINE_POSITION = 0;\r\n \tfinal int VALID_SYMBOLS_LINE_POSITION = 1;\r\n \tfinal int PRESET_VALUE_LINE_POSITION = 2;\r\n\t\tfinal String SYMBOL_DELIMITER = \" \";\r\n\r\n \tString[] splitString = null;\r\n \twhile(scanner.hasNextLine()){\r\n \t\t//current line to be parsed\r\n\t\t\tString parseLine = scanner.nextLine();\r\n \t\tif(linePositionInFile == MAZE_SIZE_LINE_POSITION) {\r\n \t\t\t//construct the game sizes.\r\n \t\t\t\r\n \t\t\t//System.out.println(\"DEBUG: size\" + parseLine);\r\n \t\t\tint parsedMazeSize = Integer.parseInt(parseLine);\r\n \t\t\t//set the gridSize variable\r\n \t\t\tgridSize = parsedMazeSize;\r\n \t\t\t\r\n \t\t\t//construct the game with the proper sizes.\r\n \t\t\tsymbols = new Integer[parsedMazeSize];\r\n \t\t\tgame = new Integer[parsedMazeSize][parsedMazeSize];\r\n\r\n \t\t}else if(linePositionInFile == VALID_SYMBOLS_LINE_POSITION) {\r\n \t\t\t//set valid symbols\r\n \t\t\t//System.out.println(\"DEBUG: symbols\" + parseLine);\r\n \t\t\tsplitString = parseLine.split(SYMBOL_DELIMITER);\r\n \t\t\tfor(int i = 0; i < symbols.length && i < splitString.length; ++i) {\r\n \t\t\t\tsymbols[i] = Integer.parseInt(splitString[i]);\r\n \t\t\t}\r\n \t\t}else if(linePositionInFile >= PRESET_VALUE_LINE_POSITION) {\r\n \t\t\t//System.out.println(\"DEBUG: inserting preset\" + parseLine);\r\n \t\t\t/*\r\n \t\t\t * example = 8,8 7\r\n \t\t\t * below parses and splits the string up to usable values to \r\n \t\t\t * then insert into the game, as preset value constraints.\r\n \t\t\t * \r\n \t\t\t */\r\n \t\t\t\r\n \t\t\tsplitString = parseLine.split(SYMBOL_DELIMITER);\r\n \t\t\tString[] coordinates = splitString[0].split(\",\");\r\n \t\t\tint xCoordinate = Integer.parseInt(coordinates[0]);\r\n \t\t\tint yCoordinate = Integer.parseInt(coordinates[1]);\r\n \t\t\tint presetValueToInsert = Integer.parseInt(splitString[1]);\r\n \t\t\tgame[xCoordinate][yCoordinate] = presetValueToInsert;\r\n\r\n \t\t}\r\n \t\t++linePositionInFile;\r\n \t}\r\n \tscanner.close();\r\n }", "public static boolean loadMap(String path) throws FileNotFoundException {\n\n// System.out.println(\" Enter map file address\");\n// String path = sc.next();\n\n // ---------------- Reading file-------------------------------\n File file_map = new File(path.trim());\n HashMap<String, List<String>> neighborsList = new HashMap<>();\n\n if (file_map.exists()) {\n Scanner myReader = new Scanner(file_map);\n\n while (myReader.hasNextLine()) {\n\n String data = myReader.nextLine();\n\n if (\"[Continents]\".equals(data.trim())) {\n System.out.println(\"==>\" + data.trim());\n data = myReader.nextLine();\n\n while (!data.equals(\"[Territories]\")) {\n System.out.println(data);\n String split[] = data.split(\"=\");\n String continent_name = split[0];\n String no_of_countries = split[1];\n continents.put(continent_name, Integer.parseInt(no_of_countries));\n data = myReader.nextLine();\n }\n }\n\n System.out.println(\"continents: \" + continents.toString());\n board.setContinents(continents);\n\n if (\"[Territories]\".equals(data)) {\n\n while (myReader.hasNextLine()) {\n String country_input = myReader.nextLine();\n\n String split[] = country_input.split(\",\");\n String country = split[0];\n int x = Integer.parseInt(split[1]);\n int y = Integer.parseInt(split[2]);\n String continent = split[3];\n List<String> neighbours = new ArrayList<>();\n\n for (int i = 4; i < split.length; i++) {\n neighbours.add(split[i]);\n }\n\n board.createTile(country, x, y, continent);\n neighborsList.put(country, neighbours);\n\n }\n }\n\n for (Map.Entry entry : neighborsList.entrySet()) {\n board.setNeighbourTile((List<String>) entry.getValue(), (String) entry.getKey());\n }\n\n\n }\n System.out.println(\"Risk Map Loaded!\");\n HashMap<String, Tile> map = board.getTiles();\n\n System.out.println(\"Map\" + map.keySet().toString());\n\n if (board.getContinents().size() == 0 || board.getTiles().size() == 0)\n return false;\n return true;\n\n } else {\n System.out.println(\"File does not exist! \");\n return false;\n }\n\n }", "private void fillBoard() {\n\n boardMapper.put(1, new int[]{0, 0});\n boardMapper.put(2, new int[]{0, 1});\n boardMapper.put(3, new int[]{0, 2});\n boardMapper.put(4, new int[]{1, 0});\n boardMapper.put(5, new int[]{1, 1});\n boardMapper.put(6, new int[]{1, 2});\n boardMapper.put(7, new int[]{2, 0});\n boardMapper.put(8, new int[]{2, 1});\n boardMapper.put(9, new int[]{2, 2});\n\n }", "public void openPlayerDataFromCSV() throws FileNotFoundException {\n csvReader = new BufferedReader(new FileReader(PATH_TO_CSV));\n }", "public void loadGridFromFile( String filename )\n\t{\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader( new FileReader( filename ));\n\t\t\tString[] data = new String[width];\n\t\t\tString delimiter = \",\", line = null;\n\t\t\tint i = 0, j = 0;\n\t\t\t\n\t\t\ttry \n\t\t\t{ \n\t\t\t\tline = br.readLine(); \n\t\t\t\t\n\t\t\t\t// Based on file format, determine grid width / height\n\t\t\t\twidth = line.length() / 2 + 1;\n\t\t\t\theight = line.length() / 2 + 1;\n\t\t\t\tgrid = new int[width][height];\n\t\t\t\t\n\t\t\t\t// While file isn't empty\n\t\t\t\twhile ( line != null )\n\t\t\t\t{\n\t\t\t\t\t// Split lines using delimiter of ','\n\t\t\t\t\tdata = line.split( delimiter );\n\t\t\t\t\t\n\t\t\t\t\t// Put contents of each formatted line into grid array\n\t\t\t\t\tfor (i = 0; i < width; i++) \n\t\t\t\t\t{\n\t\t\t\t\t\tgrid[i][j] = Integer.parseInt( data[i] );\n\t\t\t\t\t\tif ( grid[i][j] == 0 ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx0 = i;\n\t\t\t\t\t\t\ty0 = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tj++;\n\t\t\t\t\tline = br.readLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e) \n\t\t\t{ \n\t\t\t\tSystem.out.println( \"Unable to read from file \" + filename + \". Closing...\" ); \n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\tcatch ( FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println( \"File with name \" + filename + \" not found. Closing...\" );\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public Tile[][] updateBoard(int startRow, int startColumn, int endRow, int endColumn, Tile[][] board) {\n\t\t/*String[] fileRanks = input.split(\" \");\n\t\tint startRow= 8 -Integer.parseInt(fileRanks[0].substring(1));\n\t\tint startColumn = (fileRanks[0].charAt(0)) -'a';\n\t\tint endRow = 8-Integer.parseInt(fileRanks[1].substring(1));\n\t\tint endColumn = (fileRanks[1].charAt(0))-'a'; */\n\n\t\tboard[endRow][endColumn].setOccupyingPiece(null);\n\t\tboard[endRow][endColumn].setOccupyingPiece(board[startRow][startColumn].getOccupyingPiece());\n\t\tboard[startRow][startColumn].setOccupyingPiece(null);\n\n\t\treturn board;\n\t}", "public Board(String inputBoard, Random random) throws IOException\n {\n File file = new File( inputBoard );\n Scanner scanner = new Scanner( file );\n this.random = random;\n GRID_SIZE = scanner.nextInt();\n score = scanner.nextInt();\n this.grid = new int[GRID_SIZE][GRID_SIZE];\n // runs through rows first, columns second\n for ( int i=0; i< GRID_SIZE; i++) {\n for( int j=0; j< GRID_SIZE; j++) {\n grid[i][j] = scanner.nextInt();\n }\n }\n scanner.close();\n }", "public void loadBuildingPiece(HashMap<Integer, BuildingPiece> BuildingPiece_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"BuildingPiece.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(BuildingPiece_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n BuildingPiece buildingPiece = new BuildingPiece(-1, -1, -1, Color.BLACK);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n buildingPiece.setId(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n buildingPiece.setAreaNumber(Integer.parseInt(data));\r\n } else if (index == 2) {\r\n buildingPiece.setColor(Color.valueOf(data));\r\n } else if (index == 3) {\r\n buildingPiece.setPlayerID(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n BuildingPiece_HASH.put(buildingPiece.getId(), buildingPiece);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadBuildingPiece\");\r\n }\r\n \r\n }", "private void loadTiles(String filename) {\n\t\ttry {\n\t\t\tScanner s;\n\n\t\t\tif (StealthGame.EXPORT)\n\t\t\t\ts = new Scanner(ResourceLoader.load(filename));\n\t\t\telse\n\t\t\t\ts = new Scanner(new File(filename));\n\n\t\t\tif (s.hasNextLine()) {\n\t\t\t\tname = s.nextLine();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Room has no name\");\n\t\t\t}\n\t\t\txSize = s.nextInt();\n\t\t\tySize = s.nextInt();\n\t\t\ttiles = new Tile[xSize][ySize];\n\t\t\tint xPos = 0;\n\t\t\tint yPos = 0;\n\t\t\tint tileNum = 0;\n\n\t\t\t// List of doors to be given destinations\n\n\t\t\twhile (s.hasNext()) {\n\n\t\t\t\tif (s.hasNextInt()) {\n\t\t\t\t\tparseInt(s, xPos, yPos, tileNum);\n\n\t\t\t\t\txPos++;\n\t\t\t\t\ttileNum++;\n\n\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\tyPos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not a basic floor, door or wall\n\t\t\t\telse {\n\t\t\t\t\tString str = s.next();\n\t\t\t\t\tif (str.length() == 1) {\n\t\t\t\t\t\tparseChar(xPos, yPos, tileNum, str);\n\n\t\t\t\t\t\txPos++;\n\t\t\t\t\t\ttileNum++;\n\n\t\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\t\tyPos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (str.equals(\"door\")) {\n\t\t\t\t\t\t\tparseDoorDestination(s);\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\ts.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Room - Error loading file - IOException : \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public HashMap<Node, int[]> importCsv(String name) throws Exception {\n\t\t\n\t\tString path = \"./\" + name + \".csv\";\n\t\tCsvReader reader = new CsvReader(path, ';');\n\t\t\n\t\tboolean end = false;\n\t\tString[] headers;\n\t\tGraph graph = null;\n\t\tHashMap<Node, int[]> nodeDraws = new HashMap<Node, int[]>();\n\t\twhile(!end) {\n\t\t\treader.readHeaders();\n\t\t\theaders = reader.getHeaders();\n\t\t\tif(headers[0].equals(\"Graph\")) {\n\t\t\t\treader.readRecord();\n\t\t\t\tgraph = new Graph(reader.get(\"Graph\"));\n\t\t\t\tManagerMatlab.getInstance().createGraph(reader.get(\"Graph\"));\n\t\t\t\treader.skipRecord();\n\t\t\t} else if(headers[0].equals(\"Nodes\")) {\n\t\t\t\treader.readHeaders();\n\t\t\t\twhile(reader.readRecord() && reader.getColumnCount() > 1 && !reader.get(\"ID\").equals(\"\")) {\n\t\t\t\t\t//Possible problem with the encoding, so we replace  if we find it\n\t\t\t\t\tString nom = reader.get(\"Name\").replace(\"Â\", \"\");\n\t\t\t\t\tNode node = new Node(Integer.valueOf(reader.get(\"ID\")),nom);\n\t\t\t\t\tgraph.addNode(node);\n\t\t\t\t\tnodeDraws.put(node, new int[]{Integer.valueOf(reader.get(\"X\")),Integer.valueOf(reader.get(\"Y\"))});\n\t\t\t\t}\n\t\t\t }else if(headers[0].equals(\"Arcs\")) {\n\t\t\t\treader.readHeaders();\n\t\t\t\twhile(reader.readRecord() && reader.getColumnCount() > 1) {\n\t\t\t\t\tArc arc = new Arc(Integer.valueOf(reader.get(\"ID\")),\n\t\t\t\t\t\t\tgraph.getNode(Integer.valueOf(reader.get(\"headId\"))),graph.getNode(Integer.valueOf(reader.get(\"tailId\"))),\n\t\t\t\t\t\t\tBoolean.valueOf(reader.get(\"directed\")),Integer.valueOf(reader.get(\"color\")));\n\t\t\t\t\tgraph.addArc(arc);\n\t\t\t\t}\n\t\t\t\tif (reader.readRecord() == false) {\n\t\t\t\t\tend = true;\n\t\t\t\t} else {\n\t\t\t\t\treader.readHeaders();\n\t\t\t\t\twhile(reader.readRecord() && reader.getColumnCount() > 1) {\n\t\t\t\t\t\tint ID = Integer.valueOf(reader.get(\"ID\"));\n\t\t\t\t\t\tColor color = new Color(Integer.valueOf(reader.get(\"red\")),\n\t\t\t\t\t\t\t\tInteger.valueOf(reader.get(\"green\")), \n\t\t\t\t\t\t\t\tInteger.valueOf(reader.get(\"blue\")));\n\t\t\t\t\t\tManagerGraph.getInstance().addColor(ID, color);\n\t\t\t\t\t}\n\t\t\t\t\tend = true;\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t\tManagerGraph.getInstance().setGraph(graph);\n\t\treturn nodeDraws;\n\t}", "public static String ReadCSV() {\n File file = new File(\"Words.csv\");\n System.out.println(\"*****Program Started***** \" + Time.valueOf(LocalTime.now()));\n\n try {\n FileReader fRead = new FileReader(file);\n BufferedReader bfr = new BufferedReader(fRead);\n String line;\n line = bfr.readLine();\n line = line.replace(\"\\\"\", \"\");\n\n\n words = line.split(\",\");\n int count = 0;\n\n/** Next, read each line of numbers and put them into an Integer array.\n *\t\t\t Finally, store them in a hashmap (genre and related int array)and return\n */\n\n while ((line = bfr.readLine()) != null) {\n String[] temp = line.split(\",\");\n int[] wordCount = new int[words.length];\n for (int i = 0; i < temp.length; i++) {\n\n wordCount[i] = Integer.parseInt(temp[i]);\n }\n\n /**\n * Other than taking the count, we normalize them to improve the accuracy\n * */\n\n double[] temp2 = new double[wordCount.length];\n double total = 0;\n for (int i = 0; i < temp2.length; i++) {\n for (int j = 0; j < temp2.length; j++) {\n total = total + wordCount[j];\n }\n temp2[i] = 100.0 * wordCount[i] / total;\n\n }\n\n hMap.put(genres[count], temp2);\n count++;\n\n }\n System.out.println(\"*****Matrix Created successfully.***** \" + Time.valueOf(LocalTime.now()));\n return \"OK\";\n\n } catch (IOException e) {\n System.out.println(\"*****Creating matrix failed*****\");\n return \"END\";\n }\n }", "public void skaityti() throws IOException {\n\n sudoku_skaiciai = new Langelis [9][9]; //duodam sudoku_skaiciai forma 9x9\n\n BufferedReader r = new BufferedReader( new InputStreamReader (System.in ) ); //skaitymas\n\n System.out.println(\"iveskite sudoku varianto failo varda [ Enter - sudoku_var1.csv]\"); //israsas kad tinka failas su situ pavadinimu\n\n String sudoku_var1 = r.readLine(); //perskaito failo pavadinima\n\n if (sudoku_var1.length()==0) { //jei sudoku_var1 length lygus nuliui tai imam faila is direktorijos\n\n sudoku_var1= \"/Users/tadas/Desktop/mvnhello/sudoku/src/main/java/tado/sudoku_var1.csv\"; //vieta failo\n }\n\n File sudoku_failas = new File(sudoku_var1); //sukuriam failo tipo kintamaji\n\n BufferedReader br = new BufferedReader( new FileReader( sudoku_failas ) ); //isskiriama atmintis failo skaitymui\n\n String skaitom_po_viena_eilute; //eilute nuskaitytai eilutej saugoti\n\n int k = 0; //duodam k reiksme lygia 0\n\n System.out.println (\"╔═══════════╦═══════════╦═══════════╗\");\n\n while ((skaitom_po_viena_eilute = br.readLine()) !=null) { //ciklas skaito eilutes kol ju yra\n\n if ((k==3)||(k==6)) {\n \t\t\tSystem.out.print(\"╠═══════════╬═══════════╬═══════════╣\\n\");\n \t\t } if ( ( k==1 )||( k==2) ||( k==4 )||( k==5 )||( k==7 )||( k==8 ) ) {\n \t\t\tSystem.out.print(\"║ ─ ─ ─ ║ ─ ─ ─ ║ ─ ─ ─ ║\\n║\");\n \t\t } else {\n \t\t\tSystem.out.print(\"║\");\n \t\t }\n\n String[] duoti_skaiciai = skaitom_po_viena_eilute.split(\",\"); //paima is masyvo eilutes ir atskyrimo reiksmes lygios kableliui\n\n for (int i=0; i<duoti_skaiciai.length; i+=1) { //for ciklas kad i negali buti daugiau nei duoda skaiciu eiluteje i+=1 reiskia kad kieviena kart ima kita eilutes demeny??\n\n String bruksniukas = \" │\";\n\n if ((i==2)||(i==5)||(i==8)){\n \t\t\t\tbruksniukas=\" ║\";\n \t\t\t}\n System.out.print(\" \"+ duoti_skaiciai [i]+bruksniukas);\n sudoku_skaiciai [k][i] = new Langelis(Integer.parseInt(duoti_skaiciai[i])); //sudoku skaiciai [k] stuplepiai [i] eilutes. parseint atskiria visus skaicius nuo eilutes?\n\n } //uzdaro for\n System.out.println(\"\");\n k++; //sekantis stulpelis?\n }\n System.out.println (\"╚═══════════╩═══════════╩═══════════╝\");\n }", "private static void readInputDataFromCSV(String pathToCSVfile) throws IOException {\n\n // open the file\n BufferedReader reader = new BufferedReader(new FileReader(pathToCSVfile));\n // read line by line\n String line = null;\n Scanner scanner = null;\n int index = 0;\n inputPlayersList = new ArrayList<>();\n\n while ((line = reader.readLine()) != null) {\n Player pl = new Player();\n scanner = new Scanner(line);\n scanner.useDelimiter(\",\");\n while (scanner.hasNext()) {\n String data = scanner.next();\n if (index == 0)\n pl.setLastName(data);\n else if (index == 1)\n pl.setFirstName(data);\n else if (index == 2)\n pl.setCountry(data);\n else if (index == 3)\n pl.setTicketNumber(data);\n else\n System.out.println(\"Incorrect data: \" + data);\n index++;\n }\n index = 0;\n inputPlayersList.add(pl);\n\n }\n //close reader\n reader.close();\n }", "public static String[][] ReadTestData(String pathToCSVfile) throws Exception{\n\t\t\t\n\t\t//\tHashMap<String,String> theMap = new HashMap<String,String>();\n\n\t\t \n //Create object of FileReader\n FileReader inputFile = new FileReader(pathToCSVfile);\n \n //Instantiate the BufferedReader Class\n BufferedReader bufferReader = new BufferedReader(inputFile);\n \n //Variable to hold one line data\n String line;\n int NumberOfLines = 0;\n \n String[][] data = new String[1000][25]; // set the max rows to 1000 and col to 100\n \n // Read file line by line and print on the console\n while ((line = bufferReader.readLine()) != null) {\n \t \n \t String[] lineArray = line.split(Pattern.quote(\",\")); //split the line up and save to array\n \t int lineSize = lineArray.length;\n \t int z;\n \t for (z = 0; z <= (lineSize-1);)\n \t {\n \t\t data[NumberOfLines][z] = lineArray[z].toString();\n \t\t z++;\n \t } \n \t \n \t if(z <= 25) // read in 25 cols to make sure the array does not have nulls that other areas of the code are looking in\n \t {\t \t\t \n \t\t while (z <= 24)\n\t \t {\t\t \n \t\t\t data[NumberOfLines][z] = \" \";\n\t \t\t z++;\n\t \t } \n \t }\n \t NumberOfLines++; \n \t \n }\n \n bufferReader.close();\n \n // for (int h=0; h< NumberOfLines; h++) {theMap.put(data[h][0],data[h][1]); }\n \n \n System.out.println(\"Test Data has been saved \"); \n \n \t \n return data;\n \n\t \n\t}", "public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }", "public void generateRadarData(String csvName, String trajFileName, String questionLocationsName, String fileName, double meters, double speedThreshold, double timeThreshold) {\n Scanner csv = null;\n Scanner ql = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n ql = new Scanner(new File(questionLocationsName));\n FileWriter writer = new FileWriter(fileName + \".txt\");\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n ArrayList<Point2D.Double> questionLocations = new ArrayList<Point2D.Double>();\n\n while (ql.hasNextLine()) {\n questionLocations.add(new Point2D.Double(ql.nextDouble(), ql.nextDouble()));\n }\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n\n HashMap<Integer, ArrayList<AnswerTrajectory>> teams = new HashMap<Integer, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n\n for (String s : Ids) {\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n\n if (anstj == null)\n System.out.println(\"Could not find data for deviceId: \" + s);\n\n else {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort answer list data by time\n double startTime = (anstj.get(0).getTimeStamp() - 1377334800000.0) / 1000.0;//converts the time stamp to time after the event started\n double speed = determineAverageSpeed(trajectories, anstj.get(0).getId());\n //System.out.println(speed+\" \"+startTime);\n if (speed != -1) // ensure the trajectory data exists for this ID\n {\n //classify the team type\n int teamType = 0;\n\n if (startTime < timeThreshold) {\n if (speed > speedThreshold) // serious\n teamType = 1;\n else\n teamType = 2;// get it over with\n } else {\n if (speed > speedThreshold) // hurried\n teamType = 3;\n else\n teamType = 4; //lazy\n }\n if (teams.get(teamType) == null) {\n System.out.println(\"first team type for: \" + teamType);\n teams.put(teamType, new ArrayList<AnswerTrajectory>(anstj));\n } else {\n teams.get(teamType).addAll(anstj);\n }\n }\n }\n }\n int totalcc = 0;\n int totalcd = 0;\n int totalic = 0;\n int totalid = 0;\n for (int i = 1; i < 5; i++) {\n ArrayList<AnswerTrajectory> trajs = teams.get(i);\n int cc = 0;\n int cd = 0;\n int ic = 0;\n int id = 0;\n\n for (AnswerTrajectory at : trajs) {\n int question = at.getQuestion();\n double qX = questionLocations.get(question - 1).getX(); //question location x and y\n double qY = questionLocations.get(question - 1).getY();\n\n double aX = at.getX(); //location when question was answered\n double aY = at.getY();\n\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int correct = 0;\n if (at.getAnswer() == 1 || at.getAnswer() == 2)\n correct = 1;\n\n if (distToAnswer <= meters) {\n if (correct == 1)\n cc++;\n\n if (correct == 0)\n ic++;\n } else {\n if (correct == 1)\n cd++;\n\n if (correct == 0)\n id++;\n }\n\n }\n totalcc += cc;\n totalcd += cd;\n totalic += ic;\n totalid += id;\n double pcc = (double) cc / trajs.size();\n double pcd = (double) cd / trajs.size();\n double pic = (double) ic / trajs.size();\n double pid = (double) id / trajs.size();\n System.out.println(\"Team Type ID: \" + i + \" \" + trajs.size());\n writer.append(pcc + \",\" + pcd + \",\" + pic + \",\" + pid + \"\\n\");\n }\n System.out.println(\"Answer Type Totals\\n\" + \"CC: \" + totalcc + \"\\nCD: \" + totalcd + \"\\nIC: \" + totalic + \"\\nID: \" + totalid);\n\n writer.flush();\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n if (ql != null)\n ql.close();\n\n }\n }", "public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tscanner = new Scanner(new File(\"digit_data/test.csv\"));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n // Transforms the values on the csv from strings to ints\n\t\tnew drawnum().go();\n\t}", "static public void readCSVData(String csvFile, String imagePath)\n\t{\t\n String line = \"\";\n String cvsSplitBy = \"\\t\";\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(csvFile), \"UTF8\"))) {\n\n while ((line = br.readLine()) != null) {\n String[] dataMovie = line.split(cvsSplitBy);\n //System.out.println(\"Nom: \" + dataMovie[0] + \"\\nDate de sortie: \" + dataMovie[1] + \"\\nRealisateur: \" + dataMovie[2] + \"\\nDescription: \" + dataMovie[3] + \"\\nLien de la BA: \" + dataMovie[4] + \"\\nLiens sceances: \" + dataMovie[5] + \"\\nNom fichier image: \" + dataMovie[6] + \"\\n\");\n\t\t\t\tmoviesDataTab.add(dataMovie[0] + \"\\t\" + dataMovie[1] + \"\\t\" + dataMovie[2] + \"\\t\" + dataMovie[3] + \"\\t\" + dataMovie[4] + \"\\t\" + dataMovie[5]);\n\t\t\t\timageTab.add(imagePath +\"/images/\" +dataMovie[6]);\n\t\t\t}\n } catch (IOException e) {\n e.printStackTrace();\n }\t\n\t}", "public void load(File file) throws IOException {\n FileReader reader = new FileReader(file); //new File Reader\r\n char str[] = new char[10000]; //create a character string array of 10000 values\r\n reader.read(str);//read the file\r\n boolean temp[][] = new boolean[100][100]; //create a temporary new colony\r\n for (int r = 0; r < 100; r++) { //iterate through to fill with values\r\n for (int c = 0; c < 100; c++) {\r\n if (str[r*100 + c] == '1') { //if the char is equal to one, cell is alive\r\n temp[r][c] = true;\r\n } else {\r\n temp[r][c] = false; //else, the cell is dead\r\n }\r\n }\r\n }\r\n grid = temp;\r\n }", "@Override\r\n\tvoid initialize(boolean fromFile) {\n\t\tfor (int i = 0; i < board.length; i++) {\r\n\t\t\tfor (int j = 0; j < board[i].length; j++) {\r\n\t\t\t\tboard[i][j] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tboard[boardsize/2][boardsize/2] = 0;\r\n\t\tboard[boardsize/2-1][boardsize/2] = 1;\r\n\t\tboard[boardsize/2][boardsize/2-1] = 1;\r\n\t\tboard[boardsize/2-1][boardsize/2-1] = 0;\r\n\t}", "private void loadBoardFromXML(){\n int x = 0;\n int y = 0;\n int width = 0;\n try {\n File inputFile = new File(\"Config\\\\level1.xml\");\n DocumentBuilderFactory dbFactory\n = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(inputFile);\n doc.getDocumentElement().normalize();\n\n NodeList nList = doc.getElementsByTagName(\"line\");\n for(int n = 0; n < nList.getLength(); ++ n){\n Node nNode = nList.item(n);\n NodeList innerList = nNode.getChildNodes();\n for(int j = 0; j < innerList.getLength(); ++j){\n Node innerNode = innerList.item(j);\n if(innerNode.getTextContent().equals(\"wall\")){\n Wall wall = new Wall(x,y);\n walls.add(wall);\n } else if(innerNode.getTextContent().equals(\"empty_field\")){\n } else if(innerNode.getTextContent().equals(\"player\")){\n player = new Player(x,y);\n } else if(innerNode.getTextContent().equals(\"box\")){\n Box box = new Box(x,y);\n boxes.add(box);\n } else if(innerNode.getTextContent().equals(\"end_position\")){\n End_position end_position = new End_position(x,y);\n end_positions.add(end_position);\n }\n x+= DISTANCE;\n }\n //next row\n y += DISTANCE;\n if(width < x){\n width = x;\n }\n if(LEVEL_WIDTH < x) LEVEL_WIDTH = x;\n x = 0;\n }\n LEVEL_HEIGHT = y;\n }catch(Exception ex){\n ex.printStackTrace();\n }\n }", "public static Cell[][] readSavedGrid() throws IOException {\n String savedGameFile = \"Grid.txt\";\n Cell[][] grid = new Cell[4][4];\n BufferedReader reader = new BufferedReader(new FileReader(savedGameFile));\n String line = \"\";\n int row = 0;\n while((line = reader.readLine()) != null) {\n String[] cols = line.split(\",\");\n int col = 0;\n for(String c : cols) {\n if (Integer.parseInt(c) == 0) {\n targetCellX = row;\n targetCellY = col;\n }\n\n grid[row][col] = new Cell(Integer.parseInt(c));\n col++;\n }\n row++;\n }\n reader.close();\n\n return grid;\n }", "public static void writeCSV2D(CSVable[][] src, File to) throws IOException {\r\n\t\tfinal String SYSTEM_LINE_END = System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\tFileWriter fw = null;\r\n\t\tBufferedWriter bw = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Create the file if it doesn't exist yet\r\n\t\t\tif ( ! to.exists() ) {\r\n\t\t\t\tto.createNewFile();\r\n\t\t\t}\r\n\r\n\t\t\tfw = new FileWriter(to.getAbsoluteFile(), false);\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tsynchronized (src) {\r\n\t\t\t\tfor ( CSVable[] row : src ) {\r\n\t\t\t\t\tfor ( CSVable obj : row ) {\r\n\t\t\t\t\t\tbw.write(obj.toCSVRow() + SYSTEM_LINE_END);\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\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null) {\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\t}\r\n\t\t\t\tif (fw != null) {\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"I'm having really bad luck today - I couldn't even close the CSV file!\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void fillBoardWithCells(){\n double posx = MyValues.HORIZONTAL_VALUE*0.5*MyValues.HEX_SCALE + MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE;\n double posy = 2*MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE ;\n HexCell startCell = new HexCell(0,0, this);\n startCell.changePosition(posx, posy);\n boardCells[0][0] = startCell;\n for (int i = 0; i< x-1; i++) {\n HexCell currentCell = new HexCell(i+1, 0, this);\n boardCells[i+1][0] = currentCell;\n //i mod 2 = 0: Bottom\n if (i % 2 == 0) {\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT_RIGHT );\n } else {\n //i mod 2 =1: Top\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.TOP_RIGHT );\n }\n }\n for(int i = 0; i < x; i++){\n for(int j = 0; j < y-1; j++){\n HexCell currentCell = new HexCell(i, j+1, this);\n //System.out.println(Integer.toString(i) + Integer.toString(j));\n boardCells[i][j+1] = currentCell;\n boardCells[i][j].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT);\n }\n }\n }", "public void loadTilemap(File fileToLoad) \n {\n File levelFile = fileToLoad;\n boolean roverPainted = false; //Used to check if rover is painted twice\n try\n {\n Scanner scanner = new Scanner(levelFile);\n //Strict capture, instead of hasNextLine()\n // to enforce level grid size\n //Collect data for each column in row, then go to next row\n // 0 = surface, 1 = rover, 2 = rock, 3 = mineral\n for(int y = 0; y < Level.MAX_ROWS; y++)\n {\n for(int x = 0; x < Level.MAX_COLUMNS; x++)\n {\n if(scanner.hasNext())\n {\n tilemap[x][y] = scanner.nextInt();\n \n //Check if this tile paint was a rover\n if(tilemap[x][y] == 1)\n {\n //If rover has already been painted\n if(roverPainted)\n {\n System.out.println(\"WARNING: Multiple rovers exist. \"\n + \"Please fix level file. \");\n }\n roverPainted = true; //Set roverPainted to true\n }\n }\n else\n {\n tilemap[x][y] = 0;\n }\n }\n }\n scanner.close();\n repaint();\n }\n catch (FileNotFoundException e) \n {\n System.out.println(\"Invalid Level File\");\n e.printStackTrace();\n }\n }", "public void Read_Csv() {\n\t\t\n\t\tFile file = new File(\"Faucets.csv\");\n\t\tif(file.exists() == false) {\n\t\t\ttry {\n\t\t\t\t if (file.createNewFile()) {\n\t\t\t\t System.out.println(\"File created: \" + file.getName());\n\t\t\t\t } else {\n\t\t\t\t System.out.println(\"File already exists... Error\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\tFileWriter myWriter = new FileWriter(\"Faucets.csv\");\n\t\t\t\tmyWriter.write(\"Freebitco.in,3600,228,\");\n\t\t\t\tmyWriter.close();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Reading the file\n\t\tString line = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"Faucets.csv\");\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\tint x = 0;\n\t\t\tint commacounter = 0;\n\t\t\tint commaposition[] = new int[3];\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\twhile(x < line.length()) {\n\t\t\t\t\t\n\t\t\t\t\tif(line.charAt(x) == ',') {\n\t\t\t\t\t\tcommaposition[commacounter] = x;\n\t\t\t\t\t\tcommacounter +=1;\n\t\t\t\t\t}\n\t\t\t\t\tif(commacounter == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFaucets.site[amount_counter] = line.substring(0, commaposition[0]);\n\t\t\t\t\t\tFaucets.time[amount_counter] = Integer.parseInt(line.substring(commaposition[0]+1, commaposition[1]));\n\t\t\t\t\t\tFaucets.amount[amount_counter] = Integer.parseInt(line.substring(commaposition[1]+1, commaposition[2]));\n\t\t\t\t\t\tamount_counter += 1;\n\t\t\t\t\t\tcommacounter=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tx+=1;\n\t\t\t\t}\n\t\t\t\tx=0;\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\n\t\t\t\n\t}", "@Override\n public void initializeBoard(int r, int c) {\n\n grid = new Tile[HEIGHT][WIDTH];\n\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Tile(Tile.BLANK, row, col);\n }\n }\n\n Random random = new Random();\n for (int i = 0; i < numMines; i++) {\n int row = random.nextInt(HEIGHT);\n int col = random.nextInt(WIDTH);\n if ((row == r && col == c) || grid[row][col].getType() == Tile.MINE || grid[row][col].getType() == Tile.NUMBER) {\n i--;\n } else {\n grid[row][col] = new Tile(Tile.MINE, row, col);\n }\n }\n\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n if (getNumNeighboringMines(row, col) > 0 && grid[row][col].getType() != Tile.MINE) {\n Tile tile = new Tile(Tile.NUMBER, getNumNeighboringMines(row, col), row, col);\n grid[row][col] = tile;\n }\n }\n }\n }", "public void populateGrid(String fname) {\n\t\t// try open file as input stream\n\t\ttry (InputStream is = Files.newInputStream(Paths.get(fname));\n\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is))) {\n\n\t\t\tString line = null;\n\t\t\tint row = 0;\n\n\t\t\t// read every line in the file\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tfor (int col = 0; col < line.length(); col++) {\n\t\t\t\t\t// parse number as integer\n\t\t\t\t\tint value = Integer.parseInt(line.charAt(col) + \"\");\n\t\t\t\t\tif (value == 0) {\n\t\t\t\t\t\tgrid[row][col] = new Variable(row, col, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgrid[row][col] = new Variable(row, col, value, \n\t\t\t\t\t\t\t\tnew ArrayList<Integer>(Arrays.asList(value)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trow++;\n\t\t\t}\n\n\t\t\t// if file can't be opened or not found\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e);\n\t\t\tSystem.exit(0); \n\t\t}\n\t}", "public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }", "public void readBoardCalibration() {\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileNameBoardDimensions);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n line = bufferedReader.readLine();\n String readFieldSize[]=line.split(\",\");\n xBoardMin=Double.parseDouble(readFieldSize[0]);\n xBoardMax=Double.parseDouble(readFieldSize[1]);\n yBoardMin=Double.parseDouble(readFieldSize[2]);\n yBoardMax=Double.parseDouble(readFieldSize[3]);\n \t\t\tfieldWidthX=(xBoardMax-xBoardMin)/3;\n \t\t\tfieldHeightY=(yBoardMax-yBoardMin)/3;\n bufferedReader.close();\n setFields();\n }\n catch(FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" +fileNameBoardDimensions + \"'\"); \n }\n catch(IOException ex) {\n System.out.println(\"Error reading file '\"+ fileNameBoardDimensions + \"'\"); \n }\n\t}", "public void fileInput(String directory, String fileName) throws FileNotFoundException{\n\t\tinFile = new File(directory, fileName); \n\t\tinData = new Scanner(inFile); //read in file from parameter variables of directory and fileName\n\t\tString lineData = inData.next(); //get first data line\n\t\tcolumns = lineData.length();//set column size of grid\n\t\trows = 0;\n\t\twhile(inData.hasNext()){\n\t\t\trows++;\n\t\t\tinData.next(); //go through grid, when end is reached, row count is reached\n\t\t}\n\t\tcreateGrid(rows, columns); //create the grid with the gathered data\n\t\tclearGrid();\n\t\tinData.close();\n\t\tinFile = new File(directory, fileName); \n\t\tinData = new Scanner(inFile); //reset instance variables to the same file from the beginning\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){ //iterate through the file\n\t\t\t\tif(lineData.charAt(j) == '.'){\n\t\t\t\t\ttheGrid[i][j] = false; //read the characters, if empty, set to false\n\t\t\t\t}\n\t\t\t\telse{ //else, true\n\t\t\t\t\ttheGrid[i][j] = true;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tlineData = inData.next(); //read the next line\n\t\t}\n\t}", "private static void loadGridPoints() throws IOException {\n\n\t\tString filename = \"Grid Point file Path\";\n\t\tCSVReader reader = new CSVReader(new FileReader(filename));\n\t\treader.readNext();\n\t\tString[] nextLine;\n\n\t\tint id;\n\t\tdouble x, y;\n\t\ttree = new STRtree();\n\t\tpoints = new HashMap<Integer, double[]>();\n\t\tEnvelope itemEnv;\n\t\twhile ((nextLine = reader.readNext()) != null) {\n\n\t\t\tid = Integer.valueOf(nextLine[0]);\n\t\t\tx = Double.valueOf(nextLine[1]);\n\t\t\ty = Double.valueOf(nextLine[2]);\n\t\t\tdouble[] point = { x, y };\n\t\t\tpoints.put(id, point);\n\t\t\titemEnv = new Envelope(x, x, y, y);\n\t\t\ttree.insert(itemEnv, id);\n\t\t}\n\t\treader.close();\n\t}", "final public void fieldFromSrc(){\n List<String> lines = readSrc();\n size = Integer.parseInt(lines.get(0));\n Tile[] tiles = new Tile[size*size];\n int count = 0;\n Tile t;\n \n char[][] fieldChars = new char[size][size];\n \n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n try{\n fieldChars[X][Y] = lines.get(Y+1).charAt(X);\n }catch(StringIndexOutOfBoundsException e){\n System.out.println(e);\n }\n }\n }\n \n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n Coordinaat C = new Coordinaat(X,Y); \n switch(fieldChars[X][Y]){\n case 'M' : \n t = new Muur(C); \n break;\n case 'V' :\n t = new Veld(C);\n break;\n case 'E' :\n t = new EindVeld(C);\n break;\n default :\n t = new Tile(C);\n break;\n }\n tiles[count] = t;\n count++;\n }\n }\n \n fillField(tiles,size);\n createMoveAbles(lines.subList(size+2, lines.size()));\n }", "public static double[][] loadData() {\n double[][] data = null;;\n \n try {\n // create a path to the file\n File file = new File(\"data.csv\");\n \n // create a scanner to read the file\n Scanner inputFile = new Scanner(file);\n \n // count the number of entries in the file so we know how big\n // data needs to be.\n int index = 0;\n \n // count the rows in the file\n while(inputFile.hasNext()) {\n inputFile.nextLine();\n index++;\n }\n \n // declare the array.\n // first row is X, second row is Y\n data = new double[2][index];\n \n // create a new scanner so we can go back to the beginning of the file\n inputFile = new Scanner(file);\n \n // reset index to zero so we can assign array values properly\n index = 0;\n \n // a String to hold the lines as they are read from the file.\n String input = \"\";\n \n // the file should consist of a list of ordered pairs x,y\n // one ordered pair per line. assign these to the appropriate\n // places in the array\n while (inputFile.hasNext()) {\n // read the line\n input = inputFile.nextLine();\n \n // store the x value in the first array\n data[0][index] = Double.parseDouble(input.split(\",\")[0]);\n \n // store the y value in the second array\n data[1][index] = Double.parseDouble(input.split(\",\")[1]);\n \n // increment\n index++;\n }\n \n // done working with the file\n inputFile.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"File not found: \" + ex);\n } \n \n return data; \n }", "public boolean saveData(String gameType, Board board, int time, String name1, String name2,\n String playerType1, String playerType2, int turn) throws IOException{\n System.out.println(\"Saving....\");\n nameFile(SAVE);\n m_FileName = PATH+ m_FileName +FILETYPE;\n m_Writer = new CSVWriter(new FileWriter(m_FileName));\n m_Data = new ArrayList<String[]>();\n m_LoadBoard = board.getBoard();\n\n for (int i = 0; i < BOARD_ROWS; i++) {\n for (int j = 0; j < BOARD_COLS; j++) {\n if (m_LoadBoard[j][i].getColour().equals(\"Red\")){\n m_Data.add(new String[] {gameType, String.valueOf(j), String.valueOf(i), m_LoadBoard[j][i].getColour(),\n name1, playerType1, String.valueOf(turn), String.valueOf(time)});\n\n } else if (m_LoadBoard[j][i].getColour().equals(\"Yellow\")){\n m_Data.add(new String[] {gameType, String.valueOf(j), String.valueOf(i), m_LoadBoard[j][i].getColour(),\n name2, playerType2, String.valueOf(turn), String.valueOf(time)});\n\n } else {\n m_Data.add(new String[] {gameType, String.valueOf(j), String.valueOf(i),\n m_LoadBoard[j][i].getColour(), \"\", \"\", String.valueOf(turn), String.valueOf(time)});\n }\n }\n }\n m_Writer.writeAll(m_Data);\n m_Writer.close();\n return true;\n }", "public void loadFromCsv(String filePath) throws Exception {\n\tBufferedReader br=new BufferedReader(new FileReader(filePath));\n\tString line=\"\";\n\tint i=0;\n\n\tline=br.readLine();\n\tthis.gen=Integer.parseInt(line);\n\t\n\twhile((line=br.readLine()) != null) {\n\t this.setBna(i,line);\n\t i++;\n\t}\n\tbr.close();\n }", "public void loadMinionPiece(HashMap<Integer, MinionPiece> MinionPiece_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"MinionPiece.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(MinionPiece_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n MinionPiece minionPiece = new MinionPiece(-1, -1, -1, Color.BLACK);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n minionPiece.setId(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n minionPiece.setAreaNumber(Integer.parseInt(data));\r\n } else if (index == 2) {\r\n minionPiece.setColor(Color.valueOf(data));\r\n } else if (index == 3) {\r\n minionPiece.setPlayerID(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n MinionPiece_HASH.put(minionPiece.getId(), minionPiece);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadMinionPiece\");\r\n }\r\n \r\n }", "public void run() {\n CsvParser parser = this.initializeParser();\n\n // Initialize data structures\n String[] firstLine = parser.parseNext();\n List<MutableRoaringBitmap> dataset = new ArrayList<>(firstLine.length);\n for (int i = 0; i < firstLine.length; i++) {\n dataset.add(new MutableRoaringBitmap());\n this.columnPlisMutable = ImmutableList.copyOf(dataset);\n }\n\n // Start parsing the file\n if (this.configuration.isNoHeader()) {\n this.addRow(firstLine);\n } else {\n this.columnIndexToNameMapping = firstLine;\n }\n\n String[] nextRow;\n while ((nextRow = parser.parseNext()) != null) {\n this.addRow(nextRow);\n this.nRows++;\n }\n\n this.transformRows();\n this.transformColumns();\n log.info(\"Deduplicated {} rows to {}, {} columns to {}\", this.nRows, this.nRowsDistinct,\n this.columnPlisMutable.size(), this.columnPlis.size());\n }", "public void LoadFromCSV(){\n InputStream inputStream = getResources().openRawResource(R.raw.movielist);\n CSVinput csVinput = new CSVinput(inputStream);\n final List<String[]> movList = csVinput.read();\n\n for(String[] data : movList) {\n itemArrAdapt.add(data);\n }\n }", "public void fillBoard()\r\n {\r\n //fill 2d button array with the cells from bombList\r\n ListIterator itr = gameBoard.bombList.listIterator();\r\n for (int y = 0; y < gameBoard.BOARD_WIDTH; y++)\r\n {\r\n for (int x = 0; x < gameBoard.BOARD_WIDTH; x++)\r\n {\r\n if (itr.hasNext())\r\n {\r\n gameBoard.gameCells[y][x] = (Cell) itr.next();\r\n gameBoard.gameCells[y][x].setX(x);\r\n gameBoard.gameCells[y][x].setY(y);\r\n }\r\n }\r\n }\r\n// // **Debugging** print array to console\r\n// System.out.println(\"****** 2D Array Contents *******\");\r\n// for (int y = 0; y < gameBoard.BOARD_WIDTH; y++)\r\n// {\r\n// for (int x = 0; x < gameBoard.BOARD_WIDTH; x++)\r\n// {\r\n// System.out.print(gameBoard.gameCells[y][x].getText());\r\n// }\r\n// System.out.print(\"\\n\");\r\n// }\r\n\r\n // tell nearby spaces im a bomb\r\n for (int y = 0; y < gameBoard.BOARD_WIDTH; y++)\r\n {\r\n for (int x = 0; x < gameBoard.BOARD_WIDTH; x++)\r\n {\r\n if (gameBoard.gameCells[y][x].isBomb())\r\n {\r\n tellNearby(x, y);\r\n }\r\n }\r\n }\r\n }", "private void fillGameBoard() {\n for (int i = 0; i < row; i++) {\n String next = input.get(pointer);\n for (int j = 0; j < column; j++) {\n game[i][j] = String.valueOf(next.charAt(j)); //takes char from string next, this is where columns are filled\n }\n pointer++;\n }\n }", "private void populateGrid(Cell[][] populateGrid) {\n\n //Iterate through the grid and create dead cells at all locations\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n populateGrid[x][y] = new Cell(this, x, y, false);\n }\n }\n }", "@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void loadTrollPiece(HashMap<Integer, TrollPiece> TrollPiece_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"TrollPiece.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(TrollPiece_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n TrollPiece trollPiece = new TrollPiece(-1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n trollPiece.setId(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n trollPiece.setAreaNumber(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n TrollPiece_HASH.put(trollPiece.getId(), trollPiece);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadTrollPiece\");\r\n }\r\n \r\n }", "static Tile [][] tilesFromScanner(Scanner input){\r\n // Read the contents of the Scanner into a 2D ArrayList\r\n ArrayList<ArrayList<Tile>> rows = new ArrayList<ArrayList<Tile>>();\r\n while(input.hasNextLine()){\r\n Scanner line = new Scanner(input.nextLine());\r\n ArrayList<Tile> row = new ArrayList<Tile>();\r\n rows.add(row);\r\n while(line.hasNext()){\r\n String s = line.next();\r\n Tile t = null;\r\n if(s.equals(\"-\")){ t=null; }\r\n else if(s.equals(\"BRCK\")){ t=new Brick(); }\r\n else if(s.equals(\"PIT\")){ t=new Pit(); }\r\n else if(s.equals(\"Zomb\")){ t=new Zombie(); }\r\n else{ throw new RuntimeException(\"What is a \"+s); }\r\n row.add(t);\r\n }\r\n }\r\n int m = rows.size();\r\n int n = rows.get(0).size();\r\n Tile [][] tiles = new Tile[m][n];\r\n // Prepare a 2D array of tiles for use in constructors\r\n for(int i=0; i<m; i++){\r\n for(int j=0; j<n; j++){\r\n tiles[i][j] = rows.get(i).get(j);\r\n }\r\n }\r\n return tiles;\r\n }", "QueueOfPatterns(CSV csv){ \r\n\t\t\tthis.csv = csv;\r\n\t\t\tFirst = null;\r\n\t\t\tLast = null; \r\n\t\t\t}", "@Test\r\n public void readCsvFile() throws FileNotFoundException, IOException { \r\n CsvReader csvr = new CsvReader(CSV_FILE);\r\n \r\n List<NetworkElement> nes = csvr.getNetworkElements();\r\n assertEquals(55,nes.size()); \r\n }", "public void loadArea(HashMap<Integer, Area> Area_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"Area.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(Area_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n Area area = new Area();\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n area.setNumber(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n area.setNamePlate(data);\r\n } else if (index == 2) {\r\n area.setBuildingCost(Integer.parseInt(data));\r\n } else if (index == 3) {\r\n String[] adj_area = data.split(ConstantField.CSV_ADJACENT_AREA_SEPERATOR);\r\n for(String area_id : adj_area){\r\n area.getAdjacentArea().add(Integer.parseInt(area_id));\r\n }\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n Area_HASH.put(area.getNumber(), area);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n \r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadArea\");\r\n }\r\n }", "void loadCheckerBoard(int tileSize);", "public void initializeBoard() {\r\n int x;\r\n int y;\r\n\r\n this.loc = this.userColors();\r\n\r\n this.board = new ArrayList<ACell>();\r\n\r\n for (y = -1; y < this.blocks + 1; y += 1) {\r\n for (x = -1; x < this.blocks + 1; x += 1) {\r\n ACell nextCell;\r\n\r\n if (x == -1 || x == this.blocks || y == -1 || y == this.blocks) {\r\n nextCell = new EndCell(x, y);\r\n } else {\r\n nextCell = new Cell(x, y, this.randColor(), false);\r\n }\r\n if (x == 0 && y == 0) {\r\n nextCell.flood();\r\n }\r\n this.board.add(nextCell);\r\n }\r\n }\r\n this.stitchCells();\r\n this.indexHelp(0, 0).floodInitStarter();\r\n }", "private void findAndConstructPlayerFromDatabase(int id) throws IOException {\n openPlayerDataFromCSV(); // generate the file reader for the csv\n csvReader.readLine(); // read the first line through because it's just the headers\n String row = csvReader.readLine();\n\n // create a loop that reads until we find the player in the csv file\n while (row != null) {\n List<String> playerData = Arrays.asList(row.split(\",\"));\n playerID = Integer.parseInt(playerData.get(NbaGachaApp.ID_INDEX));\n if (playerID == id) {\n setPlayerData(playerData);\n row = null; // we've created the player so don't need to keep looking\n } else {\n row = csvReader.readLine(); // keep looking until we find the player\n }\n }\n\n }", "private void loadWorld(String path) {\r\n StringBuilder builder = new StringBuilder();\r\n \r\n try {\r\n BufferedReader br = new BufferedReader(new FileReader(path));\r\n String line;\r\n while ((line = br.readLine()) != null) {\r\n builder.append(line + \"\\n\");\r\n }\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n String file = builder.toString();\r\n String[] tokens = file.split(\"\\\\s+\");\r\n width = Integer.parseInt(tokens[0]);\r\n height = Integer.parseInt(tokens[1]);\r\n spawnX = Integer.parseInt(tokens[2]);\r\n spawnY = Integer.parseInt(tokens[3]);\r\n winX = Integer.parseInt(tokens[4]);\r\n winY = Integer.parseInt(tokens[5]);\r\n \r\n tiles = new int[width][height];\r\n for (int y = 0;y < height;y++) {\r\n for (int x = 0;x < width;x++) {\r\n tiles[x][y] = Integer.parseInt(tokens[(x + y * width) + 6]);\r\n }\r\n }\r\n \r\n assert (tiles != null);\r\n }", "public Grid decode (File file) throws IOException\n {\n String currentLine;\n int width = 0, height = 0;\n Grid _grid = null;\n\n try (BufferedReader br = new BufferedReader(new FileReader(file)))\n {\n // skip all the lines that we are not using\n while ((currentLine = br.readLine()) != null) {\n if (currentLine.startsWith(\"#\")) { continue; }\n if (currentLine.startsWith(\"x = \"))\n {\n for (String s : currentLine.split(\",\"))\n {\n if (s.contains(\"x = \"))\n {\n width = Integer.valueOf(s.replaceAll(\"\\\\D+\", \"\"));\n }\n else if (s.contains(\"y = \"))\n {\n height = Integer.valueOf(s.replaceAll(\"\\\\D+\", \"\"));\n }\n else\n {\n break;\n }\n }\n break;\n }\n }\n _grid = new Grid(height, width, false);\n\n int currentY = 0;\n int currentX = 0;\n int startX = 0;\n int i = 0;\n\n String kNumber = \"\"; // The number of times block should be repeated.\n String board = \"\";\n\n // convert the board to a long string\n while ((currentLine = br.readLine()) != null)\n {\n board += currentLine;\n }\n\n for (char c : board.toCharArray())\n {\n if (c == DEAD)\n {\n currentX += (kNumber.equals(\"\") ? 1 : Integer.parseInt(kNumber));\n kNumber = \"\";\n }\n else if (c == LIVE)\n {\n int count = (kNumber.equals(\"\") ? 1 : Integer.parseInt(kNumber));\n for (int j = 0; j < count; j++)\n {\n if (currentY < height && currentX < width)\n {\n _grid.setCell(true, currentX, currentY);\n }\n currentX++;\n }\n kNumber = \"\";\n }\n else if (c == EOL)\n {\n currentX = startX;\n currentY += (kNumber.equals(\"\") ? 1 : Integer.parseInt(kNumber));\n kNumber = \"\";\n }\n else if (c == EOF)\n {\n break;\n }\n else\n {\n kNumber += Integer.parseInt(board.substring(i, i + 1));\n }\n i++;\n }\n\n }\n return _grid;\n }", "private List<String> generateSquareStructureFromFile(String path) {\n Scanner scanner;\n List<String> readInput;\n InputStream inputStream = getClass().getResourceAsStream(path);\n scanner = new Scanner(inputStream);\n readInput = new ArrayList<>();\n\n while (scanner.hasNextLine()) {\n readInput.add(scanner.nextLine());\n }\n scanner.close();\n\n roomsToBuild = new ArrayList<>();\n squares = new ArrayList<>();\n spawnPoints = new ArrayList<>();\n for(int i = 0; i<readInput.size(); i++){\n if(i%2 == 0)\n squares.add(new ArrayList<>());\n }\n\n int row = 0;\n int col;\n char c;\n String s;\n while(row < readInput.size()){\n col = 0;\n while(col < readInput.get(row).length()){\n c = readInput.get(row).charAt(col);\n s = String.valueOf(c).toLowerCase();\n\n if(c=='R'||c=='B'||c=='Y'||c=='G'||c=='W'||c=='P') {\n SpawnPoint tempSquare = new SpawnPoint(row/2, col/2, Color.fromString(s));\n squares.get(row/2).add(tempSquare);\n spawnPoints.add(tempSquare);\n if(!roomsToBuild.contains(Color.fromString(s)))\n roomsToBuild.add(Color.fromString(s));\n }\n else if(c=='r'||c=='b'||c=='y'||c=='g'||c=='w'||c=='p'){\n squares.get(row/2).add(new Square(row/2, col/2, Color.fromString(s)));\n if(!roomsToBuild.contains(Color.fromString(s)))\n roomsToBuild.add(Color.fromString(s));\n }\n else if(c==' ' && row%2==0 && col%2==0){\n squares.get(row/2).add(null);\n }\n //update max\n if(row/2 + 1> numRow)\n numRow = row/2 + 1;\n if(col/2 + 1> numCol)\n numCol = col/2 + 1;\n col++;\n }\n row++;\n }\n\n return readInput;\n\n }", "private void fillBoard() {\n\t\tint randomRow, randomColumn;\n\t\t\n\t\tfor (int i = 0; i < bombs; ++i) {\n\t\t\trandomRow = (int)(Math.random() * rows);\n\t\t\trandomColumn = (int)(Math.random() * columns);\n\t\t\tboard[randomRow][randomColumn] = -1;\n\t\t}\n\t\t\n\t\tfor (int r = 0; r < rows; ++r) {\n\t\t\tfor (int c = 0; c < columns; ++c) {\n\t\t\t\tif (board[r][c] == -1) {\n\t\t\t\t\tincreaseFreeCells(r, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void initGrid(String filename)\r\n throws NumberFormatException, FileNotFoundException, IOException;", "public Board createBoard(String inputFileName) {\nList<String> ants = new ArrayList<>();\n\nint rows = 0;\nrows = getMatrixSize(inputFileName);\n\nBoard b = new Board(rows, rows);\n\nants = findAnts(inputFileName);\nfor (int k = 0; k < ants.size(); k++) {\nString firstAnt = ants.get(k);\nString[] firstAntSplitted = firstAnt.split(\" \");\nString name = \"\";\nint posX = 0;\nint posY = 0;\n\nname = firstAntSplitted[2];\nposX = Integer.parseInt(firstAntSplitted[0]);\nposY = Integer.parseInt(firstAntSplitted[1]);\n\nAnt a = new Ant(name);\n\n\nb.placeAnt(posX, posY, a);\n}\nreturn b;\n}", "public Board(int rows, int cols) {\n\t\t_board = new ArrayList<ArrayList<String>>();\n\t\t_rand = new Random();\n\t\t_colorFileNames = new ArrayList<String>();\n\t\tfor (int i=0; i<MAX_COLORS; i=i+1) {\n\t\t\t_colorFileNames.add(\"Images/Tile-\"+i+\".png\");\n\t\t}\n\t\tfor (int r=0; r<rows; r=r+1) {\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tfor (int c=0; c<cols; c=c+1) {\n\t\t\t\trow.add(_colorFileNames.get(_rand.nextInt(_colorFileNames.size())));\n\t\t\t}\n\t\t\t_board.add(row);\n\t\t\t\n\t\t\tif(_board.size()==rows) { //board is complete\n\t\t\t\tboolean istrue = false;\n\t\t\t\tif(match(3).size()>0 || end()){ //(1)there are match //(2)there is no valid move\n\t\t\t\t\tistrue = true;\n\t\t\t\t}\n\t\t\t\tif (istrue) {\n\t\t\t\t\t_board.clear();\t\t// if istrue clear the board\n\t\t\t\t\tr=-1;\t\t\t\t// restart; r=-1, at the end of loop will add 1\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\t\n\t}", "public boolean fillGrid(int[][] grid) {\n Integer[] intArray = {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\n //Find unfilled cell and fill it.\n for (int i = 0; i < 81; i++) {\n int row = i / 9;\n int col = i % 9;\n if (grid[row][col] == 0) {\n\n //Shuffle collection\n List<Integer> intList = Arrays.asList(intArray);\n Collections.shuffle(intList);\n Integer[] numbers = intList.toArray(intArray);\n for (int j = 0; j < numbers.length; j++) {\n\n //Test Row to see if it contains the value\n if (!Arrays.asList(grid[row][0], grid[row][1], grid[row][2], \n \t\tgrid[row][3], grid[row][4], grid[row][5], grid[row][6], \n \t\tgrid[row][7], grid[row][8]).contains(numbers[j])) {\n\n //Test Column to see if it contains the value\n if (!Arrays.asList(grid[0][col],grid[1][col],grid[2][col],\n \t\tgrid[3][col],grid[4][col],grid[5][col],grid[6][col],\n \t\tgrid[7][col],grid[8][col]).contains(numbers[j])) {\n\n //Test squares to see if they contain value\n int[] testsquare;\n if (row < 3) {\n if (col < 3) {\n testsquare = testSection(grid, 3, 3, 0, 0);\n } else if (col < 6){\n testsquare = testSection(grid, 3, 6, 0, 3);\n } else {\n testsquare = testSection(grid, 3, 9, 0, 6);\n }\n } else if (row < 6){\n if (col < 3) {\n testsquare = testSection(grid, 6, 3, 3, 0);\n } else if (col < 6) {\n testsquare = testSection(grid, 6, 6, 3, 3);\n } else {\n testsquare = testSection(grid, 6, 9, 3, 6);\n }\n } else {\n if (col < 3) {\n testsquare = testSection(grid, 9, 3, 6, 0);\n } else if (col < 6) {\n testsquare = testSection(grid, 9, 6, 6, 3);\n } else {\n testsquare = testSection(grid, 9, 9, 6, 6);\n }\n }\n if (!Arrays.asList(testsquare[0], testsquare[1], testsquare[2], testsquare[3], testsquare[4],\n testsquare[5], testsquare[6], testsquare[7], testsquare[8]).contains(numbers[j])) {\n grid[row][col] = numbers[j];\n if (isFull(grid))\n return true;\n else if (fillGrid(grid))\n break;\n }\n }\n }\n }\n break;\n }\n }\n return false;\n }", "public void load (){\n try{\n FileInputStream fis = new FileInputStream(\"game.data\");\n ObjectInputStream o = new ObjectInputStream(fis);\n for (int i = 0; i < 8; i++){\n for (int j = 0; j < 8; j++){\n String loaded = o.readUTF();\n if (loaded.equals(\"null\")){\n Tiles[i][j].removePiece();\n }else if (loaded.equals(\"WhiteLeftKnight\")){\n Tiles[i][j].setPiece(WhiteLeftKnight);\n }else if (loaded.equals(\"WhiteRightKnight\")){\n Tiles[i][j].setPiece(WhiteRightKnight);\n }else if (loaded.equals(\"WhiteLeftBishop\")){\n Tiles[i][j].setPiece(WhiteLeftBishop);\n }else if (loaded.equals(\"WhiteRightBishop\")){\n Tiles[i][j].setPiece(WhiteRightBishop);\n }else if (loaded.equals(\"WhiteLeftRook\")){\n Tiles[i][j].setPiece(WhiteLeftRook);\n }else if (loaded.equals(\"WhiteRightRook\")){\n Tiles[i][j].setPiece(WhiteRightRook);\n }else if (loaded.equals(\"WhiteQueen\")){\n Tiles[i][j].setPiece(WhiteQueen);\n }else if (loaded.equals(\"WhiteKing\")){\n Tiles[i][j].setPiece(WhiteKing);\n }else if (loaded.equals(\"WhitePromotedRookPawn\")){\n Rook WhitePromotedRookPawn = new Rook(\"WhitePromotedRookPawn\");\n WhitePromotedRookPawn.setIcon(WhiteRookImg);\n Tiles[i][j].setPiece(WhitePromotedRookPawn);\n }else if (loaded.equals(\"WhitePromotedBishopPawn\")){\n Bishop WhitePromotedBishopPawn = new Bishop(\"WhitePromotedBishopPawn\");\n WhitePromotedBishopPawn.setIcon(WhiteBishopImg);\n Tiles[i][j].setPiece(WhitePromotedBishopPawn);\n }else if (loaded.equals(\"WhitePromotedKnightPawn\")){\n Knight WhitePromotedKnightPawn = new Knight(\"WhitePromotedKnightPawn\");\n WhitePromotedKnightPawn.setIcon(WhiteKnightImg);\n Tiles[i][j].setPiece(WhitePromotedKnightPawn);\n }else if (loaded.equals(\"WhitePromotedQueenPawn\")){\n Queen WhitePromotedQueenPawn = new Queen(\"WhitePromotedQueenPawn\");\n WhitePromotedQueenPawn.setIcon(WhiteQueenImg);\n Tiles[i][j].setPiece(WhitePromotedQueenPawn);\n }else if (loaded.equals(\"BlackLeftKnight\")){\n Tiles[i][j].setPiece(BlackLeftKnight);\n }else if (loaded.equals(\"BlackRightKnight\")){\n Tiles[i][j].setPiece(BlackRightKnight);\n }else if (loaded.equals(\"BlackLeftBishop\")){\n Tiles[i][j].setPiece(BlackLeftBishop);\n }else if (loaded.equals(\"BlackRightBishop\")){\n Tiles[i][j].setPiece(BlackRightBishop);\n }else if (loaded.equals(\"BlackLeftRook\")){\n Tiles[i][j].setPiece(BlackLeftRook);\n }else if (loaded.equals(\"BlackRightRook\")){\n Tiles[i][j].setPiece(BlackRightRook);\n }else if (loaded.equals(\"BlackQueen\")){\n Tiles[i][j].setPiece(BlackQueen);\n }else if (loaded.equals(\"BlackKing\")){\n Tiles[i][j].setPiece(BlackKing);\n }else if (loaded.equals(\"BlackPromotedQueenPawn\")){\n Queen BlackPromotedQueenPawn = new Queen(\"BlackPromotedQueenPawn\");\n BlackPromotedQueenPawn.setIcon(BlackQueenImg);\n Tiles[i][j].setPiece(BlackPromotedQueenPawn);\n }else if (loaded.equals(\"BlackPromotedRookPawn\")){\n Rook BlackPromotedRookPawn = new Rook(\"BlackPromotedRookPawn\");\n BlackPromotedRookPawn.setIcon(BlackRookImg);\n Tiles[i][j].setPiece(BlackPromotedRookPawn);\n }else if (loaded.equals(\"BlackPromotedBishopPawn\")){\n Bishop BlackPromotedBishopPawn = new Bishop(\"BlackPromotedBishopPawn\");\n BlackPromotedBishopPawn.setIcon(BlackBishopImg);\n Tiles[i][j].setPiece(BlackPromotedBishopPawn);\n }else if (loaded.equals(\"BlackPromotedKnightPawn\")){\n Knight BlackPromotedKnightPawn = new Knight(\"BlackPromotedKnightPawn\");\n BlackPromotedKnightPawn.setIcon(BlackKnightImg);\n Tiles[i][j].setPiece(BlackPromotedKnightPawn);\n }else if (loaded.equals(\"WhitePawn0\")){\n Tiles[i][j].setPiece(WhitePawns[0]);\n }else if (loaded.equals(\"WhitePawn1\")){\n Tiles[i][j].setPiece(WhitePawns[1]);\n }else if (loaded.equals(\"WhitePawn2\")){\n Tiles[i][j].setPiece(WhitePawns[2]);\n }else if (loaded.equals(\"WhitePawn3\")){\n Tiles[i][j].setPiece(WhitePawns[3]);\n }else if (loaded.equals(\"WhitePawn4\")){\n Tiles[i][j].setPiece(WhitePawns[4]);\n }else if (loaded.equals(\"WhitePawn5\")){\n Tiles[i][j].setPiece(WhitePawns[5]);\n }else if (loaded.equals(\"WhitePawn6\")){\n Tiles[i][j].setPiece(WhitePawns[6]);\n }else if (loaded.equals(\"WhitePawn7\")){\n Tiles[i][j].setPiece(WhitePawns[7]);\n }else if (loaded.equals(\"BlackPawn0\")){\n Tiles[i][j].setPiece(BlackPawns[0]);\n }else if (loaded.equals(\"BlackPawn1\")){\n Tiles[i][j].setPiece(BlackPawns[1]);\n }else if (loaded.equals(\"BlackPawn2\")){\n Tiles[i][j].setPiece(BlackPawns[2]);\n }else if (loaded.equals(\"BlackPawn3\")){\n Tiles[i][j].setPiece(BlackPawns[3]);\n }else if (loaded.equals(\"BlackPawn4\")){\n Tiles[i][j].setPiece(BlackPawns[4]);\n }else if (loaded.equals(\"BlackPawn5\")){\n Tiles[i][j].setPiece(BlackPawns[5]);\n }else if (loaded.equals(\"BlackPawn6\")){\n Tiles[i][j].setPiece(BlackPawns[6]);\n }else if (loaded.equals(\"BlackPawn7\")){\n Tiles[i][j].setPiece(BlackPawns[7]);\n }\n }\n }\n player = o.readInt();\n if (player == 1){\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (White)\");\n }else{\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (Black)\");\n }\n o.close();\n OriginalColor();\n }catch (Exception ex){\n\n }\n }", "public void generateTrajectoryDistancesAndTimeForAnswerType(String csvName, String trajFileName, String questionLocationsName, String fileName, double meters, int answerType) {\n Scanner csv = null;\n Scanner ql = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n ql = new Scanner(new File(questionLocationsName)); //question locations (index 0 corresponds to question 1)\n\n String ap = \"\";\n if (answerType == 1)\n ap = \"CC\";\n else if (answerType == 2)\n ap = \"CD\";\n else if (answerType == 3)\n ap = \"IC\";\n else\n ap = \"ID\";\n\n FileWriter writer = new FileWriter(fileName + ap + \".csv\");\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n ArrayList<Point2D.Double> questionLocations = new ArrayList<Point2D.Double>();\n\n while (ql.hasNextLine()) {\n questionLocations.add(new Point2D.Double(ql.nextDouble(), ql.nextDouble()));\n }\n\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n writer.append(\"Distance,Time,AnswerType,ID,Question\\n\");\n\n ArrayList<Trajectory> alltj = new ArrayList<Trajectory>();\n for (String s : Ids) //for each device ID determine the corresponding answer list\n {\n System.out.println(s);\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n alltj = trajectories.get(s); //get all the trajectories under this Id\n\n if (anstj == null || alltj == null)\n System.out.println(\"Could not find trajectory data for deviceId: \" + s);\n\n else {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort it by time\n Collections.sort(alltj, Trajectory.TSComparator); //sort it by time\n\n\n int currentQuestion = anstj.get(0).getQuestion();\n int currentAnswer = anstj.get(0).getAnswer();\n int correct = 0;\n if (currentAnswer == 1 || currentAnswer == 2)\n correct = 1;\n\n boolean BC = true;// before the first question\n int total = 0;\n for (Trajectory t : alltj) {\n\n double timestamp = t.getTimeStamp() * 1000;\n\n if (BC && timestamp < anstj.get(0).getTimeStamp()) //use first trajectory as if it's before the first question\n {\n total++;\n //determine the distance and answer type\n double qX = questionLocations.get(currentQuestion - 1).getX(); //question location x and y\n double qY = questionLocations.get(currentQuestion - 1).getY();\n\n double tX = t.getX(); //trajectory x and y\n double tY = t.getY();\n\n double aX = anstj.get(0).getX(); //location when question was answered\n double aY = anstj.get(0).getY();\n\n double currentDist = Math.sqrt((tX - qX) * (tX - qX) + (tY - qY) * (tY - qY)); //distance from current location to question location\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int answerId = 0;\n if (distToAnswer <= meters) {\n if (correct == 1)\n answerId = 1;\n\n if (correct == 0)\n answerId = 3;\n } else {\n if (correct == 1)\n answerId = 2;\n\n if (correct == 0)\n answerId = 4;\n }\n\n\n if (answerId == answerType)\n writer.append(currentDist + \",\" + t.getTimeStamp() + \",\" + answerId + \",\" + t.getId() + \",\" + anstj.get(0).getQuestion() + \"\\n\");\n\n BC = false;\n } else {\n break;\n }\n\n }\n\n for (int a = 0; a < anstj.size() - 1; a++) //for questions 1-n\n {\n //determine the distance and answer type\n\n double qX = questionLocations.get(anstj.get(a + 1).getQuestion() - 1).getX();//question location x and y\n double qY = questionLocations.get(anstj.get(a + 1).getQuestion() - 1).getY();\n\n double tX = anstj.get(a).getX(); //current location x and y\n double tY = anstj.get(a).getY();\n\n double aX = anstj.get(a + 1).getX(); //location when question was answered\n double aY = anstj.get(a + 1).getY();\n\n double currentDist = Math.sqrt((tX - qX) * (tX - qX) + (tY - qY) * (tY - qY)); //distance from current location to question location\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int answerId = 0;\n if (distToAnswer <= meters) {\n if (correct == 1)\n answerId = 1;\n\n if (correct == 0)\n answerId = 3;\n } else {\n if (correct == 1)\n answerId = 2;\n\n if (correct == 0)\n answerId = 4;\n }\n if (answerId == answerType)\n writer.append(currentDist + \",\" + anstj.get(a).getTimeStamp() / 1000.0 + \",\" + answerId + \",\" + anstj.get(a).getId() + \",\" + anstj.get(a).getQuestion() + \"\\n\");\n }\n\n }\n }\n\n\n writer.flush();\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n if (ql != null)\n ql.close();\n\n }\n }", "private static void putRoomInBoard(GameState state, char[][] layout, int layoutX, int layoutY, String roomPath) {\n try {\n\n File roomFile = new File(roomPath);\n Scanner reader = new Scanner(new FileReader(roomFile));\n\n // Convert layout space to board space\n int boardX = layoutToBoard(layoutX);\n int boardY = layoutToBoard(layoutY);\n\n // Loop through rows first because scanner reads rows first\n for(int row = boardY; row < boardY + ROOM_SIZE; row++) {\n char[] line = reader.nextLine().toCharArray();\n for(int column = boardX; column < boardX + ROOM_SIZE; column++) {\n Entity e = null;\n // Figure out which entity to put in this space, or leave null\n switch(line[column - boardX]) {\n\n case WALL:\n e = new Wall();\n break;\n case PLAYER:\n e = player;\n break;\n case STAIRS:\n e = new Stairs(state);\n break;\n case SWORD:\n e = new Sword(state);\n break;\n case SHIELD:\n e = new Shield(state);\n break;\n case POTION:\n e = new Potion(state);\n break;\n case SLIME:\n e = new Slime(state); \n break;\n case DOOR:\n e = new Door(state);\n break;\n case KEY:\n e = new Key(state);\n break;\n default:\n System.out.println(\"Invalid room element \" + line[column - boardX] + \" returning null\");\n case EMPTY:\n break;\n }\n state.addEntity(e, column, row);\n\n }\n }\n\n // Make holes for the sides of rooms that are adjacent to other rooms\n // Solution does not work with arbitrary room sizes. Only works when Room size = 8x8\n if(LayoutGenerator.inLayout(layoutX - 1, layoutY) && layout[layoutX - 1][layoutY] != LayoutGenerator.NULL_CHAR) {\n // Left\n state.getBoard()[boardX][boardY + 3] = null;\n state.getBoard()[boardX][boardY + 4] = null;\n }\n if(LayoutGenerator.inLayout(layoutX + 1, layoutY) && layout[layoutX + 1][layoutY] != LayoutGenerator.NULL_CHAR) {\n // Right\n state.getBoard()[boardX + 7][boardY + 3] = null;\n state.getBoard()[boardX + 7][boardY + 4] = null;\n }\n if(LayoutGenerator.inLayout(layoutX, layoutY - 1) && layout[layoutX][layoutY - 1] != LayoutGenerator.NULL_CHAR) {\n // Up\n state.getBoard()[boardX + 3][boardY] = null;\n state.getBoard()[boardX + 4][boardY] = null;\n }\n if(LayoutGenerator.inLayout(layoutX, layoutY + 1) && layout[layoutX][layoutY + 1] != LayoutGenerator.NULL_CHAR) {\n // Down\n state.getBoard()[boardX + 3][boardY + 7] = null;\n state.getBoard()[boardX + 4][boardY + 7] = null;\n }\n\n reader.close();\n } catch (IOException e) {\n System.out.println(\"Error occured while generating floor\");\n System.out.println(e);\n }\n }", "public void generateTrajectoryDistances(String csvName, String trajFileName, String questionLocationsName, String fileName, double meters) {\n Scanner csv = null;\n Scanner ql = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n ql = new Scanner(new File(questionLocationsName));\n FileWriter writer = new FileWriter(fileName + \".csv\");\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n ArrayList<Point2D.Double> questionLocations = new ArrayList<Point2D.Double>();\n\n while (ql.hasNextLine()) {\n questionLocations.add(new Point2D.Double(ql.nextDouble(), ql.nextDouble()));\n }\n\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n writer.append(\"Distance,AnswerType,ID,Question\\n\");\n\n ArrayList<Trajectory> alltj = new ArrayList<Trajectory>();\n for (String s : Ids) //for each device ID determine the corresponding answer list\n {\n System.out.println(s);\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n alltj = trajectories.get(s); //get all the trajectories under this Id\n\n if (anstj == null || alltj == null)\n System.out.println(\"Could not find trajectory data for deviceId: \" + s);\n\n else {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort answer list data by time\n Collections.sort(alltj, Trajectory.TSComparator); //sort trajectory data by time\n\n\n int currentQuestion = anstj.get(0).getQuestion(); //the first question\n int currentAnswer = anstj.get(0).getAnswer();\n int correct = 0;\n if (currentAnswer == 1 || currentAnswer == 2)\n correct = 1;\n\n boolean BC = true;// before the first question\n int total = 0;\n for (Trajectory t : alltj) {\n\n double timestamp = t.getTimeStamp() * 1000;\n\n if (BC && timestamp < anstj.get(0).getTimeStamp()) //use first trajectory as if it's before the first question\n {\n total++;\n //determine the distance and answer type\n double qX = questionLocations.get(currentQuestion - 1).getX(); //question location x and y\n double qY = questionLocations.get(currentQuestion - 1).getY();\n\n double tX = t.getX(); //trajectory x and y\n double tY = t.getY();\n\n double aX = anstj.get(0).getX(); //location when question was answered\n double aY = anstj.get(0).getY();\n\n double currentDist = Math.sqrt((tX - qX) * (tX - qX) + (tY - qY) * (tY - qY)); //distance from current location to question location\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int answerId = 0;\n if (distToAnswer <= meters) {\n if (correct == 1)\n answerId = 1;\n\n if (correct == 0)\n answerId = 3;\n } else {\n if (correct == 1)\n answerId = 2;\n\n if (correct == 0)\n answerId = 4;\n }\n\n writer.append(currentDist + \",\" + answerId + \",\" + t.getId() + \",\" + anstj.get(0).getQuestion() + \"\\n\");\n BC = false;\n } else {\n break;\n }\n\n }\n\n for (int a = 0; a < anstj.size() - 1; a++) //for questions 1-n\n {\n //determine the distance and answer type\n\n double qX = questionLocations.get(anstj.get(a + 1).getQuestion() - 1).getX();//current question location x and y\n double qY = questionLocations.get(anstj.get(a + 1).getQuestion() - 1).getY();\n\n double tX = anstj.get(a).getX(); //current location x and y\n double tY = anstj.get(a).getY();\n\n double aX = anstj.get(a + 1).getX(); //location where question was answered\n double aY = anstj.get(a + 1).getY();\n\n double currentDist = Math.sqrt((tX - qX) * (tX - qX) + (tY - qY) * (tY - qY)); //distance from current location to question location\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int answerId = 0;\n if (distToAnswer <= meters) {\n if (correct == 1)\n answerId = 1;\n\n if (correct == 0)\n answerId = 3;\n } else {\n if (correct == 1)\n answerId = 2;\n\n if (correct == 0)\n answerId = 4;\n }\n\n writer.append(currentDist + \",\" + answerId + \",\" + anstj.get(a).getId() + \",\" + anstj.get(a).getQuestion() + \"\\n\");\n }\n\n }\n }\n\n\n writer.flush();\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n if (ql != null)\n ql.close();\n\n }\n }", "public void fillGrid() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.fillGrid()\");\r\n\t\t// From top to bottom...\r\n\t\tfor (int i=0; i<powerGrid.length; i++) {\r\n\t\t\t// ...and from left to right...\r\n\t\t\tfor (int j=0; j<powerGrid[0].length; j++) {\r\n\t\t\t\t// ...calculate each cell's power level.\r\n\t\t\t\tpowerGrid[i][j] = calculateCellPower(j, i);\r\n\t\t\t}\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}", "private void parseFromCSV(String fileNameX, String fileNameY) throws IOException {\n Scanner inX = new Scanner(new BufferedInputStream(clearInput(new FileInputStream(new File(fileNameX)))));\r\n Scanner inY = new Scanner(new BufferedInputStream(clearInput(new FileInputStream(new File(fileNameY)))));\r\n\r\n for (int i = 0; i < 5000; i++) {\r\n double[] X_i = X[i];\r\n for (int j = 0; j < 3072; j++) {\r\n X_i[j] = inX.nextDouble();\r\n }\r\n int id = inY.nextInt();\r\n int output = inY.nextInt();\r\n y[id - 1] = output;\r\n System.out.println(i + 1);\r\n }\r\n\r\n // Cache the training data (so it's faster to load next time)\r\n {\r\n // Cache X\r\n ByteBuffer bytesX = ByteBuffer.allocate(5000 * 3072 * 8);\r\n DoubleBuffer doublesX = bytesX.asDoubleBuffer();\r\n for (double[] row : X) {\r\n doublesX.put(row);\r\n }\r\n bytesX.rewind();\r\n OutputStream outX = new FileOutputStream(new File(fileNameX + \".cache\"));\r\n outX.write(bytesX.array());\r\n outX.close();\r\n }\r\n\r\n {\r\n // Cache Y\r\n ByteBuffer bytesY = ByteBuffer.allocate(5000 * 8);\r\n bytesY.asIntBuffer().put(y);\r\n bytesY.rewind();\r\n OutputStream outY = new FileOutputStream(new File(fileNameY + \".cache\"));\r\n outY.write(bytesY.array());\r\n outY.close();\r\n }\r\n }", "public void printNumberOfAnswerTypes(String csvName, String trajFileName, String questionLocationsName, double meters, double speedThreshold, double timeThreshold) {\n Scanner csv = null;\n Scanner ql = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n ql = new Scanner(new File(questionLocationsName));\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n ArrayList<Point2D.Double> questionLocations = new ArrayList<Point2D.Double>();\n\n while (ql.hasNextLine()) {\n questionLocations.add(new Point2D.Double(ql.nextDouble(), ql.nextDouble()));\n }\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n\n HashMap<Integer, ArrayList<AnswerTrajectory>> teams = new HashMap<Integer, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n\n for (String s : Ids) {\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n\n if (anstj == null)\n System.out.println(\"Could not find data for deviceId: \" + s);\n\n else {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort answer list data by time\n double startTime = (anstj.get(0).getTimeStamp() - 1377334800000.0) / 1000.0;//converts the time stamp to time after the event started\n double speed = determineAverageSpeed(trajectories, anstj.get(0).getId());\n //System.out.println(speed+\" \"+startTime);\n if (speed != -1) // ensure the trajectory data exists for this ID\n {\n //classify the team type\n int teamType = 0;\n\n if (startTime < timeThreshold) {\n if (speed > speedThreshold) // serious\n teamType = 1;\n else\n teamType = 2;// get it over with\n } else {\n if (speed > speedThreshold) // hurried\n teamType = 3;\n else\n teamType = 4; //lazy\n }\n if (teams.get(teamType) == null) {\n System.out.println(\"first team type for: \" + teamType);\n teams.put(teamType, new ArrayList<AnswerTrajectory>(anstj));\n } else {\n teams.get(teamType).addAll(anstj);\n }\n }\n }\n }\n int totalcc = 0;\n int totalcd = 0;\n int totalic = 0;\n int totalid = 0;\n for (int i = 1; i < 5; i++) {\n ArrayList<AnswerTrajectory> trajs = teams.get(i);\n int cc = 0;\n int cd = 0;\n int ic = 0;\n int id = 0;\n\n for (AnswerTrajectory at : trajs) {\n int question = at.getQuestion();\n double qX = questionLocations.get(question - 1).getX(); //question location x and y\n double qY = questionLocations.get(question - 1).getY();\n\n double aX = at.getX(); //location when question was answered\n double aY = at.getY();\n\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int correct = 0;\n if (at.getAnswer() == 1 || at.getAnswer() == 2)\n correct = 1;\n\n if (distToAnswer <= meters) {\n if (correct == 1)\n cc++;\n\n if (correct == 0)\n ic++;\n } else {\n if (correct == 1)\n cd++;\n\n if (correct == 0)\n id++;\n }\n\n }\n totalcc += cc;\n totalcd += cd;\n totalic += ic;\n totalid += id;\n\n }\n System.out.println(\"Answer Type Totals\\n\" + \"CC: \" + totalcc + \"\\nCD: \" + totalcd + \"\\nIC: \" + totalic + \"\\nID: \" + totalid);\n\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n if (ql != null)\n ql.close();\n\n }\n }", "public static void Load(String filename) throws IOException {\n\t\tLineNumberReader lnr = new LineNumberReader(new FileReader(filename));\r\n\t\t linenumber = 0;\r\n\t\t while (lnr.readLine() != null){\r\n\t\t\t linenumber++;\r\n\t\t }\r\n lnr.close();\r\n \tarrr=new String[linenumber][5];\r\n\t\tarr=arrr;\r\n\t\tBufferedReader br=new BufferedReader(new FileReader(filename));\r\n\t\t Scanner sc1=new Scanner(br);\r\n\t\t String ss=sc1.nextLine();\r\n\t\t String[] str1 = ss.split(\",\") ;\r\n\t\t String r=str1[0];\r\n\t\t String t=str1[1];\r\n\t\t String[] str2 = r.split(\":\") ;\r\n\t\t round= Integer.parseInt(str2[1]);\r\n\t\t String[] str3 = t.split(\":\") ;\r\n\t\t who=Integer.parseInt(str3[1]);\r\n\t\t arr=new String[linenumber][5];\r\n\t\t int num=0;\r\n\t\t while(sc1.hasNextLine()) {\t\r\n\t\t\t int i=0;\r\n\t\t\t num++;\r\n\t\t\t String x=sc1.nextLine();\r\n\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\twhile(i<5) {\r\n\t\t\t\tarr[num][i]=str[i];\r\n\t\t\t\ti++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t int c=1;\r\n\t ch=new Character[linenumber];\r\n\r\n\t\t\twhile(c<(linenumber)) {\r\n\t\t\t\t\r\n\t\t\t\tch[c]=new Character(Integer.parseInt(arr[c][0]),Integer.parseInt(arr[c][1]),Integer.parseInt(arr[c][2]),Integer.parseInt(arr[c][3]),arr[c][4]);\t\t\t\t\t\t\t\r\n\t\t\t\tc++;\r\n\t\t\t}\t\r\n\t\t\r\n\t\t sc1.close();\r\n\t\t String file=\"Land.txt\";\r\n\t\t\tBufferedReader br2=new BufferedReader(new FileReader(file));\r\n\t\t\tland=new String[20][2];\r\n\t\t\tland2=new String[20][2];\r\n\t\t\tland=land2;\r\n\t\t\tScanner sc2=new Scanner(br2);\r\n\t\t\tString strr=sc2.nextLine();\r\n\t\t\tnum=0;\r\n\t\t\t while(sc2.hasNextLine()) {\t\r\n\t\t\t\t int i=0;\r\n\t\t\t\t num++;\r\n\t\t\t\t String x=sc2.nextLine();\t\t\t\r\n\t\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\t\twhile(i<2) {\r\n\t\t\t\t\tland[num][i]=str[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t }\t\t\t\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t String url = \"//localhost:3306/checkpoint?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT\";\r\n\t\t // String url=\"//140.127.220.220/\";\r\n\t\t // String dbname=\"CHECKPOINT\";\r\n\t\t\t Connection conn = null;\r\n\t\t try{\r\n\t\t conn = DriverManager.getConnection(protocol + url,username,passwd);\r\n\t\t Statement s = conn.createStatement();\r\n\t\t String sql = \"SELECT PLACE_NUMBER,LAND_PRICE,TOLLS FROM LAND\";\r\n\t\t rs=s.executeQuery(sql);\r\n\t\t p_number=new int[20];\r\n\t\t l_price=new int[20];\r\n\t\t tolls=new int[20];\r\n\t\t grid=0;\r\n\t\t while(rs.next()){\r\n\t\t \tgrid++;\r\n\t\t \tp_number[grid]=rs.getInt(\"PLACE_NUMBER\");\r\n\t\t \tl_price[grid]=rs.getInt(\"LAND_PRICE\");\r\n\t\t \ttolls[grid]=rs.getInt(\"TOLLS\");\t \t\t \t\r\n\t\t }\t\t \t\t \r\n\t\t rs.close();\r\n\t\t conn.close();\r\n\t\t } catch(SQLException err){\r\n\t\t System.err.println(\"SQL error.\");\r\n\t\t err.printStackTrace(System.err);\r\n\t\t System.exit(0);\r\n\t\t }\r\n\t\t\t Land=new Land[20];\r\n\t\t\t Land2=new Land[20];\r\n\t\t\t Land=Land2;\t\t\t \r\n\t\t \tfor(int i=1;i<=grid;i++) {\r\n\t\t \t\tLand[i]=new Land(p_number[i],Integer.parseInt(land[i][1]),l_price[i],tolls[i]);\t \t\t\r\n\t\t \t}\r\n\t\t\t sc2.close();\r\n\t}", "public void initializeGameboard() {\r\n\t\t\r\n\t\t for (int row=0 ; row<gameBoard.length; row++)\r\n\t\t { \r\n\t\t \t \r\n\t\t \t for(int column=0;column<gameBoard[row].length;column++ )\t \r\n\t\t \t { \r\n\t\t \t\t if( row==0|| row ==1)\r\n\t\t \t\t { \r\n\t\t \t\t\t if (column==0) {gameBoard[row][column]=\"2\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"3\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"5\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"9\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"11\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"12\";} \r\n\t\t \t\t }\r\n\t\t \t\t \r\n\t\t\t \t else if(row ==2 || row==3) \r\n\t\t\t \t {\r\n\t\t\t \t\t if (column==0) {gameBoard[row][column]=\"12\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"11\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"9\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"5\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"3\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"2\";} \r\n\t\t\t \t }\r\n\t\t }\r\n\t\t }\r\n\t }", "public void generateTrajectoryDistancesAndTime(String csvName, String trajFileName, String questionLocationsName, String fileName, double meters) {\n Scanner csv = null;\n Scanner ql = null;\n\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n ql = new Scanner(new File(questionLocationsName)); //question locations (index 0 corresponds to question 1)\n FileWriter writer = new FileWriter(fileName + \".csv\");\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n ArrayList<Point2D.Double> questionLocations = new ArrayList<Point2D.Double>();\n\n while (ql.hasNextLine()) {\n questionLocations.add(new Point2D.Double(ql.nextDouble(), ql.nextDouble()));\n }\n\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n writer.append(\"Distance,Time,AnswerType,ID,Question\\n\");\n\n ArrayList<Trajectory> alltj = new ArrayList<Trajectory>();\n for (String s : Ids) //for each device ID determine the corresponding answer list\n {\n //System.out.println(s);\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n alltj = trajectories.get(s); //get all the trajectories under this Id\n\n if (anstj == null || alltj == null)\n System.out.println(\"Could not find trajectory data for deviceId: \" + s);\n\n else {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort it by time\n Collections.sort(alltj, Trajectory.TSComparator); //sort it by time\n\n\n int currentQuestion = anstj.get(0).getQuestion();\n int currentAnswer = anstj.get(0).getAnswer();\n int correct = 0;\n if (currentAnswer == 1 || currentAnswer == 2)\n correct = 1;\n\n boolean BC = true;// before the first question\n int total = 0;\n for (Trajectory t : alltj) {\n\n double timestamp = t.getTimeStamp() * 1000;\n\n if (BC && timestamp < anstj.get(0).getTimeStamp()) //use first trajectory as if it's before the first question\n {\n total++;\n //determine the distance and answer type\n double qX = questionLocations.get(currentQuestion - 1).getX(); //question location x and y\n double qY = questionLocations.get(currentQuestion - 1).getY();\n\n double tX = t.getX(); //trajectory x and y\n double tY = t.getY();\n\n double aX = anstj.get(0).getX(); //location when question was answered\n double aY = anstj.get(0).getY();\n\n double currentDist = Math.sqrt((tX - qX) * (tX - qX) + (tY - qY) * (tY - qY)); //distance from current location to question location\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int answerId = 0;\n if (distToAnswer <= meters) {\n if (correct == 1)\n answerId = 1;\n\n if (correct == 0)\n answerId = 3;\n } else {\n if (correct == 1)\n answerId = 2;\n\n if (correct == 0)\n answerId = 4;\n }\n\n writer.append(currentDist + \",\" + t.getTimeStamp() + \",\" + answerId + \",\" + t.getId() + \",\" + anstj.get(0).getQuestion() + \"\\n\");\n BC = false;\n } else {\n break;\n }\n\n }\n\n for (int a = 0; a < anstj.size() - 1; a++) //for questions 1-n\n {\n //determine the distance and answer type\n\n double qX = questionLocations.get(anstj.get(a + 1).getQuestion() - 1).getX();//question location x and y\n double qY = questionLocations.get(anstj.get(a + 1).getQuestion() - 1).getY();\n\n double tX = anstj.get(a).getX(); //current location x and y\n double tY = anstj.get(a).getY();\n\n double aX = anstj.get(a + 1).getX(); //location when question was answered\n double aY = anstj.get(a + 1).getY();\n\n double currentDist = Math.sqrt((tX - qX) * (tX - qX) + (tY - qY) * (tY - qY)); //distance from current location to question location\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int answerId = 0;\n if (distToAnswer <= meters) {\n if (correct == 1)\n answerId = 1;\n\n if (correct == 0)\n answerId = 3;\n } else {\n if (correct == 1)\n answerId = 2;\n\n if (correct == 0)\n answerId = 4;\n }\n\n writer.append(currentDist + \",\" + anstj.get(a).getTimeStamp() / 1000.0 + \",\" + answerId + \",\" + anstj.get(a).getId() + \",\" + anstj.get(a).getQuestion() + \"\\n\");\n }\n\n }\n }\n\n\n writer.flush();\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n if (ql != null)\n ql.close();\n\n }\n }", "private void updateBoard() throws FileNotFoundException {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Creating board image\");\r\n\t\tBufferedImage combined = new BufferedImage(GlobalVars.images.get(\"Board1\").getWidth(), GlobalVars.images.get(\"Board1\").getHeight(), BufferedImage.TYPE_INT_ARGB);\r\n\t\t\r\n\t\tGraphics g = combined.getGraphics();\r\n\t\t// Draws board template first\r\n\t\tg.drawImage(GlobalVars.images.get(\"Board1\"), 0, 0, null);\r\n\t\t\r\n\t\t// Loops through contents and adds secrets, artifacts, idols\r\n\t\tfor (int i = 0; i < mapContents.length; i++) {\r\n\t\t\tif (mapContents[i] != null && mapContents[i] != \"heart\") {\r\n\t\t\t\tint offsetX = 4;\r\n\t\t\t\tint offsetY = -1;\r\n\t\t\t\tif (mapContents[i].startsWith(\"Minor\")) {\r\n\t\t\t\t\toffsetX = 7;\r\n\t\t\t\t\toffsetY = 3;\r\n\t\t\t\t}\r\n\t\t\t\t// Specific spots to this map\r\n\t\t\t\tif (i == 18) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(mapContents[i]), 206, 286, null);\r\n\t\t\t\t} else if (i == 19) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(mapContents[i]), 299, 287, null);\r\n\t\t\t\t} else if (i == 25) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(mapContents[i]), 297, 352, null);\r\n\t\t\t\t} else if (i == 28) {\r\n\t\t\t\t\tint num = Integer.parseInt(mapContents[i].substring(10));\r\n\t\t\t\t\tif (num > 0) {\r\n\t\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"MonkeyIdol\"), 28, 369, null);\r\n\t\t\t\t\t\tif (num > 1) {\r\n\t\t\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"MonkeyIdol\"), 28, 395, null);\r\n\t\t\t\t\t\t\tif (num > 2) {\r\n\t\t\t\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"MonkeyIdol\"), 28, 422, null);\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\tg.drawImage(GlobalVars.images.get(mapContents[i]), GlobalVars.playerCoordsPerRoom[i][0]+offsetX, GlobalVars.playerCoordsPerRoom[i][1]+offsetY, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Draws dragons\r\n\t\tif (attackLevel == 0) g.drawImage(GlobalVars.images.get(\"Dragon\"), 395, 548, null);\r\n\t\telse if (attackLevel == 1) g.drawImage(GlobalVars.images.get(\"Dragon\"), 456, 542, null);\r\n\t\telse if (attackLevel == 2) g.drawImage(GlobalVars.images.get(\"Dragon\"), 513, 510, null);\r\n\t\telse if (attackLevel == 3) g.drawImage(GlobalVars.images.get(\"Dragon\"), 549, 462, null);\r\n\t\telse if (attackLevel == 4) g.drawImage(GlobalVars.images.get(\"Dragon\"), 561, 412, null);\r\n\t\telse if (attackLevel == 5) g.drawImage(GlobalVars.images.get(\"Dragon\"), 551, 349, null);\r\n\t\telse {\r\n\t\t\tg.drawImage(GlobalVars.images.get(\"Dragon\"), 552, 287, null);\r\n\t\t}\r\n\t\t\r\n\t\t// Draws characters\r\n\t\tg.drawImage(GlobalVars.images.get(\"RedChar\"), p1.getPiece().getX(), p1.getPiece().getY(), null);\r\n\t\tif (playerCount >= 2) {\r\n\t\t\tg.drawImage(GlobalVars.images.get(\"BlueChar\"), p2.getPiece().getX(), p2.getPiece().getY(), null);\r\n\t\t\tif (playerCount >= 3) {\r\n\t\t\t\tg.drawImage(GlobalVars.images.get(\"YellowChar\"), p3.getPiece().getX(), p3.getPiece().getY(), null);\r\n\t\t\t\tif (playerCount >= 4) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"GreenChar\"), p4.getPiece().getX(), p4.getPiece().getY(), null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Writes the combined image into a file\r\n\t\ttry {\r\n\t\t\tImageIO.write(combined, \"PNG\", new File(\"newboard.png\"));\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Builds an embed and sends it to the filesChannel\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(gameChannel.getName());\r\n\t\tembed.setColor(Color.GRAY);\r\n\t\tInputStream test = new FileInputStream(\"newboard.png\");\r\n\t\tembed.setImage(\"attachment://newboard.png\");\r\n\t\tMessageBuilder m = new MessageBuilder();\r\n\t\tm.setEmbed(embed.build());\r\n\t\tGlobalVars.filesChannel.sendFile(test, \"newboard.png\", m.build()).queue();\r\n\t}", "public CityList() throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new File(\"Resources\\\\MapOfIreland.csv\"));\n\t\treadNodes(); // Call method to read in all nodes\n\t\tsc.nextLine(); //Skip first line of headers\n\t\twhile(sc.hasNext()) {\n\t\t\tCSVdata = sc.nextLine().split(\",\");\n\t\t\tint link1 = -1, link2 = -1; // Holds index of two nodes to be connected\n\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[2])) // If node data == first node to be connected\n\t\t\t\t\tlink1 = i;\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[3])) // If node data == second node to be connected\n\t\t\t\t\tlink2 = i;\n\t\t\t}\n\t\t\t// If one or both nodes weren't found\n\t\t\tif(link1 < 0 || link2 < 0) {\n\t\t\t\tSystem.out.println(\"ERROR: ONE OR BOTH NODES DO NOT EXIST\");\n\t\t\t\tSystem.out.println(CSVdata[2] + \"|\" + CSVdata[3]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Connect two links\n\t\t\telse\n\t\t\t\tnodes.get(link1).connectToNodeUndirected(nodes.get(link2), Double.parseDouble(CSVdata[1]), CSVdata[0]);\n\t\t}\n\t\tsc.close();\n\t}", "public void loadPlayer(HashMap<Integer, Player> Player_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"Player.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(Player_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n Player player = new Player(-1, \"\", Color.BLACK, -1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n player.setID(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n player.setName(data);\r\n } else if (index == 2) {\r\n player.setColor(Color.valueOf(data));\r\n } else if (index == 3) {\r\n player.setOrder(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n Player_HASH.put(player.getID(), player);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayer\");\r\n }\r\n }", "public void printNumberOfTeamTypes(String csvName, String trajFileName, double speedThreshold, double timeThreshold) {\n Scanner csv = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n\n }\n\n HashMap<Integer, ArrayList<AnswerTrajectory>> teams = new HashMap<Integer, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n\n int serious = 0;\n int giow = 0;\n int hurried = 0;\n int lazy = 0;\n System.out.println(\"Total IDS: \" + Ids.size());\n\n for (String s : Ids) {\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n/*\n if (anstj == null)\n System.out.println(\"Could not find data for deviceId: \" + s);\n*/\n {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort answer list data by time\n double startTime = (anstj.get(0).getTimeStamp() - 1377334800000.0) / 1000.0;\n double speed = determineAverageSpeed(trajectories, anstj.get(0).getId());\n //System.out.println(speed+\" \"+startTime);\n if (speed != -1) // ensure the trajectory data exists for this ID\n {\n //classify the team type\n int teamType = 0;\n\n if (startTime < timeThreshold) {\n if (speed > speedThreshold) {// serious\n teamType = 1;\n serious++;\n } else {\n teamType = 2;// get it over with\n giow++;\n }\n } else {\n if (speed > speedThreshold) { // hurried\n teamType = 3;\n hurried++;\n } else {\n teamType = 4; //lazy\n lazy++;\n }\n }\n if (teams.get(teamType) == null) {\n System.out.println(\"first team type for: \" + teamType);\n teams.put(teamType, new ArrayList<AnswerTrajectory>(anstj));\n } else {\n teams.get(teamType).addAll(anstj);\n }\n }\n }\n }\n System.out.println(\"Serious: \" + serious + \"\\nGIOW: \" + giow + \"\\nHurried: \" + hurried + \"\\nLazy: \" + lazy);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n\n }\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public DistrictBoard(String filename) {\r\n Path file = FileSystems.getDefault().getPath(\"../Gerrymander/data/\", filename);\r\n try (BufferedReader reader = Files.newBufferedReader(file)) {\r\n // get the dimensions from the first line (M N)\r\n String line = reader.readLine();\r\n int[] dim = Arrays.stream(line.split(\" \")).mapToInt(s -> Integer.parseInt(s)).toArray();\r\n boardRows = dim[0];\r\n boardCols = dim[1];\r\n board = new int[boardRows][boardCols];\r\n \r\n // read the remaining lines into the board array\r\n for (int i = 0; i < boardRows; i++) {\r\n line = reader.readLine();\r\n board[i] = Arrays.stream(line.split(\" \")).mapToInt(s -> Integer.parseInt(s)).toArray();\r\n }\r\n } catch (IOException e) {\r\n System.err.format(\"IOException: %s%n\", e);\r\n }\r\n }", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "public void loadDemonPiece(HashMap<Integer, DemonPiece> DemonPiece_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"DemonPiece.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(DemonPiece_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n DemonPiece demonPiece = new DemonPiece(-1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n demonPiece.setId(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n demonPiece.setAreaNumber(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n DemonPiece_HASH.put(demonPiece.getId(), demonPiece);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadDemonPiece\");\r\n }\r\n \r\n }", "public void findCoordinates(int[] times) {\n int startTime = times[0];\n int endTime = times[1];\n int index = 0;\n Path questionPath = Paths.get(\"CrimeLatLonXY1990.csv\");\n File questionFile = questionPath.toFile();\n FileReader reader;\n BufferedReader br;\n //int[] res = new int[2];\n String columns[] = null;\n LinkedList<Crime> list = new LinkedList<>();\n try {\n // read CSV file\n reader = new FileReader(questionFile);\n br = new BufferedReader(reader);\n String str = null;\n try {\n while ((str = br.readLine()) != null) {\n columns = str.split(\"\\\\,\");\n try {\n //0,1 are the coordinates x, y\n double x = Double.parseDouble(columns[0].trim());\n double y = Double.parseDouble(columns[1].trim());\n // 2 is time field\n int time = Integer.parseInt(columns[2].trim());\n if (time <= endTime && time >= startTime) {\n // create a Crime instance within the time range\n Crime crime = new Crime(x, y, index++, str);\n list.add(crime);\n }\n //stop reading file after we have found the last crime at the end time\n if (time > endTime) {\n nodes = index;\n array = new Crime[index];\n // construct crime array\n for (int i = 0; i < index; i++) {\n array[i] = list.get(i);\n }\n break;\n }\n } catch (NumberFormatException e) {\n //skip the first line\n continue;\n }\n\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n\n }\n } catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n }", "private void init() {\n\n MyFileReader finalResultReader = null;\n\n finalResultReader = new MyFileReader(FilePath.billboardCombineResultPath);\n\n String line = \"\";\n\n while (true) {\n\n line = finalResultReader.getNextLine();\n if (line == null)\n break;\n\n String[] elements = line.split(\" \");\n if (elements.length == 1)\n continue; // skip those billboard which can not influence any route\n\n String panelID = elements[0].split(\"~\")[0]; // panelID~weeklyImpression\n int weeklyImpression = Integer.parseInt(elements[0].split(\"~\")[1]);\n\n\n List<Integer> routeIDs = new ArrayList<>();\n\n for (int i = 1; i < elements.length; i++) {\n\n int routeID = Integer.parseInt(elements[i]);\n //if (routeID < length) {\n routeIDs.add(routeID);\n //}\n }\n\n panelIDs.add(panelID);\n weeklyImpressions.add(weeklyImpression);\n routeIDsOfBillboards.add(routeIDs);\n\n }\n setUpRouteIDsAndIndexes();\n finalResultReader.close();\n }", "public SudokuGrid(String fileName) throws IOException {\n\t\tthis.fileName = fileName;\n\t\t\n\t\tString unsolvedGridString = Utils.loadGrid(fileName);\n\t\tString unsolvedGrid[] = unsolvedGridString.split(\",\");\n\t\t/*\n\t\t * adds the elements from the file\n\t\t * to the relative positions of the sudoku grid\n\t\t * if the position is blank, the position is kept to its initial value of 0\n\t\t */\n\t\tint totalElementIndex = 0;\n\t\tfor (int rowIndex = 0; rowIndex < Utils.SIZE; rowIndex++) {\n\t\t\tint elementIndex = 0;\n\t\t\twhile (elementIndex < Utils.SIZE && totalElementIndex < unsolvedGrid.length) {\n\t\t\t\tif (unsolvedGrid[totalElementIndex].length() == 0) {\n\n\t\t\t\t} else {\n\t\t\t\t\tfinalGrid[rowIndex][elementIndex] = Integer.valueOf(unsolvedGrid[totalElementIndex]);\n\t\t\t\t}\n\t\t\t\telementIndex++;\n\t\t\t\ttotalElementIndex++;\n\t\t\t}\n\t\t}\n\t}", "public String[][] loadData(String fileName)\n{\n String[] rows = loadStrings(fileName);\n String[][] dataa = new String [24][7];\n int i = 0;\n for (String row : rows) \n {\n String[] columns = row.split(\",\");\n if (columns.length >= 7) \n {\n for (int j = 0; j < 7; j=j+1)\n {\n dataa [i][j]=columns[j];\n }\n i = i +1;\n }\n }\n return dataa;\n}", "static int[][] fileToBoard(String fileName) {\n\t\ttry {\n\t\t\t// open up file\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(fileName));\n\t\t\ttry {\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// used to record the length and \n\t\t\t\t// height of the board for the 2d int array\n\t\t\t\tint x = 0;\n\t\t\t\tint y = 0;\n\t\t\t\t\n\t\t\t\tx = line.replaceAll(\"\\t\", \"\").length();\n\t\t\t\t// build up string line by line\n\t\t\t\twhile (line != null) {\n\t\t\t\t\ty++;\n\t\t\t\t\tsb.append(line);\n\t\t\t\t\tline = br.readLine();\n\t\t\t\t}\n\n\t\t\t\t// change from string builder to string and take out tabs\n\t\t\t\tString everything = sb.toString();\n\t\t\t\tString noTabs = everything.replaceAll(\"\\t\", \"\");\n\n\t\t\t\t// close file\n\t\t\t\tbr.close();\n\t\t\t\t\n\t\t\t\t// convert string to 2d int array\n\t\t\t\tint [][] board = new int[x][y];\n\t\t\t\tfor(int i = 0; i < x; i++){\n\t\t\t\t\tfor(int j = 0; j < y; j++){\n\t\t\t\t\t\tchar character = noTabs.charAt(i+j*x);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check to see if the character is a special state (Start and Goal)\n\t\t\t\t\t\tif(character == 'G')\n\t\t\t\t\t\t\tboard[i][j] = State.GOAL;\n\t\t\t\t\t\telse if(character == 'S')\n\t\t\t\t\t\t\tboard[i][j] = State.START;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tboard[i][j] = character - '0';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn board;\n\t\t\t} finally {\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn new int[0][0];\n\t}", "public List<Country> readCountriesFromCSV(String fileName){\n try {\n Scanner scanner = new Scanner(new File(fileName));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n while(scanner.hasNextLine()){\n lsta.add(createCountry(scanner.nextLine().split(\",\")));\n// System.out.println(pyr.get_pharaoh()+\"|\"+pyr.get_modern_name()+\"|\"+pyr.get_site()+\"|\"+pyr.get_height()+\"|\");\n }\n scanner.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(CityCSVDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return lsta;\n }", "@Override\n public void csvImport(String filename) {\n try {\n FileReader r = new FileReader(filename);\n Scanner in = new Scanner(r);\n\n while (in.hasNext()) {\n String firstInput = in.next().trim();\n String firstName = firstInput.substring(0, firstInput.length() - 1).trim();\n String lastInput = in.next().trim();\n String lastName = lastInput.substring(0, lastInput.length() - 1).trim();\n String ID = in.next().substring(0, 5);\n int pID = Integer.parseInt(ID);\n String grade = in.next();\n\n Student s = new Student(firstName, lastName, pID);\n Grade g = new Grade(grade);\n\n map.put(s, g);\n }\n checker = true;\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found\");\n checker = false;\n }\n }", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void generateTrajectorySpeeds(String csvName, String trajFileName, String fileName) {\n Scanner csv = null;\n try {\n csv = new Scanner(new File(csvName)); //open the answer list file\n FileWriter writer = new FileWriter(fileName + \".csv\");\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n\n while (csv.hasNextLine()) {\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId);\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n writer.append(\"Speed\\n\");\n\n ArrayList<Trajectory> alltj = new ArrayList<Trajectory>();\n for (String s : Ids) //for each device ID determine the corresponding answer list\n {\n //System.out.println(s);\n alltj = trajectories.get(s); //get all the trajectories under this Id\n\n if (alltj == null)\n System.out.println(\"Could not find trajectory data for deviceId: \" + s);\n\n else {\n Collections.sort(alltj, Trajectory.TSComparator); //sort trajectory data by time\n\n for (int i = 0; i < alltj.size() - 1; i++) {\n Trajectory t1 = alltj.get(i);\n Trajectory t2 = alltj.get(i + 1);\n\n\n double x1 = t1.getX();\n double x2 = t2.getX();\n double y1 = t1.getY();\n double y2 = t2.getY();\n\n\n double dist = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n double dt = t2.getTimeStamp() - t1.getTimeStamp();\n\n\n if (dt == 0) {\n System.out.println(t1 + \"\\n\" + t2 + \"\\tDIST: \" + dist + \"\\n\\n\");\n alltj.remove(i + 1);\n i--;\n } else {\n double speed = dist / dt;\n writer.append(speed + \"\\n\");\n\n }\n\n\n }\n\n\n }\n }\n\n\n writer.flush();\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n\n }\n }", "@Override\n\tpublic void configuration(String csv) {\n\n\t}", "public void loadCSVData() throws IOException, SQLException {\r\n //SQL statement to load csv information into data table\r\n String insertvaluesSQL = \"INSERT INTO data\"\r\n + \"(InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country)\"\r\n + \" VALUES (?,?,?,?,?,?,?,?);\";\r\n\r\n //code to read csv file taken from W03 practical\r\n BufferedReader br = new BufferedReader(new FileReader(filePath));\r\n String line = br.readLine();\r\n String[] informationArray;\r\n while (line != null) {\r\n informationArray = line.split(\",\");\r\n PreparedStatement preparedStatement = connection.prepareStatement(insertvaluesSQL);\r\n //the first '?' corresponds to the 0th term in the information array\r\n //the second '?' corresponds to the 1st term in the information array\r\n for (int i = 1; i < 9; i++) {\r\n preparedStatement.setString(i, informationArray[i - 1]);\r\n }\r\n preparedStatement.executeUpdate();\r\n line = br.readLine();\r\n }\r\n Statement statement = connection.createStatement();\r\n statement.executeUpdate(\"DELETE FROM data WHERE InvoiceNo = 'InvoiceNo';\");\r\n statement.close();\r\n }", "private void readMaze(Scanner scan) //throws FileNotFoundException\n\t{\n\t\t// initialize the square matrix\n\t\ttopology = new int[row][col];\n\t\t// str stores temporary character read in\n\t\tString str = \"\";\n\t\t// read in the matrix for square\n\t\t// loop through # of rows\n\t\tfor(int i =0; i< row; i++)\n\t\t{\n\t\t\t// check if there is a next line then read \n\t\t\tif(scan.hasNextLine())\n\t\t\t{\n\t\t\t\tString line = scan.nextLine();\t\t\t\t\t\t\n\t\t\t\t// make a scanner for that line\n\t\t\t\t//Scanner scanLine = new Scanner(line);\n\t\t\t\t// read in each line\n\t\t\t\tfor(int j =0; j<col; j++){\n\t\t\t\t\t// make sure there are col # of entries in a row\n\t\t\t\t\ttry{\n\t\t\t\t\tstr = line.charAt(j)+\"\";\n\t\t\t\t\t// open space\n\t\t\t\t\tif(str.equals(\".\")) topology[i][j]= -1;\n\t\t\t\t\t//wall\n\t\t\t\t\telse if(str.equals(\"#\")) topology[i][j]=-2;\n\t\t\t\t\t//start\n\t\t\t\t\telse if(str.equals(\"S\")){\n\t\t\t\t\t\ttopology[i][j] = 0;\n\t\t\t\t\t\t// enqueue this element to the qCells\n\t\t\t\t\t\tqCells.enQueue(new Point(i,j));\n\t\t\t\t\t}\n\t\t\t\t\t//stop\n\t\t\t\t\telse if(str.equals(\"D\")){\n\t\t\t\t\t\ttopology[i][j] = -3;\n\t\t\t\t\t\t// push this on the path stack\n\t\t\t\t\t\tsPath.push(new Point(i,j));\n\t\t\t\t\t}\n\t\t\t\t\t// otherwise wrong format\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(\"This is wrong \"+str);\n\t\t\t\t\t\tthrow new InputMismatchException(\"Illegal input\");\n\t\t\t\t\t}\n\t\t\t\t\t}catch(StringIndexOutOfBoundsException e){\n\t\t\t\t\t\tthrow new StringIndexOutOfBoundsException(\"Not enough inputs in a row\");\n\t\t\t\t\t}\n\t\t\t\t} // end of j loop\n\t\t\t\t//too many inputs on a row\n\t\t\t\tif(line.length()>col) throw new InputMismatchException(\"Extra input in row \"+ i+ \" is \" + str);\n\t\t\t\t\t\t\n\t\t\t}// end of if has next line\n\t\t\telse{\n\t\t\t\t//not enough line\n\t\t\t\tthrow new InputMismatchException(\"Two few rows.\");\n\t\t\t}\n\t\t}// end of i loop\n\t\t// check if there are too many rows\n\t\tif(scan.hasNextLine()) throw new InputMismatchException(\"Two many rows.\");\n\t}", "public Board()\n {\n ArrayList<String[]> dies = new ArrayList<String[]>();\n dies.add(Die0);\n dies.add(Die1);\n dies.add(Die2);\n dies.add(Die3);\n dies.add(Die4);\n dies.add(Die5);\n dies.add(Die6);\n dies.add(Die7);\n dies.add(Die8);\n dies.add(Die9);\n dies.add(Die10);\n dies.add(Die11);\n dies.add(Die12);\n dies.add(Die13);\n dies.add(Die14);\n dies.add(Die15);\n \n \n \n Random rand = new Random();\n int a = rand.nextInt(16);\n int b = rand.nextInt(15);\n int c = rand.nextInt(14);\n int d = rand.nextInt(13);\n int e = rand.nextInt(12);\n int f = rand.nextInt(11);\n int g = rand.nextInt(10);\n int h = rand.nextInt(9);\n int i = rand.nextInt(8);\n int j = rand.nextInt(7);\n int k = rand.nextInt(6);\n int l = rand.nextInt(5);\n int m = rand.nextInt(4);\n int n = rand.nextInt(3);\n int o = rand.nextInt(2);\n int p = rand.nextInt(1);\n row0.add(new Tile(dies.get(a)[rand.nextInt(6)].charAt(0),0,0));\n dies.remove(a);\n row0.add(new Tile(dies.get(b)[rand.nextInt(6)].charAt(0),0,1));\n dies.remove(b);\n row0.add(new Tile(dies.get(c)[rand.nextInt(6)].charAt(0),0,2));\n dies.remove(c);\n row0.add(new Tile(dies.get(d)[rand.nextInt(6)].charAt(0),0,3));\n dies.remove(d);\n row1.add(new Tile(dies.get(e)[rand.nextInt(6)].charAt(0),1,0));\n dies.remove(e);\n row1.add(new Tile(dies.get(f)[rand.nextInt(6)].charAt(0),1,1));\n dies.remove(f);\n row1.add(new Tile(dies.get(g)[rand.nextInt(6)].charAt(0),1,2));\n dies.remove(g);\n row1.add(new Tile(dies.get(h)[rand.nextInt(6)].charAt(0),1,3));\n dies.remove(h);\n row2.add(new Tile(dies.get(i)[rand.nextInt(6)].charAt(0),2,0));\n dies.remove(i);\n row2.add(new Tile(dies.get(j)[rand.nextInt(6)].charAt(0),2,1));\n dies.remove(j);\n row2.add(new Tile(dies.get(k)[rand.nextInt(6)].charAt(0),2,2));\n dies.remove(k);\n row2.add(new Tile(dies.get(l)[rand.nextInt(6)].charAt(0),2,3));\n dies.remove(l);\n row3.add(new Tile(dies.get(m)[rand.nextInt(6)].charAt(0),3,0));\n dies.remove(m);\n row3.add(new Tile(dies.get(n)[rand.nextInt(6)].charAt(0),3,1));\n dies.remove(n);\n row3.add(new Tile(dies.get(o)[rand.nextInt(6)].charAt(0),3,2));\n dies.remove(o);\n row3.add(new Tile(dies.get(p)[rand.nextInt(6)].charAt(0),3,3));\n dies.remove(p);\n tiles.add(row0);\n tiles.add(row1);\n tiles.add(row2);\n tiles.add(row3);\n \n }", "public void read()\r\n\t{\r\n\t\tScanner input = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\r\n\t\t\tinput = new Scanner(new File(\"netflix.csv\")).useDelimiter(\"[,\\r\\n]\");\r\n\r\n\t\t\twhile (input.hasNext())\r\n\t\t\t{\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tString title = input.next();\r\n\r\n\t\t\t\tString rating = input.next();\r\n\r\n\t\t\t\tint year = Integer.parseInt(input.next());\r\n\r\n\t\t\t\tint score = Integer.parseInt(input.next());\r\n\t\t\t\tMovie a = new Movie(title, rating, year, score);\r\n\t\t\t\tdata[i] = a;\r\n\t\t\t\ti++;\r\n\t\t\t\tactualSize++;\r\n\r\n\t\t\t}\r\n\t\t\tinput.close();\r\n\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "private void processCSVFile( BufferedReader csvFile ) throws IOException {\r\n\t\t\r\n\t\tboolean headerRowRead = false;\r\n\t\tString[] headerArray = null;\r\n\t\t\r\n\t\t//loop through all rows and create contacts\r\n\t\tString row = csvFile.readLine();\r\n\t\t\r\n\t\twhile (row != null) {\r\n\t\t\t\r\n\t\t\tif (row.length()==0 || row.startsWith(\"#\") || row.startsWith(\";\") ) {\t\t\r\n\t\t\t\t\r\n\t\t\t\t//empty or comment row: skip\r\n\t\t\t\t\r\n\t\t\t} else if (!headerRowRead) {\r\n\t\t\t\t\r\n\t\t\t\t//header row is the first non-blank, not-comment row in the CSV file\r\n\t\t\t\t//the required header row contains the attribute names\r\n\t\t\t\t\r\n\t\t\t\theaderRowRead = true;\r\n\t\t\t\t\r\n\t\t\t\t//read header\r\n\t\t\t\theaderArray = parseCSVLine( row, true); \t\t\r\n\t\t\t\tLogger.debug(\"header: \" + row);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\r\n\t\t\t\tHashMap<String,String> contactObject = ContactsImport.getRowValues(headerArray, row);\r\n\t\t\t\tcreateContact(contactObject);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trow = csvFile.readLine(); //read next line form csv file\r\n\t\t}\r\n\t\t\r\n\t\tLogger.debug(\"finished\");\r\n\r\n\t}", "public static ArrayList<BoardPair> readFile(String inFileName, String format) {\n ArrayList<BoardPair> boardPairs = new ArrayList<BoardPair>();\n try { \n File inFile = new File(inFileName); \n BufferedReader reader = new BufferedReader(new FileReader(inFile));\n String line = null;\n while ((line=reader.readLine()) != null) { // loop as long as there are input lines \n if(line.contains(\"id,delta\")) \n continue; // skip header\n String str = line.trim(); \n // line fields are: id, delta, start1..400, stop1..400\n String[] tokens = str.split(\",\"); \n int row_id = Integer.parseInt( tokens[0] );\n int delta = Integer.parseInt( tokens[1] );\n int[][] startBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n int[][] stopBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n for(int col=0; col<Consts.BOARD_SIDE; col++) { \n for(int row=0; row<Consts.BOARD_SIDE; row++) {\n if(format==\"train\") { \n // train format: id, delta, start.1-start.400, stop.1-stop.400\n // note column major order!\n int startIndex = col*Consts.BOARD_SIDE + row + 2; \n int stopIndex = startIndex + Consts.BOARD_SIDE*Consts.BOARD_SIDE;\n startBoard[row][col]= Integer.parseInt( tokens[startIndex] );\n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n } \n if(format==\"test\") {\n // test format is: id, delta, stop.1-stop.400\n // note column major order!\n int stopIndex = col*Consts.BOARD_SIDE + row + 2; \n startBoard = null; \n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n }\n }\n }\n boardPairs.add( new BoardPair(row_id, delta, startBoard, stopBoard) );\n } \n reader.close(); \n } catch (IOException e) {\n System.out.println(\"ERROR reading: \" + inFileName);\n }\n return boardPairs;\n }", "public String[][] toRawArray(String fileName, int rows) throws FileNotFoundException{\n String[][] toReturn = new String[5][rows];\n Scanner file = new Scanner(new File(fileName+\".csv\"));\n file.nextLine();\n file.nextLine();\n for(int j=0; j<rows; j++){ //each row\n String line = file.nextLine();\n String[] lineSplit = line.split(\",\");\n for (int i=0; i<5; i++){\n toReturn[i][j] = lineSplit[i]; //fill columns, hold row constant\n } \n } \n return toReturn; \n }", "public void initBasicBoardTiles() {\n\t\ttry {\n\t\t\tfor(int i = 1 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.BLACK).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.WHITE).build());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 2 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.WHITE).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.BLACK).build());\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(LocationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Map(String input) {\n row = 0;\n col = 0;\n\n String line;\n Scanner fin = null;\n try\n {\n fin = new Scanner(new File(input));\n }\n catch (FileNotFoundException x)\n {\n System.out.println(\"Error: \" + x);\n System.exit(0);\n }\n // Take first line and get mapLength and mapHeight. Initialize map array\n line = fin.nextLine();\n String[] temp = line.split(\" \");\n maxR = Integer.parseInt(temp[0].toString());\n maxC = Integer.parseInt(temp[1].toString());\n map = new String[maxR][maxC];\n\n for(int j = 0; j < maxR; j++) {\n line = fin.nextLine();\n for(int i = 0; i < maxC; i++){\n map[j][i] = (line.charAt(i)) + \"\";\n }\n }\n }" ]
[ "0.6305296", "0.616648", "0.59933823", "0.59119606", "0.57479405", "0.5641074", "0.56260026", "0.5608079", "0.55428606", "0.5465058", "0.54523224", "0.5451351", "0.5344596", "0.532929", "0.5309458", "0.52967495", "0.5284891", "0.52680105", "0.52440286", "0.5235653", "0.52338547", "0.52123564", "0.52123266", "0.5211099", "0.51927465", "0.51634157", "0.51550573", "0.5142748", "0.5141143", "0.5119232", "0.51163054", "0.5108473", "0.5099033", "0.50982046", "0.50916815", "0.50869906", "0.5083855", "0.5078489", "0.50769776", "0.5062959", "0.506171", "0.5057861", "0.5049674", "0.50252396", "0.49839628", "0.49782184", "0.49738607", "0.49642146", "0.49540272", "0.49505225", "0.49500668", "0.4947939", "0.49475008", "0.49329972", "0.49292445", "0.49223575", "0.492165", "0.49088693", "0.4902683", "0.48979428", "0.4889452", "0.48815563", "0.48791802", "0.48607346", "0.4845856", "0.4839965", "0.48397717", "0.48340288", "0.4831101", "0.48305863", "0.482393", "0.4821035", "0.48160976", "0.48120227", "0.48116267", "0.4808452", "0.48051116", "0.48046118", "0.48040235", "0.47907686", "0.47885472", "0.47864977", "0.4784758", "0.47670296", "0.47655123", "0.47577322", "0.47534928", "0.47461244", "0.47426897", "0.47409996", "0.47397563", "0.47306436", "0.47295955", "0.4726273", "0.4721557", "0.47183284", "0.4698204", "0.469091", "0.46896234", "0.46878597" ]
0.81740165
0
Created by Administrator on 2017/10/21 0021.
public interface Shape { void draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public void mo38117a() {\n }", "public final void mo51373a() {\n }", "public Pitonyak_09_02() {\r\n }", "public void mo4359a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void mo6081a() {\n }", "public void mo55254a() {\n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo12930a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo1531a() {\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}", "public void create() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "zzang mo29839S() throws RemoteException;", "public void mo21877s() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo3376r() {\n }", "protected void mo6255a() {\n }", "private TMCourse() {\n\t}", "@Override\n public int describeContents() { return 0; }", "Petunia() {\r\n\t\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}", "private void getStatus() {\n\t\t\n\t}", "public void mo9848a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo21878t() {\n }", "private static void oneUserExample()\t{\n\t}", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "private void m50366E() {\n }", "public final void mo91715d() {\n }", "@Override\n\tpublic void create() {\n\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public void mo115190b() {\n }", "private CreateDateUtils()\r\n\t{\r\n\t}", "public void mo21779D() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo21785J() {\n }", "public void designBasement() {\n\t\t\r\n\t}", "public void autoDetails() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "public static void listing5_14() {\n }", "public void mo21825b() {\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public void mo21793R() {\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public void mo97908d() {\n }", "zzana mo29855eb() throws RemoteException;", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void mo21795T() {\n }", "public void mo21791P() {\n }", "private void kk12() {\n\n\t}", "public void mo115188a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "public void verarbeite() {\n\t\t\r\n\t}", "@Override\n public Date getCreated()\n {\n return null;\n }", "public void mo56167c() {\n }", "public void mo3749d() {\n }", "public void mo44053a() {\n }", "public contrustor(){\r\n\t}", "@Override\n protected void getExras() {\n }", "private void poetries() {\n\n\t}", "zzafe mo29840Y() throws RemoteException;", "public void gored() {\n\t\t\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "protected boolean func_70814_o() { return true; }", "public void mo21792Q() {\n }", "@Override\n protected void initialize() \n {\n \n }", "public void mo21783H() {\n }", "private void init() {\n\n\t}", "public void mo21794S() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "private CompareDB () {\n\t\tthrow new UnsupportedOperationException();\n\t}" ]
[ "0.6115777", "0.5824288", "0.58167946", "0.58060396", "0.57246274", "0.5711049", "0.5709327", "0.5709327", "0.5709327", "0.5709327", "0.5709327", "0.5709327", "0.5709327", "0.5692206", "0.56470144", "0.56305605", "0.562322", "0.5622527", "0.5620791", "0.5618742", "0.56011224", "0.5556753", "0.5549724", "0.5548154", "0.5544501", "0.5538418", "0.55285233", "0.55037826", "0.55037826", "0.55005074", "0.5493121", "0.5483035", "0.5472601", "0.54709226", "0.5468734", "0.54664516", "0.54662675", "0.54655546", "0.5462753", "0.54558474", "0.54521936", "0.5450151", "0.5448593", "0.5445915", "0.5431651", "0.5413976", "0.5402504", "0.5402504", "0.5388811", "0.53875166", "0.53845876", "0.5383708", "0.5369234", "0.5364408", "0.5361018", "0.5357491", "0.53535664", "0.5351661", "0.5351066", "0.5344952", "0.53403676", "0.5337898", "0.53359836", "0.53308725", "0.5324183", "0.5322384", "0.5314869", "0.53146553", "0.5314297", "0.5314101", "0.5308184", "0.5305803", "0.5303738", "0.53036743", "0.53032786", "0.5293934", "0.5283252", "0.5281481", "0.5277129", "0.52759147", "0.5272311", "0.52700007", "0.5268182", "0.5267039", "0.526345", "0.52629626", "0.5262835", "0.52599525", "0.5255564", "0.5254698", "0.5248313", "0.52417445", "0.5238427", "0.52374756", "0.52341723", "0.5230796", "0.5228951", "0.5227303", "0.5224875", "0.522435", "0.52229106" ]
0.0
-1
Scanner in = new Scanner(new BufferedReader(new FileReader("meetings.in"))); PrintWriter out = new PrintWriter(new FileWriter("meetings.out"));
public static void main(String[] args) { Map<Integer, Character> cows = new HashMap<Integer, Character>(); List<Edge> tree = new ArrayList<Edge>(); Scanner in = new Scanner(System.in); int n = in.nextInt(), m = in.nextInt(); String cowsStr = in.next(); for (int i = 1; i <= cowsStr.length(); i++) cows.put(i, cowsStr.charAt(i - 1)); for (int i = 0; i < n - 1; i++) tree.add(new Edge(in.nextInt(), in.nextInt())); Collections.sort(tree); System.out.println(cows); System.out.println(tree); for (int i = 0; i < m; i++) { int start = in.nextInt(), end = in.nextInt(); char cow = in.next().charAt(0); in.nextLine(); System.out.println(start + ", " + end + ", " + cow); boolean allGood = false; if (start == end) { allGood = cows.get(start) == cow; System.out.println(allGood); continue; } int index = indexOfEnd(tree, end); while (tree.get(index).a != start) { if (cows.get(tree.get(index).a) == cow || cows.get(tree.get(index).b) == cow) { allGood = allGood || true; break; } index = indexOfEnd(tree, tree.get(index).a); if (index == -1) break; System.out.println("current edge: " + tree.get(index)); } System.out.println(allGood); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public Game(BufferedReader in, PrintWriter out) {\n \tthis.in= in;\n \tthis.out =out;\n}", "public void readAndWrite() {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.nextLine();\n List<String> passedFiles = new ArrayList<>();\n copy(new File(s), true, passedFiles);\n\n }", "public static void main(String[] arg) {\n\t\tBufferedReader br = new BufferedReader(\r\n\t\t new FileReader(\"input.in\"));\r\n\r\n\t\t// PrintWriter class prints formatted representations\r\n\t\t// of objects to a text-output stream.\r\n\t\tPrintWriter pw = new PrintWriter(new\r\n\t\t BufferedWriter(new FileWriter(\"output.in\")));\r\n\r\n\t\t// Your code goes Here\r\n\r\n\t\tpw.flush();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString x = sc.nextLine();\r\n\r\n\t\tSystem.out.println(\"hello world \" + x);\r\n\t}", "public void whatGame() throws IOException{\n try{\n inFile = new Scanner(new File(\"output.txt\"));\n } catch (InputMismatchException e) {\n System.err.printf(\"ERROR: Cannot open %s\\n\", \"output.txt\");\n System.exit(1);\n }\n \n gameNumber = inFile.nextInt();\n System.out.println(gameNumber);\n inFile.close();\n \n try {\n outFile = new PrintWriter(\"output.txt\");\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n outFile.print(gameNumber+1);\n outFile.close();\n \n }", "public static void main(String[] args) throws java.io.IOException {\n\t\tPrintWriter pw = new PrintWriter (new FileWriter(\"writefile\"));\r\n\t\tSystem.out.print(\"Please enter Phone Number: \");\r\n\t\tphoneNumber=input.next();\r\n\t\tSystem.out.print(\"Please enter Contact Name: \");\r\n\t\tcontactName=input.next();\r\n\t\tSystem.out.println(\"Name: \" + contactName + \"\\tNumber: \" + phoneNumber);\r\n\t\tSystem.out.println(\"Starting printing to text file...\");\r\n\t\tpw.println(\"Name: \" + contactName + \" <Number: \" + phoneNumber);\r\n\t\tpw.close();\r\n\t\t\r\n\r\n\t}", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static void files(Scanner input) throws FileNotFoundException { \n File inputName = inputVerify(input); // call inputVerify method to get the name of the input file \n\n System.out.print(\"Output file name: \"); // ask user for output file name and save it to outputFile variable \n\t\tString outputName = input.next();\n\n Scanner inputFile = new Scanner(inputName); // reads input file\n\n // creates a new PrintStream object to print to the output file\n PrintStream output = new PrintStream(new File(outputName)); \n\n // while loop that runs as long as the input file has another line\n while (input.hasNextLine()){\n String line = inputFile.nextLine(); // reads entire line\n output.println(line + \":\"); // prints name to file\n String scoreLine = inputFile.nextLine(); // reads next line\n abCount(scoreLine, output); // call abCount method\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tFile inFile = new File(\"result/in.txt\");\n\t\tFile outFile = new File(\"result/out.txt\");\n\t\tint begin = 4;\n\t\t\n\t\tScanner cs = new Scanner(inFile);\n\t\tPrintWriter out = new PrintWriter(outFile);\n\t\t\n\t\twhile(cs.hasNextLine())\n\t\t{\n\t\t\tString line = cs.nextLine();\n\t\t\tline = line.substring(begin);\n\t\t\tout.println(line);\n\t\t}\n\t\tcs.close();\n\t\tout.close();\n\t\t\n\t}", "public void blankremover(String args) {\r\n\r\n Scanner file;\r\n PrintWriter writer;\r\n\r\n try {\r\n\r\n file = new Scanner(new File(args));\r\n writer = new PrintWriter(\"gpstest100.txt\");\r\n\r\n while (file.hasNext()) {\r\n String line = file.nextLine();\r\n if (!line.isEmpty()) {\r\n writer.write(line);\r\n writer.write(\"\\n\");\r\n }\r\n }\r\n\r\n file.close();\r\n writer.close();\r\n\r\n } catch (FileNotFoundException ex) {\r\n //Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);\r\n \t \r\n } \r\n \r\n}", "public void generate() throws FileNotFoundException, UnsupportedEncodingException {\n\t\twriter = new PrintWriter(outputFile, \"UTF-8\");\n\t\tFile file = new File(inputFile);\n\t\treader = new Scanner(file);\n\t\tinitializeFile();\n\t\t\n\t\tString line = readLine();\n\t\twhile (line != null) {\n\t\t\tprocess(line);\n\t\t\tline = readLine();\n\t\t}\n\t\t\n\t\tfinishFile();\n\t\twriter.close();\n\t}", "public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }", "public static void appendFile(PrintWriter pw, String file) throws IOException {\n\t\tfw = new FileWriter(file, true);\n\t\tmyFile = new File(file);\n\t\t//allows me to read file\n\t\tinFile = new Scanner(myFile);\n\t\t\n\t}", "public static void echoFile(Scanner in) {\n }", "public static void saveData() throws FileNotFoundException {\t\n\t\t\t\n\tScanner inputStream = new Scanner(new File(\"bookings.dat\"));\n\t\ttry {\n\t\t\t\n\t\t\tBookingList.surName = inputStream.nextLine();\n\t\t\tBookingList.tableNo = inputStream.nextLine();\n\t\t\tBookingList.sittingTime = inputStream.nextLine();\n\t\t\tBookingList.partyOf = inputStream.nextLine();\n\t\t\t\t\n\t\t\tBooking<?> bookingData = new Booking<Object>(null, surName, tableNo, sittingTime, partyOf);\n\t\t\tb1.insert(bookingData);\n\t\t\t\t\n\t\t}finally {\n\t\t\tinputStream.close();\n\t\t}\n\t\t\t\n\t}", "public static void main (String [] args) throws IOException {\n BufferedReader f = new BufferedReader(new FileReader(\"test.in\"));\n // input file name goes above\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"test.out\")));\n // Use StringTokenizer vs. readLine/split -- lots faster\n StringTokenizer st = new StringTokenizer(f.readLine());\n\t\t\t\t\t\t // Get line, break into tokens\n int i1 = Integer.parseInt(st.nextToken()); // first integer\n int i2 = Integer.parseInt(st.nextToken()); // second integer\n out.println(i1+i2); // output result\n out.close(); // close the output file\n}", "public void setupFiles() {\n File inputDataFile = new File(inputFileName);\n try {\n inputFile = new Scanner(inputDataFile);\n FileWriter outputDataFileOA = new FileWriter(outputFileNameOA);\n FileWriter outputDataFileLL = new FileWriter(outputFileNameLL);\n outputFileOA = new PrintWriter(outputDataFileOA);\n outputFileLL = new PrintWriter(outputDataFileLL);\n outputFileOA.println(\"Output from open addressing hash table:\");\n outputFileOA.println();\n outputFileLL.println(\"Output from linked list hash table:\");\n outputFileLL.println();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static int addPersonToFile(String name, String phoneNo, String email, String address){\r\n FileWriter fr = null;\r\n BufferedWriter br = null;\r\n PrintWriter pr = null;\r\n\r\n if (name.length() == 0) return 1; //nameField is empty\r\n if (phoneNo.length() == 0) return 2; //phoneNoField is empty\r\n if (email.length() == 0) return 3; //emailField is empty\r\n if (address.length() == 0) return 4; //addressField is empty\r\n\r\n int validate = phoneNoValidator(phoneNo);\r\n if (validate == 1) return 5; //phone number is not in correct format.\r\n validate = emailValidator(email);\r\n if (validate == 1) return 6; //email isn't in correct format.\r\n\r\n try{\r\n fr = new FileWriter(file, true);\r\n br = new BufferedWriter(fr);\r\n pr = new PrintWriter(br);\r\n Scanner scanner = new Scanner(file);\r\n\r\n String content = name+separator+phoneNo+separator+email+separator+address;\r\n\r\n while (scanner.hasNext()){\r\n String line = scanner.nextLine();\r\n if (content.equals(line)){\r\n return 7; //person already exists.\r\n }\r\n }\r\n\r\n if (contentSet.contains(content))\r\n return 7;\r\n\r\n /*kept this hashSet so that if someone accidentally presses the addPersonButton\r\n *repeatedly it can quickly tell that this person has already been added.\r\n */\r\n\r\n else {\r\n contentSet.add(content);\r\n pr.println(content);\r\n }\r\n\r\n }catch (IOException e){\r\n fileError();\r\n e.printStackTrace();\r\n }finally {\r\n try{\r\n if (pr != null) pr.close();\r\n if (br != null) br.close();\r\n if (fr != null) fr.close();\r\n }catch (IOException | NullPointerException e){\r\n e.printStackTrace();\r\n }\r\n }\r\n return 0;\r\n }", "private static void writeToStudentsFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(STUDENTS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tIterator<StudentDetails> iter = ALL_STUDENTS.listIterator(1); //Get all StudentDetails objects from index 1 of ALL_STUDENTS. This is because the value at index 0 is just a dummy student\n\t\twhile(iter.hasNext()){\n\t\t\tStudentDetails student = iter.next();\n\t\t\tbw.write(student.ParseForTextFile()); //writes the Parsed Form of the StudentDetails object to the students.txt file\n\t\t}\n\t\t\n\t\tbw.close();\n\t}", "static void save() {\n String fileName, line = \"\"; char answer;\n System.out.print(\"Enter file name to save: \"); fileName = scan.nextLine();\n File file = new File(fileName);\n \n if ( file.isFile() ) {\n System.out.printf(\"WARNING: %s exists.\\n\", fileName);\n System.out.print(\"Overwrite (y/n)? \");\n \n while (line.length() < 1) line = scan.nextLine().toUpperCase();\n answer = line.charAt(0);\n\n switch (answer) {\n case 'N': save(); // reprompt\n case 'Y': break; // save the file\n default: save();\n }\n }\n pgmInf.savePgmFileAs(fileName);\n System.out.println(\"Terrain file saved.\");\n }", "@org.junit.Test\r\n public void testProspectParser() {\r\n PrintWriter writer;\r\n try {\r\n writer = new PrintWriter(file);\r\n\r\n //Should be added to prospect list\r\n writer.println(\"Börje,30000,4,3\");\r\n //Should not be added to prospect list\r\n writer.println(\"Bamse,5000,fyra,3.\");\r\n //Should not be added to prospect list\r\n writer.println(\"Andersson,f,2\");\r\n //Should be added to prospect list\r\n writer.println(\"Doris,40000,5,2\");\r\n\r\n writer.close();\r\n ProspectParser p = new ProspectParser(file, namePattern, digitPattern);\r\n p.parse();\r\n int size = p.getProspects().size();\r\n\r\n assertEquals(2, size);\r\n } catch (FileNotFoundException ex) {\r\n String failStr = \"Failed to create file writer: \" + ex;\r\n Logger.getLogger(MortagePlanTest.class.getName()).log(Level.SEVERE, null, ex);\r\n fail(failStr);\r\n }\r\n }", "public static void main(String[] args) // FileNotFoundException caught by this application\n {\n\n Scanner console = new Scanner(System.in);\n System.out.print(\"Input file: \");\n String inputFileName = console.next();\n System.out.print(\"Output file: \");\n String outputFileName = console.next();\n\n Scanner in = null;\n PrintWriter out =null;\n\n File inputFile = new File(inputFileName);\n try\n {\n in = new Scanner(inputFile);\n out = new PrintWriter(outputFileName);\n\n double total = 0;\n\n while (in.hasNextDouble())\n {\n double value = in.nextDouble();\n int x = in.nextInt();\n out.printf(\"%15.2f\\n\", value);\n total = total + value;\n }\n\n out.printf(\"Total: %8.2f\\n\", total);\n\n\n } catch (FileNotFoundException exception)\n {\n System.out.println(\"FileNotFoundException caught.\" + exception);\n exception.printStackTrace();\n }\n catch (InputMismatchException exception)\n {\n System.out.println(\"InputMismatchexception caught.\" + exception);\n }\n finally\n {\n\n in.close();\n out.close();\n }\n\n }", "public static void saveDataToFile() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy MM dd, HH mm\");\n Date date = new Date();\n String fileName= dateFormat.format(date)+\".txt\";\n\n try {\n PrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n writer.print(\"Wins: \");\n writer.println(wins);\n writer.print(\"Draws: \");\n writer.println(draws);\n writer.print(\"Losses: \");\n writer.println(loses);\n writer.close();\n System.out.println(\"File Write Successful\");\n } catch (IOException e) {\n\n }\n\n\n }", "private void writeToFile(){\r\n File file = new File(\"leaderboard.txt\");\r\n\r\n try {\r\n FileWriter fr = new FileWriter(file, true);\r\n BufferedWriter br = new BufferedWriter(fr);\r\n for(Player player : this.sortedPlayers){\r\n br.write(player.toString());\r\n br.write(\"\\n\");\r\n }\r\n br.close();\r\n fr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"fileAAA.txt\");\r\n\t\tPrintWriter output = new PrintWriter(file);\r\n\t\t\r\n\t\t//write name and age to file\r\n\t\toutput.println(\"Homer Akin\");\r\n\t\toutput.println(49);\r\n\t\toutput.close();\r\n\t\t\r\n\t\tScanner input = new Scanner(file);\r\n\t\tString name = input.nextLine();\r\n\t\tint age = input.nextInt();\r\n\t\t\r\n\t\tSystem.out.printf(\"Name: %s \\nAge : %d\",name, age);\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "public static void files() throws IOException {\n\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(\"D:\\\\Text.txt\"));\n String line;\n while ((line = reader.readLine()) != null) {\n Palindroms.palindromeByReverse(line);\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"D:\\\\output.txt\")));\n writer.append(line);\n writer.close();\n }\n reader.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n System.out.println(\"Bye!\");\n }\n }", "public void input(Scanner in) { \r\n if (in.hasNext()) firstName = in.next();\r\n if (in.hasNext()) lastName = in.next();\r\n\t}", "void run() throws IOException {\n\r\n\t\treader = new BufferedReader(new FileReader(\"input.txt\"));\r\n\r\n\t\tout = new PrintWriter(new FileWriter(\"output.txt\"));\r\n\t\ttokenizer = null;\r\n\t\tsolve();\r\n\t\treader.close();\r\n\t\tout.flush();\r\n\r\n\t}", "private static void inputs(Scanner fileScanner) {\n\t\tSystem.out.printf(\"You will now need to enter in the correct pathway to the files containing: \\n\\t1.) RNA table\\n\\t2.) RNA strand\\n\\t3.) Output Protien strand (this will create a new file)\\n\");\n\t\tSystem.out.println(\"Example pathway: C:/CSC142_143/DataFiles/RNATable.txt\");\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Table: \");\n\t\tsetRNATablePathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Strand: \");\n\t\tsetRNAStrandPathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the decoded protien: \");\n\t\tsetRNAOutPathway(fileScanner.next());\n\t\tfileScanner.close();\n\t\t\n\t}", "@Test\r\n\tpublic void testSavedFile() throws FileNotFoundException {\r\n\r\n\t\tScanner in = new Scanner(new FileReader(\"FactoryScenarios/MyExample.txt\"));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\twhile (in.hasNext()) {\r\n\t\t\tsb.append(in.next());\r\n\t\t}\r\n\t\tin.close();\r\n\t\tString outString = sb.toString();\r\n\r\n\t\tString expected = \"Cell6Button4/~disp-string:hello/~repeat-button:2/~skip-button:02/~skip:3/~pause:5/~disp-clearAll\";\r\n\r\n\t\tassertEquals(expected, outString);\r\n\r\n\t}", "public static void createCleanFile(Scanner in) {\n }", "public int makePersonStructures(File inputFile) throws FileNotFoundException{\n\t\tArrayList<String> inputFileLines = new ArrayList<String>();\r\n\t\tScanner lineScanner = new Scanner(inputFile);\r\n\t\twhile(lineScanner.hasNextLine()){\r\n\t\t\tinputFileLines.add(lineScanner.nextLine());\r\n\t\t}\r\n\t\tlineScanner.close();\r\n\t\t\r\n\t\t//Now split those up by commas. \r\n\t\tfor(int i = 0; i < inputFileLines.size(); i++){\r\n\t\t\tScanner currentLineScanner = new Scanner(inputFileLines.get(i));\r\n\t\t\tcurrentLineScanner.useDelimiter(\",\");\r\n\t\t\tString personName = currentLineScanner.next();\r\n\t\t\tPerson toBeAdded = new Person();\r\n\t\t\ttoBeAdded.name = personName; //Put in the name.\r\n\t\t\t//Handle everything past the name:\r\n\t\t\tint numberOfBools = 0; //For making sure the input is formatted correctly.\r\n\t\t\tint numberOfTrues = 0; //For tracking how many available time slots there are for this person.\r\n\t\t\twhile(currentLineScanner.hasNext()){\r\n\t\t\t\tString currBool = currentLineScanner.next();\r\n\t\t\t\tint yesNoResult = yesOrNo(currBool);\r\n\t\t\t\tif(yesNoResult == 1){\r\n\t\t\t\t\ttoBeAdded.availabilityBooleans.add(true);\r\n\t\t\t\t\tnumberOfTrues++;\r\n\t\t\t\t}\r\n\t\t\t\telse if(yesNoResult == 0){\r\n\t\t\t\t\ttoBeAdded.availabilityBooleans.add(false);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcurrentLineScanner.close();\r\n\t\t\t\t\treturn -1; //Since one of the answers wasn't yes or no or whatever.\r\n\t\t\t\t}\r\n\t\t\t\tnumberOfBools++;\t\t\r\n\t\t\t}\r\n\t\t\tif(numberOfBools != toursInTheWeek){\r\n\t\t\t\tcurrentLineScanner.close();\r\n\t\t\t\treturn -2; //Since this person didn't have the right number of answers for availability. \r\n\t\t\t}\r\n\t\t\t//Update the number of available time slots for this person. \r\n\t\t\ttoBeAdded.numOfAvailableSlots = numberOfTrues;\r\n\t\t\tpersonList.add(toBeAdded);\r\n\t\t\tcurrentLineScanner.close();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}", "public void save() throws FileNotFoundException {\n PrintWriter myWriter = new PrintWriter(\"duke.txt\");\n for (Task t : TaskList.getTasklist()) {\n myWriter.println(t.toString());\n }\n myWriter.flush();\n myWriter.close();\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n\t\tFile file = new File(\"B:\\\\output.txt\");\n\t\t\n\t\tScanner input = new Scanner(file);\n\t\t\n\t\twhile(input.hasNextLine()) {\n\t\t\tString tmp = input.nextLine();\n\t\t\t\n\t\t\tSystem.out.println(tmp);\n\t\t}\n\t\tinput.close();\n\t}", "public static void registar () throws IOException, InterruptedException {\n\n clearScreen();\n\n Scanner input = new Scanner(System.in);\n File myFile = new File (\"Clientes.txt\");\n\n try {\n if(!myFile.exists()){ \n myFile.createNewFile(); // criar o ficheiro \"Clientes.txt\" caso ainda nao exista, ou seja, caso seja o primeiro utilizador a registar-se\n }\n\n\n FileWriter writer = new FileWriter(myFile, true); // variaveis para ler e escrever no ficheiro\n BufferedWriter buf = new BufferedWriter(writer);\n\n try {\n x = new Scanner(new File(\"Clientes.txt\"));\n } \n catch(Exception e){\n System.out.println(\"couldnt find file\"); // erro caso o ficheiro nao seja encontrado\n TimeUnit.SECONDS.sleep(2);\n registar();\n return;\n } \n\n System.out.println(\"\\033[1mMenu de registo: \\033[0m\\n\");\n System.out.print(\"Primeiro Nome: \");\n String nome = input.next();\n\n System.out.print(\"Email: \");\n String email = input.next();\n \n while(x.hasNext()){ // mais uma vez, cada string corresponde a um dos parametros dos utilizadores\n\n String a = x.next();\n String b = x.next();\n String c = x.next();\n String d = x.next();\n String e = x.next();\n\n if(email.equals(b)){\n System.out.println(\"\\n\\033[1mEmail already exists!\\033[0m\\n\"); // verificacao se o email já foi registado\n TimeUnit.SECONDS.sleep(2);\n registar();\n return;\n }\n }\n\n\n System.out.print(\"Username: \");\n String username = input.next();\n\n try {\n y = new Scanner(new File(\"Clientes.txt\"));\n } \n catch(Exception e){\n System.out.println(\"couldnt find file\"); // erro caso o ficheiro nao seja encontrado\n TimeUnit.SECONDS.sleep(2);\n registar();\n return;\n }\n\n while(y.hasNext()){\n\n String a = y.next();\n String b = y.next();\n String c = y.next();\n String d = y.next();\n String e = y.next();\n\n if(username.equals(c)){\n System.out.println(\"\\n\\033[1mUsername already exists!\\033[0m\\n\"); // verificao se o username ja foi registado\n TimeUnit.SECONDS.sleep(2);\n registar();\n return;\n }\n }\n\n // escrever os parametros do utilizador para o ficheiro, para ficarem assim guardados\n\n buf.write(nome); // escrever o nome\n buf.write(\" \"); // deixar um espaço\n buf.write(email); // escrever email\n buf.write(\" \"); // ...\n buf.write(username);\n\n\n buf.write(\" \");\n System.out.print(\"Password: \");\n String password = input.next();\n buf.write(password);\n buf.write(\" \");\n buf.write(\"false\");\n buf.write(\"\\n\");\n \n buf.flush();\n buf.close();\n\n System.out.println(\"\\n\\033[1mPedido de utilizador criado com sucesso!\\033[0m\");\n TimeUnit.SECONDS.sleep(2);\n\n\n\n } catch(IOException e){\n System.out.println(\"Erro\");\n registar();\n return;\n }\n }", "public static void main( String[] args ) throws Exception\n {\n ArrayList<String> sortedNames = new ArrayList<>();\n\n //accessing the input file\n File file = new File(\"src\\\\main\\\\java\\\\ex41\\\\exercise41_input.txt\");\n\n //directing scanner to read from input file\n Scanner input = new Scanner(file);\n\n\n //creating an output file\n File orderedNamesFile = new File(\"exercise41_output.txt\");\n\n //accessing the ability to write in output file\n FileWriter outputFile = new FileWriter(orderedNamesFile);\n\n\n /*using a while loop to read each line from input file and then add it to the arraylist sortedNames\n until there are no more lines*/\n while (input.hasNextLine()) {\n String name = input.nextLine();\n sortedNames.add(name);\n }\n\n //using collections function to sort the names in the arraylist\n Collections.sort(sortedNames);\n\n\n //writing in output file\n outputFile.write(\"\\nTotal of \" + sortedNames.size() + \" names: \\n\");\n outputFile.write(\"------------------------\\n\");\n\n\n //adding in the sorted names in arraylist to the output file\n for(String n : sortedNames)\n {\n outputFile.write(n + \"\\n\");\n }\n\n\n }", "public static void main(String[] args) throws Exception {\n FileOutputStream file = new FileOutputStream(\"randoms.txt\");\n PrintWriter output = new PrintWriter(file);\n\n //write 100 random numbers to the file\n\n\n\n\n //open the file for input\n\n\n\n\n //print the sorted array on the screen\n\n\n\n}", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "private void readInter() throws FileNotFoundException {\n\t\t\r\n\t\tFile file = new File(\"input.txt\");\r\n\r\n\t\tScanner input = new Scanner(file);\r\n\r\n\t\twhile (input.hasNext()) {\r\n\r\n\t\t\tint x = input.nextInt();\r\n\t\t\tint y = input.nextInt();\r\n\t\t\t\r\n\t\t\tintervals.add(new Point(x, y));\r\n\t\t}\r\n\t\t\r\n\t\t//Close 'input.txt'\r\n\t\tinput.close();\r\n\t\t\r\n\t}", "public static void setIO(String inFile, String outFile)\r\n\r\n\t// Opens the input file \"inFile\" and output file \"outFile.\"\r\n\t// Sets the current input character \"current\" to the first character on the input stream.\r\n\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tinStream = new BufferedReader( new FileReader(inFile) ); //Set the BufferedReader to read from \"inFile.\"\r\n\t\t\toutStream = new PrintWriter( new FileOutputStream(outFile) ); //Set PrintWriter to write to the output file \"outFile.\"\r\n\t\t\tcurrent = inStream.read(); //Set current to the first character in the file.\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e) //Output error message if input or output files cannot be found.\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void parseFileForInput(emailValidator sortingObject){\n File fileObj;\n try {\n fileObj = new File(sortingObject.getPath());\n Scanner scannerObj = new Scanner(fileObj);\n \n while(scannerObj.hasNextLine()){\n String currentEmail = scannerObj.nextLine();\n\n //for each email, call validate method on it\n if(isEmailValid(currentEmail) && !currentEmail.equals(\"end\")){\n String domainEnding = extractEmailEnding(currentEmail);\n sortingObject.allEmails.put(currentEmail, domainEnding);\n\n }\n else if(currentEmail.equals(\"end\")){\n scannerObj.close();\n break;\n }\n }\n scannerObj.close();\n } \n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n}", "public static void main(String[] args) {\n\t\tString ruta=\"personas.txt\";\n\t\tFile fichero = new File(ruta);\n\t\tif (!fichero.exists()) {\n\t\t\ttry {\n\t\t\t\tfichero.createNewFile();\n\t\t\t\tSystem.out.println(\"Archivo creado\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else {\n\t\t\ttry {\n\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(ruta, false));\n\t\t\t\tScanner sc = new Scanner (System.in);\n\t\t\t\tString introducir=\"\";\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"Introduce el dni de la persona:\");\n\t\t\t\t\tString dni=sc.nextLine();\n\t\t\t\t\tSystem.out.println(\"Introduce el nombre:\");\n\t\t\t\t\tString nombre=sc.nextLine();\n\t\t\t\t\tSystem.out.println(\"Introduce lo apellidos:\");\n\t\t\t\t\tString apellidos=sc.nextLine();\n\t\t\t\t\tSystem.out.println(\"Introduce la dirección:\");\n\t\t\t\t\tString direccion=sc.nextLine();\n\t\t\t\t\tSystem.out.println(\"Introduce el teléfono:\");\n\t\t\t\t\tString telefono=sc.nextLine();\n\t\t\t\t\tSystem.out.println(\"Introduce el email:\");\n\t\t\t\t\tString email=sc.nextLine();\n\t\t\t\t\tSystem.out.println(\"¿Desea introducir los datos de otra persona?\");\n\t\t\t\t\tintroducir=sc.nextLine();\n\t\t\t\t\tbw.write(dni +\"//\"+nombre +\"//\"+apellidos +\"//\"+direccion +\"//\"+ telefono + \"//\" + email);\n\t\t\t\t\tbw.newLine();\n\t\t\t\t}while(introducir.equalsIgnoreCase(\"si\"));\n\t\t\t\tbw.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n Scanner scanner = new Scanner(new FileInputStream(\"/Users/guoziren/IdeaProjects/剑指offer for Java/src/main/java/com/ustc/leetcode/algorithmidea/dynamicprogramming/input.txt\"));\n }", "public static void main(String[] args) throws IOException {\n Scanner f = new Scanner(System.in);\n //BufferedReader f = new BufferedReader(new FileReader(\"uva.in\"));\n //BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n while(f.hasNext()) {\n int kingPos = f.nextInt();\n int queenPos = f.nextInt();\n int nextQueenPos = f.nextInt();\n int kingRow = kingPos/8;\n int kingCol = kingPos%8;\n int queenRow = queenPos/8;\n int queenCol = queenPos%8;\n int nextQueenRow = nextQueenPos/8;\n int nextQueenCol = nextQueenPos%8;\n if(kingRow == queenRow && kingCol == queenCol) {\n out.println(\"Illegal state\");\n } else if((queenRow == nextQueenRow && queenCol == nextQueenCol) || (queenRow != nextQueenRow && queenCol != nextQueenCol) || inBetween(kingRow,kingCol,queenRow,queenCol,nextQueenRow,nextQueenCol)) {\n out.println(\"Illegal move\");\n } else if((Math.abs(nextQueenRow-kingRow) == 1 && Math.abs(nextQueenCol-kingCol) == 0) || (Math.abs(nextQueenRow-kingRow) == 0 && Math.abs(nextQueenCol-kingCol) == 1)) {\n out.println(\"Move not allowed\");\n } else if((kingRow == 0 && kingCol == 0 && nextQueenRow == 1 && nextQueenCol == 1) || (kingRow == 0 && kingCol == 7 && nextQueenRow == 1 && nextQueenCol == 6) || (kingRow == 7 && kingCol == 0 && nextQueenRow == 6 && nextQueenCol == 1) || (kingRow == 7 && kingCol == 7 && nextQueenRow == 6 && nextQueenCol == 6)) {\n out.println(\"Stop\");\n } else {\n out.println(\"Continue\");\n }\n }\n f.close();\n out.close();\n }", "public void readFile()\r\n\t{\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tx = new Scanner(new File(\"clean vipr measles results.txt\"));\r\n\t\t\t\r\n\t\t\twhile (x.hasNext())\r\n\t\t\t{\r\n\t\t\t\tString a = x.next();\r\n\t\t\t\tString b = x.next();\r\n\t\t\t\tString c = x.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.printf(\"%s %s %s \\n\\n\", a,b,c);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tx.close();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"file not found\");\r\n\t\t}\r\n\t\r\n\t}", "public void recordOrder(){\n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){//throws exception\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Coffee);//prints in file contents of Coffee\n output.close();//closes file\n }", "public static void main(String[] args) throws IOException {\nFileInputStream fin=new FileInputStream(\"C:\\\\\\\\Users\\\\\\\\Dell\\\\\\\\Desktop\\\\\\\\input.txt\");\nFileOutputStream fout=new FileOutputStream(\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\Dell\\\\\\\\\\\\\\\\Desktop\\\\\\\\\\\\\\\\output.txt\");\nint c=0;\nwhile((c=fin.read())!=-1)\n{\n\tfout.write(c);\n}\nSystem.out.println(\"written completed\");\n\t}", "public static void storeDataIntoFile() {\n\r\n try {\r\n FileWriter writer = new FileWriter(\"DetailsOfVaccination.txt.txt\");\r\n writer.write(\"Vaccination booth info - First names-\" + Arrays.toString(firstName)); //Write the patients first name\r\n writer.write(\"\\n Patient's surnames - \" + Arrays.toString(surname)); //Write the patients surname\r\n writer.write(\"\\n Number of remaining vaccines = \" + vaccines); //Write the remaining of vaccines in stock\r\n writer.close();\r\n System.out.println(\"Successfully stored data into the file.\");\r\n }\r\n catch (IOException e) { //Runs if there was an error in file\r\n System.out.println(\"An error occurred while storing data into the file. Please try again.\");\r\n e.printStackTrace(); //Tool used to handle exceptions and errors (gives the line number and class name where exception happened)\r\n }\r\n }", "public static void enterNewTXTFile(String input, String id, String newName, String newHandle, String newTime, String newTweet)\n {\n try {\n String str = Integer.parseInt(id)+ \" \" +newName+ \" \" +newHandle+ \" \" +newTime+ \" \" +newTweet+ \" \";\n writer = new BufferedWriter(new FileWriter(input, true)); // continue to write to existing output file\n writer.write(str);\n writer.newLine();\n writer.close();\n \n } catch (Exception e) { System.out.println(e); }\n }", "private void createWinnerScheduleFile() {\n try {\n File scheduleFile = new File(filePath, \"winners.txt\");\n\n OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(scheduleFile), StandardCharsets.UTF_8);\n osw.write(\"WINNERS:\\n\" + winnerSchedule);\n osw.close();\n\n System.out.println(\"winners.txt successfully created.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main (String arg[]) throws FileNotFoundException {\n\t\t\n \tScanner fin = new Scanner(new FileReader(\"input.txt\"));\n \tPrintWriter writer = new PrintWriter(\"output.txt\");\n\t\t\n\t\twhile (true) {\n\t\t\t\n\t\t\tString input = fin.nextLine();\n\t\t\tif (input.compareTo(\"0\") == 0) break;\n\t\t\t\n\t\t\tboolean[] array = new boolean[input.length()];\n\t\t\tfor (int i = 1; i < input.length(); i++) {\n\t\t\t\tarray[i] = (input.substring(i, i+1).compareTo(\"1\") == 0) ? true : false;\n\t\t\t}\n\t\t\t\n\t\t\tQueue<Integer> answer = new LinkedList<Integer>();\n\t\t\t\n\t\t\tfor (int i = 1; i < input.length(); i++) {\n\t\t\t\t\n\t\t\t\tif (array[i] == false) continue;\n\t\t\t\t\n\t\t\t\tanswer.add(i);\n\t\t\t\t\n\t\t\t\tfor (int j = i; j < input.length(); j += i) {\n\t\t\t\t\tarray[j] = !array[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\twhile (answer.peek() != null) {\n\t\t\t\t\n\t\t\t\tint out = answer.poll();\n\t\t\t\tSystem.out.println(out);\n\t\t\t\twriter.print(out);\n\t\t\t\tif (answer.peek() != null) writer.print(\" \");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\twriter.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tfin.close();\n\t\twriter.close();\n\t\t\n\t}", "private static void writeToBooksFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(BOOKS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tSet<Integer> keys = ALL_BOOKS.keySet(); //returns list of all keys in ALL_BOOKS\n\t\tfor(int key : keys){\n\t\t\tbw.write(ALL_BOOKS.get(key).ParseForTextFile()); //writes the Parsed Form of the BookDetails object to the books.txt file\n\t\t}\n\t\tbw.close();\n\t}", "public static void main(String args[]) throws FileNotFoundException{\n\t\tFile file = new File(\"input.txt\");\r\n\t\tScanner scan = new Scanner(file);\r\n\t\twhile (scan.hasNext()) {\r\n\t\t\tString fName = scan.next();\r\n\t\t\tString lName = scan.next();\r\n\t\t\tSystem.out.println(\"Full name is: \" + fName + \" \" + lName);\r\n\t\t}\r\n\t\t\tscan.close();\r\n\t\t\r\n\t}", "public void new_record()\n {\n /*\n Prompt for data:\n Last name\n First name\n Phone\n */\n \n //Craete a scanner object\n Scanner kb = new Scanner(System.in);\n \n //prompt for the last name\n System.out.print(\"Last name: \");\n \n //input the last name\n String lastName = kb.nextLine();\n \n //the Last_name must not be empty\n if(lastName.length() > 0 )\n {\n //get the first name and the phone\n System.out.print(\"First name: \");\n String firstName = kb.nextLine();\n \n System.out.print(\"Phone: \");\n String phone = kb.nextLine(); \n \n \n \n //create the output string\n \n \n \n \n //delare variables to hold file types\n FileWriter fWrite = null;\n \n //try to open the file for writing - append the data\n try\n {\n fWrite = new FileWriter(new File(filename), true);\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception opening the file for writing\");\n }\n //try to wrtie the data\n try\n {\n fWrite.write(lastName + \",\" + firstName + \",\" + phone + \"\\n\");\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception writing to the file\");\n }\n //try to close the file\n try\n {\n fWrite.close();\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception closing the file\");\n }\n \n }//end of test of Last_name\n \n }", "public static void main (String[] args) throws IOException\n {\n RandomAccessFile in = new RandomAccessFile (\"ride.in\", \"r\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"ride.out\")));\n \n // declares two strings--reads and assigns them from the input file\n String cometName = in.readLine();\n String groupName = in.readLine();\n \n // declares and initializes two integer variables for storing calculations\n int cometNum = 1, groupNum = 1;\n \n // declares and initializes two constant variables\n final int ASCII_OFFSET_UPPERCASE = 64, MOD_VALUE = 47;\n \n // translates letters to ASCII code\n for(int k = 0; k < cometName.length(); k++)\n {\n cometNum *= cometName.charAt(k) - ASCII_OFFSET_UPPERCASE;\n cometNum %= MOD_VALUE;\n }\n for(int k = 0; k < groupName.length(); k++)\n {\n groupNum *= groupName.charAt(k) - ASCII_OFFSET_UPPERCASE;\n groupNum %= MOD_VALUE;\n }\n \n // checks if group and comet numbers are equal\n if(groupNum == cometNum)\n {\n out.println(\"GO\");\n }\n else\n {\n out.print(\"STAY\\n\");\n }\n \n // ensures the program ends properly\n out.close();\n System.exit(0);\n }", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new FileReader(\"cave.in\"));\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"cave.out\")));\n new cave(in, out);\n in.close();\n out.close();\n }", "public static void saveAll(Scanner console, Participant[] participants) throws FileNotFoundException {\n System.out.println();\n printHighlighted(\"SAVE ALL PARTICIPANTS NAMES, EMAILS, AND THEIR PAIRINGS TO A FILE\");\n \n if (allHaveMatches(participants)) {\n printHighlighted(\"Enter a desired name for the file (without a file extension).\");\n printHighlighted(\"THIS WILL OVERWRITE ANY EXISTING FILE WITH THE SAME NAME.\");\n \n File outputFile = promptFile(console);\n PrintStream fileOutput = new PrintStream(outputFile);\n \n for (int i = 0; i < participants.length; i++) {\n Participant person = participants[i];\n fileOutput.println(\"Participant #\" + (i + 1));\n fileOutput.println(\"Name: \\\"\" + person.getName() + \"\\\"\"); \n fileOutput.println(\"Email: \\\"\" + person.getEmail() + \"\\\"\");\n fileOutput.println(\"Sender (their Secret Santa): \\\"\" + person.getSenderName() + \"\\\"\");\n fileOutput.println(\"Recipient: \\\"\" + person.getRecipientName() + \"\\\"\");\n fileOutput.println();\n }\n } else {\n printHighlighted(\n \"There are no pairings created for the participants yet.\");\n System.out.println();\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\t\n\t\tScanner scan = new Scanner(new File(\"input.txt\"));\n\t\t\n\t\tParser parse;\n\t\tCode code = new Code();\n\t\tSymbolTable st = new SymbolTable();\n\t\t\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString inCode = scan.nextLine();\t\n\t\t\tparse = new Parser(inCode);\n\t\t}\n\t\t\n\t}", "public static void cleanFile(Scanner in) {\n }", "static void recordProcess() {\n try {\n PrintWriter output = new PrintWriter(new FileWriter(file, true));\n output.print(huLuWaList.size() + \" \");\n lock.lock();\n for (Creature creature : huLuWaList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.print(enemyList.size() + \" \");\n for (Creature creature : enemyList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.println();\n output.close();\n lock.unlock();\n }catch (Exception ex){\n System.out.println(ex);\n }\n }", "public static void mainx(String[] args) {\n\t\tPrintWriter outputFile = null;\r\n\t\t\r\nSystem.out.println(\"Test Teacher Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"teacherdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>ZAK_B\");\r\n\t\toutputFile.println(\"<NAME>Zakaria Baani\");\r\n\t\toutputFile.println(\"<EMAIL>[email protected]\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>MAH_E\");\r\n\t\toutputFile.println(\"<NAME>Mahmoud Eid\");\r\n\t\toutputFile.println(\"<EMAIL>[email protected]\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>BRI_J\");\r\n\t\toutputFile.println(\"<NAME>Brian Jenson\");\r\n\t\toutputFile.println(\"<EMAIL>[email protected]\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\tTeacherDictionary teachers = new TeacherDictionary();\r\n\t\tSystem.out.println(teachers);\r\n\t\t\r\n\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"classdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\nSystem.out.println(\"Test Room Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"roomdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>W101\");\r\n\t\toutputFile.println(\"<NAME>West 101\");\r\n\t\toutputFile.println(\"<CAPACITY>25\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>E2213\");\r\n\t\toutputFile.println(\"<NAME>East 2213\");\r\n\t\toutputFile.println(\"<CAPACITY>45\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>E1001\");\r\n\t\toutputFile.println(\"<NAME>East 1001\");\r\n\t\toutputFile.println(\"<CAPACITY>60\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\tRoomDictionary rooms = new RoomDictionary();\r\n\t\tSystem.out.println(rooms);\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * class\r\n\t\t * \r\n\t\t * <ENTRYSTART>\r\n\t\t * <TITLE>\r\n\t\t * <TEACHER>\r\n\t\t * <STUDENTCOUNT>\r\n\t\t * <STUDENTLIST>\r\n\t\t * <SCHEDULE>\r\n\t\t * <ENTRYEND>\r\n\t\t * \r\n\t\t */\r\n\t\t\r\n\t\tSystem.out.println(\"Test Class Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"classdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<TITLE>MATH 2081_1\");\r\n\t\toutputFile.println(\"<TEACHER>BRIAN_J\");\r\n\t\toutputFile.println(\"<SCHEDULE>MATH 2081_1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTCOUNT>15\");\r\n\t\toutputFile.println(\"<STUDENTLIST>CATHY4\");\r\n\t\toutputFile.println(\"<STUDENTLIST>DAN5\");\r\n\t\toutputFile.println(\"<STUDENTLIST>EVE6\");\r\n\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<TITLE>PHYS 1082_1\");\r\n\t\toutputFile.println(\"<TEACHER>MAHMOOD_E\");\r\n\t\toutputFile.println(\"<SCHEDULE>PHYS 1082_1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTCOUNT>20\");\r\n\t\toutputFile.println(\"<STUDENTLIST>FRANK7\");\r\n\t\toutputFile.println(\"<STUDENTLIST>GRACE8\");\r\n\t\toutputFile.println(\"<STUDENTLIST>HENRY9\");\r\n\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\t\t\toutputFile.println(\"<TITLE>CSCI 1082_2\");\r\n\t\t\t\toutputFile.println(\"<TEACHER>ZACH_B\");\r\n\t\t\t\toutputFile.println(\"<SCHEDULE>CSCI 1082_2\");\r\n\t\t\t\t\t\toutputFile.println(\"<STUDENTCOUNT>15\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>AARON1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>AMY2\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>BOB3\");\r\n\t\t\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\t///\r\n\t\t//DictionaryFile testDictionary = new DictionaryFile(\"classdictionary.txt\",\"ClassDictionary\");\r\n\t\tClassDictionary testDictionary = new ClassDictionary();\r\n//\t\tSystem.out.println(testDictionary.getEntryCount());\r\n//\t\tSystem.out.println(testDictionary.getOpenStatus());\r\n//\t\tSystem.out.println(testDictionary.isValid());\r\n\t\tSystem.out.println(testDictionary);\r\n\t\t\r\n\t\tCalendar calendar = new GregorianCalendar();\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHH\");\r\n\t\tSystem.out.println(df.format(calendar.getTime()));\r\n\r\n\t}", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "public void convertInputToOutput() throws FileNotFoundException {\n PrintWriter outputFile = null;\n Scanner input = null;\n int eval = 0;\n String post = \"\";\n try {\n File file = new File(\"..\\\\COSC602_P3_Input.txt\");\n outputFile = new PrintWriter(\"..\\\\COSC602_P3_Output_bkinney0.txt\");\n input = new Scanner(file);\n }\n catch(FileNotFoundException ex){\n System.out.println(\"Error openeing files\");\n throw ex;\n }\n while (input.hasNextLine()) {\n \n String line = input.nextLine();\n String exp = line.replaceAll(\"\\\\s\", \"\"); \n if (!exp.isEmpty()){\n outputFile.println(\"Original Infix: \" + line);\n try{\n post = this.convertInfix(exp); \n }\n catch(NumberFormatException numberException){\n outputFile.println(\"**Invalid Expression** \\n\\n\");\n continue; \n }\n try{\n eval = this.evalPostfix(post);\n }\n catch(NullPointerException nullException){\n outputFile.println(\"**Invalid Expression** \\n\\n\");\n continue; \n } \n \n outputFile.println(\"Corresponding Postfix: \" + post ); \n outputFile.println(\"Evaluation Result: =\"+eval +\" \\n\\n\");\n }\n } \n \n input.close();\n outputFile.close();\n }", "public static void main(String[] args) {\n BufferedReader console = new BufferedReader(\r\n new InputStreamReader(System.in));\r\n System.out.print(\"Please enter data file names: \");\r\n \r\n String params = null;\r\n try {\r\n \tparams = console.readLine();\r\n } catch (IOException e) {\r\n \tparams = null;\r\n }\r\n if (params == null) {\r\n \tSystem.out.print(\"Please enter valid file names.\");\r\n \treturn;\r\n }\r\n \r\n StringTokenizer token = new StringTokenizer(params, \",\");\r\n String[] inputParams = new String[100];\r\n int count = 0;\r\n while (token.hasMoreTokens())\r\n \tinputParams[count++] = token.nextToken().trim();\r\n \r\n String[] inputFiles = new String[count];\r\n System.arraycopy(inputParams, 0, inputFiles, 0, count);\r\n \r\n // Start program\r\n Log log = Log.getInstance();\r\n \r\n scanners = new Scanner[inputFiles.length];\r\n writers = new PrintWriter[inputFiles.length];\r\n filenames = inputFiles;\r\n \r\n for (int i = 0; i < inputFiles.length; i++) {\r\n try {\r\n scanners[i] = new Scanner(new File(inputFiles[i]));\r\n } catch (IOException e) {\r\n System.out.println(\"Could not open input file \" + inputFiles[i] + \" for reading.\");\r\n System.out.println(\"Please check if file exists! \" +\r\n \"Program will terminate after closing any opened files.\");\r\n closeScanners();\r\n return;\r\n }\r\n }\r\n \r\n for (int i = 0; i < inputFiles.length; i++) {\r\n try {\r\n writers[i] = new PrintWriter(getJson(inputFiles[i]));\r\n } catch (IOException e) {\r\n System.out.println(\"Could not open input file \" + inputFiles[i] + \" for writing.\");\r\n System.out.println(\"Program will terminate after closing any opened files.\");\r\n \r\n closeScanners();\r\n closeWriters();\r\n return;\r\n }\r\n }\r\n \r\n /*\r\n */\r\n if (!processFilesForValidation(scanners, writers)) {\r\n closeScanners();\r\n cleanWriters();\r\n return;\r\n }\r\n\r\n /*\r\n * Ask the user to enter the name of one of the created output files to display\r\n */\r\n for (int i = 0; i < 2; ++i) {\r\n System.out.print(\"Enter JSON file name: \");\r\n String file = \"\";\r\n try {\r\n file = console.readLine();\r\n } catch (IOException e) {\r\n\r\n }\r\n BufferedReader reader = null;\r\n try {\r\n reader = new BufferedReader(new FileReader(file));\r\n String line;\r\n while ((line = reader.readLine()) != null)\r\n System.out.println(line);\r\n break;\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"The file does not exist.\");\r\n } catch (IOException e) {\r\n System.out.println(\"Failed to read the file.\");\r\n } finally {\r\n try {\r\n if (reader != null)\r\n reader.close();\r\n } catch (IOException e) {\r\n }\r\n }\r\n }\r\n log.close();\r\n \r\n closeScanners();\r\n closeWriters();\r\n }", "public static void main(String[] args){\n\t\tBufferedReader indata = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString input=null;\r\n\t\ttry {\r\n\t\t\tinput=indata.readLine();\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tFile file = new File(\"d:/addfile.txt\"); \r\n try { \r\n file.createNewFile();\r\n } catch (IOException e) { \r\n // TODO Auto-generated catch block \r\n e.printStackTrace(); \r\n }\r\n \r\n byte writebyte[] = new byte[1024];\r\n writebyte=input.getBytes();\r\n try{\r\n \tFileOutputStream in = new FileOutputStream(file);\r\n \ttry{\r\n \t\tin.write(writebyte, 0, writebyte.length); \r\n in.close();\r\n \t} catch (IOException e) { \r\n // TODO Auto-generated catch block \r\n e.printStackTrace(); \r\n } \r\n } catch (FileNotFoundException e) { \r\n // TODO Auto-generated catch block \r\n e.printStackTrace(); \r\n }\r\n \r\n if(input.equals(\"print\")){\r\n \ttry{\r\n \t\tFileInputStream out = new FileInputStream(file); \r\n \t\tInputStreamReader outreader = new InputStreamReader(out);\r\n \t\tint ch = 0;\r\n \t\twhile((ch=outreader.read())!=-1){\r\n \t\t\tSystem.out.print((char) ch);\r\n \t\t}\r\n \t\toutreader.close();\r\n \t}catch (Exception e) { \r\n \t\t// TODO: handle exception \r\n \t} \r\n }\r\n\t}", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "public void OuvrirAgd() {\n //on charge l'agenda à partir d'un fichier en lecture\n try {\n File agd_a_lire = new File(\"C:\\\\Projet_Agenda_ING3\\\\saved_agendas\");\n Scanner sc = new Scanner(agd_a_lire);\n\n //on lit le fichier ligne par ligne\n /*while (sc.) {\n\n }*/\n\n sc.close();\n } catch (Exception e) {\n System.out.print(\"Erreur d'ouverture du fichier en lecture\\n\");\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tFileWriter fw = new FileWriter(\"Names.txt\");\n\t\tPrintWriter outputFile = new PrintWriter(fw);\n\t\toutputFile.println(\"Matthew\");\n\t\toutputFile.println(\"Mark\");\n\t\toutputFile.println(\"Luke\");\n\t\toutputFile.close();\n\t\t\n\t\t//read from a file\n\t\tFile file = new File(\"Names.txt\");\n\t\tScanner inputFile = new Scanner(file);\n\t\t\n\t\twhile(inputFile.hasNext()) {\n\t\t\tString name = inputFile.nextLine();\n\t\t\tSystem.out.println(name);\n\t\t}\n\t\tinputFile.close();\n\t\t\n\t}", "public static void processFile(String inputpath, String outputpath)\r\n\t{\r\n\t\ttry {\r\n\t\t\t//create both files\r\n\t\t\tFile input = new File(inputpath);\r\n\t\t\tFile output = new File(outputpath);\r\n\t\t\t//read over the input file and put the results in the output file\r\n\t\t\tFileWriter fw = new FileWriter(output); \r\n\t\t\tScanner scan = new Scanner(input);\r\n\t\t\twhile(scan.hasNextLine()) {\r\n\t\t\t\tString word = scan.nextLine();\r\n\t\t\t\t//this looks for the word in the data structure.\r\n\t\t\t\t//If it exists, it writes it in the output file\r\n\t\t\t\tif(data.search(word)) {\r\n\t\t\t\t\tfw.write(word);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//If not, it gets the suggestions\r\n\t\t\t\t\tList<String> suggestions = data.suggest(word);\r\n\t\t\t\t\tif(suggestions.size() == 0) {\r\n\t\t\t\t\t\tfw.write(\"There are no suggestions for \"+ word + \".\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tString sugg = \"\";\r\n\t\t\t\t\t\tfor(String s : suggestions) {\r\n\t\t\t\t\t\t\tsugg += s +\" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfw.write(sugg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfw.write(\"\\r\\n\"); //this adds a new line\r\n\t\t\t}\r\n\t\t\tfw.close(); \r\n\t\t\tscan.close(); \r\n\t\t} catch (Exception e) {\r\n\t\t\t//If any exception, an error is printed \r\n\t\t\tSystem.out.println(\"Error reading or writing the files\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static ArrayList<String> greetings() {\n ArrayList<String> temp = new ArrayList<String>();\n Scanner greeter;\n try {\n greeter = new Scanner(new File(\"Greetings.txt\"));\n greeter.useDelimiter(\", *\");\n while (greeter.hasNext()){\n temp.add(\" \"+greeter.next()+\" \");\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "public static void main(String[] args) throws IOException {\n\t BufferedReader f = new BufferedReader(new FileReader(\"ride.in\"));\r\n\t // input file name goes above\r\n\t PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"ride.out\")));\r\n\t // Use StringTokenizer vs. readLine/split -- lots faster\r\n\t String a=f.readLine();\r\n\t String b=f.readLine();\r\n\t int proda=1;\r\n\t int prodb=1;\r\n\t for(int i=0;i<a.length();i++){\r\n\t \tproda*=(int)a.charAt(i)-64;\r\n\t }\r\n\t for(int i=0;i<b.length();i++){\r\n\t \tprodb*=(int)b.charAt(i)-64;\r\n\t }\r\n\t if(proda%47==prodb%47)\r\n\t \tout.println(\"GO\");\r\n\t else\r\n\t \tout.println(\"STAY\");\r\n\t out.close();\r\n\t}", "@Test\r\n\tvoid testExportRecordsShouldExportAFile() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tFile temp;\r\n\t\ttry {\r\n\t\t\ttemp = File.createTempFile(\"temp\", \"tmp\");\r\n\t\t\tFileWriter writer = new FileWriter(temp);\r\n\t\t\twriter.write(\"Costley, Dukie, Male, Green, 1947-07-13\\n\"\r\n\t\t\t\t\t+ \"Bettley | Abbe | Female | Purple | 1930-01-01\\n\"\r\n\t\t\t\t\t+ \"Kindall Rici Female Aquamarine 2004-01-14\\n\");\r\n\t\t\twriter.flush();\r\n\t\t\twriter.close();\r\n\t\t\ttemp.deleteOnExit();\r\n\t\t\tassertTrue(parser.importRecords(temp));\r\n\t\t\tassertEquals(3, parser.getPeople().size());\r\n\t\t\tassertEquals(\"Costley Dukie male Green 7/13/1947 \", parser.getPeople().get(0).getDetails());\r\n\t\t\tFile file = new File(\"test.txt\");\r\n\t\t\tString fileName = parser.exportRecords(\"test.txt\");\r\n\t\t\tassertEquals(\"test.txt\", fileName);\r\n\t\t\tassertTrue(file.delete());\r\n\t\t} catch (FileNotFoundException fnfe) {\r\n\t\t\tfnfe.printStackTrace();\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tioe.printStackTrace();\r\n\t\t}\r\n\t}", "public void printToFile(AI input) {\n\t\ttry {\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(FILENAME);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.write(input.toString() + \"\\n\");\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) { // Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "public Parser(String in, String out, String cfg) {\n\t\tif (in == null) in = System.getProperty(\"user.dir\")+\"/in.txt\";\n\t\tif (out == null) out = System.getProperty(\"user.dir\")+\"/out.txt\";\n\t\tif (cfg == null) cfg = System.getProperty(\"user.dir\")+\"/tokens.cfg\";\n\t\ttry (FileWriter fw = new FileWriter(new File(out))) {\n\t\t\tinput = readFile(in);\n\t\t\ttokenList = readFile(cfg);\n\t\t\tparsePseudocode();\n\t\t\tfw.write(output);\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"IO error: check input files.\\n\", e);\n\t\t}\n\t}", "public static void loadFile() throws FileNotFoundException {\n File f = new File(\"tasks.txt\");\n if (!f.exists()) {\n throw new FileNotFoundException();\n }\n Scanner s = new Scanner(f);\n while (s.hasNext()) {\n String input = s.nextLine();\n String[] words = input.split(\" \");\n boolean isTodo = words[0].equals(\"T\");\n boolean isDeadline = words[0].equals(\"D\");\n boolean isEvent = words[0].equals(\"E\");\n boolean isDone = words[1].equals(\"Y\");\n input = input.substring(4);\n words = input.split(\"/d\");\n if (isDeadline) {\n Deadline deadline = new Deadline(words[0], words[1]);\n Tasks.add(deadline);\n }\n else if (isEvent) {\n Event event = new Event(words[0], words[1]);\n Tasks.add(event);\n }\n else if (isTodo) {\n ToDo toDo = new ToDo(words[0]);\n Tasks.add(toDo);\n }\n if (isDone) {\n Tasks.get(Tasks.size()-1).taskComplete();\n }\n }\n }", "public static void main (String[] args) throws IOException\n {\n Scanner fileScan, lineScan;\n String fileName;\n\n Scanner scan = new Scanner(System.in);\n\n System.out.print (\"Enter the name of the input file: \");\n fileName = scan.nextLine();\n fileScan = new Scanner(new File(fileName));\n\n // Read and process each line of the file\n\n\n\n\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner teamScanner = new Scanner(new File(\"teamInfo.txt\"));\n teamScanner.useDelimiter(\",\");\n ArrayList<Team> teams = new ArrayList<Team>();\n String teamName = teamScanner.next();\n String temp = teamScanner.next();\n double winLoss = Double.parseDouble(temp);\n String temp2 = teamScanner.next();\n double SRS = Double.parseDouble(temp2);\n teams.add(new Team(teamName, winLoss, SRS));\n while (teamScanner.hasNext()) {\n teamName = teamScanner.next();\n temp = teamScanner.next();\n temp2 = teamScanner.next();\n //System.out.println(\"t\" + temp);\n //System.out.println(\"x\" + teamName);\n winLoss = Double.parseDouble(temp);\n SRS = Double.parseDouble(temp2);\n\n\n teams.add(new Team(teamName.substring(2), winLoss, SRS));\n }\n\n // System.out.println(teams.get(0).name);\n //\n\n ArrayList<String> TeamsList = new ArrayList<String>();\n Scanner teamsListScanner = new Scanner(new File(\"competingTeams.txt\"));\n while(teamsListScanner.hasNextLine()){\n TeamsList.add(teamsListScanner.nextLine());\n }\n // System.out.println(TeamsList);\n //String names = teamsListScanner.next();\n//\n // ArrayList<String> competingString = new ArrayList<>();\n ArrayList<Team> competingTeams = new ArrayList<>();\n // System.out.println(teams.get(0).name);\n for (int i = 0; i < TeamsList.size(); i++)\n {\n for(int j = 0; j < teams.size(); j++)\n {\n // System.out.println(TeamsList.get(i));\n // System.out.println(teams.get(j).name);\n if (TeamsList.get(i).equalsIgnoreCase(teams.get(j).name))\n {\n competingTeams.add(teams.get(j));\n break;\n }\n }\n }\n for (int j = 1; j < 7; j++) {\n System.out.println(\"Winning Teams Round \" + j + \":\");\n ArrayList<Team> tempTeams = BracketRunner.RunRound(competingTeams);\n for (int i = 0; i < tempTeams.size(); i++) {\n System.out.println(tempTeams.get(i).name);\n }\n competingTeams = tempTeams;\n System.out.println(tempTeams.size());\n }\n // for (int i = 0; i < teams.size(); i++) {\n // System.out.println(teams.get(i).SRS);\n //}\n //g\n }", "public static void writeFile(String inputFile, String outputFile, String[] encodings){\n File iFile = new File(inputFile);\n File oFile = new File(outputFile);\n //try catch for creating the output file\n try {\n //if it doesn't exist it creates the file. else if clears the output file\n\t if (oFile.createNewFile()){\n System.out.println(\"File is created!\");\n\t } else{\n PrintWriter writer = new PrintWriter(oFile);\n writer.print(\"\");\n writer.close();\n System.out.println(\"File cleared.\");\n\t }\n }\n catch(IOException e){\n e.printStackTrace();\n }\n //try catch to scan the input file\n try {\n Scanner scan = new Scanner(iFile);\n PrintWriter writer = new PrintWriter(oFile);\n //loop to look at each word in the file\n while (scan.hasNext()) {\n String s = scan.next();\n //loop to look at each character in the word\n for(int i = 0; i < s.length(); i++){\n if((int)s.charAt(i)-32 <= 94) {\n writer.print(encodings[(int)s.charAt(i)-32]);\n }\n }\n //gives the space between words\n writer.print(encodings[0]);\n }\n scan.close();\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void saveGame() throws FileNotFoundException {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showSaveDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\t\tif (file != null) {\r\n\t\t\tFileWriter fileWriter = new FileWriter(convertToStringArrayList(), file);\r\n\t\t\tfileWriter.writeFile();\r\n\t\t}\r\n\r\n\t}", "public static void addRecords() {\n\t\t\n\t\ttry {\n\t\t\twhile(fileInput.hasNextLine()) {\n\t\t\t\t// get user input to add contact to list. \n\t\t\t\tSystem.out.print(\"\\n\\nEnter contact first name: \");\t\n\t\t\t\tString firstName = input.next();\n\t\t\t\tSystem.out.print(\"\\nEnter contact last name: \");\n\t\t\t\tString lastName = input.next();\n\t\t\t\tSystem.out.print(\"\\nEnter contact phone number: \"); \n\t\t\t\tString phoneNumber = input.next();\n\t\t\t\tSystem.out.print(\"\\nEnter contact email address: \");\n\t\t\t\tString email = input.next();\n\t\t\t\t\n\t\t\t\tString[] contactInfo = { firstName, lastName, phoneNumber, email };\n\t\t\t\t\n\t\t\t\tList<String> newInput = Arrays.asList(contactInfo);\n\t\t\t\tSystem.out.printf(\"Unsorted array elements: %s%n\", list);\n\t\t\t\t\n\t\t\t\tCollections.sort(list); // sort ArrayList\n\t\t\t\tSystem.out.printf(\"Sorted array elements: %s%n\", list);\n\t\t\t\t\n\t\t\t\t// output new record to file.\n\n\t\t}\n\t\tcatch (FormatterClosedException f) {\n\t\t\tSystem.err.println(\"Error writing to file. Terminating.\"); break;\n\t\t}\n\t\tcatch (NoSuchElementException e) {\n\t\t\tSystem.err.println(\"Invalid input. Please try again.\");\n\t\t\tinput.nextLine(); // discard input so user can try again. \n\t\t}\n\t\t\t\n\t\tSystem.out.println(\"Enter another contact? 0 for no, 1 for yes: \");\n\t\tswitch(input.nextInt()) {\n\t\t\tcase 0: moreInput = false; break;\n\t\t\tcase 1: moreInput = true; break;\n\t\t}\n\t\t\t\n\t\t\t\n\t\t} // end while. \n\n\t\tSystem.out.println();\n\t}", "public void readFile();", "private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n //Adds each line to the ArrayList\n int i = 0;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n //System.out.println(line);\n i++;\n }\n \n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n System.out.println(\"Done taking in file...\");\n }", "public void writeFile() \r\n\t{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor(String str : scorers)\r\n\t\t\tbuilder.append(str).append(\",\");\r\n\t\tbuilder.deleteCharAt(builder.length() - 1);\r\n\t\t\r\n\t\ttry(DataOutputStream output = new DataOutputStream(new FileOutputStream(HIGHSCORERS_FILE)))\r\n\t\t{\r\n\t\t\toutput.writeChars(builder.toString());\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] File \" + HIGHSCORERS_FILE + \" was not found \" \r\n\t\t\t\t\t+ \"while writing.\");\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] Error while reading the file \" + HIGHSCORERS_FILE);\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tScanner f=new Scanner(new File(\"date.in\"));\n\t\tPrintWriter g=new PrintWriter(\"date.out\");\n\t\tint n,i;\n\t\tn=f.nextInt();\n\t\tint [] a= new int[n];\n\t\tfor(i=0;i<n;i++)\n\t\t\ta[i]=f.nextInt();\n\t\tg.print(invNr(a));\n\t\tg.close();\n\t\tf.close();\n\t}", "private static void removePreviousLine() throws IOException {\n\t\tif (!scores.exists()) scores.createNewFile();\r\n\t\tFile tempFile = new File(\"AssignmentScoresTemp.dat\");\r\n\r\n\t\t// Create temp file\r\n\t\ttempFile.createNewFile();\r\n\r\n\t\tboolean repeat = true; // Used for while loop in which all but the last line is copied to the temp file\r\n\r\n\t\tScanner oldFileIn = new Scanner(scores);\r\n\t\tFileWriter tempFileOut = new FileWriter(tempFile, true);\r\n\t\t// Inputs to the FileWriter class: file, append? (write to next line or overwrite)\r\n\t\t// append is set to true to add on to the end of the file rather than overwriting\r\n\t\t\r\n\t\t// Create temp file\r\n\t\ttempFile.createNewFile();\r\n\t\t\r\n\t\t// Write all but last line to temp file\r\n\t\t// Works by reading line and only writing it to temp file if there is a line after it (leaves out last line)\r\n\t\twhile(repeat) {\r\n\t\t\tint num1 = Integer.parseInt(oldFileIn.next());\r\n\t\t\tint num2 = Integer.parseInt(oldFileIn.next());\r\n\t\t\t\t\r\n\t\t\tif(oldFileIn.hasNext()) {\r\n\t\t\t\ttempFileOut.write(num1 + \" \" + num2);\r\n\t\t\t\ttempFileOut.write(\"\\r\\n\");\r\n\t\t\t\trepeat = true;\r\n\t\t\t} else repeat = false;\r\n\t\t}\r\n\t\toldFileIn.close();\r\n\t\ttempFileOut.close();\r\n\t\t\r\n\t\t// Erase original file\r\n\t\teraseFile();\r\n\t\t\r\n\t\t// Write temp file back to file\r\n\t\tScanner tempFileIn = new Scanner(tempFile);\r\n\t\tFileWriter newFileOut = new FileWriter(scores, true);\r\n\t\t// Inputs to the FileWriter class: file, append? (write to next line or overwrite)\r\n\t\t// append is set to true to add on to the end of the file rather than overwriting\r\n\t\t\r\n\t\t// Copy temp file back to original file line by line\r\n\t\twhile(tempFileIn.hasNext()){\r\n\t\t\tint tempNum1 = Integer.parseInt(tempFileIn.next());\r\n\t\t\tint tempNum2 = Integer.parseInt(tempFileIn.next());\r\n\t\t\t\r\n\t\t\tnewFileOut.write(tempNum1 + \" \" + tempNum2);\r\n\t\t\tnewFileOut.write(\"\\r\\n\");\r\n\t\t}\r\n\t\t\r\n\t\ttempFileIn.close();\r\n\t\tnewFileOut.close();\r\n\t\t\r\n\t\t// Delete temp file\r\n\t\ttempFile.delete();\r\n\t}", "public void readFile() throws IOException {\r\n File file = new File(\"employee_list.txt\"); //Declaration and initialization of file object\r\n Scanner textFile = new Scanner(file); //Creates Scanner object and parse in the file\r\n\r\n while(textFile.hasNextLine()){ //Stay in a loop until there is no written line in the text file\r\n String line = textFile.nextLine(); //Read line and store in a String variable 'line'\r\n String[] words = line.split(\",\"); //Split the whole line at commas and store those in a simple String array\r\n Employee employee = new Employee(words[0],words[1],words[2]); //Create Employee object\r\n this.listOfEmployees.add(employee); //Add created Employee object to listOfEmployees ArrayList\r\n if(!this.listOfDepartments.contains(words[1])){ //This just adds all the department names to an ArrayList\r\n this.listOfDepartments.add(words[1]);\r\n }\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }", "void openFile(String fileName){\n\t\ttry {\n\t\t\tout = new BufferedWriter(new FileWriter(fileName));\n\t\t\tString dateTime = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\").format(new Date()); \n\t\t\t//out.write(\"Início dos testes \" + dateTime + \"\\n\" );\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void writeStaffEntry(String firstName, String lastName, String userName)\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tPrintWriter out = new PrintWriter(new FileWriter(\"StaffEntryRecords.txt\", true));\r\n\t\t\tout.println(\"First Name: \" +firstName);\r\n\t\t\tout.println(\"Last Name: \" +lastName);\r\n\t\t\tout.println(\"Username: \" +userName);\r\n\t\t\tout.println(\" \");\r\n\t\t\tout.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: Cannot open file for writing\");\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: Cannot write to file\");\r\n\t\t}\r\n\t}", "public void processInput(String theFile){processInput(new File(theFile));}", "public void readPoemFiles(){\n try (Scanner fileScan = new Scanner(new File(\"poems.txt\"))) {\n //Poems.txt consist of a header (poet and theme) plus verse lines.\n //First loop reads the header and creates object 'PoetAndTheme'.\n while (fileScan.hasNextLine()){\n String themeAndPoet = fileScan.nextLine();\n PoetAndTheme addToList = new PoetAndTheme(themeAndPoet);\n //Second loop reads verse lines and adds them to object 'PoetAndTheme'.\n while(fileScan.hasNextLine()){\n String verseLine = fileScan.nextLine();\n if (verseLine.isEmpty()){\n break;\n }\n addToList.addVerseLine(verseLine);\n }\n poetsAndThemesList.add(addToList);\n }\n \n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void sendAttendance(){\n try{\n FileInputStream fileInputStream=context.openFileInput(Constant.FILE_NAME);\n Scanner obj=new Scanner(fileInputStream);\n obj.useDelimiter(\",\");\n while(obj.hasNext()){\n Constant.dataBaseController.putAttendance(obj.next());\n }\n obj.close();\n fileInputStream.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "public static void main(String[] args) throws IOException {\n\t\t FileInputStream file=new FileInputStream(\"C:\\\\Users\\\\DELL\\\\Desktop\\\\test.txt\");\r\n Scanner scan=new Scanner(file);\r\n while(scan.hasNextLine()){\r\n \t System.out.println(scan.nextLine());\r\n }\r\n \r\n file.close();\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFileInputStream filin = new FileInputStream(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016.txt\"));\n\t\tFileOutputStream filout = new FileOutputStream(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016_2.txt\"));\n\t\tint val;\n\t\twhile((val = filin.read()) != -1)\n\t\t{\n\t\t\tfilout.write(val);\n\t\t}\n\t\tfilin.close();\n\t\tfilout.close();\n\t\tSystem.out.println(\"Completed\");\n\t\t\n\t\t//Char\n\t\tFileReader filrd = new FileReader(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016.txt\"));\n\t\tFileWriter filwr = new FileWriter(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016_3.txt\"));\n\t\tint val1;\n\t\twhile((val1 = filrd.read()) != -1)\n\t\t{\n\t\t\tfilwr.write(val1);\n\t\t}\n\t\tfilrd.close();\n\t\tfilwr.close();\n\t\tSystem.out.println(\"Character Completed\");\n\t\t//Buffer stream\n\t\tBufferedReader buffrd = new BufferedReader(new FileReader(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016.txt\")));\n\t\tBufferedWriter buffwr = new BufferedWriter(new FileWriter(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016_4.txt\")));\n\t\tString val2;\n\t\twhile((val2 = buffrd.readLine()) != null)\n\t\t{\n\t\t\tbuffwr.write(val2);\n\t\t}\n\t\tbuffrd.close();\n\t\tbuffwr.close();\n\t\tSystem.out.println(\"Buffer Completed\");\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = null;\n\t\tPrintWriter pw = null;\n\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"Input.txt\"));\n\t\t\tpw = new PrintWriter(new FileWriter(\"Output.txt\"));\n\t\t\tString str;\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\tpw.println(str+\"|\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t} finally {\n\t\t\tbr.close();\n\t\t\tpw.close();\n\t\t}\n\t}", "public static void readInFile(Scanner inFile) {\n\t\twhile(inFile.hasNext()) {\n\t\t\tString strIn = inFile.nextLine();\n\t\t\tSystem.out.println(strIn);\n\t\t}\n\t\tinFile.close();\n\t}", "void encryptFile(String inPath, String outPath) throws IOException {\n try (BufferedReader reader = new BufferedReader(new FileReader(inPath))) {\n try (PrintWriter writer = new PrintWriter(outPath)) {\n encryptFile(reader, writer);\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Output file not found\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Input file not found\");\n }\n }", "public void makeReport() throws IOException{\n File report = new File(\"Report.txt\");\n BufferedWriter reportWriter = new BufferedWriter(new FileWriter(report));\n BufferedReader bookReader = new BufferedReader(new FileReader(\"E-Books.txt\"));\n String current;\n while((current = bookReader.readLine()) != null ){\n String[] tokens = current.split(\",\");\n reportWriter.write(tokens[0].trim()+\" for \"+tokens[1].trim()+\" with redemption Code \"+tokens[2].trim()+\n \" is assigned to \"+tokens[4].trim()+\" who is in \"+tokens[5].trim()+\" grade.\");\n reportWriter.write(System.lineSeparator());\n reportWriter.flush();\n }\n reportWriter.close();\n bookReader.close();\n new reportWindow();\n }" ]
[ "0.6175344", "0.58831304", "0.5881785", "0.58421355", "0.5791538", "0.569082", "0.56822956", "0.5625705", "0.55909574", "0.5576389", "0.5561208", "0.5513103", "0.55110174", "0.55051637", "0.5499632", "0.5481008", "0.5464531", "0.54461", "0.5441397", "0.54399854", "0.5428854", "0.5422615", "0.5417356", "0.540689", "0.54063386", "0.5393383", "0.5356814", "0.53200585", "0.530966", "0.53074175", "0.53055936", "0.52981937", "0.52740073", "0.5251117", "0.52501845", "0.5248296", "0.5244633", "0.5231296", "0.5230913", "0.52260447", "0.5215575", "0.5215536", "0.521336", "0.5206602", "0.5188857", "0.51586336", "0.51572865", "0.5142013", "0.51417243", "0.51366115", "0.51334566", "0.5118862", "0.51151", "0.5096672", "0.50827426", "0.5079717", "0.50738686", "0.50692445", "0.50631016", "0.50601894", "0.50563884", "0.50563824", "0.50522125", "0.50487614", "0.5044495", "0.5042087", "0.50376296", "0.5037204", "0.50165725", "0.5013025", "0.5008681", "0.5007439", "0.49998793", "0.4996523", "0.49908587", "0.4988902", "0.49864978", "0.49805552", "0.49774498", "0.4976389", "0.4970942", "0.49523997", "0.49514523", "0.49510163", "0.49463713", "0.49435747", "0.49393508", "0.4928089", "0.49272308", "0.4926409", "0.49134332", "0.49071917", "0.49063072", "0.4905581", "0.48998228", "0.48996332", "0.48982665", "0.48941836", "0.4892508", "0.48906887", "0.48879096" ]
0.0
-1
String srcPath = config.getServletContext().getRealPath("/");
public static String savePicture(HttpSession session, MultipartFile file, long id) throws IOException { String path = session.getServletContext().getRealPath(destination); File savedFile = new File(path + "\\" + id + ".jpg"); FileUtils.writeByteArrayToFile(savedFile, file.getBytes()); File[] testFileSave = findFile(session, id); if (testFileSave.length == 1) { // return waarde van profilePicture-attribuut van User return destination + id + ".jpg"; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\r\n\t\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\r\n\t\t}", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t\tString realPath = config.getServletContext().getRealPath(\"/\");\r\n\t\tString path = realPath + \"WEB-INF\"+ System.getProperty(\"file.separator\") +\"logs\"+ System.getProperty(\"file.separator\")+\"payments\"+ System.getProperty(\"file.separator\");\r\n\r\n\t\tthis.filePath = path;// this.getInitParameter(\"TMP_PATH\");\r\n\t\tlog.debug(\"Initializing payment log file at loc: \"+ this.filePath);\r\n\t}", "public void init( ){\n\t filepath = getServletContext().getContextPath();\r\n\tappPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \r\n\t }", "java.lang.String getSrcPath();", "public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n String reqUri = req.getRequestURI();\r\n // Get the context path\r\n String contextPath = req.getContextPath();\r\n\r\n // Construct the real path in the WEB-INF\r\n String filePath = reqUri.substring(contextPath.length(), reqUri.length());\r\n filePath = \"/WEB-INF\" + filePath.replaceFirst(\"conf\", \"configuration\");\r\n\r\n // Set the content type to display xml as text\r\n res.setContentType(\"text/plain\");\r\n\r\n // Write it out\r\n PrintWriter out = res.getWriter();\r\n InputStream in = req.getServletContext().getResourceAsStream(filePath);\r\n InputStreamReader reader = new InputStreamReader(in);\r\n IOUtils.copy(reader, out);\r\n reader.close();\r\n in.close();\r\n out.close();\r\n }", "String getContextPath();", "String getContextPath();", "String getContextPath();", "protected String getRootPath() {\n\t\treturn \"/WEB-INF\";\n\t}", "private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}", "@Override\n\tpublic java.lang.String getSrcPath() {\n\t\treturn _scienceApp.getSrcPath();\n\t}", "public String getResourcePath();", "String getFilepath();", "protected abstract String getResourcePath();", "public static Path locateResourcesDir(ServletContext context,\n ApplicationContext applicationContext) {\n Path property = null;\n try {\n property = applicationContext.getBean(GeonetworkDataDirectory.class).getResourcesDir();\n } catch (NoSuchBeanDefinitionException e) {\n final String realPath = context.getRealPath(\"/WEB-INF/data/resources\");\n if (realPath != null) {\n property = IO.toPath(realPath);\n }\n }\n\n if (property == null) {\n return IO.toPath(\"resources\");\n } else {\n return property;\n }\n }", "public abstract String getRequestServletPath();", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException \r\n{\nresponse.getWriter().append(\"Served at: \").append(request.getContextPath()); \r\n}", "public void init( ){\n\t filePath = \n\t getServletContext().getInitParameter(\"file-upload\"); \n\t }", "String path(Configuration configuration);", "public String getBasePath(){\r\n\t\t \r\n\t\t String basePath = properties.getProperty(\"getPath\");\r\n\t\t if(basePath != null) return basePath;\r\n\t\t else throw new RuntimeException(\"getPath not specified in the configuration.properties file.\");\r\n\t }", "String getRealPath(String path);", "public void init( ){\n // Get the file location where it would be stored.\n filePath = getServletContext().getInitParameter(\"file-upload\"); \n }", "abstract File getResourceDirectory();", "private static String getPath (HttpServletRequest request) {\n String path = request.getServletPath();\n return path != null ? path : request.getPathInfo();\n }", "protected String getStaticFilesLocation(PortletRequest request) {\n // TODO allow overriding on portlet level?\n String staticFileLocation = getPortalProperty(\n Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH,\n request.getPortalContext());\n if (staticFileLocation != null) {\n // remove trailing slash if any\n while (staticFileLocation.endsWith(\".\")) {\n staticFileLocation = staticFileLocation.substring(0,\n staticFileLocation.length() - 1);\n }\n return staticFileLocation;\n } else {\n // default for Liferay\n return \"/html\";\n }\n }", "public String resolvePath();", "FsPath baseDir();", "private String getWebTmpDir()\n\t\t\tthrows Exception\n\t{\n\t\t\treturn Contexto.getPropiedad(\"TMP.UPLOAD2\");\n }", "String getExternalPath(String path);", "public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }", "protected Resource getResource(HttpServletRequest request) {\n String path = request.getPathInfo();\n /*\n * we want to extract everything after /spa/spaServlet from the path info.\n * This should cater for sub-directories\n */\n return getResourceLoaderBean().getResource(constructRemoteUrl(path));\n }", "public String getDocumentBase() {\n return getServerBase() + getContextPath() + \"/\";\n }", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "String getApplicationContextPath();", "public static Path locateResourcesDir(ServiceContext context) {\n if (context.getServlet() != null) {\n return locateResourcesDir(context.getServlet().getServletContext(), context.getApplicationContext());\n }\n\n return context.getBean(GeonetworkDataDirectory.class).getResourcesDir();\n }", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "protected File getFile(HttpServletRequest request) {\n String path = request.getPathInfo();\n\n // we want to extract everything after /spa/spaResources/ from the path info. This should cater for sub-directories\n String extractedFile = path.substring(path.indexOf('/', BASE_URL.length() - 1) + 1);\n File folder = SpaModuleUtils.getSpaStaticFilesDir();\n\n //Resolve default index.html\n if (extractedFile.endsWith(\"index.htm\") || !extractedFile.contains(\".\")) {\n extractedFile = \"index.html\";\n }\n\n File file = folder.toPath().resolve(extractedFile).toFile();\n if (!file.exists()) {\n log.warn(\"File with path '{}' doesn't exist\", file.toString());\n return null;\n }\n return file;\n }", "@Override\n\t\tpublic String getServletPath() {\n\t\t\treturn null;\n\t\t}", "public abstract String getFullPath();", "public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}", "@Override\n\tpublic String getServletPath() {\n\t\treturn null;\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "public String getRelativePath();", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "String rootPath();", "private static String getResourcePath(String resPath) {\n URL resource = XmlReaderUtils.class.getClassLoader().getResource(resPath);\n Assert.assertNotNull(\"Could not open the resource \" + resPath, resource);\n return resource.getFile();\n }", "String getAbsolutePathWithinSlingHome(String relativePath);", "protected String getRequestedResourceName(HttpServletRequest req) throws ServletException {\n\t\tString name = req.getPathInfo();\n\n\t\tif (StringUtils.isEmpty(name))\n\t\t\tthrow new ServletException(\"No filename specified.\");\n\n\t\twhile (name.startsWith(\"/\"))\n\t\t\tname = name.substring(1);\n\n\t\tif (name!=null && name.startsWith(\"../\"))\n\t\t\tthrow new ServletException(\"Not allowed!\");\n\n\t\treturn name;\n\t}", "public String getServletPath() {\n return servletPath;\n }", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "String getRootServerBaseUrl();", "public void init(ServletConfig config) throws ServletException {\n \tsuper.init(config);\n \ttry {\n \t\tprops = new Properties();\n \t\tprops.load(new FileInputStream(config.getServletContext().getRealPath(\"/\") + config.getInitParameter(\"propPath\")));\n \t} catch (IOException e) {\n\t\t\te.getMessage();\n\t\t}\t\t\n\t}", "@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}", "abstract public String getDataResourcesDir();", "public String getPath();", "public String getPath();", "public String getPath();", "private File getFile(String fileName, HttpServletRequest request){\n\t\tString fileSite = request.getSession().getServletContext().getRealPath(\"resources/upload\"); // 배포폴더\n\t\treturn new File(fileSite, fileName);\n\t}", "public Path getDataDirectory();", "private String getFilePath(String sHTTPRequest) {\n return sHTTPRequest.replaceFirst(\"/\", \"\");\n\n }", "public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}", "String getFilePath();", "public String getWorkDirectory(){\n String wd = \"\";\n try {\n wd = new File(\"test.txt\").getCanonicalPath().replace(\"/test.txt\",\"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return wd;\n }", "@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}", "public String getLocationPath();", "@NotNull\n/* 52 */ public String getServerPath() { return this.myServerPath; }", "private String db4oDBFullPath(Context ctx) {\t\n\t\treturn ctx.getDir(\"data\", 0) + \"/\" + LOCAL_SERVER;\n\t\n\t}", "public abstract String getFullPath(final String resourcePath);", "File getLoadLocation();", "public String getAbsPath();", "public String getContextPath() {\n return FxJsfUtils.getRequest().getContextPath();\n }", "public String getServletPath() {\n return servletPath;\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "@Override\n public void init() throws ServletException {\n super.init();\n\n dbConfigResource = getServletContext().getInitParameter(\"dbConfigResource\");\n jspPath = getServletContext().getInitParameter(\"jspPath\");\n }", "String basePath();", "abstract public String getImageResourcesDir();", "Path getMainCatalogueFilePath();", "java.lang.String getFilePath();", "public abstract String getPath();", "public abstract String getPath();", "Path getRootPath();", "private URL getResourceAsUrl(final String path) throws IOException {\n\t\treturn appContext.getResource(path).getURL();\n\t}", "public String getResPath()\n/* */ {\n/* 138 */ return this.resPath;\n/* */ }", "private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }", "public static String getConfigurationFilePath() {\n\n return getCloudTestRootPath() + File.separator + \"Config\"\n + File.separator + \"PluginConfig.xml\";\n }", "Path getFilePath();", "public static String setConfigPath(String propertFileName ) {\n String propFilePath;\n\n propFilePath = \"src\" + File.separator + \"main\" + File.separator\n + \"resources\" + File.separator + propertFileName;\n return propFilePath;\n }", "private String getTmpPath() {\n return getExternalFilesDir(null).getAbsoluteFile() + \"/tmp/\";\n }", "private String getUrlBaseForLocalServer() {\n\t HttpServletRequest request = ((ServletRequestAttributes) \n\t\t\t RequestContextHolder.getRequestAttributes()).getRequest();\n\t String base = \"http://\" + request.getServerName() + ( \n\t (request.getServerPort() != 80) \n\t \t\t ? \":\" + request.getServerPort() \n\t\t\t\t : \"\");\n\t return base;\n\t}" ]
[ "0.7095695", "0.7095695", "0.7095695", "0.7095695", "0.7028336", "0.69240665", "0.6667289", "0.66648304", "0.6483652", "0.64533263", "0.63209164", "0.63209164", "0.63209164", "0.6265206", "0.625735", "0.62401724", "0.6174119", "0.6073246", "0.6046726", "0.60429573", "0.60393745", "0.60259044", "0.60240906", "0.6016587", "0.5994827", "0.59878", "0.5984188", "0.59788954", "0.59739226", "0.59662557", "0.59174746", "0.59083843", "0.5879423", "0.5857149", "0.58554685", "0.58480203", "0.5836654", "0.5826182", "0.58258176", "0.58258176", "0.5822554", "0.5796183", "0.5780595", "0.577916", "0.577658", "0.57667637", "0.5724842", "0.5722614", "0.57121867", "0.57121867", "0.57121867", "0.57121867", "0.57121867", "0.57121724", "0.5682127", "0.56800556", "0.5668324", "0.5663991", "0.5661649", "0.56592035", "0.5650671", "0.56263626", "0.5608935", "0.55898774", "0.5587858", "0.55865633", "0.55813855", "0.55813855", "0.55813855", "0.5580994", "0.5573615", "0.556709", "0.5561663", "0.55462456", "0.55448323", "0.5534897", "0.55301064", "0.55222076", "0.5519434", "0.55151486", "0.55150557", "0.550041", "0.5495879", "0.54936683", "0.54857546", "0.54817057", "0.54700065", "0.5454648", "0.54543674", "0.5450472", "0.54501396", "0.54501396", "0.544835", "0.54447997", "0.5428266", "0.5427635", "0.5426493", "0.54217494", "0.54144967", "0.541445", "0.54068035" ]
0.0
-1
Added Constructor Austin Instantiates a new cargo container. Prints a message to the system if the container was created successfully.
public CargoContainer(String ownerName, double maxWeight, double maxVolume) { this.ownerName = ownerName; this.maxWeight = maxWeight; this.maxVolume = maxVolume; this.loaded= false; //database.writeContainerDB(this); System.out.println("Container for owner "+ownerName+" created."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Container createContainer();", "T createContainer();", "private CreateContainerTask(String containerName) {\n\t\t\tthis.containerName = containerName;\n\t\t}", "public Container newContainer();", "public AzureStorageContainer() {\n }", "public PortletContainer() {\n }", "@Test\n\tpublic void shouldHaveContainerInTableInKafkaFromContainerCreatedEvent() throws InterruptedException, ExecutionException, TimeoutException {\n\t\tSystem.out.println(\" ----- Kafka needs to run \\n\\tshouldHaveContainerInTableInKafkaFromContainerCreatedEvent\");\n\n\t\tContainerCreation ce = externalContainerProducer.buildContainerEvent();\n\t\n\t\t// verify the container does not exist in the inventory\n\t\tContainer cOut = dao.getById(ce.getContainerID());\n\t\tAssert.assertNull(cOut);\n\t\t\n\t\t// emit container added event \n\t\texternalContainerProducer.emit(ce);\n\t\tThread.sleep(5000);\n\t\t// verify it is in the container store\n\t\tcOut = dao.getById(ce.getContainerID());\n\t\tAssert.assertNotNull(cOut);\n\t\tAssert.assertEquals(cOut.getStatus(),((Container)ce.getPayload()).getStatus());\n\n\t}", "public ContainerAlreadyExistsInFacilityException() {\r\n\t\tsuper();\r\n\t}", "@Override\n public void addContainer(Container c) {\n Optional<Container> duplicate = getContainers().filter(\n n -> n.getName().equals(c.getName())\n && n.getOwner().getTenant().equals(c.getOwner().getTenant())\n && n.getOwner().getName().equals(c.getOwner().getName())\n ).findFirst();\n\n if (duplicate.isPresent()) {\n throw new NotAcceptableException(\"Container \" + c.getName()\n + \" already exists.\");\n }\n\n c.setState(State.CREATE_REQUESTED);\n c.setAdded(Utils.now());\n\n try {\n\n ZooKeeper zk = zooKeeperClient.getZookeeper();\n\n final String zkName = ContainerUtils.getZKname(c);\n\n LOG.info(\"Adding Container: \" + zkName);\n\n // Hand-off to PlacementManager\n ZKUtils.savePersistent(zk, c,\n PlacementManager.TO_BE_PLACED_NODEPATH\n + \"/\" + zkName);\n\n } catch (KeeperException | InterruptedException |\n JAXBException | GeneralSecurityException ex) {\n LOG.error(ex.toString(), ex);\n }\n\n }", "@Test\n public void test() throws IOException, InterruptedException {\n CountDownLatch latch = new CountDownLatch(1);\n\n try (\n GenericContainer<?> container = new GenericContainer<>(TestImages.TINY_IMAGE)\n .withCommand(\"true\")\n .withStartupCheckStrategy(new OneShotStartupCheckStrategy())\n ) {\n container.start();\n String createdAt = container.getContainerInfo().getCreated();\n\n // Request all events between startTime and endTime for the container\n try (\n EventsResultCallback response = DockerClientFactory\n .instance()\n .client()\n .eventsCmd()\n .withContainerFilter(container.getContainerId())\n .withEventFilter(\"create\")\n .withSince(Instant.parse(createdAt).getEpochSecond() + \"\")\n .exec(\n new EventsResultCallback() {\n @Override\n public void onNext(@NotNull Event event) {\n // Check that a create event for the container is received\n if (\n event.getId().equals(container.getContainerId()) &&\n event.getStatus().equals(\"create\")\n ) {\n latch.countDown();\n }\n }\n }\n )\n ) {\n response.awaitStarted(5, TimeUnit.SECONDS);\n latch.await(5, TimeUnit.SECONDS);\n }\n }\n }", "private void addContainer(String containerName, String baseImage){\n // Call python new_lab_script: new_lab_setup.py -b basename\n //String cmd = \"./addContainer.sh \"+labsPath+\" \"+labName+\" \"+containerName+\" \"+baseImage;\n String cmd = \"new_lab_setup.py -a \"+containerName+\" -b \"+baseImage;\n doLabCommand(cmd);\n }", "public void containerInitializer(Container container)\n\t{\n\t\tcontainer.addContainerProperty(\"Description\", String.class, null);\n\t\tcontainer.addContainerProperty(\"Start Date\", Date.class, null);\n\t\tcontainer.addContainerProperty(\"End Date\", Date.class, null); \n\t\tcontainer.addContainerProperty(\"Deadline\", Date.class, null);\n\t\tcontainer.addContainerProperty(\"Active\", Image.class, null);\n\t\tcontainer.addContainerProperty(\"Type\",String.class, null);\n\t\tcontainer.addContainerProperty(\"View\", \tButton.class, null);\n\t\tcontainer.addContainerProperty(\"Edit\",Button.class, null);\n\t\tcontainer.addContainerProperty(\"Delete\",Button.class, null);\n\t}", "public Cargo(){\n super(\"Cargo\");\n intake = new WPI_TalonSRX(RobotMap.cargoIntake);\n shoot = new WPI_TalonSRX(RobotMap.cargoShoot);\n }", "public void testInitialization() {\n assertNotNull(container);\n }", "private void createContent(final Container container) {\n this.mainPanel = new MainPanel();\n this.mainPanel.setName(\"mainPanel\"); // Fest\n\n if (container != null) {\n // adds the main panel\n container.add(this.mainPanel, BorderLayout.CENTER);\n\n // Handle status bar\n container.add(StatusBar.getInstance(), BorderLayout.SOUTH);\n }\n }", "Cab(){\n\t\tSystem.out.println(\"Cab Object Constructed..\");\n\t}", "private Catalog() {\r\n }", "public MonHoc() {\n }", "public ServicioUjaPack() {\n }", "Car()\r\n\t{\r\n\t\tSystem.out.println(\"hello\");\r\n\t}", "@Test\r\n public void testConstructor() {\r\n System.out.println(\"testConstructor\");\r\n try{\r\n new AddMetaInfoToGameService(2L, 3L, 5000);\r\n new AddMetaInfoToGameService(2L, 3L, 0);\r\n //fail();\r\n }catch(Exception e){\r\n e.getMessage();\r\n }\r\n }", "public CockpitPhaseManager() {\r\n }", "TestContainer createTestContainer();", "public GenericContainer(T t){\n obj = t;\n }", "@SuppressWarnings(\"serial\")\n\t@Test\n\tpublic void testEmptyContainerSpace(){\n\t\tContainer c = new Container(0,1){\n\t\t\tpublic boolean canAccess(Player player) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tassertTrue(c.hasSpace());\n\t}", "@Test\n void fillContainerTest() {\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n assertEquals(Resource.SHIELD,container.takeResource());\n }", "Compleja createCompleja();", "private ContainerWithMostWater() {\n }", "public Translation(ResourceContainer container) {\n this.language = container.language;\n this.project = container.project;\n this.resource = container.resource;\n\n resourceContainerSlug = ContainerTools.makeSlug(language.slug, project.slug, resource.slug);\n }", "public Component() {\n }", "public void create() {\n\t\t\n\t}", "public SpecialDepot() {\n specialContainers = new ArrayList<>();\n }", "public CyanSus() {\n\n }", "public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}", "public void testConstructor() throws Exception {\n try {\n persistence = new InformixPhasePersistence(TestHelper.PHASE_PERSISTENCE_NAMESPACE);\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Should not throw exception.\");\n }\n\n // in order to validate whether the connection factory created succesfully,\n // we try to delete one phase\n Phase phase = new Phase(new Project(new Date(), new DefaultWorkdays()), 12345);\n phase.setId(6);\n persistence.deletePhase(phase);\n }", "@PostMapping(\"/cargos\")\n @Timed\n public ResponseEntity<Cargo> createCargo(@RequestBody Cargo cargo) throws URISyntaxException {\n log.debug(\"REST request to save Cargo : {}\", cargo);\n if (cargo.getId() != null) {\n throw new BadRequestAlertException(\"A new cargo cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Cargo result = cargoRepository.save(cargo);\n return ResponseEntity.created(new URI(\"/api/cargos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "private static CloudBlobContainer getContainer() throws Exception {\n\n CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString);\n\n // Create the blob client.\n CloudBlobClient blobClient = storageAccount.createCloudBlobClient();\n // Get a reference to a container.\n // The container name must be lower case\n CloudBlobContainer container = blobClient.getContainerReference(\"sparshdevmobileapp\");\n\n return container;\n }", "public CampLease( ) {}", "public void create(){}", "@Test\n public void createNewComputerBuildSuccess() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n LoginRequest loginRequest = new LoginRequest(ANOTHER_USER_NAME_TO_CREATE_NEW_USER, USER_PASSWORD);\n\n loginAndCreateBuild(computerBuild, loginRequest, SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n }", "@Test\n void refillingContainerTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n container.fillContainer(Resource.COIN);\n assertEquals(Resource.COIN,container.takeResource());\n }", "public SimpleMessageListenerContainer() {\n\t}", "public Corso() {\n\n }", "public StatusComponent()\n {\n }", "public void setContainerName(String name) {\n this.name = name;\n }", "private ActorSystemBootstrapTools() {}", "@Test\n public void ctor(){\n assertNotNull(CuT.templateEngine, \"The Template Engine is Null and should not be\");\n }", "void init(Component c) {\n Dictionary<?, ?> props = c.getServiceProperties();\n if (props != null) {\n this.containerName = (String) props.get(\"containerName\");\n logger.debug(\"Running containerName: {}\", this.containerName);\n } else {\n // In the Global instance case the containerName is empty\n this.containerName = \"\";\n }\n startUp();\n }", "protected abstract void construct();", "protected Container createContainer() {\n\treturn new EditorContainer();\n }", "public Ctacliente() {\n\t}", "public CalccustoRequest()\r\n\t{\r\n\t}", "public static void created() {\n\t\t// TODO\n\t}", "public void addContainer(GameObject container) {\n if(!containers.contains(container)) {\n containers.add(container);\n } else {\n System.out.println(\"addContainer(): This container is already added.\");\n }\n }", "CreateContainerCmd withAuthConfig(AuthConfig authConfig);", "public CircleCADTool() {\r\n }", "private CLUtil()\n {\n }", "default Node create(HibUser user, HibSchemaVersion container, HibProject project) {\n\t\treturn create(user, container, project, null);\n\t}", "void addToContainer(Container container);", "public Ludo() {\n this.status = \"Created\";\n }", "public Actor(String actorDescription) {\n actorParams = actorDescription.split(\":\");\n id = actorParams[0];\n x = Double.parseDouble(actorParams[1]);\n y = Double.parseDouble(actorParams[2]);\n SimStatus.registerNewActor(id, x, y, label);\n randomGenerator = new Random();\n /** sets the actor lifetime to 10 minutes */\n lifetime_min = 10; \n lifetime = (long) TimeUnit.MINUTES.toMillis(lifetime_min); // converter minutos em milisegundos\n \n /** Initializes the Communication Stack */\n csParams = new String[]{actorParams[3], actorParams[4],actorParams[5], \n actorParams[6], actorParams[7], actorParams[8],actorParams[9],actorParams[10]};\n \n \n }", "public CreateStatus()\n {\n super(new DataMap(), null);\n }", "public Odi11SceneCatImpl() {\n }", "public ApplicationCreator() {\n }", "public void testCtorSuccess() {\r\n new FileSystemPersistence(10);\r\n }", "public InventarioControlador() {\n }", "private Cat() {\n\t\t\n\t}", "public RobotContainer()\n {\n SmartDashboard.putData(new InstantCommand(\n () -> flywheelSubsystem.hoodEncoder.setPosition(0)\n ));\n // Configure the button bindings\n configureButtonBindings();\n }", "protected ForContainerCreation(Class<?> target) {\n this.target = target;\n }", "public CreateHero() {\r\n\t\tinitComponents();\r\n\t}", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "public Magazzino() {\r\n }", "Node create(HibUser user, HibSchemaVersion container, HibProject project, String uuid);", "public StartUp(){\r\n \r\n }", "public void test_ctor() {\n assertNotNull(\"instance should be created.\", instance);\n }", "@Override\n public void construct() throws IOException {\n \n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public LabConstructUserServiceImpl() {\n\t}", "public Constructor(){\n\t\t\n\t}", "public void testConstructor() {\n CutSubsystemAction cutSubsystemAction = new CutSubsystemAction(subsystem);\n assertNotNull(\"Instance of CutSubsystemAction should be created.\", cutSubsystemAction);\n }", "@Test\n public void classInstantiated() {\n assertNotNull(cameraVisualizationPacket);\n }", "private CatalogContract() {}", "public ActorNPC() {\r\n }", "protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }", "public MyTrackContainer(){\n\t}", "public ContainerAlreadyExistsInFacilityException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public static SubsystemNodeContainer createSubsystemNodeContainer() {\n Map<String, String> properties = new HashMap<String, String>();\n properties.put(\"String\", \"String\");\n TransferHandler handler = new TransferHandler(\"\");\n SubsystemNodeContainer snc = null;\n try {\n snc = new SubsystemNodeContainer(AccuracyTestHelper.createGraphNodeForSubsystem(), properties, handler);\n } catch (IllegalGraphElementException e) {\n TestCase.fail(\"Should not throw exception here.\");\n }\n return snc;\n }", "public Factory(NamedObj container, String name)\n\t\t\t\tthrows IllegalActionException, NameDuplicationException {\n\t\t\tsuper(container, name);\n\t\t}", "public RobotContainer() \n {\n /* Bind commands to joystick buttons. */\n m_OI.configureButtonBindings();\n\n /* Initialize various systems on robotInit. */\n this.initializeStartup();\n\n /* Initialize autonomous command chooser and display on the SmartDashboard. */\n this.initializeAutoChooser();\n\n /* Initialize PID tuning for use on the SmartDashboard. */\n this.initializePIDValues();\n\n // this.testColorSensing();\n }", "public static void main(String[] argv) {\n try {\n PoolInfoClient test = create();\n System.out.println(test.toString());\n } catch (Exception e) {\n System.out.println(\"Got exception: \");\n e.printStackTrace();\n System.exit(1);\n }\n }", "public Contato() {\n }", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "ComponentContainer container(ContextDefinition context);", "Compuesta createCompuesta();", "@Test\n public void testBuildContainer() throws Exception {\n System.out.println(\"buildContainer\");\n JTextArea ta = new JTextArea();\n //Create temp host file\n try {\n //\"False\" in file writer for no append\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"hosts\", false)));\n out.println(\"[email protected]\");\n out.flush();\n } catch (Exception e) {\n\n }\n ArrayList<File> files = new ArrayList<File>();\n Docker instance = new Docker(\"ubuntu\", \"git\", files, \"sh6791\", \"matrix\", \"v1\", \"saqhuss\", \"dockersh6791\", \"[email protected]\");\n instance.buildDockerfile();\n instance.buildContainer(ta);\n Process p;\n String line = null;\n StringBuilder sb = new StringBuilder();\n try {\n p = Runtime.getRuntime().exec(new String[]{\"docker\", \"images\"});\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n } catch (Exception e) {\n\n }\n assertEquals(sb.toString().split(\"\\n\")[1].split(\" \")[0].trim(), \"saqhuss/matrix\");\n Files.delete(Paths.get(\"Dockerfile\"));\n Files.delete(Paths.get(\"hosts\"));\n Files.delete(Paths.get(\"id_rsa\"));\n Files.delete(Paths.get(\"id_rsa.pub\"));\n Files.delete(Paths.get(\"authorized_keys\"));\n }", "public MyResource() {\n System.out.println(\"creating Resource\");\n }", "public Cart() {\r\n\t\tSystem.out.println(\"in ctor of cart\");\r\n\t}", "public void testCtorAccuracy() {\r\n assertNotNull(\"Should create the instance successfully.\", log);\r\n assertEquals(NAME, log.getName());\r\n }", "public Main() {\n \n \n }", "@Test(expected = NullPointerException.class)\n public void testConstructorNPE() throws NullPointerException {\n new BoundedCompletionService<Void>(null);\n shouldThrow();\n }" ]
[ "0.6513108", "0.62703204", "0.6207255", "0.59405893", "0.5731972", "0.5709022", "0.5577985", "0.5544931", "0.54333025", "0.54115856", "0.54017174", "0.5396487", "0.5349261", "0.5322338", "0.5267751", "0.52171624", "0.52084076", "0.52037144", "0.5171304", "0.5156129", "0.51529425", "0.51420146", "0.5128396", "0.5124398", "0.51147527", "0.50950104", "0.50624484", "0.5058115", "0.501992", "0.50149345", "0.5008987", "0.50088596", "0.5001326", "0.49951565", "0.49932033", "0.49916074", "0.49832225", "0.4982382", "0.49793127", "0.49593303", "0.49538335", "0.49494487", "0.49486935", "0.4947316", "0.49433622", "0.4938061", "0.4934214", "0.49291745", "0.4925666", "0.4922357", "0.4909792", "0.49078003", "0.49059412", "0.4905307", "0.49010828", "0.49005863", "0.4887336", "0.4886147", "0.48730043", "0.48684698", "0.48625356", "0.48547292", "0.48524866", "0.48348096", "0.48323217", "0.48317534", "0.4829802", "0.48239297", "0.48227632", "0.4819786", "0.48147026", "0.48135716", "0.48133183", "0.48132965", "0.4807103", "0.4798187", "0.47966102", "0.47928736", "0.4792148", "0.47906822", "0.4789913", "0.4789065", "0.4786126", "0.4785733", "0.47846952", "0.4783883", "0.47822806", "0.47816065", "0.47810054", "0.47782198", "0.47770298", "0.47764006", "0.4775472", "0.47741112", "0.47708026", "0.47699872", "0.47691092", "0.47677332", "0.47673112", "0.47661498" ]
0.5047242
28
Clears all items from the container
public void clearContainer() { cargoList.clear(); this.currentVolume=0; this.currentWeight=0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear(){\n this.items.clear();\n }", "public void clearItems(){\n items.clear();\n }", "public void clear() {\r\n\t\titems.clear();\r\n\t}", "public void clear() {\n items.clear();\n update();\n }", "void clear()\n\t{\n\t\tgetItems().clear();\n\t}", "public void empty() {\n _items.clear();\n }", "public void removeAllItems() {\n contents.clear();\n }", "public void clear() {\r\n items.clear();\r\n keys.clear();\r\n }", "public void clearItems() {\n grabbedItems.clear();\n }", "public void clear() {\n size = 0;\n Arrays.fill(items, null);\n }", "public void clear() {\n\t\tcollection.clear();\n\t}", "public void removeAllItems ();", "public void clear() {\n doClear();\n }", "public void clear() {\n this.collection.clear();\n }", "public void clear() {\r\n items = Arrays.copyOf(new int[items.length], items.length);\r\n NumItems = 0;\r\n }", "public void clear() {collection.clear();}", "public void clearContainerElements() {\n nestedElements.clear();\n }", "public void clear() {\n\t\tallItems.clear();\n\t\tminimums.clear();\n\t}", "@Override\n public void clear() {\n elements.clear();\n indexByElement.clear();\n }", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "public void clearAll();", "public void clearAll();", "@Override\n public void clear() {\n for (E e : this) {\n remove(e);\n }\n }", "public void clear() {\n doClear( false );\n }", "@Override\n\tpublic void clearAll() {\n\t\t\n\t}", "public void clear() {\n final int itemCount = mItems.size();\n mItems.clear();\n mDatasourceObservable.notifyItemRangeRemoved(0, itemCount);\n }", "public void clearAll()\r\n {\r\n if(measurementItems!=null) measurementItems.clear();\r\n itemsQuantity=(measurementItems!=null)?measurementItems.size():0;\r\n }", "public void clear(){\n\t\tclear(0);\n\t}", "public void clear() {\n \tIterator<E> iterateSet = this.iterator();\n \t\n \twhile(iterateSet.hasNext()) {\n \t\t// iterate through and remove all elements\n \t\titerateSet.next();\n \t\titerateSet.remove();\n \t}\n }", "private void clear() {\n }", "public void clear() {\n\n mItems.clear();\n notifyDataSetChanged();\n\n }", "public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}", "public void clear(){\r\n BarsList.clear();\r\n }", "public void clear() {\n }", "public final void clear() {\n clear(true);\n }", "public void clear() {\n mItems.clear();\n notifyDataSetChanged();\n }", "public void clear() {\n mItems.clear();\n notifyDataSetChanged();\n }", "public void clear() {\n\t\tthis.contents.clear();\n\t}", "protected abstract void clearAll();", "public void clear() {\n\t\t\r\n\t}", "@Override\n public void clear() {\n capacity = 15;\n currentSize = 0;\n this.container = new Object[capacity];\n }", "public void clear()\n {\n }", "public void clear()\n {\n int llSize = ll.getSize();\n for(int i=0; i<llSize; i++){\n ll.remove(0);\n }\n }", "public void clear()\n\t{\n\t\tthis.getChildren().clear();\n\t}", "public void clear() {\n this.entries = new Empty<>();\n }", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear() {\n mMenuItems.clear();\n mModelList.clear();\n mActionViewLayout.clear();\n }", "@Override\n public void clear() {\n \n }", "void clearAll();", "void clearAll();", "@Override\n public void clear() {\n size = 0;\n }", "@Override\n public void clear() {\n size = 0;\n }", "@Override\n public void clear() {\n size = 0;\n }", "public void clear() {\n size = 0;\n }", "public void clearCart() {\n this.items.clear();\n }", "public void clear() {\n\t\tthis.count = (emptyItem ? 1 : 0);\n\t\tpages.clear();\n\t}", "@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\telements[i] = null;\n\t\t}\n\n\t\tsize = 0;\n\t}", "public void clear() {\n\t\tthis.set.clear();\n\t\tthis.size = 0;\n\t}", "public void clear () {\n\t\treset();\n\t}", "public void clear() {\n }", "public void clear() {\n }", "public void clear() {\n\t\tentries.clear();\n\t}", "public void clear() {\n\t\tIterator<E> iterator = this.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\titerator.next();\n\t\t\titerator.remove();\n\t\t}\n\t}", "public void clear() {\n this.layers.clear();\n list.clear();\n }", "public void clear() {\r\n\t\tremoveAll();\r\n\t\tdrawBackGround();\r\n\t\tclearEntries();\r\n\t\t\r\n\t}", "public void clear() {\r\n\t\tsize = 0;\r\n\t}" ]
[ "0.8319375", "0.8319061", "0.8268844", "0.81588596", "0.811391", "0.79907167", "0.79828393", "0.79566824", "0.78219616", "0.77503204", "0.7616006", "0.7615646", "0.75630796", "0.752704", "0.7509392", "0.7487951", "0.74651414", "0.7458663", "0.7410903", "0.7389304", "0.7389304", "0.7384184", "0.7384184", "0.7383486", "0.7363835", "0.7323256", "0.7293784", "0.7244198", "0.7214881", "0.7214112", "0.72114766", "0.7203471", "0.71972036", "0.7196824", "0.7196176", "0.7195909", "0.71923", "0.71923", "0.71917194", "0.71909726", "0.71902686", "0.7188177", "0.7186456", "0.7180242", "0.71793336", "0.7178211", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.7174459", "0.71655184", "0.7164036", "0.71624863", "0.71624863", "0.71577173", "0.71577173", "0.71577173", "0.71524096", "0.71508217", "0.7150757", "0.7150682", "0.71493787", "0.71460253", "0.71449536", "0.71449536", "0.7143157", "0.714262", "0.713902", "0.7132073", "0.7128838" ]
0.80150473
5
Sets the status of the container to loaded (onto a flight)
public void loaded(){ loaded=true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLoaded();", "public void loadStatus (){\n\t}", "public void setLoaded(boolean loaded);", "private void loadingPhase() {\n try { Thread.sleep(10000); } catch(InterruptedException e) { return; }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "public void loadStatus() {\r\n\r\n\t\ttry {\r\n\t\t\tRemoteOffice objRemoteOffice = Application.UNITY_CLIENT_APPLICATION.getreRemoteOffice();\r\n\t\t\tif (objRemoteOffice != null) {\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"Going to load the status of the components from broadworks.\");\r\n\r\n\t\t\t\tboolean isActive = objRemoteOffice.isActive();\r\n\t\t\t\tString phnumber = objRemoteOffice.getPhoneNumber();\r\n\t\t\t\tobjRemoteOfficeEnableJCheckBox.setSelected(isActive);\r\n\t\t\t\tobjRemoteOfficeJTextField.setText(phnumber);\r\n\r\n\t\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(true);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(false);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status not loaded successfully\");\r\n\t\t}\r\n\t}", "protected void setLoaded(boolean fLoaded)\n {\n m_fLoaded = fLoaded;\n }", "protected void setLoaded(boolean loaded) {\n\tthis.loaded = loaded;\n }", "void setLoading(boolean isLoading);", "@Override\n\tpublic void onStatusChanged(Object arg0, STATUS status) {\n\t\tSystem.out.println(status);\n\t\tswitch (status) {\n\n\t\tcase LAYER_LOADED:\n\t\t\tif (!isPathShow && goodsMap != null && goodsMap.size() > 0) {\n\t\t\t\tshelfList.clear();\n\t\t\t\tsearchTime = 0;\n\t\t\t\tqueryLocator();\n\t\t\t\tisPathShow = true;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "public void loading() {\n if (state == null) {\n state = new NodeState();\n }\n state.setState(ENodeState.Loading);\n }", "public void setUploading()\n {\n jPanel4.setVisible(false);\n th.start();\n }", "protected void onStartLoading() { forceLoad();}", "public void setLoadingStatus(LoadingStatus loadingStatus) {\n this.loadingStatus = loadingStatus;\n }", "public void setReady() {\n\t\tfadein = fadeout = false;\n\t\tfadeValue = 1;\n\t\tloadingDone();\n\t}", "public void setLoading(boolean loading) {\n this.loading = loading;\n }", "private void setComponentStatus() {}", "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "public void load() {\n handleLoad(false, false);\n }", "protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}", "public void notifyLoaded();", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "void setForceLoaded(boolean forced);", "public boolean isLoaded(){return true;}", "public abstract void loaded();", "private void onLoad(Building building) {\n ImageView view = new ImageView(building.getImage());\n addEntity(building, view);\n squares.getChildren().add(view);\n System.out.println(\"Set new Building \" + building.getType());\n }", "public void startLoading() {\n projects.clear();\n processContainer.setVisibility(View.VISIBLE);\n progressSpinner.setVisibility(View.VISIBLE);\n progressText.setVisibility(View.VISIBLE);\n progressText.setText(\"Getting Items...\"); // Text updated using SetProgress()\n listView.setVisibility(View.GONE);\n }", "private void verifyActive() {\n if (!active) {\n throw new IllegalStateException(\"Container is no longer active for loading\");\n }\n }", "@Override\n\tprotected void load() {\n\t\tisPageLoaded = true;\n\t}", "@Override\n protected void onStartLoading() {\n\n forceLoad();\n }", "@Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n mLoadingIndicator.setVisibility(View.VISIBLE);\n\n forceLoad();\n }", "@Override\n protected void onStartLoading() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n if (mResult != null) // If we currently have a result available, deliver it immediately.\n deliverResult(mResult);\n\n if (isReload() || mResult == null)\n forceLoad();\n }\n });\n }", "@Override\n public void setLoadOnStartup(int los) {\n }", "void setContainerStatusInProgress(RuleContextContainer rccContext)\r\n throws StorageProviderException;", "@Override\n\tprotected void onStartLoading() {\n\t\tif (mData != null) {\n\t\t\tdeliverResult(mData);\n\t\t}\n\t\t// Now we're in start state so we need to monitor for data changes.\n\t\t// To do that we start to observer the data\n\t\t// Register for changes which is Loader dependent\n\t\tregisterObserver();\n\t\t// Now if we're in the started state and content is changes we have\n\t\t// a flag that we can check with the method takeContentChanged()\n\t\t// and force the load\t\t\t\t\t\n\t\tif (takeContentChanged() || mData == null) {\n\t\t\tforceLoad();\n\t\t}\n\t}", "public void setLoading(boolean z) {\n this.mLoading = z;\n }", "@SuppressWarnings(\"SameParameterValue\")\n public void setFullyLoaded(boolean fullyLoaded) {\n this.fullyLoaded = fullyLoaded;\n }", "@Override\n protected void onStartLoading() {\n forceLoad();\n\n }", "private void setLoadingDisplay() {\n if (swipeRefreshing) {\n footer.clear();\n setRefreshing(true);\n } else if (loading) {\n footer.setLoading();\n }\n }", "public void setScreenLoaded(boolean screenLoaded) \n\t{\n\t\tthis.screenLoaded = screenLoaded;\n\t}", "public void setAllLoaded(boolean value) {\n this.allLoaded = value;\n }", "private void onFullyLoaded() {\n info(\"onFullyLoaded()\");\n cancelProgress();\n\n //Fully loaded, start detection.\n ZiapApplication.getInstance().startDetection();\n\n Intent intent = new Intent(LoadingActivity.this, MainActivity.class);\n if (getIntent().getStringExtra(\"testname\") != null)\n intent.putExtra(\"testname\", getIntent().getStringExtra(\"testname\"));\n startActivity(intent);\n finish();\n }", "@Override\n public void onChange(boolean selfChange) {\n mModel.resetLoadedState(false, true);\n mModel.startLoaderFromBackground();\n }", "void showLoading(boolean isLoading);", "@Override\n protected void onStartLoading() {\n if (idlingResource != null) {\n idlingResource.setIdleState(false);\n }\n\n if (recepts != null) {\n deliverResult(recepts);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n }", "public synchronized void setComplete() {\n status = Status.COMPLETE;\n }", "public void setLoadState(boolean isInLoadState) {\n\t\tthis.setListShown(!isInLoadState);\n\t}", "public void setStatus(boolean newstatus){activestatus = newstatus;}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n public void showLoading() {\n setRefresh(true);\n }", "@Override\n public void onLoad() {\n super.onLoad();\n instance = this;\n running = true;\n }", "private void completeLoad() {\n if (boardFragment == null) {\n FragmentManager fm = getSupportFragmentManager();\n boardFragment = (BoardFragment) fm.findFragmentById(android.R.id.content);\n }\n boardFragment.setData(posts, threadLinks);\n\n setProgressBarIndeterminateVisibility(false);\n if (refreshItem != null) {\n refreshItem.setVisible(true);\n }\n }", "protected void updateLoading()\n {\n scheduled = false;\n\n if (!valid)\n return;\n\n while (loading.size() < numConnections) {\n updateActiveStats();\n\n final TileInfo tile;\n synchronized (toLoad) {\n if (toLoad.isEmpty())\n break;\n tile = toLoad.last();\n if (tile != null) {\n toLoad.remove(tile);\n }\n }\n if (tile == null) {\n break;\n }\n\n tile.state = TileInfoState.Loading;\n synchronized (loading) {\n if (!loading.add(tile)) {\n Log.w(\"RemoteTileFetcher\", \"Tile already loading: \" + tile.toString());\n }\n }\n\n if (debugMode)\n Log.d(\"RemoteTileFetcher\",\"Starting load of request: \" + tile.fetchInfo.urlReq);\n\n // Set up the fetching task\n tile.task = client.newCall(tile.fetchInfo.urlReq);\n\n if (tile.isLocal) {\n // Try reading the data in the background\n new CacheTask(this,tile).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,(Void)null);\n } else {\n startFetch(tile);\n }\n }\n\n updateActiveStats();\n }", "public void setStateComplete() {state = STATUS_COMPLETE;}", "public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }", "void transStatus()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(passenger != null && status.equals(\"soon\"))\r\n\t\t\t{\r\n\t\t\t\tService s_temp = new Service(passenger);\r\n\t\t\t\tdes = passenger.loc;\r\n\t\t\t\tmakeService(loc.i*80+loc.j,des.i*80+des.j);\r\n\t\t\t\tstatus = \"stop\";\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tstatus = \"serve\";\r\n\t\t\t\tdes = passenger.des;\r\n\t\t\t\ts_temp.path.add(loc);\r\n\t\t\t\tmakeService(loc.i*80+loc.j,des.i*80+des.j,s_temp.path);\r\n\t\t\t\tstatus = \"stop\";\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tcredit += 3;\r\n\t\t\t\tser_times += 1;\r\n\t\t\t\tservices.add(s_temp);\r\n\t\t\t\t//refresh:\r\n\t\t\t\tstatus = \"wait\";\r\n\t\t\t\tpassenger = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");\r\n\t\t}\r\n\t}", "void setNetStatus(boolean status){\r\n\t\t\t\tready=status;\r\n\t\t\t}", "public void markReady() {\n\t\tsetState(State.READY);\n\t\tthis.statusCode = StatusCode.Success.code;\n\t}", "@Override\n\tpublic void refresh(){\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}", "private void setStatus() {\n\t\t// adjust the status of the rest\n\t\tif (rest.getState().equals(RestState.INACTIVE)) {\n\t\t\t// set status to heating\n\t\t\trest.setState(RestState.HEATING);\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t} else if (rest.getState().equals(RestState.HEATING) && temperatureSensor.getTemperature() >= (rest.getTemperature() - tolerance)) {\n\t\t\t// set status to active\n\t\t\trest.setState(RestState.ACTIVE);\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t} else if (rest.getState().equals(RestState.ACTIVE)\n\t\t\t\t&& (new GregorianCalendar().getTimeInMillis() - rest.getActive().getTimeInMillis()) / 1000 / 60 > rest.getDuration()) {\n\t\t\t// time is up :)\n\t\t\tif (rest.isContinueAutomatically()) {\n\t\t\t\trest.setState(RestState.COMPLETED);\n\t\t\t} else {\n\t\t\t\trest.setState(RestState.WAITING_COMPLETE);\n\t\t\t}\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t}\n\t}", "public void setDataLoaded(boolean dataLoaded) {\n\t\t\n\t\tthis.dataLoaded = dataLoaded;\n\t}", "private void startCusorLoader() {\n\n if (getLoaderManager().getLoader(CURSOR_LOADER_ID) == null) {\n getLoaderManager().initLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n } else {\n getLoaderManager().restartLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n }\n\n }", "@Override\n public void onMapLoaded() {\n mMapStatus = new MapStatus.Builder().zoom(9).build();\n mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(mMapStatus));\n }", "public boolean isLoaded();", "private void reDrowStatusCard() {\n \t\tint currentInstance= Storage_access.getCurrentProjectInstanceBDDID() ;\n \t\t\n \t\tdispatcher.execute(new GetActivityStateAction(currentInstance), new AsyncCallback<GetActivityStateActionResult>() {\n \n \t\n \n \t\t\t@Override public void onFailure(Throwable arg0) {\n \t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!!!**** failed to get activities status\");\n \n \t\t\t}\n \n \t\t\t@Override public void onSuccess(GetActivityStateActionResult result) {\n \t\t\t\tfor (int i=0; i< Storage_access.getNumberOfCard(); i++) {\n \t\t\t\t\tString card = Storage_access.getCard(i);\n \t\t\t\t\tActivityState_dto a = result.getActivitiesState().get(\"\"+Storage_access.getBddIdCard(card));\n \t\t\t\t\tif (a == null) \n \t\t\t\t\t\tStorage_access.revoveFromSlot(i);\t\n \t\t\t\t\telse \n \t\t\t\t\t\tStorage_access.setSlotCard(i, a.getDay(), a.getPeriod());\t\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\teventBus.fireEvent( \n \t\t\t\t\t\tnew BoardViewChangedEvent(getView().getCombo_viewChoice1().getSelectedIndex(),\n \t\t\t\t\t\t\t\t\t\t\t\t getView().getCombo_viewChoice2().getSelectedIndex())\n \t\t\t\t\t\t);\n \t\t\t\t//Storage_access.printStorage();\n \t\t\t}\n \n \t\t\t});\n \n \t\t\n \t}", "void setStatus(STATUS status);", "public void startLoading() {\r\n\t\tgetDisplay().setRowCount(0, true);\r\n\t\tlabel1.setHTML(\"\");\r\n\t\tlabel2.setHTML(\"\");\r\n\t}", "public void startGame() {\n status = Status.COMPLETE;\n }", "boolean isLoaded();", "public void showLoadingView() {\n handleLoadingContainer(false /* showContent */, false /* showEmpty */, false /* animate */);\n }", "public void setInitialStatus(InstanceStatus initialStatus)\n {\n this.initialStatus = initialStatus;\n }", "private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "public void showLoadingView() {\n mStateView.showViewLoading();\n }", "private Container Load() {\n return null;\r\n }", "public void setStateToInProgress() {\n progressBar.setIndeterminate(true);\n progressBarLabel.setText(\"Simulation is in progress...\");\n openFolderButton.setVisible(false);\n }", "public void setReady() {\n\t\tlabelReady.setEnabled(true);\n\t\tlabelBusy.setEnabled(false);\n\t\tsetStatusBar(DO_MOVE_MSG);\n\t}", "public void setPending()\n\t{\n\t\tprogressBar.setString(XSTR.getString(\"progressBarWaiting\"));\n\t\tprogressBar.setIndeterminate(true);\n\t\tprogressBar.setValue(0);\n\t\t\n\t\tstoplightPanel.setPending();\n\t}", "private void loadData() {\r\n titleProperty.set(TITLE);\r\n imageView.setImage(null);\r\n scrollPane.setContent(null);\r\n final Task<Void> finisher = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n buffer = replay.politicalBuffer;\r\n output = new WritableImage(replay.bufferWidth, replay.bufferHeight);\r\n output.getPixelWriter().setPixels(0, 0, replay.bufferWidth, replay.bufferHeight, PixelFormat.getIntArgbPreInstance(), buffer, 0, replay.bufferWidth);\r\n progressBar.progressProperty().unbind();\r\n progressBar.setProgress(0);\r\n statusLabel.textProperty().unbind();\r\n statusLabel.setText(l10n(\"replay.map.loaded\"));\r\n scrollPane.setContent(null);\r\n imageView.setImage(output);\r\n scrollPane.setContent(imageView);\r\n int fitWidth = Integer.parseInt(settings.getProperty(\"map.fit.width\", \"0\"));\r\n int fitHeight = Integer.parseInt(settings.getProperty(\"map.fit.height\", \"0\"));\r\n imageView.setFitHeight(fitHeight);\r\n imageView.setFitWidth(fitWidth);\r\n lock.release();\r\n }\r\n });\r\n return null;\r\n }\r\n };\r\n progressBar.progressProperty().bind(finisher.progressProperty());\r\n statusLabel.textProperty().bind(finisher.titleProperty());\r\n replay.loadData(finisher);\r\n }", "@FXML\n void onStatus(ActionEvent event) throws ClassNotFoundException {\n paczkaDAO.zmienStatusPrzesylki(Integer.parseInt(idPaczkiTextField.getText()), false, Integer.parseInt(idPaczkomatuTextField.getText()));\n try {\n\n if (!idPaczkiTextField.getText().equals(null)) {\n\n ObservableList<Tracking> paczkiData = paczkaDAO.sledzPaczke(Integer.valueOf(idPaczkiTextField.getText()));\n populateTracking(paczkiData);\n consoleTextArea.appendText(\"Zaktualizowano status dla paczki o numerze id: \" + idPaczkiTextField.getText() + \".\" + \"\\n\");\n\n }\n } catch (SQLException e) {\n consoleTextArea.appendText(\"Wystąpił błąd.\\n\");\n }\n }", "@Override\r\n\t\t\t\tpublic void onLoadStarted(PhotoView container,\r\n\t\t\t\t\t\tString uri, BitmapDisplayConfig config) {\n\t\t\t\t\tspinner.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tsuper.onLoadStarted(container, uri, config);\r\n\t\t\t\t}", "public void onLoad() {\n\t}", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "void showLoading(boolean visible);", "public void load() {\n\t}", "void setStatus(TaskStatus status);", "@Override\n public void setLoadingIndicator(boolean active) {\n\n if (active) {\n mBusyIndicator.setVisibility(View.VISIBLE);\n } else {\n mBusyIndicator.setVisibility(View.GONE);\n }\n }", "public void setStatus(JobStatus status);", "@Override\n public Boolean isLoading() {\n return loadingInProgress;\n }", "public ScreenStatus(ComponentContainer container) {\n\t\tsuper(container);\n\t\t// TODO Auto-generated constructor stub\n\t\tform.registerForOnDestroy(this);\n\t\t \n\t\tmainUIThreadActivity = container.$context();\n\t\tLog.i(TAG, \"Before create probe\");\n\t\tgson = new GsonBuilder().registerTypeAdapterFactory(\n\t\t\t\tFunfManager.getProbeFactory(mainUIThreadActivity)).create();\n\t\tJsonObject config = new JsonObject();\n\n\t\tprobe = gson.fromJson(config, ScreenProbe.class);\n\n\t\tinterval = SCHEDULE_INTERVAL;\n\t\tduration = SCHEDULE_DURATION;\n\t\t\t\n\t}", "public void showLoading() {\n }", "public void setStatus(WorkflowInstanceStatus status) {\n this.status = status;\n }", "@Override\n\tpublic void setStatus(VehicleStatus status) {\n\t\tthis.status = status;\n\t}", "public void setStatus(Status status) {\r\n\t this.status = status;\r\n\t }", "void onLocationChanged()\n\t{\n\t\tgetLoaderManager().restartLoader(FORECAST_LOADER_ID, null, this);\n\t}", "void onLoaderLoading();", "@Override\n protected void onStartLoading() {\n if (mMovieData != null) {\n deliverResult(mMovieData);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tloadLayout.setVisibility(View.VISIBLE);\n\t\t}", "@Override\r\n public void onPreResponse() {\r\n findViewById(R.id.loader).setVisibility(View.VISIBLE);\r\n findViewById(R.id.mainContainer).setVisibility(View.GONE);\r\n findViewById(R.id.errorText).setVisibility(View.GONE);\r\n\r\n }", "public void setStatus(boolean newStatus);", "public void setStatus(Boolean s){ status = s;}", "void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}" ]
[ "0.6817633", "0.6753833", "0.6621886", "0.62923276", "0.62796366", "0.6217972", "0.6198236", "0.6055454", "0.5973495", "0.5917495", "0.58824664", "0.5880535", "0.5792921", "0.5727512", "0.5725069", "0.5701805", "0.5681914", "0.56819075", "0.5649471", "0.564869", "0.5640486", "0.56249964", "0.56249124", "0.5606537", "0.55825406", "0.55771154", "0.5552076", "0.5549108", "0.55377555", "0.5526681", "0.5520782", "0.5517073", "0.5498373", "0.546059", "0.54580927", "0.5449065", "0.5435112", "0.5425731", "0.5425645", "0.54225785", "0.541545", "0.5406005", "0.5404947", "0.538726", "0.5384996", "0.53707117", "0.536494", "0.53521353", "0.53454936", "0.53339297", "0.53326017", "0.5327879", "0.53255475", "0.5319237", "0.53119826", "0.5298526", "0.52955437", "0.5285753", "0.527363", "0.527185", "0.5270909", "0.5270211", "0.52592796", "0.52544814", "0.5247869", "0.5242859", "0.52402824", "0.5230659", "0.52295065", "0.5228566", "0.5227955", "0.52275616", "0.5222506", "0.5212096", "0.5208248", "0.5208091", "0.5205395", "0.5203198", "0.52025616", "0.5200671", "0.51997477", "0.5186669", "0.51856464", "0.51839393", "0.5182608", "0.5175588", "0.51614666", "0.5160889", "0.5157797", "0.5156493", "0.5153429", "0.5153373", "0.5152409", "0.51517355", "0.5148839", "0.5148709", "0.5140437", "0.5140031", "0.51382697", "0.51348764" ]
0.63323057
3
Sets the status of the container to unloaded (from a flight)
public void unloaded(){ loaded=false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unload() {\n releasePressureToReturn();\n releasePressureToShooter();\n latch(false);\n// reloaded = false;\n }", "public void destroy() {\n this.alive = false;\n }", "void unsetStatus();", "public void flightDisappear();", "void setStatus(boolean destroyed);", "public void unload(){ \n load.unloadFirst(); \n }", "public void Kill(){\n this.dead.getAndSet(true);\n if(this.registry != null){\n try {\n UnicastRemoteObject.unexportObject(this.registry, true);\n } catch(Exception e){\n System.out.println(\"None reference\");\n }\n }\n }", "public void unload() {\n plugin.getEngine().getWorldProvider().getHeartbeat().unsubscribe(WIND);\n plugin.getRootConfig().unsubscribe(TEMPERATURES);\n }", "boolean unload();", "public void shutdown()\n {\n valid = false;\n quitSafely();\n\n synchronized (loading) {\n loading.clear();\n }\n synchronized (toLoad) {\n toLoad.clear();\n }\n synchronized (tilesByFetchRequest) {\n tilesByFetchRequest.clear();\n }\n }", "void deactivate() {\n\t\tanimalTemplate = null;\n\t\tscope=null;\n\t\ttriggerOnID=false;\n\t\tstate = null;\n\t\tlog.debug(bundleMarker, \"deactivating...\");\n\t}", "void unsetState();", "void dead() { this.alive = false; }", "private Storage_Area unloadAGV (Storage_Area storage) throws Exception\r\n {\r\n return unloadContainer(0,0, storage);\r\n }", "public void shutdown()\n {\n this.running = false;\n }", "public void turnOff() {\n update(0,0,0);\n this.status = false;\n }", "protected abstract void onUnloadedCustom();", "public void setDead(){\n\t\t//queue this blood for cleanup\n\t\tvisible = false;\n\t\tDEAD = true;\n\t\tcleanUp();\n\t}", "@Override\n public void clear() {\n isLoaded = false;\n }", "private void tear() {\n\t\tthis.torn = true;\n\t\tthis.getContainer().addToContents(getDucatContent());\n\t\tthis.getContainer().removeFromContents(this);\n\t}", "private void clearAlive() {\n \n alive_ = false;\n }", "public void onUnload() {\n\t}", "public void off() {\n\n\t}", "public void refill(){\r\n\t}", "@Override\r\n\tpublic void execute() {\n\t\tlight.off();\r\n\t}", "public void deactivate() {\n\t\tactive_status = false;\n\t}", "public void removeStatus() {\n this.setStatus(StatusNamesies.NO_STATUS.getStatus());\n }", "public ContainerUnloader getUnloader();", "protected void takeDown() {\n // Deregister from the yellow pages\n try {\n DFService.deregister(this);\n } catch (FIPAException fe) {\n fe.printStackTrace();\n }\n\n // Printout a dismissal message\n System.out.println(\"Dataset-agent \" + getAID().getName() + \" terminating.\");\n }", "public void unLoad() {\n try{\n deInitialize();\n iMenu.unLoad();\n }catch(Exception e){\n Logger.loggerError(\"Menu canvas unload Error\"+e.toString());\n }\n }", "void resetStatus();", "@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release resources\n if( mData != null ) {\n releaseResources( mData );\n mData = null;\n }\n\n // The loader is being reset, so we should stop monitoring for changes\n if( mObserver != null ) {\n resolver.unregisterContentObserver( mObserver );\n mObserver = null;\n }\n }", "public void unloadItems() {\n if (dishwasherState == State.ON) {\n throw new InvalidStateException(\"The washing cycle hasn't been run yet\");\n } else if (dishwasherState == State.RUNNING) {\n throw new InvalidStateException(\"Please wait until washing cycle is finished\");\n }\n items = 0;\n dishwasherState = State.ON;\n System.out.println(\"The dishwasher is ready to go\");\n }", "public void dropWaitingStates() {\n waitlist.clear();\n }", "void minecraftChunkUnloaded() {\n\t\tthis.lastUnloadingTime = System.currentTimeMillis();\n\t}", "void onUnbind();", "public void halt ( )\n\t{\n\t\tthis.running = false;\n\t}", "public void destroy() {\n\t\tgone = true;\n\t}", "void decoller();", "protected void setDead()\n {\n alive = false;\n if(location != null) {\n field.clear(location);\n location = null;\n field = null;\n }\n }", "protected void setDead()\n {\n alive = false;\n if(location != null) {\n field.clear(location);\n location = null;\n field = null;\n }\n }", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "private void exit() {\n this.isRunning = false;\n }", "public void exitOverlay() {\n\t\tdeRegister(); \n\t}", "private void releaseAirfield() {\n\t\tlandedAirfield.setOccupied(false);\n\t}", "@Override\n\tprotected void takeDown() {\n\t\ttry{\n\t\t\tDFService.deregister(this);\n\t\t}\n\t\tcatch(FIPAException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void unsetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(STATE$14);\r\n }\r\n }", "public void unInit() {\n this.bdv = null;\n this.brz = null;\n }", "public synchronized void shutDown() {\n\t state.shutDown();\n\t}", "public final void onDeregistration()\n {\n onObjectDeregistration();\n this.container = null;\n }", "public void unsetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(STATE$8, 0);\r\n }\r\n }", "public void destroy(){\n destroyed = true;\n }", "public void clearContainer()\n\t{\n\t\tcargoList.clear();\n\t\tthis.currentVolume=0;\n\t\tthis.currentWeight=0;\n\t}", "public void powerOff() \n\t{\n\t\tif(active)\n\t\t{\n\t\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\t\tsetActivationLever(false);\n\t\t\t}\n\t\t\t\n\t\t\t//lots of code to make the furnace turn off, without loosing contents.\n\t\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tbyte data = furnace.getData().getData();\n\t\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\t\tfurnace.getInventory().clear();\n\t\t\tfactoryPowerSourceLocation.getBlock().setType(Material.FURNACE);\n\t\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tfurnace.setRawData(data);\n\t\t\tfurnace.update();\n\t\t\tfurnace.getInventory().setContents(oldContents);\n\t\t\t\n\t\t\t//put active to false\n\t\t\tactive = false;\n\t\t\t//reset the production timer\n\t\t\tcurrentProductionTimer = 0;\n\t\t}\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "protected void clearStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\tbackground.clearStatus();\n\t}", "public Unmount() {\r\n }", "public void vacateGarage() {\n\t\tvehicles.clear(); \n\t}", "void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}", "public void unlock() {\n islandLocked = false;\n }", "public void unload() {\n this.currentRooms.clear();\n // Zero the info panel.\n this.roomNameField.setText(\"\");\n this.includeField.setText(\"\");\n this.inheritField.setText(\"\");\n this.streetNameField.setSelectedIndex(0);\n this.determinateField.setText(\"\");\n this.lightField.setText(\"\");\n this.shortDescriptionField.setText(\"\");\n this.longDescriptionField.setText(\"\");\n this.exitPanel.removeAll();\n }", "public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }", "public void deactivate();", "public void deactivate() {\n log.info(\"Stopped\");\n }", "public void clean(){\n\t\tsynchronized(this.lock){\n\t\t\tint index=0;\n\t\t\tfor(ResourceStatus<T> resourceStatus:this.resourcesStatus){\n\t\t\t\tif(resourceStatus!=null){\n\t\t\t\t\tif(!resourceStatus.isInUse()){\n\t\t\t\t\t\tlong lastTime=resourceStatus.getLastNotInUseTime();\n\t\t\t\t\t\tlong currentTime=System.currentTimeMillis();\n\t\t\t\t\t\tT resource=resourceStatus.getResource();\n\t\t\t\t\t\tif((currentTime-lastTime)>=this.resourceAliveTime){\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdestroyResource(resource);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tlogger.error(Constants.Base.EXCEPTION, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.resourcesStatus[index]=null;\n\t\t\t\t\t\t\tthis.currentSize--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}", "public void unload() throws IOException;", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if (fireworkView.isRunning()) {\n fireworkView.setRunning(false);\n }\n }", "public void DeActivate() {\n\t\t\n\t}", "void unsetObjectives();", "public void onUnblock();", "public void unloadGameTextures()\r\n {\n }", "public void removePawn() {\n lives = 0;\n }", "public void switchOff();", "public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }", "void unsetStation();", "void deinit() {\n\t\tsafeLocationTask.cancel();\n\t\t//Deinit all remaining worlds\n\t\tworlds.values().forEach(WorldHandler::deinit);\n\t\t//Clear members\n\t\tworlds.clear();\n\t\toptions = null;\n\t}", "public void deactivate(){\n state = State.invisible;\n active = false;\n }", "private void unloadCollections(ORI container) {\n\n List<Collection> collections = resourceManager.loadChildren(Collection.class, container);\n for (Collection collection : collections) {\n unload(collection.getORI());\n }\n\n List<Folder> folders = resourceManager.loadChildren(Folder.class, container);\n for (Folder folder : folders) {\n unloadCollections(folder.getORI());\n }\n\n }", "public void unsetFacilityType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FACILITYTYPE$4, 0);\n }\n }", "@Override\n public void Die() {\n this.setAlive(false);\n }", "@Override\n\tpublic void onStopLoading() {\n\t\tcancelLoad();\n\t\t// It's important that the Observers are active because in this state\n\t\t// the monitoring for changes is still active but it won't notify \n\t\t// changes until in the started state again \n\t}", "void onUnregisterForPremount();", "private void clearStatus() {\n \n status_ = getDefaultInstance().getStatus();\n }", "public void resetOccupied(){\n \t\toccupiedSeconds = 0;\n \t}", "void unsetLastrun();", "public void shutDown() {\n StunStack.shutDown();\n stunStack = null;\n stunProvider = null;\n requestSender = null;\n\n this.started = false;\n\n }", "public void cleanShutDown () {\n shutdown = true;\n }", "protected void takeDown() {\n\t\t// Deregister from the yellow pages\n\t\ttry {\n\t\t\tDFService.deregister(this);\n\t\t}\n\t\tcatch (FIPAException fe) {\n\t\t\tfe.printStackTrace();\n\t\t}\n\t\t// Close the GUI\n\t\tmyGui.dispose();\n\t\t// Printout a dismissal message\n\t\tSystem.out.println(\"agent \"+getAID().getName()+\" terminating.\");\n\t}", "public void off() throws Exception;", "public void deactivate() {\n this.active = false;\n }", "public final void mo25942f() {\n setVisibility(0);\n setStatus(0);\n }", "public static void lost() {\n\t\tPig.alterStorage(false);\n\t}", "@SuppressWarnings(\"unused\")\n private static void onUnload() {\n Runnable runnable = onFinalize.getAndSet(null);\n if (runnable != null) {\n runnable.run();\n }\n }", "public void unregister() {\n unregistered = true;\n }", "public void reset() {\n //mLoader.reset();\n start();\n }", "public void die()\n\t{\n\t\talive = false;\n\t}", "private void bringToLife(){\n this.dead = false;\n }", "private void verifyActive() {\n if (!active) {\n throw new IllegalStateException(\"Container is no longer active for loading\");\n }\n }", "private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}" ]
[ "0.67144084", "0.62571883", "0.62565523", "0.61394113", "0.61018074", "0.6015201", "0.5893422", "0.5880948", "0.5861721", "0.5852582", "0.5838143", "0.58309275", "0.5820668", "0.58189285", "0.5739271", "0.57151663", "0.570524", "0.56908345", "0.5678152", "0.565787", "0.5646939", "0.56305075", "0.56153756", "0.5594076", "0.5591673", "0.5583541", "0.5552488", "0.5544709", "0.55387765", "0.55240196", "0.5519255", "0.55116117", "0.5500774", "0.54993856", "0.54880565", "0.54770875", "0.5474696", "0.54745954", "0.54685575", "0.5467899", "0.5462358", "0.5462358", "0.5456999", "0.5450449", "0.54461133", "0.5437217", "0.54366875", "0.5436279", "0.5435707", "0.542922", "0.54248613", "0.54227746", "0.54204434", "0.541922", "0.5414147", "0.5412684", "0.5411356", "0.54025996", "0.53995085", "0.53927743", "0.5391892", "0.53900313", "0.5386923", "0.53740937", "0.5372794", "0.5370583", "0.53603745", "0.5360194", "0.5357104", "0.5354229", "0.5342089", "0.5331717", "0.5330605", "0.5330282", "0.53245324", "0.5321957", "0.53184044", "0.53149956", "0.53123254", "0.53075355", "0.52994716", "0.5295807", "0.52956855", "0.5295571", "0.52950126", "0.5292179", "0.5291876", "0.5290448", "0.5289562", "0.528514", "0.52822244", "0.5281469", "0.5279727", "0.52742076", "0.5271563", "0.5271497", "0.5271146", "0.52596235", "0.52553535", "0.5253241" ]
0.69965035
0
Returns whether or not the container was loaded on to a flight
public boolean getLoaded() { return loaded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isLoaded();", "boolean isLoaded();", "public boolean isLoaded() {\n\t\treturn started;\n\t}", "protected boolean isLoaded()\n {\n return m_fLoaded;\n }", "public boolean isLoaded() {\n return _id != null;\n }", "private boolean hasTableContainerLoaded() {\n return delegationDefaultCreationScreen.tableContainer.isDisplayed();\n }", "public synchronized boolean isLoaded() {\n\t\treturn _resourceData != null;\n\t}", "public boolean isLoaded() {\n\t\treturn lib != null;\n\t}", "public boolean isLoaded()\n {\n return m_syntheticKind == JCacheSyntheticKind.JCACHE_SYNTHETHIC_LOADED;\n }", "public boolean isLoaded() {\n return loaded;\n }", "boolean isForceLoaded();", "public boolean isLoaded() {\n\treturn loaded;\n }", "public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isLoaded(){return true;}", "public boolean isLoaded() \n\t{\n\t return htRecords != null ;\n\t}", "public boolean isFullyLoaded() {\n return fullyLoaded;\n }", "public boolean isLoaded() {\n return parser != null;\n }", "public boolean isLoaded() {\n\t\treturn chestsLoaded;\r\n\t}", "public boolean hasBeenLoaded () {\n return loaded;\n }", "public boolean shouldLoad() {\n return load;\n }", "public boolean isLoaded() {\n return m_module.isLoaded();\n }", "public boolean isLoadedFromDisk() {\n return isLoadedFromDisk;\n }", "public boolean isLoadCache() {\n return mLoadCache;\n }", "public boolean isAutoStartup() {\n\t\treturn (this.container != null) ? this.container.isAutoStartup() : false;\n\t}", "public boolean isContainer();", "public boolean isLoaded(P player){\n return playerMap.containsKey(player);\n }", "public boolean hasLoadedFile() {\n return isSuccessfulFileLoad;\n }", "public boolean isDeployed(){\n return !places.isEmpty();\n }", "public boolean hasFlightdetails() {\n return flightdetails_ != null;\n }", "public boolean isTransferringContainer() {\n return this.isContainerFile();\n }", "boolean hasHasDeployedAirbag();", "boolean hasStartingConfig() {\n return startCfg_ != null;\n }", "boolean isCacheInitialized();", "public final boolean mo30098d() {\n try {\n return this.f24822a.isLoaded();\n } catch (RemoteException e) {\n zzbad.m26360d(\"#007 Could not call remote method.\", e);\n return false;\n }\n }", "public boolean hasFlightdetails() {\n return flightdetailsBuilder_ != null || flightdetails_ != null;\n }", "private boolean hasTrackingPlane() {\n for (Plane plane : session.getAllTrackables(Plane.class)) {\n if (plane.getTrackingState() == TrackingState.TRACKING) {\n return true;\n }\n }\n return false;\n }", "public boolean isScreenLoaded() \n\t{\n\t\treturn screenLoaded;\n\t}", "public boolean isAllLoaded() {\n return allLoaded;\n }", "public static boolean isGenomeLoaded() {\n return genomeController.isGenomeLoaded();\n }", "private boolean isTextureLoaded() {\n return loaded;\n }", "public boolean dependenciesRunning() {\n\t\ttry {\n\t\t\treturn dependenciesInState(ResourceState.RUNNING);\n\t\t} catch (DependencyException de) {\n\t\t\tlog.warn(\"Unable to check is dependencies are running for \" + this, de);\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isDataLoaded() {\n\t\t\n\t\t return dataLoaded;\n\t }", "public boolean isConnectorRuntimeInitialized() {\n List<ServiceHandle<ConnectorRuntime>> serviceHandles =\n connectorRuntimeHabitat.getAllServiceHandles(ConnectorRuntime.class);\n for(ServiceHandle<ConnectorRuntime> inhabitant : serviceHandles){\n // there will be only one implementation of connector-runtime\n return inhabitant.isActive();\n }\n return true; // to be safe\n }", "boolean hasFlightdetails();", "public abstract boolean isLoadCompleted();", "public boolean load() {\n return load(Datastore.fetchDefaultService());\n }", "boolean hasResolve();", "protected static synchronized boolean isPresent() {\n if (m_Present == null) {\n try {\n SizeOfAgent.fullSizeOf(new Integer(1));\n m_Present = true;\n } catch (Throwable t) {\n m_Present = false;\n }\n }\n\n return m_Present;\n }", "public boolean isLoadData() {\n return loadData;\n }", "public boolean isDeferredLoading() {\n/* 86 */ return this.deferred;\n/* */ }", "private boolean isReady() {\n for (Rotor rotor : rotors)\n if (rotor == null)\n return false;\n return (stator != null && reflector != null && plugboard != null);\n }", "public boolean hasLanded ();", "public boolean hasLoaded(String filename)\n {\n return this.loadedFiles.containsKey(filename);\n }", "public boolean isLive()\n\t{\n\t\tString id = this.getId();\n\t\tif (id == null) return false;\n\t\t\n\t\tEntityContainer<E> container = this.getContainer();\n\t\tif (container == null) return false;\n\t\t\n\t\tif (!container.isLive()) return false;\n\t\t\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isLoad() {\n\t\treturn false;\n\t}", "public static boolean isContainerUpdated(final ResourceMapping mapping) {\n String containerId = ContainerInfo.getInstance().getContainerId();\n\n ResourceMapping.ContainerInstance container\n = mapping.getContainer(containerId);\n if (container == null) {\n LOGGER.warn(\"No flakes for this container.\");\n return false;\n } else {\n return true;\n }\n }", "public boolean getIsContainer()\n {\n return standardDefs.isContainer(root.getType());\n }", "public boolean isHotLoadable();", "@Override\n public boolean isRunning() {\n if (lumenClient == null || spine == null || !spine.isRunning()) {\n return false;\n } else {\n return true;\n }\n }", "public boolean isInDepot() {\n\t\treturn isInDepot;\n\t}", "public boolean isShowing() {\n\t\tLinearLayout loading = (LinearLayout) findViewById(R.id.loading);\n\t\treturn loading.getVisibility() == View.VISIBLE;\n\t}", "boolean hasOriginFlightLeg();", "private boolean hasContainer(Object receiver) {\n IServiceInfo serviceInfo = DiscoveryPropertyTesterUtil.getIServiceInfoReceiver(receiver);\n final String connectNamespace = getConnectNamespace(serviceInfo);\n final String connectId = getConnectID(serviceInfo);\n try {\n final ID createConnectId = IDFactory.getDefault().createID(connectNamespace, connectId);\n return (getContainerByConnectID(createConnectId) != null);\n } catch (IDCreateException e) {\n return false;\n }\n }", "@SuppressLint(\"LongLogTag\")\n public static boolean isIpfsRuning() {\n if (IpfsRunning != null)\n return IpfsRunning;\n\n try {\n IPFS ipfs = new IPFS(IPFS_PROXY_URL);\n IpfsRunning = true;\n } catch (Exception e) {\n Log.e(\"Failed to connnect IPFS service:\", e.toString());\n IpfsRunning = false;\n }\n\n return IpfsRunning;\n }", "public boolean isRunning()\n\t{\n\t\tif(mBoundService != null){\t// Service already started\n\t\t\tif(mBoundService.testThread != null && mBoundService.testThread.isAlive())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}else{\n\t\t\tLog.v(\"4G Test\", \"mBoundService null not running\");\n\t\t\treturn false;\n\t\t}\n\t}", "public Double getIsInterstitialLoaded() {\n\t\tdouble isLoaded = 0f;\n\t\tif(mYoyoBridge != null) {\n\t\t boolean loaded = mYoyoBridge.getIsInterstitialLoaded();\t\t\n\t\t\tif(loaded == true) {\n\t\t\t\tisLoaded = 1f;\n\t\t\t}else {\n\t\t\t\tisLoaded = 0f;\n\t\t\t}\t \n\t }\t\t\t\t \n\t\treturn isLoaded;\n\t}", "public boolean isRunning ()\n {\n return server == null ? false : true;\n }", "public static boolean controlManager() {\n boolean empty = false;\n\n if(OnAirPlane.isEmpty()) {\n empty = true;\n }\n return empty;\n }", "protected final boolean isShowing() {\n synchronized (getPeerTreeLock()) {\n if (isVisible()) {\n final LWContainerPeer<?, ?> container = getContainerPeer();\n return (container == null) || container.isShowing();\n }\n }\n return false;\n }", "public final boolean isColdStarted()\n\t{\n\t\treturn this.coldstart;\n\t}", "public boolean hasOriginFlightLeg() {\n return originFlightLeg_ != null;\n }", "protected boolean isFullyInitialized() {\n return html == null;\n }", "boolean hasStartingInfo();", "boolean hasBackpack();", "public boolean hasFLIGHTID() {\n return fieldSetFlags()[5];\n }", "public boolean isLocal()\n {\n try\n {\n Member member = getMember();\n return member == null || member.equals(\n getService().getCluster().getLocalMember());\n }\n catch (RuntimeException e)\n {\n // the local services are stopped\n // there is no good answer...\n return true;\n }\n }", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "public boolean isStarted() {\n\t\treturn started.get();\n\t}", "private boolean isStartable()\n {\n if (! isAlive() && nextStartTime <= System.currentTimeMillis())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "boolean isParentInitialized();", "public boolean arePluginsLoaded() {\n return pluginsLoaded.get();\n }", "@Override\r\n\tpublic boolean loadContainer(DonationPackage dPackage) {\n\t\tif(containerLine.isFull() == false) {\r\n\t\t\tcontainerLine.push(dPackage);\r\n\t\t\treturn true;\r\n\t\t} else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public final boolean hasDeponents() {\r\n synchronized (f_seaLock) {\r\n return !f_deponents.isEmpty();\r\n }\r\n }", "public boolean hasOriginFlightLeg() {\n return originFlightLegBuilder_ != null || originFlightLeg_ != null;\n }", "@Override\n public boolean isContainer(String path) {\n return false;\n }", "public static boolean hasBeenInitialized() {\n\t\treturn mContext != null;\n\t}", "public boolean isVehiclesListLinkPathPresent() {\r\n\t\treturn isElementPresent(vehicleLinkPath, SHORTWAIT);\r\n\t}", "public boolean isReady() {\n return this.mWmService.mDisplayReady && this.mDisplayReady;\n }", "boolean hasBuild();", "public boolean hasService() {\n return service_ != null;\n }", "public boolean hasService() {\n return service_ != null;\n }", "public boolean hasService() {\n return service_ != null;\n }", "boolean isAcceptingLifecycleEvents() {\n return adapter.isStarted();\n }", "public boolean hasLocality() {\n return localityBuilder_ != null || locality_ != null;\n }", "public boolean hasPath() {\n return carrier.findPath(getCarrierTarget()) != null;\n }", "boolean canLoadData();", "boolean hasResource();", "public boolean wasInitialized()\n {\n return this.isInitialized;\n }", "public boolean isInterface()\n {\n ensureLoaded();\n return m_flags.isInterface();\n }" ]
[ "0.71794665", "0.71102655", "0.6985232", "0.68659234", "0.6858397", "0.6821566", "0.6813168", "0.6800389", "0.6796175", "0.6775165", "0.67301583", "0.67298037", "0.6716755", "0.6683516", "0.66812766", "0.65423006", "0.6509188", "0.6504974", "0.6495628", "0.641873", "0.6410681", "0.6299413", "0.6236513", "0.6231884", "0.6218599", "0.6217443", "0.6210721", "0.6207793", "0.6148482", "0.6131162", "0.6121767", "0.61217314", "0.6119964", "0.6109568", "0.60887754", "0.6052451", "0.6048676", "0.6037702", "0.6034266", "0.60127646", "0.5967523", "0.59633005", "0.59628713", "0.5960876", "0.593109", "0.59166163", "0.5884987", "0.58838683", "0.5876425", "0.5874145", "0.5871333", "0.58666724", "0.5862011", "0.58579504", "0.58576113", "0.5851318", "0.5849416", "0.582443", "0.5822117", "0.58198637", "0.5819138", "0.57830083", "0.5782073", "0.57807344", "0.57748544", "0.5741162", "0.5734987", "0.5734954", "0.57310796", "0.57307833", "0.57226163", "0.5706283", "0.56916004", "0.56808376", "0.5676516", "0.5655643", "0.5646807", "0.5646807", "0.5634819", "0.56313205", "0.5629813", "0.5627309", "0.5626695", "0.562051", "0.56077534", "0.56002724", "0.5595389", "0.5593704", "0.55799973", "0.55794543", "0.55767846", "0.55767846", "0.55767846", "0.55749846", "0.5571425", "0.5569876", "0.55692667", "0.5569008", "0.5568315", "0.5566887" ]
0.6161743
28
Gets the owner's name.
public String getownerName() { return this.ownerName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOwnerName() {\r\n return this.ownerName;\r\n }", "public String getOwnerName() {\n\n return ownerName;\n }", "public String getOwnerName() {\r\n\t\treturn ownerName;\r\n\t}", "public String getOwnerName() {\n\t\treturn ownerName;\n\t}", "java.lang.String getOwner();", "java.lang.String getOwner();", "public java.lang.String getOwnername() {\n\treturn ownername;\n}", "public String getOwner() {\r\n if (mOwner==null) {\r\n return \"n/a\";\r\n }\r\n return mOwner;\r\n }", "public String ownerName() {\n\t\t\treturn null;\n\t\t}", "String getOwner();", "String getOwner();", "public java.lang.String getOwner() {\n java.lang.Object ref = owner_;\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 owner_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getOwner() {\n java.lang.Object ref = owner_;\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 owner_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getOwner(){\n\t\treturn new SmartAPIModel().getCpOwner(cp.getLocalName());\n\t}", "public String getName() {\n return (String) getObject(\"username\");\n }", "public String getOwner() {\r\n\t\treturn owner;\r\n\t}", "@java.lang.Override\n public java.lang.String getOwner() {\n java.lang.Object ref = owner_;\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 owner_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getOwner() {\n java.lang.Object ref = owner_;\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 owner_ = s;\n return s;\n }\n }", "public String getOwner() {\r\n return owner;\r\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String getOwner() {\n return owner;\n }", "public String owner() {\n return this.owner;\n }", "public String getOwner(){\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn _owner;\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }", "public String getOwner() {\n return mOwner;\n }", "public synchronized static String getOwner() {\n return owner;\n }", "public String getName() {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE,\n\t\t\t\tContext.MODE_PRIVATE);\n\t\treturn settings.getString(USERNAME_KEY, null);\n\t}", "public String getOwner();", "public String getOwner() {\n\n return owner;\n\n }", "public String getOwner() {\n\n return Owner;\n }", "public String getOwner() { return owner; }", "@Override\n\t\tpublic String ownerName() {\n\t\t\treturn \"Dog Owner\";\n\t\t}", "@Override\n public String getDeviceOwnerName() {\n if (!mHasFeature) {\n return null;\n }\n Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity())\n || hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));\n\n synchronized (getLockObject()) {\n if (!mOwners.hasDeviceOwner()) {\n return null;\n }\n // TODO This totally ignores the name passed to setDeviceOwner (change for b/20679292)\n // Should setDeviceOwner/ProfileOwner still take a name?\n String deviceOwnerPackage = mOwners.getDeviceOwnerPackageName();\n return getApplicationLabel(deviceOwnerPackage, UserHandle.USER_SYSTEM);\n }\n }", "public String getName() {\r\n\t\treturn username;\r\n\t}", "public String getOwnerString() {\n return String.valueOf(enteredBy);\n }", "@Override\n\t\tpublic String ownerName() {\n\t\t\treturn \"Tiger Owner\";\n\t\t}", "public String getName() {\n\t\treturn this.username;\n\t}", "@Override\n\t\tpublic String ownerName() {\n\t\t\treturn \"Cat Owner\";\n\t\t}", "@DISPID(75)\r\n\t// = 0x4b. The runtime will prefer the VTID if present\r\n\t@VTID(73)\r\n\tjava.lang.String owner();", "public com.google.protobuf.ByteString\n getOwnerBytes() {\n java.lang.Object ref = owner_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n owner_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getOwnerBytes() {\n java.lang.Object ref = owner_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n owner_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getName() {\n return user.getName();\n }", "@Column(name=\"owner\")\n\tpublic String getOwner() {\n\t\treturn owner;\n\t}", "public final String getOwnerName() {\n return ElementUtils.getDeclaringClassName(node);\n }", "public java.lang.String getOwnerId() {\r\n return ownerId;\r\n }", "@DISPID(33)\r\n\t// = 0x21. The runtime will prefer the VTID if present\r\n\t@VTID(38)\r\n\tjava.lang.String owner();", "Optional<String> getOwner();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getOwnerBytes() {\n java.lang.Object ref = owner_;\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 owner_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getOwnerBytes() {\n java.lang.Object ref = owner_;\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 owner_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getOwner(){\n return owner;\r\n }", "public String getName() {\r\n\t\treturn this.userName;\r\n\t}", "public final String getOwnerNameWithoutPackage() {\n return ElementUtils.getDeclaringClassNameWithoutPackage(node);\n }", "@Column (name=\"OWNER\", insertable = true, updatable = false)\r\n\tpublic String getOwner() {\r\n\t\treturn owner;\r\n\t}", "User getOwner();", "public String getName()\n\t{\n\t\treturn fullName;\n\t}", "public java.lang.String getGroupOwnerName() {\n return groupOwnerName;\n }", "com.google.protobuf.ByteString getOwner();", "com.google.protobuf.ByteString getOwner();", "public int getOwner() {\n validify();\n return Client.INSTANCE.pieceGetOwner(ptr);\n }", "public com.google.protobuf.ByteString getOwner() {\n return owner_;\n }", "public com.google.protobuf.ByteString getOwner() {\n return owner_;\n }", "public long getOwner() {\n\t\treturn owner;\n\t}", "public String getName() {\n return name.get();\n }", "public String getName() {\n\t\treturn name != null ? name : getDirectory().getName();\n\t}", "public com.google.protobuf.ByteString getOwner() {\n return owner_;\n }", "public com.google.protobuf.ByteString getOwner() {\n return owner_;\n }", "public String getAccountOwner() {\n return accountOwner;\n }", "public String getName(){\n return username;\n\t}", "public String getName() {\r\n\t\treturn name.get();\r\n\t}", "public void setOwnerName(String name) {\r\n this.ownerName = name;\r\n }", "public String getTheName() {\n\t\treturn name.getText();\n\t}", "public String getOwner() {\n return lockOwner;\n }", "public UUID getOwner() {\n return owner;\n }", "public UUID getOwner() {\n return owner;\n }", "public Player getOwner() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\n\t\treturn owner;\n\t}", "@Override\n\tpublic UUID getOwnerId() {\n\t\treturn this.dataManager.get(OWNER_UUID).orNull();\n\t}", "com.google.protobuf.ByteString\n getOwnerBytes();", "com.google.protobuf.ByteString\n getOwnerBytes();", "public String getName() {\n if(name == null)\n return \"\"; \n return name;\n }", "public java.lang.String getNameOfShipOwners() {\n\t\treturn _tempNoTiceShipMessage.getNameOfShipOwners();\n\t}", "public final String getName() {\n\treturn name.getName();\n }", "public void setOwnerName( String name ) {\n\n ownerName = name;\n }", "public String getFullName() {\n return group + \".\" + name;\n }", "public synchronized String getGroupOwner(String groupName) {\n\t\t\treturn groupList.get(groupName).getCreator();\n\t\t}", "public String getName() {\r\n assert name != null;\r\n return name;\r\n }", "private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }", "public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }", "public User getOwner() {\n return owner;\n }", "public String getOwnerId() {\n return ownerId;\n }", "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "public String getUserName() {\n\t\t\treturn name;\n\t\t}", "public String getName() {\n return this.session.sessionPersona().getRealName();\n }", "@JsonGetter(\"owner\")\r\n public String getOwner() {\r\n return owner;\r\n }", "public String getName() {\n\t\t\treturn this.getIdentity();\n\t\t}", "public String getName() {\n\t\t\treturn this.getIdentity();\n\t\t}", "public String getName()\n {\n return foreName + \" \" + lastName;\n }", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}" ]
[ "0.8395708", "0.83520925", "0.83396065", "0.82957506", "0.8224735", "0.8224735", "0.81882393", "0.8148729", "0.8044268", "0.7837003", "0.7837003", "0.7805538", "0.78053993", "0.7645772", "0.7639604", "0.7588783", "0.7585034", "0.7584536", "0.75838554", "0.7570415", "0.7570415", "0.7570415", "0.7570415", "0.7570415", "0.7570415", "0.75665087", "0.75525475", "0.75299877", "0.7515849", "0.75122106", "0.7430302", "0.74296415", "0.7389107", "0.73542726", "0.73021764", "0.7297293", "0.7293538", "0.7289082", "0.7284767", "0.7283347", "0.7278235", "0.726481", "0.72485495", "0.72485495", "0.723875", "0.72381836", "0.7231478", "0.72265446", "0.7198483", "0.7168592", "0.7096148", "0.7096148", "0.7061772", "0.70595425", "0.6986332", "0.69779915", "0.69669867", "0.69631344", "0.6931609", "0.69010043", "0.69010043", "0.6862357", "0.68532765", "0.68532765", "0.6851155", "0.6820449", "0.6814523", "0.68144846", "0.68144846", "0.68139136", "0.6807413", "0.6793758", "0.6782401", "0.67598206", "0.67577803", "0.6752593", "0.6752593", "0.67490846", "0.6743029", "0.6730761", "0.6729192", "0.6713474", "0.6701947", "0.66983724", "0.6689961", "0.6689575", "0.6676776", "0.6676414", "0.66689944", "0.6662409", "0.6658138", "0.665151", "0.66443735", "0.6640836", "0.6620286", "0.66079396", "0.6607079", "0.6607079", "0.65989155", "0.65942633" ]
0.81902975
6
Sets the owner's name.
public void setownerName(String ownerName) { this.ownerName = ownerName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOwnerName( String name ) {\n\n ownerName = name;\n }", "public void setOwnerName(String name) {\r\n this.ownerName = name;\r\n }", "public void setOwnername(java.lang.String newOwnername) {\n\townername = newOwnername;\n}", "public void setName(String name) {\n\n if (name.isEmpty()) {\n\n System.out.println(\"Owner name must not be empty\");\n /**\n * If Owner name is ever an empty String, a NullPointerException will be thrown when the\n * listings are loaded in from the JSON file. I believe this is because the JSON parser we're\n * using stores empty Strings as \"null\" in the .json file. TODO this fix is fine for now, but\n * I want to make it safer in the future.\n */\n this.name = \" \";\n } else {\n\n this.name = name;\n }\n }", "public void setOwnerName(String ownerName) {\r\n\t\tthis.ownerName = ownerName;\r\n\t}", "public void setOwnerName(String ownerName) {\r\n\t\tthis.ownerName = ownerName;\r\n\t}", "void setOwner(String owner);", "public synchronized void setOwner(String s) {\n owner = s;\n }", "public void setOwner(String owner) {\n mOwner = owner;\n }", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public void setOwner (String owner) {\n\t\tthis.owner=owner;\n\t}", "public void setOwner(String owner) {\r\n this.owner = owner == null ? null : owner.trim();\r\n }", "public void setOwner(String owner) {\n this.owner = owner == null ? null : owner.trim();\n }", "public void setOwner(String owner) {\n this.owner = owner == null ? null : owner.trim();\n }", "public void setName(String name){\r\n gotUserName = true;\r\n this.name = name;\r\n }", "public void setOwner(String mOwner) {\r\n this.mOwner = mOwner;\r\n }", "public void setOwner(User owner) {\n this.owner = owner;\n }", "public void setName(String name) {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\teditor.putString(USERNAME_KEY, name);\n\t\teditor.commit();\n\t}", "public void setOwner(String newOwner) {\n\t\t_pcs.firePropertyChange(\"owner\", this.owner, newOwner); //$NON-NLS-1$\n\t\tthis.owner = newOwner;\n\t}", "public void changeOwner(String o){\n owner = o;\r\n }", "public void setOwner( String owner ){\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t_owner = owner;\r\n \t_itDepartment.setDirector(_owner);\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }", "public Builder setOwner(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n owner_ = value;\n onChanged();\n return this;\n }", "public Builder setOwner(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n owner_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}", "public void setOwner(Owner owner) {\n this.owner = owner;\n }", "public void setOwner(Person owner)\n {\n this.owner = owner;\n }", "public String getOwnerName() {\r\n\t\treturn ownerName;\r\n\t}", "public void setOwner(com.sforce.soap.enterprise.sobject.SObject owner) {\r\n this.owner = owner;\r\n }", "public void setName(String username) {\n setObject(\"username\", (username != null) ? username : \"\");\n }", "public void setName(String n)\n\t{\n\t\tfullName=n;\n\t}", "public String getOwnerName() {\n\t\treturn ownerName;\n\t}", "public void setName(String n) {\r\n name = n;\r\n }", "public void setName(String name)\r\n\t{\r\n\t\tthis.nome = nome;\r\n\t}", "public final void setName(String name) {_name = name;}", "public String getOwnerName() {\r\n return this.ownerName;\r\n }", "public void setOwnerString(String s) {\n ownerString = s;\r\n }", "public void setOwner(String s) {\n log(\"This option is not supported by ILASM as of Beta-2, \"\n + \"and will be ignored\", Project.MSG_WARN);\n }", "public void setName( String name ) {\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"name\", name ) );\n }", "public void setName(String name) {\n\t\tthis.nome = name;\n\t}", "public String getOwnerName() {\n\n return ownerName;\n }", "public void setName (String n) {\n name = n;\n }", "public void setName(String name) {\n _name = name;\n }", "public String getownerName() {\n\t return this.ownerName;\n\t}", "public void setOwner(Player owner) {\n\t\tthis.owner = owner;\n\t}", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void setName(String name) {\n\t\tName = name;\n\t}", "public void setName(String s) {\n this.name = s;\n }", "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}", "public void setName(String name) {\n synchronized(this) {\n this.name = name;\n nameExplicitlySet = true;\n }\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "public void setName( String pName )\n {\n name = pName;\n }", "public void setName(String name) {\n if (!name.isEmpty()) {\n this.name = name;\n }\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(final String name);", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\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 value) {\n this.name = value;\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) {\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) {\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) {\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) {\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) {\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) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "protected void setName(String name) {\n this._name = name;\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "@JsonSetter(\"owner\")\r\n public void setOwner(String owner) {\r\n this.owner = owner;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }" ]
[ "0.8416955", "0.8406748", "0.7979281", "0.78985506", "0.7846378", "0.7846378", "0.76539046", "0.7462399", "0.74567723", "0.74270254", "0.74270254", "0.74270254", "0.74270254", "0.7271672", "0.72647643", "0.7259224", "0.7259224", "0.72225446", "0.7213329", "0.7192607", "0.7172476", "0.71318346", "0.71210945", "0.7082884", "0.70237833", "0.70237833", "0.6966379", "0.6958219", "0.69024664", "0.6895842", "0.6887972", "0.6861412", "0.68441564", "0.68235457", "0.6821859", "0.68209624", "0.68160754", "0.6807871", "0.6805453", "0.67989266", "0.6790938", "0.67841893", "0.67825216", "0.67749023", "0.67732805", "0.6766436", "0.6756944", "0.6741857", "0.6734201", "0.67285615", "0.6727658", "0.6726501", "0.6715292", "0.6715196", "0.67082655", "0.6708057", "0.6700431", "0.6696152", "0.6696152", "0.6696152", "0.66947883", "0.6676167", "0.66759795", "0.66759795", "0.66759795", "0.6670806", "0.6670806", "0.6670806", "0.66694343", "0.66686946", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66622293", "0.66620564", "0.66568124", "0.66568124", "0.66568124", "0.66568124", "0.6646543", "0.6646543", "0.6643402", "0.66433245", "0.66395754", "0.66383255" ]
0.7753905
6
Gets the max weight.
public double getmaxWeight() { return this.maxWeight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaximumWeight() { // get the max weight\n\t\treturn maximumWeight;\n\t}", "@Basic @Immutable\n\tpublic Weight getMaxWeight() {\n\t\treturn this.MAX_WEIGHT;\n\t}", "public int getWeightLimit() {\n\t\treturn this.weightLimit;\n\t}", "public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}", "public int weight() {\n if (this.weight == null) {\n return 0;\n } else {\n return this.weight;\n } // if/else\n }", "public double getWitnessedMaxPrice() {\t\r\n\t\treturn witnessed_max_price;\r\n\t}", "public double getMaximum() {\n return (max);\n }", "public double getWeight() {\n return this.weight * 2.20462;\n }", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public int getWeight() {\n return parameter.getWeight();\n }", "public double getMaxRating() {\n return max;\n }", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "public double getWeight()\n\t{\n\t\t//metodo precisa retornar alguma coisa\n\t\treturn 0.0;\n\t}", "public int weight(){\n\t\treturn this.weight;\n\t}", "public int getWeight() {\n return weight;\n }", "public void setmaxWeight(double maxWeight) {\n\t this.maxWeight = maxWeight;\n\t}", "public int getRemainingWeight() { // get the remaining weight\n\t\treturn maximumWeight - cargoWeight;\n\t}", "private double getMaxThreshold() {\n return maxThreshold;\n }", "public Byte getWeight() {\n\t\treturn weight;\n\t}", "public int getWeight() {\n\t\treturn _weight;\n\t}", "public int getWeight() {\n\t\treturn weight;\n\t}", "public int getWeight() {\n\t\treturn weight;\n\t}", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "public int getWeight() {\n return weight;\n }", "public int getWeight() {\n return weight;\n }", "public int weight() {\n \treturn weight;\n }", "public int getWeight() {\r\n\t\treturn this.weight;\r\n\t}", "public double getWeight() {\n\t\treturn weight; \n\t\t}", "public int getWeight()\n\t{\n\t\treturn this.weight;\n\t}", "public int getWeight() {\n return this.weight;\n }", "public Integer getWeight() {\n return weight;\n }", "public int getWeight() {\n return weight;\n }", "public double getWeight() {\n\t\treturn weight;\n\t}", "public int getWeight(){\n\t\treturn weight;\n\t}", "public double getActualWeight() {\n return actualWeight;\n }", "public float getWeight() {\n\t\t\treturn weight;\n\t\t}", "public double getWeight() {\n\t\tif(weightConfiguration == null) {\n\t\t\treturn 1.0;\n\t\t}\n\t\treturn weightConfiguration.weightForIdentifier(this.getIdentifier());\n\t}", "public double getWeight()\r\n {\r\n return this.weightCapacity;\r\n }", "public int getMax() {\r\n // get root\r\n RedBlackTree.Node<Grade> max = rbt.root;\r\n // loop to right of tree\r\n while (max.rightChild != null) {\r\n max = max.rightChild;\r\n }\r\n\r\n return max.data.getGrade();\r\n }", "int getWeight();", "int getWeight();", "public double getWeight() {\n\t\n\t\treturn this.weight;\t \n\t}", "public double getWeight(){\n\t\treturn this._weight;\n\t}", "double getMax();", "double getMax();", "public Double getMaximum() {\n\t\treturn maximum;\n\t}", "public double getWeight() {\r\n return weight;\r\n }", "public double getWeight() {\r\n return weight;\r\n }", "public float getWeight() {\n return weight;\n }", "public int getMaxRating() {\n return maxRating;\n }", "public java.lang.Double getWeight () {\r\n\t\treturn weight;\r\n\t}", "public double getWeight() {\n return weight;\n }", "public double getWeight() {\n return weight;\n }", "@Override\n\t\tpublic int get_weights() {\n\t\t\treturn weight;\n\t\t}", "public double getWeightedHeight() {\n return weightedNodeHeight(overallRoot);\n }", "public double getWeight(){\n\t\treturn weight;\n\t}", "public int getMaxWeightSection() {\r\n\t\tSectionDAO secDao1 = (SectionDAO) secDao;\r\n\t\treturn secDao1.getMaxWeightSection();\r\n\t}", "public int getWeight()\n {\n return weight;\n }", "@RequestMapping(value = \"/max_weight_dag\", method = RequestMethod.GET)\r\n @ResponseBody\r\n public DirectedGraph getMaxWeightDAG() {\n UndirectedGraph graph = new UndirectedGraph(5);\r\n graph.addEdge(0, 1, 10.0);\r\n graph.addEdge(1, 2, 11.0);\r\n graph.addEdge(2, 3, 13.0);\r\n graph.addEdge(3, 4, 14.0);\r\n graph.addEdge(4, 0, 15.0);\r\n return graph;\r\n }", "public float getWeight() {\n return weight;\n }", "public double getMaximumScore() {\n return 0.9; // TODO: parameter\n }", "private double getMax() {\n return Collections.max(values.values());\n }", "public float getWeightUsed()\r\n {\r\n // implement our own magic formula here ...\r\n return 2.0f;\r\n }", "public int maximum() {\n \n if (xft.size() == 0) {\n return -1;\n }\n \n Integer maxRepr = xft.maximum();\n \n assert(maxRepr != null);\n \n int index = maxRepr.intValue()/binSz;\n \n TreeMap<Integer, Integer> map = getTreeMap(index);\n \n assert(map != null);\n \n Entry<Integer, Integer> lastItem = map.lastEntry();\n \n assert(lastItem != null);\n \n return lastItem.getKey();\n }", "public double getMaximumValue() { return this.maximumValue; }", "java.math.BigDecimal getWBMaximum();", "final protected double getWeight() {\n\t\treturn getWeight( _population );\n\t}", "public double max() {\n return max(0.0);\n }", "Double getMaximumValue();", "public float getWeight() {\n return weight;\n }", "public float getWeight() {\n return weight;\n }", "int getWeight() {\n return weight;\n }", "int getWeight() {\n return weight;\n }", "public int maxGrowths(){\n\t\tint max = -1;\n\t\tfor(CircosNode tempNode : nodes){\n\t\t\tfor(int entry : tempNode.getGrowthsPerYear().values()){\n\t\t\t\tif(entry > max){\n\t\t\t\t\tmax = entry;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public int getWeight();", "@Override\r\n public final int getWeight() {\r\n int i, c;\r\n Rule[] r;\r\n\r\n c = 0;\r\n r = this.m_rules;\r\n for (i = (r.length - 1); i >= 0; i--) {\r\n c += r[i].getWeight();\r\n }\r\n\r\n return c;\r\n }", "public float getNitrateMax() {\n return nitrateMax;\n }", "public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }", "protected final int getMax() {\n\treturn(this.max);\n }", "public int getWeight()\n {\n return weightCarried;\n }", "public int getMaxpower() {\n\t\treturn 0;\r\n\t}", "public int getWeight(){\n \treturn weight;\n }", "public float getWeight();", "public int getMaxPower() {\r\n return maxPower;\r\n }", "public int getWeight() {\n\t\treturn quantity*weight; \n\t}", "org.apache.xmlbeans.XmlDecimal xgetWBMaximum();", "@Override\n public double getMaxLoadWeight() {\n return maxLoadWeight;\n }", "public int getMax()\n {\n return 0;\n }", "@Override\n\tpublic double getWeight() {\n\t\treturn weight;\n\t}", "public float getMax()\n {\n parse_text();\n return max;\n }", "public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}", "public int getMaximum() {\r\n return max;\r\n }", "int getMaximum();", "public double getWeight() {\n return 0;\n }", "public double getMaxWithdrawal() {\n\t\treturn maxWithdrawal;\n\t}", "public long getWeightKg() {\n return (long) (getWeight() / POUNDS_PER_KG);\n }", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public float getmaxWind() {\n Reading minWindReading = null;\n float maxWind = 0;\n if (readings.size() >= 1) {\n maxWind = readings.get(0).windSpeed;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).windSpeed > maxWind) {\n maxWind = readings.get(i).windSpeed;\n }\n }\n } else {\n maxWind = 0;\n }\n return maxWind;\n }" ]
[ "0.88264006", "0.87982595", "0.76412135", "0.72768116", "0.72257406", "0.71409446", "0.714034", "0.71261656", "0.71181256", "0.7115157", "0.7082306", "0.7038662", "0.7034501", "0.6987338", "0.69782287", "0.6963728", "0.6962391", "0.6934328", "0.69322944", "0.69305426", "0.6918239", "0.6918239", "0.6897162", "0.6895817", "0.6895817", "0.6890009", "0.6885255", "0.68829405", "0.6881719", "0.68701077", "0.6865363", "0.6864799", "0.68569165", "0.6853849", "0.68461555", "0.68430895", "0.68410105", "0.68339795", "0.682587", "0.6821773", "0.6821773", "0.68196666", "0.6817371", "0.6814765", "0.6814765", "0.6805074", "0.6803439", "0.6803439", "0.68028504", "0.6802492", "0.6789052", "0.67843336", "0.67843336", "0.6784323", "0.6783146", "0.6776921", "0.6762239", "0.67577827", "0.675645", "0.6752584", "0.6743983", "0.6730867", "0.6725915", "0.6722409", "0.6710708", "0.6702213", "0.6685085", "0.6682433", "0.66814965", "0.66750383", "0.66750383", "0.66677517", "0.66677517", "0.6666542", "0.6660874", "0.66552204", "0.66534853", "0.6638999", "0.66318995", "0.66318136", "0.66186076", "0.66174865", "0.6614682", "0.66125244", "0.66086936", "0.6604883", "0.6598026", "0.6594492", "0.6590857", "0.65828156", "0.6582194", "0.6578484", "0.6577586", "0.6577441", "0.6577416", "0.65769804", "0.65668666", "0.6566066", "0.65649223", "0.6561624" ]
0.88413894
0
Sets the max weight.
public void setmaxWeight(double maxWeight) { this.maxWeight = maxWeight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMaxWeight(double inMaxWeight) {\n maxWeight = inMaxWeight;\n }", "public void setMaximumWeight(int maximumWeight) { // set the max weight\n\t\tthis.maximumWeight = maximumWeight;\n\t}", "public void setMaxWeight(String newValue);", "public void setWeightLimit(int weightLimit) {\n\t\tthis.weightLimit = weightLimit;\n\t}", "public void setWeight(double w){\n weight = w;\n }", "public double getmaxWeight() {\n\t return this.maxWeight;\n\t}", "public void setWeight(int w){\n\t\tweight = w;\n\t}", "public void setWeight(float w) {\n weight = w;\n }", "public int getMaximumWeight() { // get the max weight\n\t\treturn maximumWeight;\n\t}", "public void setWeight(int w) {\n\t\tweight = w;\n\t}", "@Override\n public void setWeight(double w) {\n this.weight = w;\n\n }", "@Basic @Immutable\n\tpublic Weight getMaxWeight() {\n\t\treturn this.MAX_WEIGHT;\n\t}", "public void setWeight(float value) {\n this.weight = value;\n }", "private void setWeight(float weight){\n this.weight = weight;\n }", "public void setWeight(int newWeight) {\n weight = newWeight;\n }", "void setMaximum(int max);", "public void setMaximumWaterRequirement(double w) {\n this.Maximum_Water_Requirement = w;\n }", "@Override\r\n\tpublic void setWeight(double weight) {\n\t\t\r\n\t}", "public void setWeight(int weight) {\n\t\tif (weight > 0) {\n\t\t\tthis.weight = weight;\n\t\t} else {\n\t\t\tthis.weight = 0;\n\t\t}\n\t}", "public void setWeight(double weight) {\r\n this.weight = weight;\r\n }", "void setWBMaximum(java.math.BigDecimal wbMaximum);", "public void setWeight(float value) {\n\t\t\tthis.weight = value;\n\t\t}", "private void setWeight() {\n \tthis.trainWeight = (this.trainCars*TRAIN_WEIGHT) + (this.crew + this.numPassengers) * AVE_PASSENGER_WEIGHT;\n }", "public void setWeight(int weight){\n\t\tthis.weight = weight;\n\t}", "public void setMaximum( final double max )\n\t{\n\t\tthis.max = max;\n\t\tthis.oneOverMax = 1d / this.max;\n\t}", "public void setWeight(double weight){\n\t\tthis.weight = weight;\n\t}", "public void setWeight(double weight) {\n this.weight = weight;\n }", "public void setActualWeight(double actualWeight) {\n if(actualWeight >= 0.0){\n this.actualWeight = actualWeight;\n }\n else{\n this.actualWeight = 0.0;\n }\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00008000;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000040;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000080;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public void setWeight(int x)\n {\n weightCarried=x;\n }", "public int getWeightLimit() {\n\t\treturn this.weightLimit;\n\t}", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public void setMax( float max )\n { \n this.max = max;\n show_text();\n }", "public void setWeight(final int weight) {\n this.weight = weight;\n }", "public void setWeight(double weight){\n\t\tthis._weight = weight;\n\t}", "public void setMaximum(Number max) {\n ((ADocument) getDocument()).setMaximum(max);\n }", "public void setWeight(Double weight) {\n this.weight = weight;\n }", "public void setWeight(Integer weight) {\n this.weight = weight;\n }", "public void setMaxpower(int maxpower) {\n\t\t\r\n\t}", "public void setWeight(double weight) {\n\t\tthis.weight = weight;\n\t}", "private void setMaxThreshold() {\n maxThreshold = value - value * postBoundChange / 100;\n }", "public void setWeight(int i, int j, double w) {\n if (this.n == -1 || this.m == -1) {\n throw new IllegalStateException(\"Graph size not specified.\");\n }\n if ((i < 0) || (i >= this.n)) {\n throw new IllegalArgumentException(\"i-value out of range: \" + i);\n }\n if ((j < 0) || (j >= this.m)) {\n throw new IllegalArgumentException(\"j-value out of range: \" + j);\n }\n if (Double.isNaN(w)) {\n throw new IllegalArgumentException(\"Illegal weight: \" + w);\n }\n\n this.weights[i][j] = w;\n if ((w > Double.NEGATIVE_INFINITY) && (w < this.minWeight)) {\n this.minWeight = w;\n }\n if (w > this.maxWeight) {\n this.maxWeight = w;\n }\n }", "public void setMax ( Point max ) {\r\n\r\n\tsetB ( max );\r\n }", "public void setMaximum(Number max) {\n this.max = max;\n }", "public void SetMaxVal(int max_val);", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "public void setWishMaxSalary(Integer wishMaxSalary) {\n this.wishMaxSalary = wishMaxSalary;\n }", "public void setWeight(final double pWeight){this.aWeight = pWeight;}", "public void setWeight (java.lang.Double weight) {\r\n\t\tthis.weight = weight;\r\n\t}", "@Override\n\tpublic void setWeight(final double weight) {\n\n\t}", "public void setMaximumValue (double max) {\r\n\t\tmaxValue = new Double(max);\r\n\t}", "void setMaxValue();", "public void setMinWeight(double inMinWeight) {\n minWeight = inMinWeight;\n }", "public void setMax(){\n for (int i = 0; i < Nodes.size(); i++){\n this.MinDistance.add(Double.MAX_VALUE);\n }\n }", "public synchronized void setWeight(int weight){\n\t\tthis.personWeight = weight; \n\t}", "public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n }", "public void setMaxPower(int maxPower) {\r\n this.maxPower = maxPower;\r\n }", "public ConditionTargetWeight(int weight)\n\t{\n\t\t_weight = weight;\n\t}", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "protected final void setMax(Comparable max)\r\n {\r\n myMax = max;\r\n }", "void setMaxScale(int value);", "void xsetWBMaximum(org.apache.xmlbeans.XmlDecimal wbMaximum);", "public HumanBuilder setWeight(double weight) {\n\t\t\t/*\n\t\t\t * if weight is a minus or 0 then will assign the value 0.1 to the weight of \n\t\t\t * the Human myHumaan\n\t\t\t */\n\t\t\tif(weight<=0)\n\t\t\t\tweight=0.1;\n\t\t\tmyHuman.weight=weight;\n\t\t\treturn this;\n\t\t}", "public void setMaxRating(int maxRating) {\n this.maxRating = maxRating;\n }", "@JSProperty(\"max\")\n void setMax(double value);", "public void setMaximum() {\n getReel().setMaxValue(getVerticalScrollBar().getMaximum());\n }", "void setNilWBMaximum();", "public void setMaximumValue (Double max) {\r\n\t\tmaxValue = max;\r\n\t}", "public void setGradingWeight(double weight){\n \tgradingWeight = weight;\n }", "public void setWeight(double pounds) {\n if (pounds >= 80 && pounds <= 280)\n this.weight = pounds;\n }", "public void setWeight(T3 eWeight) {\r\n\t\tthis.weight = eWeight;\r\n\t}", "public void setCost(int maxTemp) {\n\t\tthis.cost = 900 + (200 * (Math.pow( 0.7, ((double)maxTemp/5.0) )));\n\t}", "public void setMaxSpeed(double value) {\n super.setMaxSpeed(value);\n }", "public void setWeight(double weight) {\n\t\tweightConfiguration.setWeightForIdentifier(this.getIdentifier(), weight);\n\t}", "public void update_weight() {\n this.weights = this.updatedWeights;\n }", "public void setWeights(double[] w) {\n\t\t\tweights = w;\n\t\t}", "public void setMaximumValue(double maximumValue)\n {\n this.maximumValue = maximumValue;\n }", "public void setWeight(String newValue);", "public void _setMax(float max)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMaximum((int) (max * 100));\r\n } else\r\n {\r\n setMaximum((int) max);\r\n }\r\n }", "void setMaximum(java.math.BigDecimal maximum);", "public void setWeight(Byte weight) {\n\t\tthis.weight = weight;\n\t}", "public void setStrengthBoost(int boost) {\n mStrengthBoost = boost;\n }", "public void setMaxSpeed(double maxSpeed) {\r\n this.maxSpeed = maxSpeed;\r\n }", "private void setMaxLoss(float maxloss) \n\t{\n\t\tif (Math.abs(maxloss) < 1.0f)\n\t\t{\n\t\t\t_maxloss = Math.abs(maxloss);\t\n\t\t}\n\t}", "public void set_max(byte value) {\n setSIntBEElement(offsetBits_max(), 8, value);\n }", "@JsonSetter(\"weight\")\n public void setWeight (int value) {\n this.weight = value;\n }", "public void setMax(int max)\n\t{\n\t\tif (max < 0)\n\t\t\tthrow new IllegalArgumentException(\"max < 0\");\n\t\tthis.max = max;\n\t}", "public void setMaxValue(double x) {\r\n\t\tmaxValue = x;\r\n\t}", "public void setMaxUnit(int max) {\n maxUnit = max;\n }", "public void setMaxAmount(int max) {\n _max = max;\n }", "public static void SetMaxPassengers(double inLimit) \r\n {\r\n if (inLimit > 0) \r\n {\r\n maxPassengers = inLimit;\r\n } \r\n else \r\n {\r\n maxPassengers = 0;\r\n }\r\n }", "public void setMaximumPoints(int maximum);", "public Builder setMaximumCapacity(int value) {\n \n maximumCapacity_ = value;\n onChanged();\n return this;\n }", "public void setMaxValue(int x) {\r\n\t\tmaxValue = x;\r\n\t}", "void setPruneMaximum(int max) {\n\t\tif(max >= maximumBound) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint newLargestWidth = getWidth(max - 1);\n\t\tint oldLargestWidth = getWidth(maximumBound - 1);\n\t\tmaximumBound = max;\n\t\t\n\t\tif(newLargestWidth < widthAfterQueue - 1) {\n\t\t\t//Don't prune the widths in the queue.\n\t\t\tnewLargestWidth = widthAfterQueue - 1;\n\t\t}\n\t\t\n\t\t//Prune useless widths\n\t\tfor(int i = newLargestWidth + 1; i < widths.size() && i <= oldLargestWidth; i++) {\n\t\t\tfor(ScheduleBlock block : widths.get(i)) {\n\t\t\t\tblock.remove();\n\t\t\t\twidthSize[i] -= block.size;\n\t\t\t}\n\t\t\t\n\t\t\twidths.get(i).clear();\n\t\t}\n\t}" ]
[ "0.8699806", "0.80826324", "0.8014895", "0.72217745", "0.69922686", "0.69826543", "0.6954777", "0.6917475", "0.6818599", "0.6811267", "0.6801716", "0.6765474", "0.6743974", "0.6714212", "0.6685707", "0.666156", "0.66491944", "0.6609114", "0.65428555", "0.654086", "0.6540644", "0.6513644", "0.64935446", "0.6488093", "0.64855933", "0.64829457", "0.6476581", "0.6475212", "0.6469835", "0.6458827", "0.64499027", "0.644248", "0.64362407", "0.64155376", "0.64155376", "0.6414213", "0.6396955", "0.6390089", "0.63882166", "0.6367264", "0.6364448", "0.6354493", "0.6345577", "0.634131", "0.6336869", "0.6331852", "0.6329301", "0.6326531", "0.6304364", "0.6300367", "0.6300367", "0.62997687", "0.6262489", "0.6254667", "0.6247891", "0.6245117", "0.62401396", "0.62364584", "0.6226089", "0.6222305", "0.6213991", "0.6207087", "0.6176852", "0.6155124", "0.61541253", "0.6142469", "0.6133862", "0.6129056", "0.6127155", "0.6126583", "0.6121129", "0.61101407", "0.60949224", "0.60768706", "0.6058061", "0.60552806", "0.6051968", "0.60434586", "0.6036521", "0.6028303", "0.60218793", "0.6010832", "0.6009985", "0.5999305", "0.59978366", "0.5997834", "0.5992282", "0.5961123", "0.59593326", "0.5953703", "0.5952275", "0.59487337", "0.59376395", "0.5935294", "0.5932637", "0.59325784", "0.59319586", "0.5925457", "0.5916692", "0.59132653" ]
0.8260293
1
Gets the max volume.
public double getmaxVolume() { return this.maxVolume; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxVolume() {\n return mMaxVolume;\n }", "public int getVolumeMax() {\n return mBundle.getInt(KEY_VOLUME_MAX);\n }", "double getMaxVolume();", "public long getPropertyVolumeMax()\n {\n return iPropertyVolumeMax.getValue();\n }", "public long getPropertyVolumeMax();", "public void setmaxVolume(double maxVolume) {\n\t this.maxVolume = maxVolume;\n\t}", "public int getPeakVolume()\n {\n return peakVolume;\n }", "public static void maxVolume() {\n volume = 100;\n System.out.println(\"Volume: \" + volume);\n//end of modifiable zone(JavaCode)........E/883cef54-8649-49b6-b371-11234437d0eb\n }", "public long getPropertyVolumeLimit()\n {\n return iPropertyVolumeLimit.getValue();\n }", "public double getVolume()\n {\n return volume / 512;\n }", "public long getPropertyVolumeLimit();", "public double getVolume()\n {\n return this.volume;\n }", "public int getCurrentVolume() {\n return mCurrentVolume;\n }", "public long getCurrentVolume() {\n return currentVolume;\n }", "public double getVolume() {\n return super.getLado1() * super.getLado2() * this.altura;\n }", "public double getMaximum() {\n return (max);\n }", "public int getVolume();", "int getVolume();", "int getVolume();", "int getOriginalVolume();", "public int getVolume() {\n return volume;\n }", "public PeakVolumeSize getPeakVolumeSize()\n {\n return peakVolumeSize;\n }", "public void setVolumeMax(int volumeMax) {\n mBundle.putInt(KEY_VOLUME_MAX, volumeMax);\n }", "public int getVolume() {\n return mBundle.getInt(KEY_VOLUME);\n }", "public double getVolume() {\n return volume;\n }", "public int getVolume() {\n return volume_;\n }", "public int getVolume() {\n\t\treturn this.volume;\n\t}", "public int getVolume() {\r\n\t\treturn volume;\r\n\t}", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}", "public double getcurrentVolume() {\n\t return this.currentVolume;\n\t}", "public int volume() {\r\n int xLength = this.getMaximumPoint().getBlockX() - this.getMinimumPoint().getBlockX() + 1;\r\n int yLength = this.getMaximumPoint().getBlockY() - this.getMinimumPoint().getBlockY() + 1;\r\n int zLength = this.getMaximumPoint().getBlockZ() - this.getMinimumPoint().getBlockZ() + 1;\r\n\r\n int volume = xLength * yLength * zLength;\r\n return volume;\r\n }", "public int getVolume() {\n return volume_;\n }", "public double getMaximumStock () {\r\n\t\treturn maximumStock;\r\n\t}", "public double getMaxVal() {\n return maxVal;\n }", "public long getPropertyVolume();", "public double getTotalVolume() {\n return totalVolume;\n }", "BigDecimal getVolume();", "public long getPropertyVolume()\n {\n return iPropertyVolume.getValue();\n }", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "int getVolume() {\n return this.volume;\n }", "public double getVolume() { return volume; }", "public float getVolume()\n {\n return volume;\n }", "public boolean setPropertyVolumeMax(long aValue);", "public Quantity<Q> getMax() {\n return max;\n }", "int getRemainingVolume();", "public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}", "public double getVolume() {\n return (getArea() * height);\n }", "Double getMaximumValue();", "public Double getMaximum() {\n\t\treturn maximum;\n\t}", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "public double getVolume() {\n\t\treturn base.getArea() * height;\n\t}", "public abstract double getVolume();", "public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }", "public Integer getVolumeSize() {\n return this.volumeSize;\n }", "public int getSliderVolume() {\n return (int)(this.volume * 100);\n }", "Double volume() {\n return execute(\"player.volume\");\n }", "public String volume() {\n return mVolume;\n }", "public double getMaximumValue() { return this.maximumValue; }", "public double getVolume() {\n\t\treturn height * depth * length;\n\n\t}", "public float getmaxP() {\n Reading maxPressureReading = null;\n float maxPressure = 0;\n if (readings.size() >= 1) {\n maxPressure = readings.get(0).pressure;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).pressure > maxPressure) {\n maxPressure = readings.get(i).pressure;\n }\n }\n } else {\n maxPressure = 0;\n }\n return maxPressure;\n }", "public double max() {\n return max(0.0);\n }", "public Float getVolume() throws DynamicCallException, ExecutionException {\n return (Float)call(\"getVolume\").get();\n }", "public double getMaxScale() {\n return maxScale;\n }", "public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }", "private int getVol() {\r\n\r\n\t\treturn dayVolume;\r\n\t}", "public byte getVolume(){\r\n\t\treturn volume;\r\n\t}", "public int VolumeGet();", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public MediaStorageVolume getDefaultStorageVolume()\n {\n MediaStorageVolume msv = null;\n LogicalStorageVolume lsv[] = null;\n StorageProxy[] proxies = StorageManager.getInstance().getStorageProxies();\n if (proxies.length != 0)\n {\n lsv = proxies[0].getVolumes();\n }\n else\n {\n System.out.println(\" *********No proxies avaliable*********\");\n return null;\n }\n\n System.out.println(\"*************************************************\");\n System.out.println(\" *****Found \" + lsv.length + \" volumes.******\");\n System.out.println(\"*************************************************\");\n for (int i = 0; i < lsv.length; i++)\n {\n if (lsv[i] instanceof MediaStorageVolume)\n {\n msv = (MediaStorageVolume) lsv[i];\n System.out.println(\"*************************************************\");\n System.out.println(\"******Found MSV: \" + msv + \"*********\");\n System.out.println(\"*************************************************\");\n }\n }\n\n if (msv == null)\n {\n System.out.println(\"*************************************************\");\n System.out.println(\"*******MediaStorageVolume not found!********\");\n System.out.println(\"*************************************************\");\n }\n return msv;\n }", "public double getMaxValue() {\r\n\t\treturn maxValue;\r\n\t}", "public double getVolume()\r\n\t{\r\n\t\treturn (super.getArea())*h;\r\n\t}", "@Override\r\n\tpublic float getVolume() {\n\t\treturn 0;\r\n\t}", "public float getVolume() {\n return 1.0f;\n }", "public String getAvailVolumeNumber() {\n int maxNr = -1;\n for (final DrbdVolumeInfo dvi : drbdVolumes) {\n final String nrString = dvi.getName();\n if (Tools.isNumber(nrString)) {\n final int nr = Integer.parseInt(nrString);\n if (nr > maxNr) {\n maxNr = nr;\n }\n }\n }\n return Integer.toString(maxNr + 1);\n }", "public int calculateVolume() {\n return (int) Math.pow(this.sideLength, 3) ;\n }", "public long getPropertyVolumeUnity()\n {\n return iPropertyVolumeUnity.getValue();\n }", "@Override\r\n\t\tpublic int dmr_getVolume() throws RemoteException {\n\t\t\tint current = soundManager.getVolume();\r\n\t\t\tUtils.printLog(TAG, \"current Volume\" + current);\r\n\t\t\treturn current;\r\n\t\t}", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "public double getVolumeNeeded() {\n if (!this.getIsAlive()) {\n return 0.0;\n }\n if (this.ageInWeeks < YOUNG_FISH_AGE_IN_WEEKS) {\n return MINIMUM_WATER_VOLUME_ML;\n } else if (this.ageInWeeks <= MATURE_FISH_AGE_IN_WEEKS) {\n return MINIMUM_WATER_VOLUME_ML * this.ageInWeeks / YOUNG_FISH_AGE_IN_WEEKS;\n } else if (this.ageInWeeks <= MAXIMUM_AGE_IN_WEEKS) {\n return MINIMUM_WATER_VOLUME_ML * MATURE_FISH_WATER_VOLUME_CONSTANT;\n }\n return 0.0;\n }", "public int getMaximum() {\r\n return max;\r\n }", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}", "public float getMax()\n {\n parse_text();\n return max;\n }", "public Long getMaxValue() {\n return maxValue;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "double volume() {\n\t\treturn 0;\n\t}", "public double volume() {\n\t\treturn this.iWidth * this.iLength * this.iDepth\r\n\t}", "@Basic @Raw @Immutable\n public double getMaxVelocity(){\n return this.maxVelocity = SPEED_OF_LIGHT;\n }", "public float getVolumeMultiplier();", "protected final int getMax() {\n\treturn(this.max);\n }", "public float getSilicateMax() {\n return silicateMax;\n }", "private double Volume() {\n\t\tdouble volume = (4f / 3f) * Math.PI * Math.pow(_radius, 3);\n\t\treturn volume;\n\t}", "public BigDecimal maxPrice() {\n return this.maxPrice;\n }", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "public float getMaxValue();", "public CoreComponentTypes.apis.ebay.BasicAmountType getMpMax() {\r\n return mpMax;\r\n }", "public int getMaxprice() {\n return maxprice;\n }", "@Resource(resourceId = 2216, operation = Operation.Read)\n public Long readVolume()\t{\n ActionInvocation actionInvocation =\n new ActionInvocation(renderingControlService.getAction(ACTION_GET_VOLUME));\n actionInvocation.setInput(ARG_INSTANCE_ID, new UnsignedIntegerFourBytes(0));\n actionInvocation.setInput(ARG_CHANNEL, VALUE_CHANNEL_MASTER);\n Map<String, ActionArgumentValue> output = UpnpController.getInstance().executeUpnpAction(actionInvocation);\n return ((UnsignedIntegerTwoBytes)output.get(ARG_CURRENT_VOLUME).getValue()).getValue();\n }" ]
[ "0.8930182", "0.8692162", "0.86722606", "0.8345391", "0.83286387", "0.76246595", "0.7572129", "0.75178796", "0.7415002", "0.7103989", "0.7081285", "0.70421916", "0.7040159", "0.70176643", "0.70013225", "0.6992277", "0.69909185", "0.6984808", "0.6984808", "0.6981527", "0.69595903", "0.69517565", "0.69492245", "0.69442606", "0.69388974", "0.69191265", "0.6919002", "0.69090354", "0.69064987", "0.69007707", "0.68853", "0.6872494", "0.68698686", "0.6863723", "0.6856478", "0.6856347", "0.68437576", "0.6840102", "0.6827724", "0.68145186", "0.6790592", "0.67787814", "0.6774878", "0.6748095", "0.67424685", "0.6741608", "0.67287976", "0.66998804", "0.6689233", "0.6687373", "0.6668413", "0.6667072", "0.6658903", "0.6655706", "0.66527504", "0.6652654", "0.66369027", "0.6626727", "0.66013837", "0.66007054", "0.6595618", "0.6589448", "0.6580788", "0.65690094", "0.6567825", "0.6554063", "0.65436804", "0.65326786", "0.6512547", "0.6510804", "0.65102834", "0.65061814", "0.649493", "0.64928824", "0.6491247", "0.64802146", "0.6475329", "0.6458742", "0.6457411", "0.6448836", "0.6430478", "0.6418541", "0.63978535", "0.6390257", "0.63874054", "0.63874054", "0.63874054", "0.6377581", "0.63765717", "0.6365723", "0.6359772", "0.63581234", "0.635753", "0.63518614", "0.63457656", "0.63430333", "0.63401103", "0.6338624", "0.63318676", "0.63287956" ]
0.8964641
0
Sets the max volume.
public void setmaxVolume(double maxVolume) { this.maxVolume = maxVolume; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setVolumeMax(int volumeMax) {\n mBundle.putInt(KEY_VOLUME_MAX, volumeMax);\n }", "public int getMaxVolume() {\n return mMaxVolume;\n }", "public double getmaxVolume() {\n\t return this.maxVolume;\n\t}", "public static void maxVolume() {\n volume = 100;\n System.out.println(\"Volume: \" + volume);\n//end of modifiable zone(JavaCode)........E/883cef54-8649-49b6-b371-11234437d0eb\n }", "public boolean setPropertyVolumeMax(long aValue);", "public void enablePropertyVolumeMax()\n {\n iPropertyVolumeMax = new PropertyUint(new ParameterUint(\"VolumeMax\"));\n addProperty(iPropertyVolumeMax);\n }", "public int getVolumeMax() {\n return mBundle.getInt(KEY_VOLUME_MAX);\n }", "public long getPropertyVolumeMax();", "public boolean setPropertyVolumeMax(long aValue)\n {\n return setPropertyUint(iPropertyVolumeMax, aValue);\n }", "public void setMaximumValue (double max) {\r\n\t\tmaxValue = new Double(max);\r\n\t}", "@Raw\n private void setMaxVelocity(double max){\n \tif (!isValidMaxVelocity(max)) this.maxVelocity = SPEED_OF_LIGHT;\n \telse this.maxVelocity = max;\n }", "public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n }", "public void setMaximum(Number max) {\n ((ADocument) getDocument()).setMaximum(max);\n }", "double getMaxVolume();", "public void setMaximumValue (Double max) {\r\n\t\tmaxValue = max;\r\n\t}", "public void setMaximum( final double max )\n\t{\n\t\tthis.max = max;\n\t\tthis.oneOverMax = 1d / this.max;\n\t}", "public void SetMaxVal(int max_val);", "public void setMaxUnit(int max) {\n maxUnit = max;\n }", "public void setVolume(int volume);", "void setMaximum(int max);", "public void setMaximum(Number max) {\n this.max = max;\n }", "public void setVolume(double value) {\n this.volume = value;\n }", "void setVolume(float volume);", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "@Override\n\t\tpublic void setVolume(int volume) {\n\t\t\tif(volume>RemoteControl.MAX_VOLUME) {\n\t\t\t\tthis.volume = RemoteControl.MAX_VOLUME;\n\t\t\t}else if(volume<RemoteControl.MIN_VOLUME) {\n\t\t\t\tthis.volume = RemoteControl.MIN_VOLUME;\n\t\t\t}else {\n\t\t\t\tthis.volume = volume;\n\t\t\t}\n\t\t\tSystem.out.println(\"현재 오디오 볼륨은 \"+this.volume);\n\t\t}", "public void setVolume(int v) {\n volume = v;\n }", "public long getPropertyVolumeMax()\n {\n return iPropertyVolumeMax.getValue();\n }", "public void setMaximumStock (double maximumStock) {\r\n\t\tthis.maximumStock = maximumStock;\r\n\t}", "public void setMax( float max )\n { \n this.max = max;\n show_text();\n }", "public Builder setVolume(int value) {\n bitField0_ |= 0x00000008;\n volume_ = value;\n onChanged();\n return this;\n }", "public void setMax(int max) {\r\n\t\tif (!(max <= 0)) { // Check to make sure it's greater than zero\r\n\t\t\tif (max <= mProgress) {\r\n\t\t\t\tmProgress = 0; // If the new max is less than current progress, set progress to zero\r\n\t\t\t\tif (mOnCircularSeekBarChangeListener != null) {\r\n\t\t\t\t\tmOnCircularSeekBarChangeListener.onProgressChanged(this, mProgress, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmMax = max;\r\n\r\n\t\t\trecalculateAll();\r\n\t\t\tinvalidate();\r\n\t\t}\r\n\t}", "protected final void setMax(Comparable max)\r\n {\r\n myMax = max;\r\n }", "public void setMaximum() {\n getReel().setMaxValue(getVerticalScrollBar().getMaximum());\n }", "public void setMaxOutput(double maxOutput){\n m_drive.setMaxOutput(maxOutput);\n }", "@Override\r\n\tpublic void setVolume(float volume) {\n\t\t\r\n\t}", "public void setMaxValue(int maxValue) {\n this.maxValue = maxValue;\n }", "public void setMaxAlturaCM(float max);", "void setMaxScale(int value);", "public void setMaxOutput(double maxOutput) {\n m_drive.setMaxOutput(maxOutput);\n }", "public void setMaximumValue(double maximumValue)\n {\n this.maximumValue = maximumValue;\n }", "public void setVolume(float volume) {\n }", "protected void setVxmax(double vxmax) {\n\t\tthis.vxmax = vxmax;\n\t}", "void setRemainingVolume(int newRemainingVolume) throws Exception;", "public void setVolume(byte newVolume){\r\n\t\tvolume = newVolume > 10 ? 10 : newVolume;\r\n\t}", "public void setVolume(int level);", "public void setVolume(int v) {\n\t\tif (On) {\n\t\t\tif (v < 0 || v > 5) {\n\t\t\t\tSystem.out.println(\"New volume not within range!\");\n\t\t\t} else {\n\t\t\t\tVolume = v;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Radio off ==> No adjustment possible\");\n\n\t\t}\n\t}", "public void set_max(byte value) {\n setSIntBEElement(offsetBits_max(), 8, value);\n }", "public boolean setPropertyVolumeLimit(long aValue);", "public void setMax ( Point max ) {\r\n\r\n\tsetB ( max );\r\n }", "public void setMaxOutput(double maxOutput) {\n drive.setMaxOutput(maxOutput);\n }", "public void setMaximum( final int value ) {\n checkWidget();\n if( 0 <= minimum && minimum < value ) {\n maximum = value;\n if( selection > maximum - thumb ) {\n selection = maximum - thumb;\n }\n }\n if( thumb >= maximum - minimum ) {\n thumb = maximum - minimum;\n selection = minimum;\n }\n }", "void setMaximum(java.math.BigDecimal maximum);", "public void _setMax(float max)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMaximum((int) (max * 100));\r\n } else\r\n {\r\n setMaximum((int) max);\r\n }\r\n }", "public void setMax(int max)\n\t{\n\t\tif (max < 0)\n\t\t\tthrow new IllegalArgumentException(\"max < 0\");\n\t\tthis.max = max;\n\t}", "public void setVolume(int volume) {\n mBundle.putInt(KEY_VOLUME, volume);\n }", "public boolean setPropertyVolumeLimit(long aValue)\n {\n return setPropertyUint(iPropertyVolumeLimit, aValue);\n }", "public void setMaxAmount(int max) {\n _max = max;\n }", "public void setMaxSpeed(double maxSpeed) {\r\n this.maxSpeed = maxSpeed;\r\n }", "public void setMaxRange(double maxRange) {\n this.maxRange = maxRange;\n }", "public void setMaxValue(double x) {\r\n\t\tmaxValue = x;\r\n\t}", "@JSProperty(\"max\")\n void setMax(double value);", "public void setMax(int max) {\n\t\tif (max <= 0 || max < mProgress) {\n\t\t\tthrow new IllegalArgumentException(String.format(\"Max (%d) must be > 0 and >= %d\", max, mProgress));\n\t\t}\n\t\tmMax = max;\n\t\tinvalidate();\n\t}", "public void setMaxQuantity(BigDecimal maxQuantity) {\n this._maxQuantity = maxQuantity;\n }", "public void setPeakVolume(int peakVolume)\n {\n this.peakVolume = peakVolume;\n }", "public void setMaxPower(int maxPower) {\r\n this.maxPower = maxPower;\r\n }", "public void setMaxWeight(double inMaxWeight) {\n maxWeight = inMaxWeight;\n }", "public void setMaxprice(int value) {\n this.maxprice = value;\n }", "public long getPropertyVolumeLimit();", "void setMaxValue();", "public static void setDefaultVolume(float newDefault) {\n\t\tdefaultVolume = newDefault;\n\t}", "public void setVolume(float value){\n\t\tgainControl.setValue(value);\n\t}", "public void setVolume(float volume) {\r\n\t\tthis.volume = volume;\r\n\t}", "public void setVolume(final int volume) {\r\n\t\tthis.volume = volume;\r\n\t}", "public void setVolume(double volume)\n {\n mediaPlayer.setVolume(volume);\n }", "public void setMaxOutput(double maxOutput) {\r\n\t\tm_maxOutput = maxOutput;\r\n\t}", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "protected void setMaxVolumeStateOnButtons() {\n mVolDownButton.setEnabled(true);\n mVolUpButton.setEnabled(false);\n }", "public void setMaxValue(int x) {\r\n\t\tmaxValue = x;\r\n\t}", "public void setVolume(int volume) {\n\t\tthis.volume = volume;\n\t}", "public void setMaxpower(int maxpower) {\n\t\t\r\n\t}", "protected void setMaxHealthPerLevel(double maxHealthPerLevel) \r\n\t{\tthis.maxHealthPerLevel = maxHealthPerLevel;\t}", "public void enablePropertyVolumeLimit()\n {\n iPropertyVolumeLimit = new PropertyUint(new ParameterUint(\"VolumeLimit\"));\n addProperty(iPropertyVolumeLimit);\n }", "public DynamicPart max(float max) {\n this.max = max;\n return this;\n }", "public void setMaxRotationVel(float maxVel, int xform) {\n\t\tm_xforms[xform].m_maxRotationVel = maxVel;\n\t}", "void setWBMaximum(java.math.BigDecimal wbMaximum);", "private void setMax(int max) { this.max = new SimplePosition(false,false,max); }", "@Override\n \tpublic void onSetVolume(double arg0) {\n \t}", "public static void setMaxAu(int max) {\n\t\tmaxAu = max;\n\t}", "public void setMaximumAir ( int ticks ) {\n\t\texecute ( handle -> handle.setMaximumAir ( ticks ) );\n\t}", "public void setmaxWeight(double maxWeight) {\n\t this.maxWeight = maxWeight;\n\t}", "protected void setMaxManaPerLevel(double maxManaPerLevel) \r\n\t{\tthis.maxManaPerLevel = maxManaPerLevel;\t}", "public void setMaxElectricityProduction(double maxElectricityProduction) {\r\n\t\tthis.maxElectricityProduction = maxElectricityProduction;\r\n\t}", "public void resetVolume() {\n\t\tthis.volume = defaultVolume;\n\t}", "public void setMaxElectricityInput(double maxElectricityInput) {\r\n\t\tthis.maxElectricityInput = maxElectricityInput;\r\n\t}", "public void setMaxNumDisksSVMotion(java.lang.Integer maxNumDisksSVMotion) {\r\n this.maxNumDisksSVMotion = maxNumDisksSVMotion;\r\n }", "public void setMinAlturaCM(float max);", "public void setAdc_max (int max)\n {\n adc_max_ = max;\n }", "public void setMaxSpeed(float max_speed)\n\t{\n\t\tthis.max_speed = max_speed;\n\t}", "public void setMaxTransfer(double maxTransfer) {\n\t\tthis.maxTransfer = maxTransfer;\n\t}" ]
[ "0.8746373", "0.7393824", "0.7363684", "0.7357039", "0.73566383", "0.7290181", "0.7233834", "0.7159382", "0.7103742", "0.7038708", "0.7031909", "0.69428104", "0.6929213", "0.6908161", "0.690689", "0.68763685", "0.68193954", "0.68139344", "0.68078434", "0.68074644", "0.68015313", "0.68006235", "0.67765427", "0.67513484", "0.67513484", "0.6750136", "0.6740254", "0.67261076", "0.6666673", "0.66407835", "0.6635765", "0.6576371", "0.65700287", "0.65649784", "0.6563664", "0.6507307", "0.6506887", "0.65059114", "0.6499487", "0.6482316", "0.6475361", "0.6457042", "0.64475554", "0.64390785", "0.64390206", "0.64362735", "0.6434217", "0.6431509", "0.642722", "0.6423738", "0.6421428", "0.6419206", "0.64159817", "0.64074636", "0.64004546", "0.6396542", "0.63682926", "0.6361184", "0.63580376", "0.6352895", "0.6337519", "0.63364697", "0.63108647", "0.63052267", "0.630437", "0.62729007", "0.6265825", "0.625809", "0.6253672", "0.62534344", "0.62513894", "0.62442297", "0.6243493", "0.6237495", "0.6231805", "0.62273085", "0.62232083", "0.6215953", "0.62108016", "0.62030286", "0.61839575", "0.6177631", "0.6175776", "0.6159755", "0.61545277", "0.6144894", "0.6141977", "0.6132931", "0.6130726", "0.6130503", "0.6119467", "0.6108394", "0.61044145", "0.61015135", "0.6098695", "0.6088508", "0.60781586", "0.60774106", "0.60755485", "0.607302" ]
0.85986483
1
Gets the current weight for the container.
public double getcurrentWeight() { return this.currentWeight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getWeight() {\n return weight;\n }", "public int weight() {\n if (this.weight == null) {\n return 0;\n } else {\n return this.weight;\n } // if/else\n }", "public double getWeight() {\n\t\tif(weightConfiguration == null) {\n\t\t\treturn 1.0;\n\t\t}\n\t\treturn weightConfiguration.weightForIdentifier(this.getIdentifier());\n\t}", "public int weight(){\n\t\treturn this.weight;\n\t}", "public int getWeight() {\n\t\treturn _weight;\n\t}", "public float getWeight() {\n\t\t\treturn weight;\n\t\t}", "public Byte getWeight() {\n\t\treturn weight;\n\t}", "public int getWeight() {\n\t\treturn weight;\n\t}", "public int getWeight() {\n\t\treturn weight;\n\t}", "public int getWeight() {\n return weight;\n }", "public int getWeight() {\r\n\t\treturn this.weight;\r\n\t}", "public double getWeight() {\n\t\treturn weight;\n\t}", "public int weight() {\n \treturn weight;\n }", "public int getWeight() {\n return this.weight;\n }", "public float getWeight() {\n return weight;\n }", "public int getWeight()\n\t{\n\t\treturn this.weight;\n\t}", "@Basic\n\tpublic Weight getCurrentWeight() {\n\t\treturn this.currentWeight;\n\t}", "public int getWeight() {\n return weight;\n }", "public int getWeight() {\n return weight;\n }", "public int getWeight() {\n return parameter.getWeight();\n }", "public float getWeight() {\n return weight;\n }", "public int getWeight() {\n\t\treturn quantity*weight; \n\t}", "public int getWeight() {\n return weight;\n }", "public double getWeight() {\n return weight;\n }", "public double getWeight() {\n return weight;\n }", "public double getWeight() {\n\t\treturn weight; \n\t\t}", "public double getWeight(){\n\t\treturn this._weight;\n\t}", "public double getWeight() {\n\t\n\t\treturn this.weight;\t \n\t}", "public double getWeight() {\r\n return weight;\r\n }", "public double getWeight() {\r\n return weight;\r\n }", "public double getWeight() {\n\t\tIterator<Ball> it = this.contents.iterator();\n\t\tdouble retVal = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tretVal += it.next().getWeight();\n\t\t}\n\t\treturn retVal;\n\t}", "public float getWeight() {\n return weight;\n }", "public float getWeight() {\n return weight;\n }", "public double getWeight() {\n return this.weight * 2.20462;\n }", "@Override\n\tpublic double getWeight() {\n\t\treturn weight;\n\t}", "public int getWeight(){\n\t\treturn weight;\n\t}", "public int getWeight()\n {\n return weight;\n }", "public double getWeight(){\n\t\treturn weight;\n\t}", "public java.lang.Double getWeight () {\r\n\t\treturn weight;\r\n\t}", "public double getWeight()\r\n {\r\n return this.weightCapacity;\r\n }", "@Override\n public double getWeight() {\n return this.weight;\n }", "int getWeight() {\n return weight;\n }", "int getWeight() {\n return weight;\n }", "public double getWeight()\n\t{\n\t\t//metodo precisa retornar alguma coisa\n\t\treturn 0.0;\n\t}", "@Override\n\t\tpublic int get_weights() {\n\t\t\treturn weight;\n\t\t}", "@Override\r\n\tpublic double Weight() {\n\t\treturn Weight;\r\n\t}", "public String getWeight()\r\n\t{\r\n\t\treturn weight;\r\n\t}", "public String getWeight() {\n return weight;\n }", "public float getWeight();", "public int getWeight(){\n \treturn weight;\n }", "public ButlerWeights getWeights() {\n\treturn currentWeights;\n }", "public Weight getWeight();", "@Basic\r\n\tpublic Weight getWeight(){\r\n\t\treturn weight;\r\n\t}", "public int getWeight();", "int getWeight();", "int getWeight();", "public T3 getWeight() {\r\n\t\treturn weight;\r\n\t}", "public int getRelativeWeight() {\n return relativeWeight;\n }", "public int getWeight()\n {\n return weightCarried;\n }", "final protected double getWeight() {\n\t\treturn getWeight( _population );\n\t}", "public double getWeight(){\n return weight;\n }", "public double getWeight()\r\n {\r\n return this.aWeight ;\r\n }", "public double getTotalWeight() {\n return this.totalWeight;\n }", "public int getWeight()\n {\n return this.aWeight;\n\n }", "public Matrix getWeight() {\n return weights;\n }", "public double getActualWeight() {\n return actualWeight;\n }", "public double getWeight() {\n return 0;\n }", "public int getWeight(Item item) {\n\t\treturn weight.get(item);\n\t}", "public float getWeightUsed()\r\n {\r\n // implement our own magic formula here ...\r\n return 2.0f;\r\n }", "public GiftCardProductQuery weight() {\n startField(\"weight\");\n\n return this;\n }", "public long getWeightKg() {\n return (long) (getWeight() / POUNDS_PER_KG);\n }", "public float getWeightValue() {\r\n\t\treturn this.value;\r\n\t}", "@Override\n\tpublic double getInternalWeight(int nodeIndex) {\n\t\treturn this.inWeights[nodeIndex];\n\t}", "public double getWeight() {\n \treturn this.trainWeight;\n }", "@JsonGetter(\"weight\")\n public int getWeight ( ) {\n return this.weight;\n }", "public int getpWeight() {\n return pWeight;\n }", "public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}", "public int getCargoWeight() { // get the cargo weight\n\t\treturn cargoWeight;\n\t}", "public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}", "public int getTotalWeight() {\n\t\tif (_cachedTotalWeight == 0) {\n\t\t\tint totalWeight = getWeight();\n\t\t\tfor (Program child : getChildren()) {\n\t\t\t\ttotalWeight += child.getTotalWeight();\n\t\t\t}\n\t\t\t_cachedTotalWeight = totalWeight;\n\t\t}\n\t\treturn (_cachedTotalWeight);\n\t}", "public int weight ();", "public int getCarriedWeight() {\n\t\tint weight = 0;\n\t\tfor (Item item : this) {\n\t\t\tweight += item.getWeight();\n\t\t}\n\n\t\treturn weight;\n\t}", "public abstract double getWeight ();", "public int getWeightLimit() {\n\t\treturn this.weightLimit;\n\t}", "@Override\n\tpublic double weight() {\n\t\treturn 1.0;\n\t}", "public String getWeightUnit() {\n return (String) get(\"weight_unit\");\n }", "@Override\n public double getWeight() {\n // For this example just assuming all cars weigh 500kg and people weigh 70kg\n return 500 + (70 * this.getNumPassengers());\n }", "public Map<String, Double> getWeightingsPerConstraint() {\r\n\t\treturn this.weightingsPerConstraint;\r\n\t}", "default double totalWeight() {\n return edges().stream().mapToDouble(E::weight).sum();\n }", "public int getWeight1() {\n return weight1;\n }", "public short getObjectWeight() { return objectWeight; }", "public Double getHeadWeight();", "public double findWeight(){\n int totalCoins = gold + silver + copper + electrum + platinum;\n if((totalCoins % 3) == 0){\n return totalCoins/3;\n }\n return totalCoins * weight;\n }", "public double getWeight(Criterion criterion) {\n return this.getWeightSubjectiveValue(criterion);\n }", "public double getEquipmentWeight() {\r\n\t\tdouble ret = 0;\r\n\t\tPerson p = model.getData();\r\n\t\tif ( p!=null ) {\r\n\t\t\tret = p.getCarriedWeight();\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "HashMap<String, Double> getWeightMap() {\n\t\treturn weightMap;\n\t}", "public Long getLevelweight() {\n return levelweight;\n }", "public int weight(Person person) {\n\t\tthis.weightMeasuredCount++; \n return person.getWeight(); \n }", "@Override\r\n public double getBaseWeight() { return type.getWeight(); }", "public int getWeightSize() {\r\n\t\treturn weigths.length;\r\n\t}" ]
[ "0.7722425", "0.77129894", "0.7650932", "0.7647197", "0.76145864", "0.76119274", "0.7576902", "0.75540686", "0.75540686", "0.755075", "0.7549882", "0.75476676", "0.7547559", "0.7542506", "0.7538443", "0.75295985", "0.7527684", "0.7518726", "0.7518726", "0.7516759", "0.751483", "0.7510862", "0.7481939", "0.74681675", "0.74681675", "0.74483174", "0.7448153", "0.74433845", "0.7443309", "0.7443309", "0.7435649", "0.74241346", "0.74241346", "0.74110353", "0.7406797", "0.73903626", "0.7378056", "0.73578346", "0.73499405", "0.73499256", "0.7321295", "0.73205304", "0.73205304", "0.7251901", "0.72489655", "0.72262233", "0.7183642", "0.7182607", "0.7169902", "0.7149677", "0.71467537", "0.714294", "0.7119638", "0.71080756", "0.70954186", "0.70954186", "0.7072149", "0.7062696", "0.70620745", "0.70545006", "0.7044903", "0.7043461", "0.69616777", "0.6949331", "0.69227284", "0.6865412", "0.6810393", "0.6801555", "0.67739093", "0.67659634", "0.6711931", "0.67047083", "0.66953164", "0.6689929", "0.66849947", "0.6676017", "0.6675559", "0.66358936", "0.6619413", "0.65854776", "0.6584779", "0.65819275", "0.654892", "0.6534766", "0.65242404", "0.65159535", "0.6485116", "0.64701456", "0.6452569", "0.6451991", "0.64498246", "0.6433646", "0.64310485", "0.6426844", "0.6398568", "0.63955545", "0.63648075", "0.63374174", "0.63277423", "0.63066834" ]
0.71911263
46
Gets the current volume for the container.
public double getcurrentVolume() { return this.currentVolume; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getCurrentVolume() {\n return currentVolume;\n }", "public int getCurrentVolume() {\n return mCurrentVolume;\n }", "@Override\r\n\t\tpublic int dmr_getVolume() throws RemoteException {\n\t\t\tint current = soundManager.getVolume();\r\n\t\t\tUtils.printLog(TAG, \"current Volume\" + current);\r\n\t\t\treturn current;\r\n\t\t}", "@Resource(resourceId = 2216, operation = Operation.Read)\n public Long readVolume()\t{\n ActionInvocation actionInvocation =\n new ActionInvocation(renderingControlService.getAction(ACTION_GET_VOLUME));\n actionInvocation.setInput(ARG_INSTANCE_ID, new UnsignedIntegerFourBytes(0));\n actionInvocation.setInput(ARG_CHANNEL, VALUE_CHANNEL_MASTER);\n Map<String, ActionArgumentValue> output = UpnpController.getInstance().executeUpnpAction(actionInvocation);\n return ((UnsignedIntegerTwoBytes)output.get(ARG_CURRENT_VOLUME).getValue()).getValue();\n }", "public String volume() {\n return mVolume;\n }", "public int getVolume() {\n return volume_;\n }", "public int getVolume() {\n return volume_;\n }", "public double getVolume()\n {\n return volume / 512;\n }", "public int getVolume() {\n return mBundle.getInt(KEY_VOLUME);\n }", "public Float getVolume() throws DynamicCallException, ExecutionException {\n return (Float)call(\"getVolume\").get();\n }", "public int getVolume() {\n return volume;\n }", "public int getVolume() {\r\n\t\treturn volume;\r\n\t}", "Double volume() {\n return execute(\"player.volume\");\n }", "public int getVolume() {\n\t\treturn this.volume;\n\t}", "public String getContainerVolumes() {\n return containerVolumes;\n }", "public Future<Float> getVolume() throws DynamicCallException, ExecutionException {\n return call(\"getVolume\");\n }", "public double getVolume()\n {\n return this.volume;\n }", "public double getVolume() {\n return volume;\n }", "int getVolume();", "int getVolume();", "public byte getVolume(){\r\n\t\treturn volume;\r\n\t}", "int getOriginalVolume();", "public int getVolume();", "public String getVolumeName() {\n return volumeName;\n }", "int getVolume() {\n return this.volume;\n }", "public float getVolume()\n {\n return volume;\n }", "public VPlexStorageVolumeInfo getStorageVolumeInfo() {\n return storageVolumeInfo;\n }", "public String getVolumeId() {\n return this.volumeId;\n }", "BigDecimal getVolume();", "public double getTotalVolume() {\n return totalVolume;\n }", "ModuleComponent volume();", "public VolumeControl getOutputVolumeControl()\r\n {\r\n return outputVolumeControl;\r\n }", "public List<V1Volume> getVolumes() {\n return volumes;\n }", "public double getVolume() { return volume; }", "public Double getVolumeProgress() {\n return this.volumeProgress;\n }", "public int VolumeGet();", "public Long getVolumeSizeInBytes() {\n return this.volumeSizeInBytes;\n }", "public String getVolumeStatus() {\n return this.volumeStatus;\n }", "public long getPropertyVolume()\n {\n return iPropertyVolume.getValue();\n }", "public double volume() {\n\t\treturn this.iWidth * this.iLength * this.iDepth\r\n\t}", "public Integer getVolumeSize() {\n return this.volumeSize;\n }", "public long getPropertyVolume();", "public double getVolume() {\n\t\treturn height * depth * length;\n\n\t}", "public abstract double getVolume();", "public Long getVolumeUsedInBytes() {\n return this.volumeUsedInBytes;\n }", "double volume() {\n\t\treturn 0;\n\t}", "public String getVolumeType() {\n return this.volumeType;\n }", "public String getVolumeType() {\n return this.volumeType;\n }", "public float getVolume() {\n return 1.0f;\n }", "public long getPropertyVolumeUnity()\n {\n return iPropertyVolumeUnity.getValue();\n }", "public MediaStorageVolume getDefaultStorageVolume()\n {\n MediaStorageVolume msv = null;\n LogicalStorageVolume lsv[] = null;\n StorageProxy[] proxies = StorageManager.getInstance().getStorageProxies();\n if (proxies.length != 0)\n {\n lsv = proxies[0].getVolumes();\n }\n else\n {\n System.out.println(\" *********No proxies avaliable*********\");\n return null;\n }\n\n System.out.println(\"*************************************************\");\n System.out.println(\" *****Found \" + lsv.length + \" volumes.******\");\n System.out.println(\"*************************************************\");\n for (int i = 0; i < lsv.length; i++)\n {\n if (lsv[i] instanceof MediaStorageVolume)\n {\n msv = (MediaStorageVolume) lsv[i];\n System.out.println(\"*************************************************\");\n System.out.println(\"******Found MSV: \" + msv + \"*********\");\n System.out.println(\"*************************************************\");\n }\n }\n\n if (msv == null)\n {\n System.out.println(\"*************************************************\");\n System.out.println(\"*******MediaStorageVolume not found!********\");\n System.out.println(\"*************************************************\");\n }\n return msv;\n }", "public Long[] getVolumes() { return this.volumes; }", "public double getVolume() {\n return super.getLado1() * super.getLado2() * this.altura;\n }", "int getRemainingVolume();", "public float getConferenceLocalInputVolume();", "@Override\r\n\tpublic float getVolume() {\n\t\treturn 0;\r\n\t}", "public static byte getPlayerVolume(Player player) {\n\t\tByte byteObj = plugin.playerVolume.get(player.getName());\n\t\tif (byteObj == null) {\n\t\t\tbyteObj = 100;\n\t\t\tplugin.playerVolume.put(player.getName(), byteObj);\n\t\t}\n\t\treturn byteObj;\n\t}", "public double volume()\r\n {\r\n double volume = Math.pow(radius, 2) * (height / 3) * Math.PI;\r\n return volume;\r\n }", "public double getVolume() {\n\t\treturn base.getArea() * height;\n\t}", "public int getSliderVolume() {\n return (int)(this.volume * 100);\n }", "public long getPropertyVolumeUnity();", "@Override\n\tpublic double volume() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double volume() {\n\t\treturn 0;\n\t}", "public static ComicVineVolume GetVolume(String data) {\n\t\treturn null;\n\t}", "private int getVol() {\r\n\r\n\t\treturn dayVolume;\r\n\t}", "public double getVolume() {\n return (getArea() * height);\n }", "private double Volume() {\n\t\tdouble volume = (4f / 3f) * Math.PI * Math.pow(_radius, 3);\n\t\treturn volume;\n\t}", "public int volume() {\r\n int xLength = this.getMaximumPoint().getBlockX() - this.getMinimumPoint().getBlockX() + 1;\r\n int yLength = this.getMaximumPoint().getBlockY() - this.getMinimumPoint().getBlockY() + 1;\r\n int zLength = this.getMaximumPoint().getBlockZ() - this.getMinimumPoint().getBlockZ() + 1;\r\n\r\n int volume = xLength * yLength * zLength;\r\n return volume;\r\n }", "public String getVolumeDiskId() {\n return this.volumeDiskId;\n }", "public abstract double volume();", "public static synchronized int getKeyClickVolume() {\r\n\t\treturn Button.keys.getKeyClickVolume();\r\n\t}", "@Override\n public double getVolume() {\n return liquids\n .stream()\n .mapToDouble(Liquid::getVolume)\n .sum();\n }", "double volume()\n\t{\n\t\t\n\t\treturn width*height*depth;\n\t\t\n\t}", "public String getVolumeState(String mountPoint) throws RemoteException;", "@Override\n\tpublic float volume() {\n\t\treturn 0;\n\t}", "public double getVolume()\r\n\t{\r\n\t\treturn (super.getArea())*h;\r\n\t}", "public static int getMusicVolume()\n\t{\n\t\treturn musicVolume;\n\t}", "public abstract float volume();", "public double totalVolume() {\n int index = 0;\n double total = 0.0;\n while (index < icosList.size()) {\n total += icosList.get(index).volume();\n index++; \n } \n return total;\n }", "@Override\n\tpublic float volume() {\n\t\tfloat volume = (float) ((4/3) * Math.PI * Math.pow(this.radius, 3));\n\t\treturn volume;\n\t}", "String getVolume_type();", "BigDecimal getVolumeTraded();", "private int getPreviousStreamVolume() {\n \tif (this.debugMode){\n \t\treturn QUIET_SOUND_LEVEL;\n \t} else {\n \t\treturn previousStreamVolume;\n \t}\n }", "public Disc getCurrentPlayerDisc() {\n\t\treturn currentDisc;\n\t}", "public float getSoundVolume() {\n return _soundVolume;\n }", "public VolumeInfo getVolumeInformation(DiskDeviceContext ctx) {\n \n // Check if the context has volume information\n \n VolumeInfo volInfo = ctx.getVolumeInformation();\n \n if ( volInfo == null) {\n \n // Create volume information for the filesystem\n \n volInfo = new VolumeInfo(ctx.getDeviceName());\n \n // Add to the device context\n \n ctx.setVolumeInformation(volInfo);\n }\n\n // Check if the serial number is valid\n \n if ( volInfo.getSerialNumber() == 0) {\n \n // Generate a random serial number\n \n volInfo.setSerialNumber(new java.util.Random().nextInt()); \n }\n \n // Check if the creation date is valid\n \n if ( volInfo.hasCreationDateTime() == false) {\n \n // Set the creation date to now\n \n volInfo.setCreationDateTime(new java.util.Date());\n }\n \n // Return the volume information\n \n return volInfo;\n }", "public String getVolumeARN() {\n return this.volumeARN;\n }", "public double getVolumeLitres() {\n return volumeLitres;\n }", "public StrColumn getJournalVolume() {\n return delegate.getColumn(\"journal_volume\", DelegatingStrColumn::new);\n }", "@java.lang.Deprecated\n public io.kubernetes.client.openapi.models.V1FlexPersistentVolumeSource getFlexVolume();", "public static Volume do_calc() {\n\t\treturn new Volume();\n\t}", "public java.lang.Long getMinVolumeSize() {\r\n return minVolumeSize;\r\n }", "public double getCyclinderVolume();", "double volume() {\n\treturn width*height*depth;\n}", "public double getVolumeOfPipe(){\n double lengthPipeInches = lengthOfPipe / 0.0254;\n \n double outerRadius = diameterOfPipe / 2;\n outerRadius = Math.pow(outerRadius,2);\n double outervolumeOfPipe = (Math.PI * outerRadius) * lengthPipeInches;\n \n //get the inner volume pi * r^2 * height\n double innerRadius = (diameterOfPipe / 2) * 0.9;\n innerRadius = Math.pow(innerRadius,2);\n double innervolumeOfPipe = (Math.PI * innerRadius) * lengthPipeInches; \n \n //get the total volume of raw materials\n double totalVolume = outervolumeOfPipe - innervolumeOfPipe;\n \n return totalVolume;\n }", "public float getVolumeFactor() {\r\n\t\treturn volumeFactor;\r\n\t}", "public String remoteVolumeRegion() {\n return this.remoteVolumeRegion;\n }", "private URI getSourceBackingVolumeStorageSystem(Volume vplexVolume) {\n // Get the backing volume associated with the source side only\n Volume localVolume = VPlexUtil.getVPLEXBackendVolume(vplexVolume,\n true, _dbClient);\n\n return localVolume.getStorageController();\n }", "public int getVolumeHandling() {\n return mBundle.getInt(KEY_VOLUME_HANDLING);\n }", "public double totalVolume() {\r\n int index = 0;\r\n double listTotalVolume = 0;\r\n while (index < list.size()) {\r\n listTotalVolume += list.get(index).volume();\r\n index++;\r\n }\r\n return listTotalVolume;\r\n }" ]
[ "0.76389587", "0.73692936", "0.7123769", "0.69385636", "0.6916781", "0.68610424", "0.68105346", "0.68087935", "0.6774286", "0.671498", "0.66643864", "0.6658616", "0.66567737", "0.6634489", "0.66123194", "0.6594481", "0.65941817", "0.6580727", "0.64925104", "0.64925104", "0.64538574", "0.64321834", "0.6429912", "0.64141405", "0.63890654", "0.6370801", "0.6306794", "0.6301394", "0.62838376", "0.62597173", "0.6190179", "0.6184065", "0.6174559", "0.6158852", "0.61439323", "0.6097228", "0.60842663", "0.60697055", "0.60694873", "0.6042846", "0.59973097", "0.5992214", "0.5988408", "0.5987206", "0.5976163", "0.5961876", "0.59423304", "0.59423304", "0.5933008", "0.5920376", "0.590689", "0.58647925", "0.584246", "0.58394355", "0.58087784", "0.57734704", "0.5743217", "0.57253104", "0.5717693", "0.56921065", "0.56862605", "0.5674238", "0.5674238", "0.567047", "0.5639898", "0.563885", "0.563322", "0.56151366", "0.5614412", "0.5602199", "0.5583907", "0.5573683", "0.55698305", "0.5565967", "0.55313957", "0.55283743", "0.552708", "0.5502115", "0.5497799", "0.5461123", "0.54592377", "0.54525", "0.5409977", "0.5385504", "0.5375522", "0.5361123", "0.5358797", "0.5358309", "0.53565466", "0.5332338", "0.533216", "0.53315324", "0.5329596", "0.53110677", "0.53094244", "0.530165", "0.52867776", "0.52802664", "0.5271408", "0.5263289" ]
0.6994127
3
Removes the item from the container.
public void removeItem(CargoItem item) { if (cargoList.contains(item)) { currentWeight = currentWeight-item.getWeight(); currentVolume = currentVolume-item.getVolume(); cargoList.remove(item); System.out.println("Item removed"); } else { System.out.println("Item not found"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeItem(){\n\t\tthis.item = null;\n\t}", "protected abstract void removeItem();", "@Override\n public void remove() {\n if (lastItem == null)\n throw new IllegalStateException();\n bag.remove(lastItem);\n lastItem = null;\n }", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "public void removeItem(Item item) {\n _items.remove(item);\n }", "public void itemRemoved(E item);", "public void removeItem(int id);", "public DataItem removeItem()\r\n\t{\r\n\t\tDataItem temp=itemArray[numItems-1];\r\n\t\titemArray[numItems-1]=null;\r\n\t\tnumItems--;\r\n\t\treturn temp;\r\n\t}", "public DataItem removeItem()\n\t{\n\t\tDataItem temp = itemArray[numItems-1];\n\t\titemArray[numItems-1] = null;\n\t\tnumItems--;\n\t\treturn temp;\n\t}", "@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}", "public void rmItem(Item item) {\n\t\titems.remove(item);\n\t}", "public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}", "public void removeItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.remove(item);\n\t}", "public void removeIt() { \n\t\t\tcollection.remove(currIndex);\n\t\t\tcurrIndex--;\n\t\t}", "public Object removeItem (String key);", "public Item removeLast();", "public void removeDataItem(E value) {\n\t\tdata.remove(value);\n\t}", "public void removeItem(Item e) {\n\t\tif (items.contains(e))\n\t\t\titems.remove(e);\n\t}", "public Item remove(@NonNull Item item) {\n if (items.contains(item) && item instanceof Valuable) {\n \titems.remove(item);\n return item;\n }\n return null;\n }", "public void remove(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == item) {\n items[i] = null;\n return;\n }\n }\n }", "public void removeItem(T itemModel) {\n\t\tthis.removeItem(this.getItemIndex(itemModel));\n\t}", "public void removeItem(int i) {\n checkIndex(i);\n\n if (items[i] != null) {\n size--;\n }\n items[i] = null;\n }", "public void hapusItem(Item objItem) {\n arrItem.remove(objItem); //buang item\n }", "@Override\n\tpublic void itemRemove(final HomeItem item)\n\t{\n\t\tfileService().removeExcept(item.getReference(), null);\n\n\t\tsqlService().transact(new Runnable()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\titemRemoveTx(item);\n\t\t\t}\n\t\t}, \"remove\");\n\t}", "@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}", "public Objects removeObject(String itemName)\n {\n return items.remove(itemName);\n }", "public void removeItem() {\n if (this.size() == 0) {\n System.out.println(\"Empty List.\");\n return;\n }\n this.print();\n String code;\n System.out.println(\"Enter the code of removed item: \");\n code = sc.nextLine().toUpperCase();\n int pos = find(code);\n if (pos < 0) {\n System.out.println(\"This code does not exist.\");\n } else {\n this.remove(pos);\n System.out.println(\"The item \" + code + \" has been removed.\");\n\n }\n }", "public void remove(String item) {\n synchronized(this) {\n _treeSet.remove(item);\n }\n }", "@Override\n\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\tcontainer.removeView(viewList.get(position));\n\t\t}", "public void doRemoveItem() {\n doRemoveItem(this.mSrcPos - getHeaderViewsCount());\n }", "public void removeItem(Item item)\n\t{\n\t\tinventory.remove(item);\n\t}", "public final void remove () {\r\n }", "public void removeItem(int itemToRemove){\n\t\tinventoryItems[itemToRemove] = null;\n\t}", "@Override\n public void remove() {\n }", "public void remove(TradeItem newItem) {\n items.remove(newItem);\n }", "@Override\r\n\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\tcontainer.removeView(viewList.get(position));\r\n\t\t}", "@Override\r\n public void destroyItem( ViewGroup container, int position, Object object ){\n container.removeView( (View) object );\r\n }", "public abstract void removeDisplayedItem(String key);", "public void remove(int index) {\n items.remove(index);\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object){\n container.removeView((View)object);\n }", "public ContentObject remove(\n )\n {\n ContentObject removedObject = objects.remove(index);\n refresh();\n\n return removedObject;\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n container.removeView((View)object);\n }", "@Override\n\tpublic void remove(Component component) {\n\t\tlist.remove(component);\n\t}", "@Override\n\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\tcontainer.removeView((View)object); \t\n\t\t}", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "@Override\n public void remove() {\n }", "@Override\r\n\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\tcontainer.removeView((View) object);\r\n\t}", "private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}", "@Override\n public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {\n container.removeView((View) object);\n }", "public void remove() {\r\n return;\r\n }", "public void remove() {\n\n }", "public void removeItem() {\n tvItem.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n // Notify the listener which position was long pressed.\n longClickListener.onItemLongClicked(getBindingAdapterPosition());\n return true;\n }\n });\n }", "@Override\n public boolean remove(T item) {\n //find the node with the value\n Node n = getRefTo(item);\n //make sure it actually is in the set\n if(n == null)\n return false;\n //reassign the value from the first node to the removed node\n n.value = first.value;\n //take out the first node\n remove();\n return true;\n }", "@Override\n\tpublic void destroyItem(View container, int position, Object object) {\n\t}", "@Override\n\tpublic void remove() { }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "@Override\n public synchronized E remove(int index) {\n E result = this.get(index);\n if (index < this.size() - 1) {\n System.arraycopy(this.container, index + 1, this.container, index, this.size() - (index + 1));\n }\n this.container[--this.pointer] = null;\n return result;\n }", "public void removeItem(int idx)\n\t{\n\t\titemList.remove(idx);\n\t\t\n\t}", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n container.removeView((RelativeLayout) object);\n\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n container.removeView((RelativeLayout) object);\n\n }", "public void removeImageItem() {\n\n mSelectedImageAdapter.setUpRemoveImageItem(this::removeImage);\n }", "public void remove() {\n/* 1379 */ super.remove();\n/* 1380 */ this.inventoryMenu.removed(this);\n/* 1381 */ if (this.containerMenu != null) {\n/* 1382 */ this.containerMenu.removed(this);\n/* */ }\n/* */ }", "public void removeGroceryItem(String item){\n int position = findItem(item);\n if(position > 0)\n myGrocery.remove(position);\n }", "@Override\n\tpublic T remove(T removeItem) {\n\t\t// TODO\n\t\tT item;\n\t\tint index=indexOf(removeItem);\n\t\tif (index == -1) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\titem = data[index];\n\t\t\tfor(int j=index;j<size-1;j++)\n\t\t\t\tdata[j] = data[j+1];\n\t\t\tsize--;\n\t\t\treturn item;\n\t\t}\n\t\t// Find the removeItem in the array\n\t\t// return null if not found\n\t\t// First, Store the item found in a variable\n\t\t// shift the sequence element to the blank(adjust the array)\n\t\t// decrease size by 1\n\t\t// return the stored item\n\n\t}", "public void remove()\n {\n list.remove(cursor);\n cursor--;\n }", "@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() {\n btRemove().push();\n }", "public void remove() {\n btRemove().push();\n }", "public void removeItem(Item item) {\r\n\t\tif (items.containsKey(item)) {\r\n\t\t\titems.remove(item);\r\n\t\t}\r\n\t}", "@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\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 boolean remove(T item) {\n\t\treturn list.remove(item);\n\t}", "public void remove () {}", "@Override\n public void remove(News item) {\n }", "public Object remove();", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "public void remove() {\r\n super.remove();\r\n }", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public boolean removeItem(Item item) {\r\n\t\treturn items.remove(item);\r\n\t}", "public void removeItem(Item item) {\r\n for (Iterator<Item> it = inventoryItems.iterator(); it.hasNext(); ) {\r\n Item i = it.next();\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() - 1);\r\n }\r\n if (i.getCount() <= 0) {\r\n it.remove();\r\n }\r\n }\r\n }", "public void removeFileUploaderItem(FileUploaderItem item) {\n m_items.removeView(item);\n }", "public void remove(MeasurementItem mi)\r\n {\r\n if(measurementItems==null || mi==null) return;\r\n measurementItems.remove(mi);\r\n itemsQuantity=(measurementItems!=null)?measurementItems.size():0;\r\n }", "public void remove ( ) {\n\t\texecute ( handle -> handle.remove ( ) );\n\t}" ]
[ "0.8055762", "0.7411022", "0.7059137", "0.70501953", "0.69832855", "0.69326395", "0.6907128", "0.6890816", "0.6877457", "0.6845482", "0.68437237", "0.6772967", "0.675685", "0.67338216", "0.67196363", "0.67075145", "0.66907454", "0.6640018", "0.6638639", "0.6614497", "0.65763277", "0.6568178", "0.65409005", "0.65300745", "0.6523579", "0.651857", "0.6513914", "0.64651394", "0.64633715", "0.64617366", "0.6450369", "0.6449287", "0.6437007", "0.6429472", "0.6425466", "0.6425226", "0.6423878", "0.64217454", "0.64190096", "0.641367", "0.6405094", "0.640164", "0.63973624", "0.63945746", "0.63920635", "0.6387689", "0.63841766", "0.63810366", "0.6359706", "0.6354223", "0.63532436", "0.6347343", "0.6347244", "0.63470787", "0.6339691", "0.6323298", "0.632201", "0.632201", "0.632201", "0.6317798", "0.63175493", "0.6315911", "0.6315911", "0.63141197", "0.63098663", "0.6301327", "0.62990665", "0.6298617", "0.6298503", "0.6298503", "0.6295235", "0.6295235", "0.62926716", "0.62873864", "0.62846214", "0.62846214", "0.6269242", "0.6266031", "0.625394", "0.6252644", "0.62495655", "0.6248146", "0.6243315", "0.6243315", "0.6243315", "0.6243315", "0.6243315", "0.6239526", "0.6239526", "0.6239526", "0.6239526", "0.6239526", "0.6239526", "0.6239526", "0.6232918", "0.6214119", "0.61955106", "0.61945844", "0.6191091", "0.6190293" ]
0.62458867
82
The main method. Tester method
public static void main (String args[]){ CargoContainer test1 = new CargoContainer("Austin", 800, 8000); CargoContainer test2 = new CargoContainer("Swathi", 10000, 10000000); CargoItem item1 = new CargoItem("Toys", 200, 10, 20, 10); //Volume= 2000 CargoItem item2 = new CargoItem("Pens", 50, 50, 20, 5); //Volume= 5000 CargoItem item3 = new CargoItem("Trucks", 5000, 500, 500, 10); //Volume= 2500000 System.out.println(test1); test1.addItem(item1); System.out.println(test1); test1.addItem(item2); System.out.println(test1); test1.addItem(item3); test2.addItem(item3); System.out.println(test2); test1.removeItem(item1); System.out.println(test1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n GOL_Main.main(args);\n }", "public static void main(String [] args) {\r\n\t\ttestOne(); //adds items to WH; tests getNumItems method & toString method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestTwo(); //tests getItem(String) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestThree(); //test getItem(Item) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFour(); //tests total cost method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFive(); //this will test the getRefrigeratedItems method\r\n\t\tSystem.out.print(\"\\n\"); \r\n\t\ttestSix(); //tests getTotalCostRefrigerated method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestSeven(); //tests remove method\r\n\t}", "@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}", "public static void main() {\n \n }", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}", "public static void main()\n\t{\n\t}", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[] args) {\n\ttest(tests);\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n Calculadora_teste.main(args);\n \n }", "public static void main(String[] args) throws IOException {\n\t\t testType1();\n\n\t\t// testMatrix();\n//\t\ttestKening();\n\t\t\n//\t\ttestOutline();\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(){\n\t}", "@Test\t\n\tpublic void testMain() {\n\n\t\tSystem.out.println(\"hello\");\n\t}", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public static void main(String args[]){\n\t\tTestingUtils.runTests();\n\t\t\n\t}", "public static void main(String [] args) {\n TestFListInteger test = new TestFListInteger();\n \n test.testIsEmpty();\n test.testGet();\n test.testSet();\n test.testSize();\n test.testToString();\n test.testEquals();\n \n test.summarize();\n \n }", "@Test\r\n\tpublic void mainTest(){\r\n\t\tMain m = new Main();\r\n\t\tm.main(null);\r\n\t}", "public static void main(String[] args) {\n\t\tTestingPerformanceCalculator obj= new TestingPerformanceCalculator(\"./data/gitInfoNew.txt\", \"data/Results/FinalResultSidTest1.txt\");\n\t\t//Read Gold set\n\t\tobj.goldStMap=obj.LoadGoldSet();\n\t\t//MiscUtility.showResult(10, obj.goldStMap);\n\t\t//Resd output file/ test result file\n\t\tobj.finalResult=obj.LoadTestingResult();\n\t\t//MiscUtility.showResult(20, obj.finalResult);\n\t\t\n\t\t\n\t\t//Create a ranked list\n\t\t//obj.produceRankedResult(10);\n\t\tArrayList<String> rankedFinalTestingResult=obj.produceRankedResult(10);\n\t\tContentWriter.writeContent(\"./data/testing1RankedResult.txt\", rankedFinalTestingResult);\n\t\t//call another class BLPerformanceCalc to compute\n\t\t\n\t\t\n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n Cic.main(args);\n \n }", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "public static void main(String[] args) {\n\t\ttestStreamMapReduce();\r\n\t\t//testMethodReference();\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"main method\");\n\t\ttest();\n\t\t//RunprogramwithoutObject.test();// no need to create any object of class\n\t\tcover();\n\n\t}", "public void testMain() throws ClassNotFoundException, IOException \r\n {\r\n String[] args = new String[1];\r\n args[0] = \"SyntaxTest\";\r\n \r\n System.out.println(\"Filename: SyntaxTest:\\n\");\r\n Rectangle1.main(args);\r\n \r\n\r\n\r\n String[] args2 = new String[1];\r\n args2[0] = \"SimpleInsertionTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: SimpleInsertionTest:\\n\");\r\n Rectangle1.main(args2);\r\n \r\n String[] args3 = new String[1];\r\n args3[0] = \"RegionSearchTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RegionSearchTest:\\n\");\r\n Rectangle1.main(args3);\r\n \r\n String[] args4 = new String[1];\r\n args4[0] = \"WebCatTests\";\r\n \r\n System.out.println(\"\\n\\nFilename: WebCatTests:\\n\");\r\n Rectangle1.main(args4);\r\n \r\n String[] args5 = new String[1];\r\n args5[0] = \"RemoveTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RemoveTest:\\n\");\r\n Rectangle1.main(args5);\r\n \r\n String[] args6 = new String[1];\r\n args6[0] = \"MoreCommands\";\r\n \r\n System.out.println(\"\\n\\nFilename: MoreCommands:\\n\");\r\n Rectangle1.main(args6);\r\n \r\n assertEquals(\"RegionSearchTest\", args3[0]);\r\n }", "public static void main (String[] args){\n\t\tincPieceCountTest();\n\t\tdecPieceCountTest();\n\t\tsetPieceTest();\n\t\tmoveTest();\n\t\tanyMoveTest();\n\t\tgetPiecesTest();\n\t\tsetPieceTest2();\n\t}", "public static void main() {\n }", "public static void main(String args[]) {\n\t\tSystem.out.println(\"\\r\\ngetGameSituationTest()\");\n\t\tgetGameSituationTest();\n\n\t\tSystem.out.println(\"\\r\\nstateCheckerboardConvertionTest()\");\n\t\tstateCheckerboardConvertionTest();\n\n\t\tSystem.out.println(\"\\r\\ngetValidActionsTest()\");\n\t\tgetValidActionsTest();\n\t}", "public Main() {\n \n \n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Just testing\");\r\n\t\t//lisää kommenttia\r\n\t\t\r\n\t}", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n CashRegister.main(args);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public static void main(String[] args) {\n //init\n Client.getLayerIntersectDao().getConfig().getIntersectionFile(null);\n\n //tests\n TestLayers();\n// TestFields();\n// TestObjects();\n// TestDistributions();\n// TestDistributionData();\n// TestDistributionShapes();\n// TestObjNames();\n }", "public static void main(String[] args) {\n new TSL2550Test();\n }", "public static void main(String[] args) {\n\t\ttest();\n\t}", "public static void main(String[] args) {\n\n experiment();\n }", "public static void main(String[] args) {\r\n\t\t// test method\r\n\t\tNewFeatures newFeatures = new NewFeatures();\r\n\t\tnewFeatures.testingArrayList();\r\n\t\tnewFeatures.testingTryCatch();\r\n\t\tnewFeatures.testingNumericValues();\r\n\t\tnewFeatures.testingSwitchWithStringStatemant();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tglobalTest();\n//\t\ttimeTest();\n//\t\ttestPrefixSearch();\n//\t\ttestSearch();\n//\t\ttestPrediction();\n//\t\ttestTrieSearch();\n//\t\ttestRebuid();\n//\t\ttest13();\n//\t\ttest14();\n\t}", "public static void main(String... args) throws Exception {\n //testHelloWorld();\n //testExchange();\n //testParentChild();\n //testLinking();\n //testListener();\n //testParse(\"1\");\n //testOuterInner();\n //testResourceARM();\n //testExecuteAround();\n testExecuteAroundARM();\n }", "public static void main(String arg[]) {\n System.out.println(\"testGuset(): \" + testGuset());\n System.out.println(\"testServingQueue(): \" + testServingQueue());\n System.out.println(\"testDessertSolvers(): \" + testDessertSolvers());\n testCapicity();\n }", "@Test\n public void main() {\n System.out.println(\"main\");\n String[] args = null;\n SaalHelper.main(args);\n }", "public static void main(String[] args) {\n\t\t \n\t\tResult result1 = JUnitCore.runClasses(TestUnitForCreate.class);\n\t for (Failure failure : result1.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result1.wasSuccessful());\n\n\t Result result2 = JUnitCore.runClasses(TestUnitForReadByCalimNumber.class);\n\t for (Failure failure : result2.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result2.wasSuccessful());\n\t \n\t Result result3 = JUnitCore.runClasses(TestUnitForReadByLossDate.class);\n\t for (Failure failure : result3.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result3.wasSuccessful());\n\t \n\t\tResult result4 = JUnitCore.runClasses(TestUnitForUpdate.class);\n\t\tfor (Failure failure : result4.getFailures()) {\n\t\t\tSystem.out.println(failure.toString());\n\t\t}\n\t\tSystem.out.println(result4.wasSuccessful());\n\t \n\t Result result5 = JUnitCore.runClasses(TestUnitForReadVehicle.class);\n\t for (Failure failure : result5.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result5.wasSuccessful());\n \n\t Result result6 = JUnitCore.runClasses(TestUnitForDelete.class);\n\t for (Failure failure : result6.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result6.wasSuccessful());\n\t \n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n RefSystemGUI.main(args);\n }", "public static void main(String[] args) {\n basePath = MatcherTest.class.getClassLoader().getResource(\"\").getPath() + \"/\";\n\n String russianPath = basePath + \"russianArticlesTokenizedShort-2.txt\";\n String ruOriginalPath = basePath + \"newRussianArticles.json\";\n String englishPath = basePath + \"englishArticlesTokenized.txt\";\n String enOriginalPath = basePath + \"englishArticles.txt\";\n\n String titleExpert = basePath + \"titleExpert.json\";\n String expertPath = basePath + \"matchExpert.json\";\n String articlePath = basePath + \"testMatchRussian3.json\";\n\n getRussianTokenized(russianPath);\n getRussianOriginal(ruOriginalPath);\n getEnglishTokenized(englishPath);\n getEnglishOriginal(enOriginalPath);\n// matchTitles(titleExpert);\n// matchArticles(articlePath);\n// matchTest(expertPath, articlePath);\n matchArticlesRussian(articlePath);\n ArticleClass.PlayMusic();\n }", "public static void main(String args[]) {\n\t\tCollection<Point> data = TestDataPoints.dataFromURL(\"http://www.hep.ucl.ac.uk/undergrad/3459/data/module6/module6-data.txt\");\r\n\t\t\r\n\t\t// Two new objects to be passed to the bestTheory method\r\n\t\tGoodnessOfFitCalculator gofc = new ChiSquared();\r\n\t\tArrayList<Theory> theory = new ArrayList<Theory>();\r\n\t\t\r\n\t\t// Adding each theory to a collection to be tested out\r\n\t\tSystem.out.println(\"There are three theories that will best tested:\");\r\n\t\ttheory.add(new PowerLawTheory(2));\r\n\t\tSystem.out.println(\"\\t\"+new PowerLawTheory(2));\r\n\t\ttheory.add(new PowerLawTheory(2.05));\r\n\t\tSystem.out.println(\"\\t\"+new PowerLawTheory(2));\r\n\t\ttheory.add(new QuadraticTheory(1,10,0));\r\n\t\tSystem.out.println(\"\\t\"+new QuadraticTheory(1,10,0)+\"\\n\");\r\n\t\t\r\n\t\t// Test all the theories and print out the best one to the user\r\n\t\tSystem.out.println(\"The best theory that fits the data input is: \"+bestTheory(data, theory, gofc));\r\n\t}", "public static void main(String[] args){\n\t\ttest1();\r\n\t}", "@Test\n public void main() {\n // App.main(null);\n // assertEquals(\"Hello world\", outContent.toString());\n }", "public void mainTest()\n {\n \tprintSimilarRatingsByYearAfterAndMinutes();\n }", "@Test\n public void testMain() throws Exception {\n //main function cannot be tested as it is dependant on user input\n System.out.println(\"main\");\n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test\r\n public void testMain() {\r\n System.out.println(\"main\");\r\n String[] args = null;\r\n Prog4.main(args);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tpublic void testMain() {\n\t}", "public static void main(String[] args) {\n\t\tTestGeneric t=new TestGeneric();\n\t\tt.testAdd();\n\t\tt.testForEach();\n\t\tt.testChild();\n\t\tt.testForEach();\n\t\tt.testBasicType();\n\t\t\n\n\t}", "@Override\n public void runTest() {\n }", "public static void main(String[] args) throws IOException, InterruptedException {\r\n\t\r\n TournamentTest();\r\n //humanPlayersTest();\r\n }", "public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Horse> trainingSet = utility.readHorseColicfile(\"horseTrain.txt\");\n\t\tArrayList<Variable> variableSets = Horse.getAllVar();\n\t\tTree tree = new Tree();\n\t\t\n\t\tNode decisionTree = tree.buildTree(trainingSet, variableSets);\n\t\tutility.printNode(decisionTree);\n\t\t\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Horse> testSet = utility.readHorseColicfile(\"horseTest.txt\");\n\t\tutility.testTree(testSet, decisionTree);\n\t\t\n\n\t}", "public static void main(String[] args)\n {\n try\n {\n TestRunner.run(isuite());\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public Main() {}", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String argv[]) {\n \r\n PolicyTest bmt = new PolicyTest();\r\n\r\n bmt.create_minibase();\r\n\r\n // run all the test cases\r\n System.out.println(\"\\n\" + \"Running \" + TEST_NAME + \"...\");\r\n boolean status = PASS;\r\n status &= bmt.test1();\r\n \r\n bmt = new PolicyTest();\r\n bmt.create_minibase();\r\n status &= bmt.test2();\r\n\r\n // display the final results\r\n System.out.println();\r\n if (status != PASS) {\r\n System.out.println(\"Error(s) encountered during \" + TEST_NAME + \".\");\r\n } else {\r\n System.out.println(\"All \" + TEST_NAME + \" completed successfully!\");\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\ttest01();\n\t}", "@Test\r\n public void testMain() {\r\n System.out.println(\"main\");\r\n String[] args = null;\r\n ChessMain.main(args);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n SServer.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void main(String[] args)\r\t{", "public static void main(String[] args) {\n\t\trun();\n\t\t//runTest();\n\n\t}", "public static void main(String[] args) {\n testFactorial();\n testFibonacci();\n testMissing();\n testPrime();\n\n\n }", "public void main(){\n }", "public void Main(){\n }", "public Main() {\r\n\t}", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n LoginRegister.main(args);\n }", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"INSERT\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testInsert);\r\n\t\t\tSystem.out.println(\"LOOKUP\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testLookup);\r\n\t\t\tSystem.out.println(\"DELETE BY NAME\");\r\n\t\t\tTestFromFile(\"C:\\\\Users\\\\dhdim\\\\projects\\\\Coursework\\\\src\\\\Coursework\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testDeleteByName);\r\n\t\t\tSystem.out.println(\"DELETE BY NUMBER\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testDeleteByNumber);\r\n\t\t\tSystem.out.println(\"CHANGE NUMBER\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testChangeNumber);\r\n\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} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\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\r\n\t}", "public static void main(String[] args) {\n\t\tIntersection intersection = new Intersection(10, 20);\n\t\t\n\t\t//create the ArrayList for the carGenerators\n\t\tArrayList<CarGenerator> carGen = new ArrayList<CarGenerator>();\n\t\t\n\t\t//create a TestGenerators and add them to the ArraList\n\t\tTestGenerator tg1 = new TestGenerator(intersection,true);\n\t\tTestGenerator tg2 = new TestGenerator(intersection,false);\n\t\tcarGen.add(tg1);\n\t\tcarGen.add(tg2);\n\t\t\n\n\n\t\t\n\t\t//create the simulator for testing\n\t\tSimulator simulator = new Simulator(intersection, 500, carGen);\n\n\t\t//create and start threads for the simulator and the generators\n\t\tThread[] t = new Thread[3];\n\t\tt[0] = new Thread(simulator);\n\t\tt[1] = new Thread(carGen.get(0));\n\t\tt[2] = new Thread(carGen.get(1));\n\t\tt[0].start();\n\t\tt[1].start();\n\t\tt[2].start();\n\t\t\n\t\t//wait until generator and simulator are done, then print statistics\n\t\ttry {\n\t\t\tt[0].join();\n\t\t\tt[1].join();\n\t\t} catch (InterruptedException e) {}\n\t\tStatistics stats = new Statistics();\n\t\tstats.addTime(tg1.reportTotalTravelTime());\n\t\tstats.addTime(tg2.reportTotalTravelTime());\n\t\tSystem.out.println(stats.getReport());\n\t\tSystem.exit(0);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Student> trainingSet = utility.readStudentfile(\"porto_math_train.csv\");\n\t\tArrayList<Variable> variableSets = Student.getAllVar();\n\n\t\tTree tree = new Tree();\n\t\tNode decisionTree = tree.buildTree2(trainingSet, variableSets);\n\n\t\tutility .printNode(decisionTree);\n\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree2(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Student> testSet = utility.readStudentfile(\"porto_math_test.csv\");\n\t\tutility.testTree2(testSet, decisionTree);\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t testMid();\n\t\t testCircular();\n\t\n\t}", "public Main() {\r\n }", "public Main() {\r\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n WarPlane.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = new String[]{\"-i\", \"-p\", \"src/test/resources/problems_resp.xml\", \"src/test/resources/context.txt\"};\n PrintStream prev = System.out;\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(bos));\n XpathGenerator.main(args);\n System.setOut(prev);\n System.out.println(bos.toString());\n assertTrue(bos.toString().startsWith(\"/fhir:Bundle[1]\"));\n }", "public static void main(String[] args) throws Exception{\n test1();\n }", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "public void TestMain(){\n SampleStatements();\n TestMyPow();\n }", "public static void main(String args[]) {\n\t\ttestFindStop();\n\t\ttestFindGene() ;\n\t\ttestAllGenes();\n\t}", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "@org.junit.Test\n public void main() throws Exception {\n DosEquis.main(null);\n }", "public static void run()\n {\n String[] testInput = FileIO.readAsStrings(\"2020/src/day17/Day17TestInput.txt\");\n String[] realInput = FileIO.readAsStrings(\"2020/src/day17/Day17Input.txt\");\n\n Test.assertEqual(\"Day 17 - Part A - Test input\", partA(testInput), 112);\n Test.assertEqual(\"Day 17 - Part A - Challenge input\", partA(realInput), 384);\n Test.assertEqual(\"Day 17 - Part B - Test input\", partB(testInput), 848);\n Test.assertEqual(\"Day 17 - Part B - Challenge input\", partB(realInput), 2012);\n }", "public static void main(String[] args)\r\n\t{\r\n\t\t// create the suite of tests\r\n\t\t/*final TestSuite tSuite = new TestSuite();\r\n\t\ttSuite.addTest(new PersonDaoGenericTest(\"testSavePerson\"));\r\n\t\ttSuite.addTest(new PersonDaoGenericTest(\"testLoadPerson\"));\r\n\t\tTestRunner.run(tSuite);*/\r\n\t}", "public static void main(String... args) throws IOException {\n new Test().test();\n }", "public static void main(String[] args) {\r\n System.out.println(runAllTests());\r\n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }" ]
[ "0.7559868", "0.75421655", "0.73973095", "0.73923314", "0.7350428", "0.7307818", "0.7277629", "0.7275881", "0.72670144", "0.7235171", "0.7201694", "0.7101806", "0.7094669", "0.7080212", "0.7073424", "0.7035874", "0.70286894", "0.7014958", "0.6990661", "0.69887215", "0.6984294", "0.6981439", "0.69679034", "0.696332", "0.69599956", "0.6936149", "0.692152", "0.69206685", "0.6918102", "0.6911832", "0.69083375", "0.68916845", "0.6888143", "0.68760145", "0.6873731", "0.68726003", "0.6858534", "0.68560773", "0.6848201", "0.6843079", "0.6838451", "0.68375075", "0.6837417", "0.68295974", "0.6819949", "0.6816111", "0.6814438", "0.6808227", "0.67962146", "0.6795232", "0.6795031", "0.6794663", "0.6790848", "0.67899185", "0.67709804", "0.6770745", "0.6764429", "0.67545617", "0.67508864", "0.67435503", "0.674061", "0.6738095", "0.6738034", "0.67363113", "0.67321855", "0.6730607", "0.6728312", "0.6727609", "0.6726147", "0.6718906", "0.6717589", "0.67136496", "0.6708992", "0.6708992", "0.67046696", "0.6704386", "0.6694627", "0.66930336", "0.6691276", "0.6678382", "0.66751176", "0.66751176", "0.6671047", "0.6669095", "0.6665185", "0.6663274", "0.66616446", "0.66588444", "0.66569465", "0.66569465", "0.66481155", "0.664291", "0.66401905", "0.663912", "0.66388357", "0.6637438", "0.6637438", "0.6637438", "0.6637438", "0.6637438", "0.6637438" ]
0.0
-1
Service Methods to check room's state
public boolean checkIn(){ return state.checkIn(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasFindGameRoomsRequest();", "boolean hasFindGameRoomsResponse();", "@Override\n public boolean isAvailable() {\n return room.isAvailable();\n }", "boolean getCurrentRoom() {\n return currentRoom;\n }", "public void changeOutofService(Room room);", "boolean hasChatRoom();", "private boolean checkRoomValid(String room) {\n\treturn true;\r\n}", "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "public String getRoomStatus() {\n if (isOccupied()) {\r\n return \"Occupied\";\r\n } else {\r\n return \"Unoccupied\";\r\n }\r\n }", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }", "@Override\n\tpublic void checkOutRoom() {\n\t\t\n\t}", "public boolean isAvailableRoom(String sNmRoom, Date dtFrom, Date dtTo)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=isAvailableRoom&token=\"+sSecurityToken+\"&room=\"+URLEncode(sNmRoom)+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.value.equalsIgnoreCase(\"true\");\r\n } else {\r\n return false;\r\n }\r\n }", "boolean hasServerState();", "boolean isValidStatus();", "void updateRoomStatus(long roomId, int status);", "Room getRoom();", "Room getRoom();", "public Boolean isActive(){return status;}", "public interface RoomListener {\n\n /**\n * Notification method names\n */\n public static final String METHOD_PARTICIPANT_JOINED = \"participantJoined\";\n public static final String METHOD_PARTICIPANT_PUBLISHED = \"participantPublished\";\n public static final String METHOD_PARTICIPANT_UNPUBLISHED = \"participantUnpublished\";\n public static final String METHOD_ICE_CANDIDATE = \"iceCandidate\";\n public static final String METHOD_PARTICIPANT_LEFT = \"participantLeft\";\n public static final String METHOD_SEND_MESSAGE = \"sendMessage\";\n public static final String METHOD_MEDIA_ERROR = \"mediaError\";\n\n //room 返回response\n void onRoomResponse(RoomResponse roomResponse);\n\n //当前房间发生错误\n void onRoomError(RoomError roomError);\n\n //接到房间中的notification\n void onRoomNotification(RoomNotification roomNotification);\n\n //与当前房间的连接已建立\n void onRoomConnected();\n\n //与当前房间的连接已断开\n void onRoomDisconnected();\n\n}", "void updateRoomStatus(String username, long roomId, int status);", "boolean isActive();", "boolean isActive();", "boolean isActive();", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean checkEngineStatus(){\r\n return isEngineRunning;\r\n }", "boolean hasChangeStatus();", "private static void demo2() throws RemoteException {\n\t\tCheckOutRoomService service = new CheckOutRoomServiceImpl();\r\n\t\tString clientID = \"0000001\";\r\n\t\tString hotelID = \"00001\";\r\n\t\t//System.out.println(service.checkOutRoom(clientID, hotelID));\r\n\t\tList<String> numbers = new ArrayList<String>();\r\n\t\t\r\n\t\tList<RoomVO> volist = service.getAllRooms(clientID, hotelID);\r\n\t\tfor(RoomVO vo:volist){\r\n\t\t\tshow(vo);\r\n\t\t\tnumbers.add(vo.getRoomNumber());\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(service.checkOutRoom(clientID, hotelID, \"102\"));\r\n\t}", "boolean hasStatusChanged();", "boolean hasLobbyId();", "void opponentInRoom();", "boolean isOpen() {\n return state == RUNNING;\n }", "public boolean getIsCurrentRoom()\n {\n return isCurrentRoom;\n }", "public boolean isReservationroomidInitialized() {\n return reservationroomid_is_initialized; \n }", "boolean hasHasState();", "public boolean canChangeRooms() {\n return this.canChangeRooms;\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "public abstract OnlineStatus getStatus();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "public static boolean CheckRoomIsAvailable(Room room, long Start, long end) {\n\t\tboolean[] DIO = room.getDateIsOccupied();\n\t\tfor (int i = (int) Start; i < end; i++)\n\t\t\tif (DIO[i] == true) \n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "void startChecking()\n {\n UnitModel model = new UnitModel();\n model.UNIT_ID = Globals.unitId;\n Observable<RoomMeetingsResponse> data = retrofitInterface.roomreservations(model);\n\n subscription = data\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Subscriber<RoomMeetingsResponse>() {\n @Override\n public void onCompleted() {\n\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n\n }\n\n @Override\n public void onNext(RoomMeetingsResponse serviceResponse) {\n //sweetAlertDialog.hide();\n progress_rel.setVisibility(View.GONE);\n OngoingReactAsync(serviceResponse);\n }\n });\n }", "private boolean checkDoor(Door door){\n\n\t \treturn(door.getStatus().equalsIgnoreCase(\"Unlocked\"));\n\t \t\t//return true;//returns the value true\n\t //else\n\t \t //return false;//returns the value false\n\t }", "public Boolean isActive();", "protected boolean statusIs(String state)\n { return call_state.equals(state); \n }", "Boolean isAvailable();", "public boolean isRoomEvent() {\n return roomEvent;\n }", "public boolean isRoom(){\n\t\treturn (cellType == CellType.ROOM);\n\t}", "public void readChatRoomsState(RoomStateListener listener){\n roomsStatelisteners.add(listener);\n\n final Firebase ref = new Firebase(\"https://chatroomapp-6dd82.firebaseio.com/ChatRoomNode\");\n // Attach an listener to read rooms state reference\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n if(roomsStatelisteners.size()>0){\n notifyListeners(roomsStatelisteners,snapshot,\"RoomStateListener\");\n ref.removeEventListener(this);\n }\n RoomsSnapshot = snapshot;\n }\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n //TODO need to take care of this case\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }\n });\n }", "boolean isSetStation();", "private void checkStatus() {\n if (switchOff) {\n String msg = \"Locker is switched off - no data source accessible.\";\n log.error(msg);\n throw new IllegalStateException(msg);\n }\n }", "public abstract Boolean isActive();", "int isActive();", "public boolean roomIsEmpty(){\n return this.isEmpty;\n }", "boolean isMonitoring();", "boolean isMonitoring();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();" ]
[ "0.6606275", "0.6468287", "0.63827413", "0.6353272", "0.6296716", "0.62963945", "0.6271363", "0.6241471", "0.61375767", "0.6051023", "0.6051023", "0.6051023", "0.6051023", "0.6051023", "0.6051023", "0.6051023", "0.6051023", "0.60278755", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5998954", "0.5985979", "0.5985979", "0.5985979", "0.5966655", "0.593041", "0.5917569", "0.59148633", "0.5897832", "0.58972424", "0.5850572", "0.5850572", "0.584831", "0.58292484", "0.58099747", "0.57981306", "0.57981306", "0.57981306", "0.57885087", "0.5775044", "0.5767773", "0.57632923", "0.5763075", "0.5738073", "0.5736808", "0.5729803", "0.57297254", "0.5724249", "0.57133675", "0.57119405", "0.5705973", "0.5697283", "0.5691165", "0.5691165", "0.5691165", "0.5691165", "0.56911594", "0.5677544", "0.5677544", "0.5654796", "0.5651766", "0.56515604", "0.5638837", "0.5638602", "0.5630311", "0.5594954", "0.5593178", "0.55910456", "0.5587736", "0.5578298", "0.55752516", "0.5574486", "0.55625725", "0.55625725", "0.55373627", "0.55373627", "0.55373627", "0.55373627", "0.55373627", "0.55373627", "0.55373627" ]
0.6011142
18
TODO Autogenerated method stub
static int growing() { for(int i=1;i<=3;i++){ height=height+i; System.out.println(height);} return 0; }
{ "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
on upgrade drop older tables
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + TABLE_DEBITOS); // create new tables onCreate(db); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteOldTables(){\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence\");\n jdbcTemplate.execute(\"DROP TABLE OLDrole\");\n jdbcTemplate.execute(\"DROP TABLE OLDperson\");\n jdbcTemplate.execute(\"DROP TABLE OLDavailability\");\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence_profile\");\n }", "public void DropTables() {\n\t\ttry {\n\t\t\tDesinstall_DBMS_MetaData();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void dropTables() {\n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE REVISION\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE VCS_COMMIT\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE FILE\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CODE_FRAGMENT\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CLONE_SET\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CODE_FRAGMENT_LINK\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CLONE_SET_LINK\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CLONE_GENEALOGY\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CODE_FRAGMENT_GENEALOGY\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CRD\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"VACUUM\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \t}", "private void dropOldTables(CopyTable table) throws SQLException\n\t{\n\t\tLOG.info(\"Dropping older versions of table '\" + table.getToName() + \"'...\");\n\t\t\n\t\tStatement q =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\t\n\t\tResultSet result =\n\t\t\tq.executeQuery(\"SELECT name FROM sys.tables WHERE name LIKE '\" + table.getToName()\n\t\t\t\t+ \"_20%_%' AND name <> '\" + table.getToName() + \"' \"\n\t\t\t\t+ \"AND schema_id = (SELECT id from sys.schemas WHERE LOWER(name) = LOWER('\" + table.getSchema()\n\t\t\t\t+ \"')) AND query IS NULL ORDER BY name DESC\");\n\t\t\n\t\tint i = 0;\n\t\tint dropCount = 0;\n\t\tStatement stmtDrop =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\twhile(result.next())\n\t\t{\n\t\t\ti++;\n\t\t\t\n\t\t\t// if table is a fast view-switching table then\n\t\t\t// \t\tskip first result -> is current table and referenced by view\n\t\t\t// \t\tskip second result -> as backup (TODO: perhaps make this configurable?)\n\t\t\tif (table.isUseFastViewSwitching())\n\t\t\t\tif (i == 1 || i == 2)\n\t\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// build DROP query\n\t\t\tStringBuilder query = new StringBuilder(\"DROP TABLE \");\n\t\t\t\n\t\t\tif (!StringUtils.isEmpty(table.getSchema()))\n\t\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(table.getSchema())).append(\".\");\n\t\t\t\n\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(result.getString(\"name\"))).append(\";\");\n\t\t\t\n\t\t\t// execute DROP query\n\t\t\tstmtDrop.executeUpdate(query.toString());\t\t\t\n\t\t\tdropCount++;\n\t\t}\n\t\t\n\t\tif (i == 0 || (table.isUseFastViewSwitching() && i <= 2))\n\t\t\tLOG.info(\"Table '\" + table.getToName() + \"' has no older versions\");\n\t\telse\n\t\t\tLOG.info(\"Dropped \" + dropCount + \" older versions of table '\" + table.getToName() + \"'\");\n\t\t\n\t\tresult.close();\n\t\tq.close();\n\t}", "void dropAllTables();", "public void dropTable();", "public void dropTables()\n {\n String tableName;\n\n for (int i=0; i<tableNames.length; i++)\n {\n tableName = tableNames[i];\n System.out.println(\"Dropping table: \" + tableName);\n try\n {\n Statement statement = connect.createStatement();\n\n String sql = \"DROP TABLE \" + tableName;\n\n statement.executeUpdate(sql);\n }\n catch (SQLException e)\n {\n System.out.println(\"Error dropping table: \" + e);\n }\n }\n }", "@Override\n public void onDowngrade(SQLiteDatabase db, int oldV, int newV ){\n db.execSQL(\"DROP TABLE IF EXISTS \" + DAILY_ACCOUNT_TABLE);\n db.execSQL(\"DROP TABLE IF EXISTS \" + JOURNEY_ACCOUNT_TABLE);\n db.execSQL(\"DROP TABLE IF EXISTS \" + JOURNEY_TABLE);\n // Drop older table if existed\n db.execSQL(\"DROP TABLE IF EXISTS data\");\n // Create tables again\n onCreate(db);\n }", "public void dropTable() {\n }", "public void dropDB() throws SQLException {\n\t \t\tStatement stmt = cnx.createStatement();\n\t \t\tString[] tables = {\"account\", \"consumer\", \"transaction\"};\n\t \t\tfor (int i=0; i<3;i++) {\n\t \t\t\tString query = \"DELETE FROM \" + tables[i];\n\t \t\t\tstmt.executeUpdate(query);\n\t \t\t}\n\t \t}", "void dropAllTablesForAllConnections();", "@Override\n\tpublic void dropTable() {\n\t\ttry {\n\t\t\tTableUtils.dropTable(connectionSource, UserEntity.class, true);\n\t\t\tTableUtils.dropTable(connectionSource, Downloads.class, true);\n\t\t} catch (SQLException e) {\n\t\t}\n\t}", "public void removeLifeloggingTables() throws SQLException {\n\n\t\tString sqlCommand1 = \"DROP TABLE IF EXISTS minute\";\n\t\tString sqlCommand2 = \"DROP TABLE IF EXISTS image\";\n\t\tStatement stmt = this.connection.createStatement();\n\n\t\tstmt.execute(sqlCommand2);\n\t\tstmt.execute(sqlCommand1);\n\t\tstmt.close();\n\t}", "@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(DROP_USER_TABLE);\n db.execSQL(DROP_MONTH_TABLE);\n db.execSQL(DROP_EXPECTED_TABLE);\n db.execSQL(DROP_PERIOD_TABLE);\n db.execSQL(DROP_TRANSACT_TABLE);\n db.execSQL(DROP_TYPE_TABLE);\n db.execSQL(DROP_CATEGORY_TABLE);\n // Create tables again\n onCreate(db);\n }", "public void doDropTable();", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tString[] queries = DROP_TABLES.split(\";\");\n\t\tfor(String query : queries){\n\t\t db.execSQL(query);\n\t\t}\n\t\t\n\t\tString[] drops = CREATE_TABLES.split(\";\");\n\t\tfor(String drop : drops){\n\t\t db.execSQL(drop);\n\t\t}\n\t}", "@Override\r\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tString s3 = \"DROP TABLE IF EXISTS \" + TABLE_NAME_1;\r\n\t\tdb.execSQL(s3);\r\n\r\n\t\tString s4 = \"DROP TABLE IF EXISTS \" + TABLE_NAME_2;\r\n\t\tdb.execSQL(s4);\r\n\r\n\t\tString s5 = \"DROP TABLE IF EXISTS \" + TABLE_NAME_3;\r\n\t\tdb.execSQL(s5);\r\n\r\n\t\tString s6 = \"DROP TABLE IF EXISTS \" + TABLE_NAME_4;\r\n\t\tdb.execSQL(s6);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tonCreate(db);\r\n\r\n\t}", "abstract void dropTable() throws SQLException;", "protected void dropDetachedPartitionTables() {\n\n TenantInfo tenantInfo = getTenantInfo(); \n \n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, tenantInfo.getTenantSchema());\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n dropDetachedPartitionTables(pdm, tenantInfo);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(DROP_PROFILE_TABLE);\n //db.execSQL(DROP_CUSTOMER_TABLE);\n db.execSQL(DROP_REQUEST_TABLE);\n db.execSQL(DROP_SOUVENIR_TABLE);\n\n // Create tables again\n onCreate(db);\n }", "@AfterEach\n void dropAllTablesAfter() throws SQLException {\n Connection connPlayers = individualPlayerScraper.setNewConnection(\"playertest\");\n ResultSet rsTables = connPlayers.prepareStatement(\"SHOW TABLES\").executeQuery();\n while (rsTables.next()) {\n connPlayers.prepareStatement(\"DROP TABLE \" + rsTables.getString(1)).execute();\n }\n rsTables.close();\n connPlayers.close();\n }", "private static void dropTablesFromDatabase (Statement statement) throws SQLException {\n //Удаление таблиц из БД\n statement.execute(\"DROP TABLE IF EXISTS payment;\");\n statement.execute(\"DROP TABLE IF EXISTS account;\");\n statement.execute(\"DROP TABLE IF EXISTS users;\");\n statement.execute(\"DROP TABLE IF EXISTS role;\");\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME1);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_HISTORY);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME3);\n this.onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NODE);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_SECTION);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_GPS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_MARKER);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_STATS);\n // create new tables\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n String sql = \"DROP TABLE IF EXISTS products\";\n db.execSQL(sql);\n onCreate(db);\n\n String sql_2 = \"DROP TABLE IF EXISTS orders\";\n db.execSQL(sql_2);\n // Buat kembali table setelah di drop\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE1 );\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE2 );\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE3 );\n\n onCreate(db);\n }", "public void drop() {\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME1);\n onCreate(db);\n }", "public void upgrade() {\n\t\t\tLog.w(\"\" + this, \"Upgrading database \"+ db.getPath() + \" from version \" + db.getVersion() + \" to \"\n\t + DATABASE_VERSION + \", which will destroy all old data\");\n\t db.execSQL(\"DROP TABLE IF EXISTS agencies\");\n\t db.execSQL(\"DROP TABLE IF EXISTS stops\");\n\t create();\n\t\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(DROP_KAFSH_TABLE);\n db.execSQL(DROP_DARMANI1_TABLE);\n db.execSQL(DROP_DARMANI2_TABLE);\n // Create tables again\n onCreate(db);\n\n }", "@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}", "public void dropTable(String tableName);", "private void dropTables(SQLiteDatabase db) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NEWS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_FEEDS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_CATEGORIES);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_IMAGES);\n }", "boolean dropTable();", "@Override\n public void onUpgrade(SQLiteDatabase database, ConnectionSource connectionSource, int oldVersion, int newVersion) {\n try {\n\n TableUtils.dropTable(connectionSource, Comanda_Item.class, true);\n TableUtils.dropTable(connectionSource, Comanda.class, true);\n\n TableUtils.dropTable(connectionSource, Produto.class, true);\n TableUtils.dropTable(connectionSource, Mesa.class, true);\n\n\n onCreate(database, connectionSource);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\r\n db.execSQL(\"drop table if exists \" + COUNTRY_TABLE);\r\n db.execSQL(\"drop table if exists \" + CURRENT_POLL_TABLE);\r\n }", "private void dropMergeTables() {\n // [2012/4/30 - ysahn] Comment this when testing, if you want to leave the temp tables\n\n try {\n callSP(buildSPCall(DROP_MAP_TABLES_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error dropping id mapping tables. \", exception);\n }\n\n try {\n callSP(buildSPCall(DROP_HELPER_TABLES_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error dropping id mapping tables. \", exception);\n }\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldV, int newV ){\n db.execSQL(\"DROP TABLE IF EXISTS \" + DAILY_ACCOUNT_TABLE);\n db.execSQL(\"DROP TABLE IF EXISTS \" + JOURNEY_ACCOUNT_TABLE);\n db.execSQL(\"DROP TABLE IF EXISTS \" + JOURNEY_TABLE);\n // Drop older table if existed\n db.execSQL(\"DROP TABLE IF EXISTS data\");\n // Create tables again\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_JOURNAL);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_TASKS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_LIST);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_WISH);\n\n // create new tables\n onCreate(db);\n }", "@BeforeAll\n void dropAllTablesBefore() throws SQLException {\n Connection connPlayers = individualPlayerScraper.setNewConnection(\"playertest\");\n ResultSet rsTables = connPlayers.prepareStatement(\"SHOW TABLES\").executeQuery();\n while (rsTables.next()) {\n connPlayers.prepareStatement(\"DROP TABLE \" + rsTables.getString(1)).execute();\n }\n rsTables.close();\n connPlayers.close();\n }", "@Override\n\t\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+DATABASE_TABLE);\n\t\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+DATABASE_TABLE1);\n\t\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+DATABASE_TABLE2);\n\t\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+DATABASE_TABLE4);\n\t\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+DATABASE_TABLE5);\n\n\t\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+DATABASE_TABLE3);\n\t\t\tonCreate(db);\n\t\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_USERS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_CONF);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_CONF_USERS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_TOPICS);\n\n // create new tables\n onCreate(db);\n }", "@Override\r\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_MACHINE);\r\n\r\n // Create tables again\r\n onCreate(db);\r\n }", "private void dropDBProcedure() {\r\n try {\r\n Class.forName(myDriver);\r\n Connection conn = DriverManager.getConnection(myUrl, myUser, myPass);\r\n DatabaseMetaData md = conn.getMetaData();\r\n String[] types = {\"TABLE\"};\r\n ResultSet rs = md.getTables(null, \"USERTEST\", \"%\", types);\r\n while (rs.next()) {\r\n String queryDrop\r\n = \"DROP TABLE \" + rs.getString(3);\r\n Statement st = conn.createStatement();\r\n st.executeQuery(queryDrop);\r\n System.out.println(\"TABLE \" + rs.getString(3).toLowerCase() + \" DELETED\");\r\n st.close();\r\n }\r\n rs.close();\r\n conn.close();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\r\n }", "@Override\n\t\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\ttry {\n\t\t\t\tdb.execSQL(TABLE_DROP);\n\t\t\t\tonCreate(db);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t\n\t\t\t}\n\t\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n if (oldVersion > 3) {\n switch (oldVersion) {\n case 4:\n new Tables(db).makeConferenceTable();\n case 5:\n new Tables(db).makeTalkTable();\n new Tables(db).makeNotificationTable();\n db.execSQL(\"DROP TABLE IF EXISTS 'table_log'\"); //Removing log table from this version\n db.execSQL(\"DROP TABLE IF EXISTS 'table_database'\"); //Removing JC database table from this version\n db.execSQL(\"DROP TABLE IF EXISTS 'table_external'\"); //Removing External database table from this version\n }\n }\n //Remove support from previous databases\n else {\n new Tables(db).dropAllTables();\n onCreate(db);\n }\n }", "public void dropTable(DropTableQuery query);", "private static void removeDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n dropTable(\"myRooms\");\n dropTable(\"myReservations\");\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_VISITORS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_USERS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_LINKS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_EVENTS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_TAGS);\n onCreate(db);\n }", "@After\n public void after() throws IOException {\n spark.sql(String.format(\"DROP TABLE IF EXISTS %s\", baseTableName));\n }", "public void dropAllTables(SQLiteDatabase db){\n dropTable(db, TABLE_SUBSCRIPTIONS);\r\n }", "@Override\n public void dropUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createSQLQuery(\"DROP TABLE IF EXISTS Users\").executeUpdate();\n tx.commit();\n session.close();\n\n }", "@Override\n protected void doClean() throws SQLException {\n for (String dropStatement : generateDropStatements(name, \"V\", \"VIEW\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // aliases\n for (String dropStatement : generateDropStatements(name, \"A\", \"ALIAS\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n for (Table table : allTables()) {\n table.drop();\n }\n\n // slett testtabeller\n for (String dropStatement : generateDropStatementsForTestTable(name, \"T\", \"TABLE\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n\n // tablespace\n for (String dropStatement : generateDropStatementsForTablespace(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // sequences\n for (String dropStatement : generateDropStatementsForSequences(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // procedures\n for (String dropStatement : generateDropStatementsForProcedures(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // functions\n for (String dropStatement : generateDropStatementsForFunctions(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // usertypes\n for (String dropStatement : generateDropStatementsForUserTypes(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n }", "public void stopMigrating();", "void dropDatabase();", "public void dropAllCreateAgain() {\n\t\tSQLiteDatabase db = getWritableDatabase() ;\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_AUTHORS_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"\n\t\t\t\t+ TABLE_ABSTRACT_AUTHOR_POSITION_AFFILIATION);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_AFFILIATION_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"\n\t\t\t\t+ TABLE_ABSTRACT_AFFILIATION_ID_POSITION);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_REFERENCES);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_FIGURES);\n\t\tonCreate(db);\n\t\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_LINEAS_OFERTA);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_CABECERAS_OFERTA);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_TARIFAS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_PUNTOS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_EXTRACOMISION);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_CLIENTES);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_TERMINALES_SMART);\n\n // create new tables\n onCreate(db);\n }", "@Override\n\t\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\t// TODO: upgrade is not supported yet\n\t\t\t//\n\t\t\tLogger.i(\"Upgrade not yet supported\");\n\n\t\t\tfor (SQLTableLayout layout : m_db_tables) {\n\t\t\t\t//\n\t\t\t\t// construct drop table statement\n\t\t\t\t//\n\t\t\t\tString sql_stmt = \"DROP TABLE IF EXISTS \" + layout.m_table_name;\n\t\t\t\tLogger.i(\"STMT: \" + sql_stmt);\n\t\t\t\t//\n\t\t\t\t// execute statement\n\t\t\t\t//\n\t\t\t\tdb.execSQL(sql_stmt);\n\t\t\t}\n\n\t\t\t//\n\t\t\t// construct tables\n\t\t\t//\n\t\t\tonCreate(db);\n\t\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ACCELEROMETER);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_GYROSCOPE);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_MAGNETIC);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ORIENTATION);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_GPS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_EVENT);\n // create new tables\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_PUSH);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_PULL);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_LEGS);\n\n // create new tables\n onCreate(db);\n }", "public void dropTempTable (java.lang.String tableName) { throw new RuntimeException(); }", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+familyTable);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+userTable);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"+PostTable);\n\n\t onCreate(db);\n\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n //do this on upgrade - drop the old tables\n db.execSQL(\"DROP TABLE IF EXISTS \" + ProductEntry.TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + SupplierEntry.TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + CategoryEntry.TABLE_NAME);\n\n //create the new tables\n onCreate(db);\n }", "@Override\n \tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_FEED);\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_FEEDUSER);\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_USER);\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ITEM);\n \t\tonCreate(db);\n \t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n final String DROP_TABLE_COMMAND = \"DROP TABLE IF EXISTS \" + ShopsContract.ShopsEntry.TABLE_NAME;\n db.execSQL(DROP_TABLE_COMMAND);\n onCreate(db);\n }", "public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }", "@Override\n public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {\n sqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_USER);\n sqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_CLIENT);\n sqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_JOB);\n sqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_PHONE);\n sqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_PHONE_TYPE);\n sqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_JOB_CATEGORY);\n sqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_JOB_HAS_JOB_CATEGORY);\n\n // Create new tables\n onCreate(sqLiteDatabase);\n }", "@Override\r\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TB_NAME);\r\n\t\tonCreate(db);\r\n\t\r\n\t\tLog.e(\"Database\", \"onUpgrade\");\r\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + ORDER_RECORDS_TABLE);\n db.execSQL(\"DROP TABLE IF EXISTS \" + XREF_TABLE);\n \n // Create tables again\n onCreate(db);\n\t}", "@Override\r\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + CONTACT_TABLE_NAME);\r\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + GROUP_TABLE_NAME);\r\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + MYSELF_TABLE_NAME);\r\n\t\tonCreate(db);\r\n\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + BusinessContract.CategoryEntry.TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + BusinessContract.SubCategoryEntry.TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + BusinessContract.BusinessEntry.TABLE_NAME);\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase database, ConnectionSource connectionSource, int oldVersion, int newVersion) {\n try {\n TableUtils.dropTable(connectionSource, PlaceType.class, true);\n TableUtils.dropTable(connectionSource, Place.class, true);\n TableUtils.dropTable(connectionSource, Routine.class, true);\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n Log.e(DatabaseHelper.class.getName(), \"onUpgrade\", e);\n throw new RuntimeException(e); // Force exception to quit and stop application\n }\n onCreate(database, connectionSource);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(DROP_USER_TABLE);\n // db.execSQL(DR);\n\n // Create tables again\n onCreate(db);\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \"+CART_TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \"+WISHLIST_TABLE_NAME);\n\n onCreate(db);\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE);\n // Creating tables again\n onCreate(db);\n }", "@Override\r\n\t\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\tdb.execSQL(\"DROP TABLE IF EXITS \" + TABLE_NAME);\r\n\t\t\tonCreate(db);\r\n\t\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n // Create tables again\n onCreate(db);\n }", "@Override\n public void dropTable(String table_name) {\n\n // silently return if connection is closed\n if (!is_open) {\n return;\n }\n\n // try to delete the table\n try {\n String drop_table = \"DROP TABLE \" + table_name;\n statement.execute(drop_table);\n connection.commit();\n } catch (SQLException e) {\n System.out.println(\"Could not delete table \" + table_name);\n e.printStackTrace();\n }\n\n //System.out.println(\"Deleted table \" + table_name);\n\n }", "@Override\r\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tString sqlfavor = \"DROP TABLE IF EXISTS \" + TABLE_FAVOR;\r\n\t\tString sqlgroup = \"DROP TABLE IF EXISTS \" + TABLE_GROUP;\r\n\t\tString sqlcom = \"DROP TABLE IF EXISTS \" + TABLE_MSG;\r\n\t\tString sqlnews = \"DROP TABLE IF EXISTS \" + TABLE_NEWS;\r\n\t\tdb.execSQL(sqlfavor);\r\n\t\tdb.execSQL(sqlgroup);\r\n\t\tdb.execSQL(sqlcom);\r\n\t\tdb.execSQL(sqlnews);\r\n\t\tonCreate(db);\r\n\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_Video);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_PDF);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_AUDIO);\n // Create tables again\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n final String DROP_REVIEW_TABLE = \"DROP TABLE IF EXISTS \" + GOOGLE_PLAY_REVIEW + \";\";\n db.execSQL(DROP_REVIEW_TABLE);\n\n final String DROP_FILE_HISTORY_TABLE = \"DROP TABLE IF EXISTS \" + FILE_IMPORT + \";\";\n db.execSQL(DROP_FILE_HISTORY_TABLE);\n\n final String DROP_REVIEW_STATUS_TABLE = \"DROP TABLE IF EXISTS \" + REVIEW_STATUS + \";\";\n db.execSQL(DROP_REVIEW_STATUS_TABLE);\n\n final String DROP_REVIEW_HISTORY_TABLE = \"DROP TABLE IF EXISTS \" + REVIEW_HISTORY + \";\";\n db.execSQL(DROP_REVIEW_HISTORY_TABLE);\n\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(CoffeeShopDatabase.CoffeeShopTable.SQL_DELETE_ENTRIES);\n\n //drop coffee shop image table\n db.execSQL(CoffeeShopDatabase.CoffeeShopImageTable.SQL_DELETE_ENTRIES);\n\n //drop drinks table\n db.execSQL(CoffeeShopDatabase.DrinksTable.SQL_DELETE_ENTRIES);\n\n //drop drink image table\n db.execSQL(CoffeeShopDatabase.DrinkImageTable.SQL_DELETE_ENTRIES);\n\n //drop drink order table\n db.execSQL(CoffeeShopDatabase.DrinkOrderTable.SQL_DELETE_ENTRIES);\n\n //drop order detail table\n db.execSQL(CoffeeShopDatabase.OrderDetailTable.SQL_DELETE_ENTRIES);\n\n //recreate coffee shop database\n onCreate(db);\n }", "@Override\r\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_TOPICS);\r\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_WORDS);\r\n\t\t// Recreate the table\r\n\t\tonCreate(db);\r\n\r\n\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(DROP_USERS_TABLE_QUERY);\n db.execSQL(DROP_ACCOUNTS_TABLE_QUERY);\n // Create tables again\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n\n // Create tables again\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(DROP_VEHICLE_TABLE);\n\n // Create tables again\n onCreate(db);\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + AppointmentEntry.TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + StaffEntry.TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + VisitorEntry.TABLE_NAME);\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)\n {\n\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n\n\t// Create tables again\n\tonCreate(db);\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {\n sqLiteDatabase.execSQL(\"drop table if exists \" + TABLE_NAME + \"\");\n onCreate(sqLiteDatabase);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n Log.w(TAG, \"Ažuriranje verzije baze podataka sa \" + oldVersion + \" na verziju \"\n + newVersion + \", a to će uništiti postojeće podatke\");\n db.execSQL(\"DROP TABLE IF EXISTS single_page_table\");\n db.execSQL(\"DROP TABLE IF EXISTS top_apps_table \");\n db.execSQL(\"DROP TABLE IF EXISTS virtual_games_table \");\n db.execSQL(\"DROP TABLE IF EXISTS quiz_games_table \");\n db.execSQL(\"DROP TABLE IF EXISTS math_games_table \");\n db.execSQL(\"DROP TABLE IF EXISTS casual_games_table \");\n db.execSQL(\"DROP TABLE IF EXISTS coloring_pages_table \");\n db.execSQL(\"DROP TABLE IF EXISTS do_not_miss_table \");\n\n ///SINGLE\n db.execSQL(\"DROP TABLE IF EXISTS single_page_table \");\n\n //TESTIMONIALS\n db.execSQL(\"DROP TABLE IF EXISTS testimonials \");\n\n\n onCreate(db);\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ACTIVITY);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_VITAL);\n // create new tables\n onCreate(db);\n }", "private void upgradeDatabaseFrom4to5(SQLiteDatabase db) {\n db.delete(\"addons\", \"body IS NULL\", null);\n \n // Purge any data inconsistent with foreign key references (which may have appeared before\n // foreign keys were enabled in Bug 900289).\n db.delete(\"fields\", \"measurement NOT IN (SELECT id FROM measurements)\", null);\n db.delete(\"environments\", \"addonsID NOT IN (SELECT id from addons)\", null);\n db.delete(EVENTS_INTEGER, \"env NOT IN (SELECT id FROM environments)\", null);\n db.delete(EVENTS_TEXTUAL, \"env NOT IN (SELECT id FROM environments)\", null);\n db.delete(EVENTS_INTEGER, \"field NOT IN (SELECT id FROM fields)\", null);\n db.delete(EVENTS_TEXTUAL, \"field NOT IN (SELECT id FROM fields)\", null);\n }", "@Override\n public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {\n String sql = \"DROP TABLE IF EXISTS \" + TABLE_NAME + \";\";\n sqLiteDatabase.execSQL(sql);\n onCreate(sqLiteDatabase);\n }", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_FILE);\n\t\t// Create tables again\n\t\tonCreate(db);\n\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n db.execSQL(\"drop table if exists \" + TABLE_NAME + \";\") ;\n onCreate(db);\n }", "@Override\n\t\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\tString modPersonaQuery = \"DROP TABLE \" + TBL_PERSONA;\n\t\t\tdb.execSQL(modPersonaQuery);\n\t\t}", "public void rollbackCreateTable(Table table) throws MetaException {\n commitDropTable(table, true);\n }", "public void dropTable(String tableName) throws SQLException {\n mysql.update(\"DROP TABLE ` \" + tableName + \" `\");\n }", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLENAME);\n\t\tonCreate(db);\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase database, int oldVersion,\n\t\t\tint newVersion) {\n\t\tLog.w(DBOpenHelper.class.getName(),\n\t\t\t\t\"Upgrading database from version \" + oldVersion + \" to \"\n\t\t\t\t\t\t+ newVersion + \", which will destroy all old data\");\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_MACS);\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_STATISTICS);\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_REVOCATIONS);\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_FRIENDS_KEYS);\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_TWEETS);\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_USERS);\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_DMS);\n\t\tdatabase.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_HTML);\n\t\t//database.execSQL(\"DROP TABLE IF EXISTS \"+TABLE_HTML_TRACKERS);\n\n\t\tcreateTables(database);\n\t}" ]
[ "0.8163109", "0.770959", "0.75683373", "0.7524388", "0.74309754", "0.7356155", "0.7311341", "0.72487235", "0.7237594", "0.7222855", "0.7128809", "0.70926255", "0.70651925", "0.70604795", "0.7022588", "0.69892496", "0.6922954", "0.6890829", "0.68854535", "0.6878749", "0.68781066", "0.68760085", "0.6850181", "0.6830185", "0.6826078", "0.6806667", "0.68037003", "0.6801163", "0.6799182", "0.67829645", "0.67807966", "0.6767583", "0.6753445", "0.67527485", "0.6751785", "0.67344", "0.6726433", "0.67035925", "0.67013603", "0.66922414", "0.66824716", "0.66714466", "0.66699994", "0.66450506", "0.66273415", "0.6609432", "0.66031253", "0.659443", "0.6594076", "0.65869933", "0.65860325", "0.6560379", "0.6556451", "0.6543209", "0.6537914", "0.6526127", "0.6525566", "0.652483", "0.6523425", "0.6522015", "0.6521806", "0.6512832", "0.6512008", "0.650758", "0.649512", "0.64841795", "0.64826816", "0.6480637", "0.6471162", "0.64662814", "0.64607495", "0.645526", "0.6447365", "0.6443764", "0.64166546", "0.64040625", "0.6398316", "0.6395923", "0.63944036", "0.6391299", "0.63903815", "0.63878155", "0.63867927", "0.6385788", "0.6381993", "0.63810617", "0.63690776", "0.63655007", "0.6361235", "0.6354336", "0.6351987", "0.63479537", "0.6340784", "0.6331017", "0.6326088", "0.63232106", "0.63212055", "0.63133276", "0.630985", "0.63086987" ]
0.6501378
64
/ get single debito
public Debito getDebito(long todo_id) { SQLiteDatabase db = this.getReadableDatabase(); String selectQuery = "SELECT * FROM " + TABLE_DEBITOS + " WHERE " + KEY_ID + " = " + todo_id; Log.e(LOG, selectQuery); Cursor c = db.rawQuery(selectQuery, null); if (c != null) c.moveToFirst(); Debito td = new Debito(); td.setCodigo(c.getInt(c.getColumnIndex(KEY_ID))); td.setValor(c.getDouble(c.getColumnIndex(KEY_VALOR))); td.setData(c.getString(c.getColumnIndex(KEY_DATA))); td.setEstabelecimento((c.getString(c.getColumnIndex(KEY_ESTABELECIMENTO)))); return td; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Reserva Obtener();", "Optional<OrdPaymentRefDTO> findOne(Long id);", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "Debut getDebut();", "public Produit getProduit(int theId);", "@Override\n @Transactional(readOnly = true)\n public AdChoiseDTO findOne(Long id) {\n log.debug(\"Request to get AdChoise : {}\", id);\n AdChoise adChoise = adChoiseRepository.findOne(id);\n return adChoiseMapper.toDto(adChoise);\n }", "public IDado getDado() {\n\t\ttry {\r\n\t\t\treturn juego.getDado();\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Commande getSingleCommandes(Integer theId) {\n return commandeDao.findById(theId).get();\r\n }", "Optional<BalanceDTO> findOne(Long id);", "com.soa.SolicitarCreditoDocument.SolicitarCredito getSolicitarCredito();", "RefTarifDTO findOne(Long id);", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType xgetDebtType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType)get_store().find_element_user(DEBTTYPE$10, 0);\n return target;\n }\n }", "@Override\n @Transactional(readOnly = true)\n public CostoDTO findOne(Long id) {\n log.debug(\"Request to get Costo : {}\", id);\n Costo costo = costoRepository.findOne(id);\n return costoMapper.toDto(costo);\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<HistouriqueStatutDemandeDTO> findOne(Long id) {\n log.debug(\"Request to get HistouriqueStatutDemande : {}\", id);\n return histouriqueStatutDemandeRepository.findById(id)\n .map(histouriqueStatutDemandeMapper::toDto);\n }", "Optional<Consulta> findOne(Long id);", "@Generated\n public Depositi getDepositi() {\n long __key = this.iddep;\n if (depositi__resolvedKey == null || !depositi__resolvedKey.equals(__key)) {\n __throwIfDetached();\n DepositiDao targetDao = daoSession.getDepositiDao();\n Depositi depositiNew = targetDao.load(__key);\n synchronized (this) {\n depositi = depositiNew;\n \tdepositi__resolvedKey = __key;\n }\n }\n return depositi;\n }", "@Override\n @Transactional(readOnly = true)\n public PermisoDTO findOne(Long id) {\n log.debug(\"Request to get Permiso : {}\", id);\n Permiso permiso = permisoRepository.findOne(id);\n PermisoDTO permisoDTO = permisoMapper.permisoToPermisoDTO(permiso);\n return permisoDTO;\n }", "@Transactional(readOnly = true)\n public Optional<SolicitacaoExameDTO> findOne(Long id) {\n log.debug(\"Request to get SolicitacaoExame : {}\", id);\n return solicitacaoExameRepository.findById(id)\n .map(solicitacaoExameMapper::toDto);\n }", "Cemetery findOne(Long id);", "@Override\r\n public ReactivoDTO obtener(Integer id) {\n return null;\r\n }", "@Override\n public AlunoDTO findOne(String id) {\n log.debug(\"Request to get Aluno : {}\", id);\n Aluno aluno = alunoRepository.findOne(id);\n return alunoMapper.toDto(aluno);\n }", "public Payment getTarjeta(){\n return cuenta;\n }", "@Override\r\n\tpublic Member getPayment(int no) {\n\t\treturn session.selectOne(\"payments.selectOneMember\", no);\r\n\t}", "public Coche consultarUno(int id) {\n Coche coche =cochedao.consultarUno(id);\r\n \r\n return coche;\r\n }", "@Override\n\tpublic BatimentoCardiaco get(long id) {\n\t\treturn null;\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<OrdreDTO> findOne(Long id) {\n log.debug(\"Request to get Ordre : {}\", id);\n return ordreRepository.findById(id)\n .map(ordreMapper::toDto);\n }", "public byte obtenerDano(){\n\treturn dano;\n }", "@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}", "Optional<TypeBonDTO> findOne(Long id);", "Documento getDocumento();", "teledon.network.protobuffprotocol.TeledonProtobufs.Donatie getDonatie();", "teledon.network.protobuffprotocol.TeledonProtobufs.Donatie getDonatie();", "T readOne(int id);", "public String getCopii(int id) {\n String denumiri=new String();\n String selectQuery = \"SELECT denumire FROM copii WHERE id=\"+id;\n Cursor cursor = db.rawQuery(selectQuery, new String[]{});\n if (cursor.moveToFirst()) {\n do {\n denumiri = cursor.getString(0);\n } while (cursor.moveToNext());\n }\n return denumiri;\n }", "SeminarioDTO findOne(Long id);", "@Override\n @Transactional(readOnly = true)\n public JeuDTO findOne(Long id) {\n log.debug(\"Request to get Jeu : {}\", id);\n Jeu jeu = jeuRepository.findOne(id);\n return jeuMapper.toDto(jeu);\n }", "Object getDados(long id);", "@Override\n public Optional<DuLieuBaoCaoDTO> findOne(String id) {\n log.debug(\"Request to get DuLieuBaoCao : {}\", id);\n return duLieuBaoCaoRepository.findById(id)\n .map(duLieuBaoCaoMapper::toDto);\n }", "Corretor findOne(Long id);", "@Transactional(readOnly = true)\n public Optional<GeoTypeCommuneDTO> findOne(Long id) {\n log.debug(\"Request to get GeoTypeCommune : {}\", id);\n return geoTypeCommuneRepository.findById(id)\n .map(geoTypeCommuneMapper::toDto);\n }", "public ContaBancaria deposito(int numero, double valor) {\n ContaBancaria contaEncontrada = null;\n \n for(int i=0; i < contas.size(); i++){\n \n ContaBancaria contaEmAnalise = contas.get( i );\n \n if(contaEmAnalise.getNumero() == numero){\n contaEncontrada = contaEmAnalise;\n contaEncontrada.depositar(valor);\n break;\n }\n \n }\n return contaEncontrada;\n }", "public String getDenumireBuget(String id){\n c = db.rawQuery(\"select denumire from buget where id='\" + id + \"'\", new String[]{});\n StringBuffer buffer = new StringBuffer();\n while (c.moveToNext()) {\n String denumire = c.getString(0);\n buffer.append(\"\" + denumire);\n }\n return buffer.toString();\n }", "public TarjetaDeCreditoEntity getTrajetaDeCredito(Long id) \n {\n LOGGER.log(Level.INFO, \"Inicia proceso de consultar Tarjeta con id={0}\", id);\n TarjetaDeCreditoEntity tarjeta= persistence.find(id);\n if (tarjeta == null) {\n LOGGER.log(Level.SEVERE, \"tarjeta con el id {0} no existe\", id);\n }\n LOGGER.log(Level.INFO, \"Termina proceso de consultar tarjeta con id={0}\", id);\n return tarjeta;\n }", "@Transactional(readOnly = true) \n public Tbc_fazenda findOne(Long id) {\n log.debug(\"Request to get Tbc_fazenda : {}\", id);\n Tbc_fazenda tbc_fazenda = tbc_fazendaRepository.findOne(id);\n return tbc_fazenda;\n }", "@Override\n\tpublic TradeVO get(int no) {\n\t\treturn dao.get(no);\n\t}", "Optional<ItemPedido> findOne(Long id);", "public Indicador grabarIndicador(Indicador indicador) throws BusinessException{\r\n\t\tIndicador ind = null;\r\n\t\ttry{\r\n\t\t\tind = boIndicador.grabar(indicador);\r\n\t\t}catch(BusinessException e){\r\n\t\t\tthrow e;\r\n\t\t}catch(Exception e){\r\n\t\t\tthrow new BusinessException(e);\r\n\t\t}\r\n\t\treturn ind ;\r\n\t}", "public Candidato obterCandidato(Eleicao eleicao, int id) {\r\n\t\tCandidato candidato = null;\r\n\t\tcandidato = (Candidato) em.createNamedQuery(\"buscaCandidatoPorId\")\r\n\t\t\t\t.setParameter(1, eleicao).setParameter(2, id).getSingleResult();\r\n\t\treturn candidato;\r\n\t}", "@Override\n\tpublic TransferCompra detalleCompra(int id) {\n\t\t\n\t\t//Creamos la Transaccion\n\t\tTransactionManager.getInstance().nuevaTransaccion();\n\t\tTransactionManager.getInstance().getTransaccion().start();\n\t\t\n\t\t//Hacemos Commit \n\t\tTransferCompra t = FactoriaDAO.getInstance().createDAOCompra().searchId(id);\n\t\tTransactionManager.getInstance().getTransaccion().commit();\n\t\t\n\t\t//Finalmente cerramos la Transaccion\n\t\tTransactionManager.getInstance().eliminaTransaccion();\n\t\treturn t;\n\t}", "BaacDTO findOne(Long id);", "Optional<ToChuc> findOne(Long id);", "Optional<NegozioDTO> findOne(Long id);", "@Override\n @Transactional(readOnly = true)\n public Fund findOne(Long id) {\n log.debug(\"Request to get Fund : {}\", id);\n Fund fund = fundRepository.findOneWithEagerRelationships(id);\n return fund;\n }", "@Transactional(readOnly = true)\n public Optional<FormaDeAgendamentoDTO> findOne(Long id) {\n log.debug(\"Request to get FormaDeAgendamento : {}\", id);\n return formaDeAgendamentoRepository.findById(id)\n .map(formaDeAgendamentoMapper::toDto);\n }", "Objet getObjetAlloue();", "@Override\r\n\tpublic Invigilate getOne(Integer no) {\n\t\treturn invigilateMapper.selectByPrimaryKey(no);\r\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<DepositoryInfoDTO> findOne(Long id) {\n log.debug(\"Request to get DepositoryInfo : {}\", id);\n return depositoryInfoRepository.findById(id)\n .map(depositoryInfoMapper::toDto);\n }", "int getMoneyID();", "int getMoneyID();", "int getMoneyID();", "Optional<ShipmentInfoPODDTO> findOne(Long id);", "public String getDenumireCaroserie(int id) {\n c = db.rawQuery(\"select denumire from caroserii where id='\" + id + \"'\", new String[]{});\n StringBuffer buffer = new StringBuffer();\n while (c.moveToNext()) {\n String denumire = c.getString(0);\n buffer.append(\"\" + denumire);\n }\n return buffer.toString();\n }", "public Account getDebtor() {\n\t\treturn debtor;\n\t}", "@Transactional(readOnly = true)\n public Optional<CandidatoDTO> findOne(Long id) {\n log.debug(\"Request to get Candidato : {}\", id);\n return candidatoRepository.findById(id).map(candidatoMapper::toDto);\n }", "GiftMatPromo findOne(Long id);", "@Override\n @Transactional(readOnly = true)\n public SintomaDTO findOne(Long id) {\n log.debug(\"Request to get Sintoma : {}\", id);\n Sintoma sintoma = sintomaRepository.findOne(id);\n return sintomaMapper.toDto(sintoma);\n }", "@Override\n @Transactional(readOnly = true)\n public WilayaDTO findOne(Long id) {\n log.debug(\"Request to get Wilaya : {}\", id);\n Wilaya wilaya = wilayaRepository.findOne(id);\n return wilayaMapper.toDto(wilaya);\n }", "@Transactional(readOnly = true)\n public TipoSituacao findOne(Long id) {\n log.debug(\"Request to get TipoSituacao : {}\", id);\n return tipoSituacaoRepository.findOne(id);\n }", "@GetMapping(\"/detalle-ordens/{id}\")\n @Timed\n public ResponseEntity<DetalleOrdenDTO> getDetalleOrden(@PathVariable Long id) {\n log.debug(\"REST request to get DetalleOrden : {}\", id);\n Optional<DetalleOrdenDTO> detalleOrdenDTO = detalleOrdenService.findOne(id);\n return ResponseUtil.wrapOrNotFound(detalleOrdenDTO);\n }", "@Override\n public DetalleVenta get(int id) {\n return detalleVentaJpaRepository.getOne(id);\n }", "public String getDenumireCombustibil(String id){\n c = db.rawQuery(\"select denumire from combustibil where id='\" + id + \"'\", new String[]{});\n StringBuffer buffer = new StringBuffer();\n while (c.moveToNext()) {\n String denumire = c.getString(0);\n buffer.append(\"\" + denumire);\n }\n return buffer.toString();\n }", "@Override\n @Transactional(readOnly = true)\n public ModeDTO findOne(Long id) {\n log.debug(\"Request to get Mode : {}\", id);\n Mode mode = modeRepository.findOne(id);\n return modeMapper.toDto(mode);\n }", "public static Periode getRecordById(int id){ \n Periode p=null; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menampilkan data berdasarkan id atau primary key \n PreparedStatement ps=con.prepareStatement(\"select * from periode where id=?\"); \n ps.setInt(1,id); \n ResultSet rs=ps.executeQuery(); \n while(rs.next()){ \n p = new Periode(); \n p.setId(rs.getInt(\"id\")); \n p.setTahun(rs.getString(\"tahun\")); \n p.setAwal(rs.getString(\"awal\")); \n p.setAkhir(rs.getString(\"akhir\"));\n p.setStatus(rs.getString(\"status\"));\n } \n }catch(Exception e){System.out.println(e);} \n return p; \n }", "@Override\n @Transactional(readOnly = true)\n public Optional<ProductPurchaseDTO> findOne(Long id) {\n log.debug(\"Solicitud para obtener ProductPurchase : {}\", id);\n return productPurchaseRepository.findById(id)\n .map(productPurchaseMapper::productPurchaseToProductPurchaseDTO);\n }", "public Account getAccountByID(int id)//This function is for getting account for transfering amount\r\n {\r\n return this.ac.stream().filter(ac1 -> ac1.getAccId()==id).findFirst().orElse(null);\r\n }", "public ContratOffreDTO getCdd(){\n\t\tcdd = null;\n\t\tList<ContratOffreDTO> l = getNomenclatureDomainService().getContrats();\n\t\tfor(ContratOffreDTO c : l){\n\t\t\tif(c.getCodeCtrl().equalsIgnoreCase(DonneesStatic.CONTRAT_OFFRE_CODE_CTRL_CDD)){\n\t\t\t\tcdd=c;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn cdd;\n\t}", "@Override\n\tpublic DealVO getDealInfo(int dNo) throws Exception {\n\t\treturn null;\n\t}", "Chofer findOne(Long id);", "public Double deuda(Cliente c);", "@Override\n\tpublic BnsCash get(String arg0) {\n\t\treturn cashRepository.findOne(arg0);\n\t}", "public So_cdVO getById(String so_cd);", "public int getAccount1() // getAccount1 method start\n\t\t{\n\t\t\treturn debitBox1.getSelectedIndex();\n\t\t}", "@Transactional(readOnly = true)\n public Optional<DRkDTO> findOne(Long id) {\n log.debug(\"Request to get DRk : {}\", id);\n return dRkRepository.findById(id).map(dRkMapper::toDto);\n }", "public Estado ReadEstado(int estadoID){\r\n SQLiteDatabase sqLiteDatabase = conn.getReadableDatabase();\r\n String query = \"select * from estados WHERE estadoID=?\";\r\n Cursor c= sqLiteDatabase.rawQuery(query, new String[]{String.valueOf(estadoID)});\r\n if (c.moveToFirst()) return new Estado(estadoID,c.getString(c.getColumnIndex(\"descripcion\")));\r\n return null;\r\n\r\n\r\n }", "@Override\n public ReporteAccidente getById(int id) {\n return repr.findOne(id);\n }", "@Transactional(readOnly = true)\n public Optional<CaraterDaInternacaoDTO> findOne(Long id) {\n log.debug(\"Request to get CaraterDaInternacao : {}\", id);\n return caraterDaInternacaoRepository.findById(id)\n .map(caraterDaInternacaoMapper::toDto);\n }", "@Override\n @Transactional(readOnly = true)\n public CashReceiveDTO findOne(Long id) {\n log.debug(\"Request to get CashReceive : {}\", id);\n CashReceive cashReceive = cashReceiveRepository.findOne(id);\n return cashReceiveMapper.toDto(cashReceive);\n }", "public SepaDauerauftrag getTransfer() throws RemoteException\n\t{\n if (transfer != null)\n return transfer;\n\n Object o = getCurrentObject();\n if (o != null && (o instanceof SepaDauerauftrag))\n return (SepaDauerauftrag) o;\n \n transfer = (SepaDauerauftrag) Settings.getDBService().createObject(SepaDauerauftrag.class,null);\n return transfer;\n\t}", "@Transactional(readOnly = true)\n public Optional<KohnegiDTO> findOne(Long id) {\n log.debug(\"Request to get Kohnegi : {}\", id);\n return kohnegiRepository.findById(id)\n .map(kohnegiMapper::toDto);\n }", "teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonatori(int index);", "Payment find(int paymentID);", "teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonator();", "teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonator();", "@Transactional(readOnly = true)\n public Optional<DisabilityTypeDTO> findOne(Long id) {\n log.debug(\"Request to get DisabilityType : {}\", id);\n return disabilityTypeRepository.findById(id)\n .map(disabilityTypeMapper::toDto);\n }", "@Override\n @Transactional(readOnly = true)\n public MechanicDTO findOne(Long id) {\n log.debug(\"Request to get Mechanic : {}\", id);\n Mechanic mechanic = mechanicRepository.findOne(id);\n return mechanicMapper.toDto(mechanic);\n }", "O obtener(PK id) throws DAOException;", "public Nodo getNodoDerecho(){\n return der;\n }", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType.Enum getDebtType()\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(DEBTTYPE$10, 0);\n if (target == null)\n {\n return null;\n }\n return (ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType.Enum)target.getEnumValue();\n }\n }", "public Cliente buscarClientePorDocumento(String id) throws ExceptionService {\n Optional<Cliente> verificar = repositorio.findById(Long.parseLong(id));\n if (verificar.isPresent()) { //verificamos que traiga un resultado\n Cliente cliente = verificar.get(); //con el get obtenemos del optional el objeto en este caso de tipo cliente\n return cliente;\n } else {\n throw new ExceptionService(\"no se encontro el cliente con el documento indicado\");\n }\n }", "BeanPedido getPedido(UUID idPedido);" ]
[ "0.62609905", "0.60772675", "0.6029504", "0.5965298", "0.5945888", "0.58805877", "0.58440924", "0.58426815", "0.58023477", "0.57584065", "0.5757618", "0.573719", "0.5700994", "0.5699327", "0.5681509", "0.5670222", "0.5667373", "0.564971", "0.5649702", "0.5643199", "0.56338733", "0.5630117", "0.56248975", "0.5618499", "0.56048006", "0.5596049", "0.5595507", "0.5577954", "0.5576366", "0.5574353", "0.55697954", "0.55697954", "0.5531919", "0.5518587", "0.5515659", "0.5509683", "0.5507668", "0.550732", "0.55041516", "0.5501814", "0.5501699", "0.549265", "0.5484685", "0.5477691", "0.54612935", "0.5461083", "0.5442035", "0.54307646", "0.54282945", "0.5423607", "0.54177177", "0.5416562", "0.5412626", "0.5407941", "0.5405602", "0.54039645", "0.54039544", "0.54005265", "0.54005265", "0.54005265", "0.5391408", "0.53878504", "0.53860927", "0.5377823", "0.53734154", "0.5371562", "0.53686154", "0.53647417", "0.53605664", "0.53519166", "0.5351862", "0.53488886", "0.53406763", "0.53339547", "0.5327787", "0.5327034", "0.53267384", "0.5326523", "0.5324768", "0.53240615", "0.53218734", "0.53161466", "0.53084165", "0.530565", "0.5302028", "0.52981615", "0.5297107", "0.5283109", "0.5281966", "0.5278972", "0.52786", "0.52776724", "0.52776724", "0.52760243", "0.52748483", "0.5274203", "0.5270447", "0.52697635", "0.52592856", "0.52587616" ]
0.67637044
0
/ getting all debitos
public ArrayList<Debito> getAllDebitos() { ArrayList<Debito> debitos = new ArrayList<Debito>(); String selectQuery = "SELECT * FROM " + TABLE_DEBITOS; Log.e(LOG, selectQuery); SQLiteDatabase db = this.getReadableDatabase(); Cursor c = db.rawQuery(selectQuery, null); // looping through all rows and adding to list if (c.moveToFirst()) { do { Debito td = new Debito(); td.setCodigo(c.getInt(c.getColumnIndex(KEY_ID))); td.setValor(c.getDouble(c.getColumnIndex(KEY_VALOR))); td.setData(c.getString(c.getColumnIndex(KEY_DATA))); td.setEstabelecimento((c.getString(c.getColumnIndex(KEY_ESTABELECIMENTO)))); // adding to todo list debitos.add(td); } while (c.moveToNext()); } return debitos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<DietaBalanceada> consultar_dietaBalanceada();", "List<BookAccount> findAllDebtors();", "void listAllDeposit(Ui ui, int depositsToDisplay) throws TransactionException, BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "public Collection pesquisaParaCriarDebitosNaoGerados() throws ErroRepositorioException{\n\t\treturn null;\n\t}", "public List<Account> getCustomerAccountListDegrade(String id){\n \t Account userDefaultAccount = new Account();\n \t userDefaultAccount.setAccountType(\"CompteCourant\");\n \t userDefaultAccount.setOwner(id);\n \t userDefaultAccount.setStatus(\"*****ServiceDégradé****\");\n \t userDefaultAccount.setBalance(1.00);\n \t return (List<Account>)Arrays.asList(userDefaultAccount);\n \t \n }", "List<OrdPaymentRefDTO> findAll();", "public List<Permiso> obtenerTodosActivos();", "public List<Consultor> getConsultores()\n\t{\n\t\tList<Consultor> nombres = new ArrayList<Consultor>();\n\t\tLinkedList<Consultor> tb = Consultor.findAll();\n\t\tfor(Consultor c : tb)\n\t\t{\n\t\t\tnombres.add(c);\n\t\t}\n\t\treturn nombres;\t\n\t}", "@Override\n\tpublic List<Commande> getAll() {\n\n\t\ttry {\n\n\t\t\tps = this.connection.prepareStatement(\"SELECT * FROM commandes\");\n\n\t\t\trs = ps.executeQuery();\n\n\t\t\tList<Commande> listeCommandesBDD = new ArrayList<>();\n\t\t\tCommande commande = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tcommande = new Commande(rs.getInt(1), rs.getDate(2), rs.getInt(3));\n\t\t\t\tlisteCommandesBDD.add(commande);\n\n\t\t\t} // end while\n\n\t\t\treturn listeCommandesBDD;\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"...(CommandeDAOImpl) erreur de l'execution de getAll()...\");\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tps.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} // end finally\n\n\t\treturn null;\n\n\t}", "List<DangerMerchant> selectAll();", "@Override\n\tpublic List<DescontoBeneficiario> listarDescontos() {\n\t\treturn null;\n\t}", "java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> \n getFundsList();", "java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> \n getFundsList();", "java.util.List<cosmos.base.v1beta1.Coin> \n getTotalDepositList();", "public Collection<Dealsusagetb> getSdeals() {\n RedeemAmount = 0;\n sdeals = new ArrayList<>();\n Collection<Dealsusagetb> usages = res.readEntity(gDUsages);\n for (Dealsusagetb usage : usages) {\n if(usage.getStatus() == 2) {\n sdeals.add(usage);\n //RedeemAmount += usage.getDealID().getAverageCost();\n }\n }\n return sdeals;\n }", "public static PayabbhiCollection<Payout> all() throws PayabbhiException {\n\t\treturn requestCollection(Method.GET, urlFor(Payout.class), null, Payout.class);\n\t}", "public Collection<CleaningTransaction> findAll();", "List<WayBill> getAllWayBill();", "public List<AccesorioBicicletaEntity> getAccesorioBici() {\r\n LOGGER.info(\"Inicia proceso de consultar todas las Bicicletaes\");\r\n // Note que, por medio de la inyección de dependencias se llama al método \"findAll()\" que se encuentra en la persistencia.\r\n List<AccesorioBicicletaEntity> acc = persistence.findAll();\r\n LOGGER.info(\"Termina proceso de consultar todas las Bicicletaes\");\r\n return acc;\r\n }", "List<Cemetery> findAll();", "private void getObsequios(){\n mObsequios = estudioAdapter.getListaObsequiosSinEnviar();\n //ca.close();\n }", "public List<Buy> getAll() throws PersistException;", "@GetMapping(\"/getallCommande_Fournisseur\")\n\tprivate List<Commande_Fournisseur> getAllCommandes()\n\t{\n\t\tSystem.out.println(\"get all commandes frournisseur\");\n\t\treturn commande_FournisseurController.findAll();\n\t}", "public Collection<Transferencia> traerTodasLasTransferencias() {\n Collection<Transferencia> resultado = null;\n try {\n controlTransferencia = new ControlTransferencia();\n bitacora.info(\"Registro Transferencia Iniciado correctamente\");\n resultado = controlTransferencia.traerTodasLasTransferencias();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro Transferencia por \" + ex.getMessage());\n }\n return resultado;\n }", "public List<Commande> getCommande() {\n return commandeDao.findAll();\r\n\r\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry[] getDebtsArray();", "@Override\n public List<Dependente> todosOsDepentendes() {\n return dBC.todosOsDepentendes();\n\n }", "public Collection buscarDebitosCobradosEmitirContaCaern(Conta conta)\n\tthrows ErroRepositorioException;", "@WebMethod(operationName = \"listerDemandesACombler\")\n public Collection<Demande> listerDemandesACombler() {\n return ejbRef.listerDemandesACombler();\n }", "public Collection pesquisaParaCriarDebitosCategoriaNaoGerados() throws ErroRepositorioException{\n\t\treturn null;\n\t}", "List<PaymentsIdResponse> getAllPaymentsId();", "List<Oficios> buscarActivas();", "List<CurrencyDTO> getCurrencies();", "public java.util.List<SitbMoneyCollection> findAll();", "@GET\n public List<TrayectoDetail> darTrayectos() {\n \n List<TrayectoDetail> listaTrayecto = listEntity2DetailDTO(trayectoLogic.getTrayectos());\n LOGGER.log(Level.INFO, \"BookResource getBooks: output: {0}\", listaTrayecto);\n return listaTrayecto;\n }", "public Collection<OrdenCompra> traerTodasLasOrdenesDeCompra() {\n Collection<OrdenCompra> resultado = null;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.traerTodasLasOrdenesDeCompra();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return resultado;\n }", "public com.zenithbank.mtn.fleet.Transaction[] getCardTrans(boolean includeOpeningBalance) throws java.rmi.RemoteException;", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry getDebtsArray(int i);", "public List<ReceitaDTO> listarReceitas() {\n return receitaOpenHelper.listar();\n }", "List<InvoiceDTO> fetchAll();", "List<Order> getAll();", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ComTicketsDependencia> codigosdisponibles(Long ide) {\n\t\t\r\n\t\treturn em.createQuery(\"select ct.id,ct.ticket from ComTicketsDependencia c inner join c.comTicket ct where c.dependencia.id=\"+ide+\" and c.comTicket.estado=1 and c.comPeriodo.estado='1' order by ct.id \").getResultList();\r\n\t}", "public List<Payment> findAll(){\n\t\treturn paymentRepository.findAll();\n\t}", "Collection<Order> getAll();", "public Map listAllDonations() throws IOException\n\t{\n\t\treturn request(GET, coOpVault());\n\t}", "public List<vacante> cargarvacante() {\n\t\treturn vacantesrepo.findAll();\n\t}", "@Override\n\tpublic List<CreditCard> getAll(){\n\t\t\n\t\treturn creditCardDao.findAll();\n\t}", "public List<RjTipoDepreciacion> getAllRjTipoDepreciacion()throws Exception{\n\t\tList<RjTipoDepreciacion> lista=new LinkedList<RjTipoDepreciacion>();\n\t\ttry{\n\t\t\tStringBuffer SQL=new StringBuffer(\"SELECT tipo_depreciacion_id,descripcion,descripcion_corta FROM \").append(Constante.schemadb).append(\".rp_tipo_depreciacion order by descripcion asc\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tRjTipoDepreciacion obj=new RjTipoDepreciacion(); \n\t\t\t\tobj.setTipoDepreciacionId(rs.getInt(\"tipo_depreciacion_id\"));\n\t\t\t\tobj.setDescripcion(rs.getString(\"descripcion\"));\n\t\t\t\tobj.setDescCorta(rs.getString(\"descripcion_corta\"));\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}", "public Collection<Transaction> getAllTransactions();", "public List<StatusDemande> getStatusDemandes(){\n return statusDemandeRepository.findAll();\n }", "public List<Bank> findAll() {\n return em.createQuery(\"SELECT b FROM Bank b\").getResultList();\n }", "@Override\n\tpublic ResponseEntity<?> list() {\n\t\treturn ResponseEntity.ok(service.deposit.list(0));\n\t}", "@Override\n\tpublic Payment getPayDeatilsById(long transactionid) {\n\t\treturn paydao.fetchPayDeatilsById(transactionid);\n\t}", "@Override\n public List<DuLieuBaoCaoDTO> findAll() {\n log.debug(\"Request to get all DuLieuBaoCaos\");\n return duLieuBaoCaoRepository.findAll().stream()\n .map(duLieuBaoCaoMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public List<CbmCItemFininceItem> findAll();", "public List<vacante> buscarDestacadas() {\n\t\treturn vacantesrepo.findByDestacadoAndEstatusOrderByIdDesc(1,\"Aprobada\");\n\t}", "Collection<Account> getAll();", "public List<BrainTreePaymentInfo> getPaymentMethods(final SessionContext ctx)\n\t{\n\t\tList<BrainTreePaymentInfo> coll = (List<BrainTreePaymentInfo>)getProperty( ctx, PAYMENTMETHODS);\n\t\treturn coll != null ? coll : Collections.EMPTY_LIST;\n\t}", "public Hashtable getDecissions()\n {\n return m_decissions;\n }", "@Override\n @Transactional(readOnly = true)\n public List<OrdreDTO> findAll() {\n log.debug(\"Request to get all Ordres\");\n return ordreRepository.findAll().stream()\n .map(ordreMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public Debito getDebito(long todo_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_DEBITOS + \" WHERE \"\n + KEY_ID + \" = \" + todo_id;\n\n Log.e(LOG, selectQuery);\n\n Cursor c = db.rawQuery(selectQuery, null);\n\n if (c != null)\n c.moveToFirst();\n\n Debito td = new Debito();\n td.setCodigo(c.getInt(c.getColumnIndex(KEY_ID)));\n td.setValor(c.getDouble(c.getColumnIndex(KEY_VALOR)));\n td.setData(c.getString(c.getColumnIndex(KEY_DATA)));\n td.setEstabelecimento((c.getString(c.getColumnIndex(KEY_ESTABELECIMENTO))));\n\n\n return td;\n }", "public List<Tripulante> obtenerTripulantes();", "@Override\n\tpublic List<Boletos> getAllBoletos() throws Exception {\n\t\treturn null;\n\t}", "public Collection<Dealsusagetb> getDusages() {\n Collection<Dealsusagetb> usages = res.readEntity(gDUsages);\n dusages = new ArrayList<>();\n for (Dealsusagetb usage : usages) {\n if(usage.getStatus() == 1) {\n dusages.add(usage);\n }\n }\n return dusages;\n }", "public RecordSet obtenerEtapasDeuda(es.indra.sicc.util.DTOBelcorp dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerEtapasDeuda(es.indra.sicc.util.DTOBelcorp dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n query.append(\" SELECT OID_ETAP_DEUD AS OID, VAL_DESC AS DESCRIPCION \");\n query.append(\" FROM COB_ETAPA_DEUDA \");\n query.append(\" WHERE PAIS_OID_PAIS = \" + dtoe.getOidPais());\n query.append(\" ORDER BY DESCRIPCION \");\n \n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerEtapasDeuda(es.indra.sicc.util.DTOBelcorp dtoe): Salida\");\n \n return rs; \n \n }", "public List<NotaDeCredito> procesar();", "public Collection eleicoesAbertas(){\n return this.eleicaoDB.eleicoesAberta();\n }", "@Override\n @Transactional(readOnly = true)\n public List<DepositoryInfoDTO> findAll() {\n log.debug(\"Request to get all DepositoryInfos\");\n return depositoryInfoRepository.findAll().stream()\n .map(depositoryInfoMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "@Override\n public Collection<ExchangeTradedFund> getAllExchangeTradedFunds() {\n return exchangeTradedFundRepository.findAllSorted();\n }", "private void getRecepcionSeros(){\n mRecepcionSeros = estudioAdapter.getListaRecepcionSeroSinEnviar();\n //ca.close();\n }", "List<BusinessRepayment> selectAll();", "List<NovedadAdapter> getAll();", "public List<Departamento> obtenerInstancias() {\n List<Departamento> lstDepas = new ArrayList();\n if (conectado) {\n try {\n String Query = \"SELECT * FROM instancias ORDER BY nombre ASC\";\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n Departamento depa = new Departamento();\n depa.setCodigo(resultSet.getString(\"codigo\"));\n depa.setNombre(resultSet.getString(\"nombre\"));\n depa.setJefe(resultSet.getString(\"jefe\"));\n lstDepas.add(depa);\n }\n Logy.m(\"Consulta de datos de las instancias: exitosa\");\n return lstDepas;\n\n } catch (SQLException ex) {\n Logy.me(\"Error!! en la consulta de datos en la tabla instancias\");\n return new ArrayList();\n }\n } else {\n Logy.me(\"Error!!! no se ha establecido previamente una conexion a la DB\");\n return lstDepas;\n }\n }", "List<OcCustContract> selectAll();", "@SuppressWarnings(\"unchecked\")\n\tpublic List<BookCopiesNumber> getDeletableBooks() throws SQLException{\n\t\treturn (List<BookCopiesNumber>) super.manager.getDeletableBooks(true);\n\t}", "public List<String> retornaDatasComprasDeClientes () {\n return this.contasClientes\n .values()\n .stream()\n .flatMap((Conta conta) -> conta.retornaDatasDasCompras().stream())\n .collect(Collectors.toList());\n }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "@Override\n public List<ReporteAccidente> getAll() {\n return (List<ReporteAccidente>) repr.findAll();\n }", "private void getRecepcionBHCs(){\n mRecepcionBHCs = estudioAdapter.getListaRecepcionBHCSinEnviar();\n //ca.close();\n }", "public List<Contract> allContracts() {\r\n\r\n\t\tQuery query = this.em.createQuery(\"SELECT c FROM Contract c order by c.contractId desc\");\r\n\t\tList<Contract> contractList = null;\r\n\t\tif (query != null) {\r\n\t\t\tcontractList = query.getResultList();\r\n\t\t\tSystem.out.println(\"List:\"+contractList);\r\n\t\t}\r\n\t\treturn contractList;\r\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "@Override\n\tpublic List<Dispositivo> getAll() {\n\t\treturn (List<Dispositivo>) dispositivoDao.findAll();\n\t}", "public Collection getAllReceivables()\n throws RemoteException;", "public SgfensBanco[] findAll() throws SgfensBancoDaoException;", "@Override\r\n\tpublic ArrayList<TransferUsuario> buscarDesarroladorDescuento(int descuento) {\n Transaction transaccion= TransactionManager.getInstance().nuevaTransaccion();\r\n transaccion.start();\r\n\t\t\r\n //Obtenemos el DAO\r\n \r\n Query query = factoriaQuery.getInstance().getQuery(Eventos.QUERY_DESARROLLADOR);\t\t \r\n ArrayList<TransferUsuario> ret= (ArrayList<TransferUsuario>) query.execute(descuento);\r\n \r\n TransactionManager.getInstance().eliminarTransaccion();\r\n \r\n return ret;\r\n\t}", "public void verCartasDelMazo(){\n for(Carta carta: cartasBaraja){\n System.out.println(carta);\n }\n }", "private void getReconsentimientos(){\n mReconsentimientos = estudioAdapter.getListaReConsentimientoDensSinEnviar();\n //ca.close();\n }", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }", "public Collection<Integer> getDepositAccounts() {\n try {\n return costumerRepo.getAllAccounts(ssn, \"DepositAccount\");\n }catch (Exception ex) {\n rootLogger.error(\"JDBC: message: {}\", ex.getMessage());\n }\n return null;\n }", "java.util.List<com.google.protobuf.ByteString> getTransactionsList();", "public List<RjEstadoConservacion> getAllRjEstadoConservacion()throws Exception{\n\t\tList<RjEstadoConservacion> lista=new LinkedList<RjEstadoConservacion>();\n\t\ttry{\n\t\t\tStringBuffer SQL=new StringBuffer(\"SELECT conservacion_id,descripcion FROM \").append(Constante.schemadb).append(\".rj_estado_conservacion order by descripcion asc\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tRjEstadoConservacion obj=new RjEstadoConservacion(); \n\t\t\t\tobj.setConservacionId(rs.getInt(\"conservacion_id\"));\n\t\t\t\tobj.setDescripcion(rs.getString(\"descripcion\"));\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}", "@Override\n\tpublic List<DemandeAcquisition> getAllDemandeAcquisition() {\n\t\treturn demandeacquisitiondao.getAllDemandeAcquisition();\n\t}", "List<Invoice> getByDebtorIdOrderByDateDesc(int debtorId);", "public Collection getReceivablesByEodId(Integer eodId)\n throws RemoteException;", "public List<CommandeDto> getCommandes() {\n return commandes;\n }", "@Override\r\n\tpublic List<CreditCard> findAll() {\n\t\treturn this.cardList;\r\n\t\t\r\n\t}", "public ArrayList<Table> getTablePayment() {\n \tArrayList<Table> fetchedTables = new ArrayList<Table>();\n \tfetchedTables = getTable(tablePayment);\n \treturn fetchedTables;\n }", "List<Trade> getAllTrades();", "public List<TransactionInfo> getAll() {\n return transactions;\n }", "Object getDados(long id);" ]
[ "0.63052917", "0.622684", "0.5990375", "0.5966537", "0.58765054", "0.58554673", "0.5855076", "0.58225715", "0.5797685", "0.5773685", "0.5771127", "0.5747777", "0.5747777", "0.57414746", "0.5706642", "0.5702084", "0.56990856", "0.5697664", "0.5694762", "0.5677202", "0.5640528", "0.5637148", "0.56299734", "0.5623989", "0.562278", "0.5614407", "0.56042767", "0.56024677", "0.5590171", "0.5579406", "0.55761033", "0.55669475", "0.5564974", "0.5562059", "0.55605996", "0.5557034", "0.5556511", "0.55547583", "0.55380094", "0.55240095", "0.55203485", "0.5517924", "0.5512934", "0.5507978", "0.5493324", "0.54810953", "0.54660374", "0.545575", "0.5455117", "0.5447163", "0.544438", "0.5439545", "0.5435457", "0.54332656", "0.5422892", "0.5419928", "0.54169154", "0.54146326", "0.54137254", "0.5411873", "0.5408259", "0.5405099", "0.5404482", "0.5401372", "0.53998935", "0.53998625", "0.5398436", "0.5397888", "0.53939176", "0.5392048", "0.53892857", "0.5386123", "0.53856057", "0.53736854", "0.53718114", "0.537174", "0.53572756", "0.53553224", "0.53548825", "0.53539664", "0.5342747", "0.534006", "0.53366756", "0.53353053", "0.53305477", "0.53299624", "0.5329606", "0.53255254", "0.53136855", "0.5311077", "0.5305168", "0.53024834", "0.5300992", "0.5300955", "0.5297498", "0.5291109", "0.5287539", "0.5286645", "0.5279025", "0.5278315" ]
0.7050736
0
/ Deleting a Debito
public void deleteDebito(long tado_id) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_DEBITOS, KEY_ID + " = ?", new String[] { String.valueOf(tado_id) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int ShopLoyaltyCardId) {\n\t\t\n\t}", "int deleteByExample(CGcontractCreditExample example);", "private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }", "void delete(String receiptHandle);", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public void delete(String so_cd);", "void delete(SecretIdentifier secretIdentifier);", "void deleteDepositTransaction(int index, Ui ui, boolean isCardBill) throws TransactionException, BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "private void delete() {\n\n\t}", "public int delete( Conge conge ) ;", "int deleteByExample(PaymentTradeExample example);", "private Delete() {}", "private Delete() {}", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "int deleteByExample(PurchasePaymentExample example);", "int deleteByExample(BasicInfoAnodeBurningLossRateExample example);", "void deleteBet(Account account, int id, BigDecimal amount) throws DAOException;", "@Override\n\tpublic void delete(Integer transactionId) {\n\n\t}", "@Override\n\tpublic void delete(ComplitedOrderInfo arg0) {\n\t\t\n\t}", "public int delete( Integer idConge ) ;", "int deleteByPrimaryKey(String debtsId);", "void deleteCustomerDDPayById(int id);", "public Order delete(Order order);", "@Override\n\tpublic int deleteTicket(Booking_ticket bt) {\n\t\treturn 0;\n\t}", "void delete(int id) throws Exception;", "void delete(long idToDelete);", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "public void delete() {\n\n\t}", "void delete(int id);", "void delete(int id);", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Override\n\tpublic int delete(Utente input) throws Exception {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic int deletePurchase(PurchaseVo vo) {\n\t\treturn 0;\r\n\t}", "public void delete(){\r\n\r\n }", "public boolean delete(String cardid);", "void delete(UUID id);", "void delete(UUID id);", "void delete(UUID id);", "void delete(UUID id);", "int deleteByExample(ErpOaLicKeyExample example);", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "int deleteByExample(RepaymentPlanInfoUnExample example);", "public void deleteCrime(UUID id) {\n\n }", "void delete(long id);", "void delete(long id);", "void delete(long id);", "public void delete() {\n\n }", "@Override\n\tpublic void delete(Unidade obj) {\n\n\t}", "void delete(String uuid);", "@Secured( { \"ROLE_ADMIN\",\"ROLE_PUBLISH\",\"ROLE_WRITE\" })\n\tpublic void delete (Credit credit);", "public void deleteTransactionById(int id);", "@Override\n\tpublic void deleteBanque(Banque b) {\n\t\t\n\t}", "public void deleteTask(Integer tid);", "void eliminarPedido(UUID idPedido);", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public void delete(HrJBorrowcontract entity);", "public int delete(o dto);", "@Override\n public void deleteItem(P_CK t) {\n \n }", "boolean delete(Account account);", "boolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberException, SQLException, ClassNotFoundException;", "public void debitar(int valor) throws SaldoInsuficienteException{\r\n this.contaCorrente.debitar(valor);\r\n }", "int deleteByExample(TDwBzzxBzflbExample example);", "private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }", "void delete( Long id );", "@Override\r\n\tpublic int delete() throws Exception {\n\t\treturn 0;\r\n\t}", "public void delete(Conseiller c) {\n\t\t\r\n\t}", "private void deletePurchase(CustomerService customerService) throws DBOperationException\n\t{\n\t\tSystem.out.println(\"To delete coupon purchase enter coupon ID\");\n\t\tString idStr = scanner.nextLine();\n\t\tint id;\n\t\ttry\n\t\t{\n\t\t\tid=Integer.parseInt(idStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid id\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// retrieve all coupons of this customer\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tCoupon coupon = null;\n\t\t\n\t\t// find coupon whose purchase to be deleted\n\t\tfor(Coupon tempCoupon : coupons)\n\t\t\tif(tempCoupon.getId() == id)\n\t\t\t{\n\t\t\t\tcoupon = tempCoupon;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t// delete purchase of the coupon\n\t\tif(coupon != null)\n\t\t{\n\t\t\tcustomerService.deletePurchase(coupon);\n\t\t\tSystem.out.println(customerService.getClientMsg());\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Customer dors not have coupon with this id\");\n\t}", "int deleteByExample(CusBankAccountExample example);", "public void removerDebitoCobrado(Conta conta)\n\t\t\tthrows ErroRepositorioException;", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Long arg0) {\n\t\t\n\t}", "public void delete(int id);", "@Override\n\tpublic void delete(Integer arg0) {\n\t\t\n\t}", "void delete(Integer id);", "void delete(Integer id);", "int delete(long id);", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "private void declineBid(final String listUserID)\r\n {\r\n // remove the data from firebase database\r\n bidsRef.child(currentUserID).child(listUserID).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n //when success, deleting another users' data\r\n bidsRef.child(listUserID).child(currentUserID).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n Toast.makeText(getApplicationContext(), \"Bid Deleted\", Toast.LENGTH_SHORT).show();\r\n\r\n }\r\n }\r\n });\r\n }\r\n\r\n }\r\n });\r\n\r\n }", "public void delete()\n {\n call(\"Delete\");\n }", "public int Delbroker(Long broker_id, String firstname, String lastname,\r\n\t\tString address, String gender, String eMail, Long phone,\r\n\t\tString experience) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from broker where broker_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "public void delete(CbmCItemFininceItem entity);", "@Override\n\tpublic void delete(Pedido arg0) {\n\n\t}", "int deleteByExample(DebtsRecordEntityExample example);", "@Override\r\n\tpublic void delete(Integer arg0) {\n\t\t\r\n\t}", "int deleteByExample(SrmFundItemExample example);", "@Override\n\tpublic int delete(int t) {\n\t\treturn 0;\n\t}", "Order removeInCharge(Order order, User user);", "@Override\r\n\tpublic void deleteBankAccount(String name) {\n\t\t\r\n\t}", "@Override\n public CompletableFuture<Void> delete() {\n return delete(false);\n }", "void deleteDoctor(Doctor target);", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "@Override\n public void delete(int id) {\n }", "@Override\n\tpublic void delete(Long arg0) {\n\n\t}", "@Override\n\tpublic void delete(Long arg0) {\n\n\t}" ]
[ "0.68641603", "0.6578064", "0.65776986", "0.65550685", "0.6493746", "0.64823157", "0.6437506", "0.6434868", "0.6424445", "0.6392859", "0.63913333", "0.6324012", "0.6297302", "0.6297302", "0.6294384", "0.6294384", "0.6294384", "0.6294384", "0.6294384", "0.6294384", "0.6293384", "0.62924105", "0.62864214", "0.627082", "0.62383235", "0.62338", "0.6211184", "0.62085515", "0.620021", "0.6165629", "0.6136767", "0.61334", "0.6113055", "0.61100423", "0.6106567", "0.6106567", "0.6105886", "0.6097766", "0.6090559", "0.608693", "0.60833985", "0.60825086", "0.60825086", "0.60825086", "0.60825086", "0.6076603", "0.60727847", "0.6057218", "0.605453", "0.60520476", "0.60520476", "0.60520476", "0.60411644", "0.6027581", "0.6023706", "0.6021033", "0.6013961", "0.60063756", "0.6005084", "0.599573", "0.59911984", "0.5991144", "0.59877384", "0.5987445", "0.5987043", "0.5975829", "0.5975368", "0.5966657", "0.59558934", "0.59431314", "0.5940831", "0.59396297", "0.5929146", "0.59281147", "0.5926028", "0.5924869", "0.5923332", "0.5915145", "0.5914921", "0.59139633", "0.59139633", "0.5910601", "0.59080505", "0.5907062", "0.5906438", "0.59063995", "0.5905203", "0.5901164", "0.5899635", "0.5899517", "0.5898337", "0.589826", "0.5896013", "0.58918417", "0.588796", "0.5882782", "0.58792806", "0.58747536", "0.5871981", "0.5871981" ]
0.68319166
1
Sets up the GUI for teh program
public Gui() { setTitle("Gui"); setSize(320, 225); setDefaultCloseOperation(EXIT_ON_CLOSE); setResizable(false); title.setText(" ~~~~~ Monty Hall Problem Simulation ~~~~~ "); inputPanel.add(title); iterationsLabel.setText("Iterations:"); inputPanel.add(iterationsLabel); inputPanel.add(inputTextIt); inputTextIt.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String input = inputTextIt.getText(); iterations = Integer.parseInt(input); } }); inputPanel.add(inputButtonOne); inputButtonOne.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String input = inputTextIt.getText(); iterations = Integer.parseInt(input); } }); doorsLabel.setText("Number of Doors:"); inputPanel.add(doorsLabel); inputPanel.add(inputTextDoor); inputTextDoor.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String input = inputTextDoor.getText(); doorCount = Integer.parseInt(input); } }); inputPanel.add(inputButtonTwo); inputButtonTwo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String input = inputTextDoor.getText(); doorCount = Integer.parseInt(input); } }); stayResultLabel.setText("Staying at the door success rate:"); stayResultLabel.setBounds(100, 200, 200, 50); inputPanel.add(stayResultLabel); inputPanel.add(stayPercentLabel); switchResultLabel.setText("Switching to the other door success rate:"); switchResultLabel.setBounds(100, 260, 200, 50); inputPanel.add(switchResultLabel); inputPanel.add(switchPercentLabel); inputPanel.add(startCalcButton); startCalcButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { DecimalFormat df = new DecimalFormat("#.##"); df.setRoundingMode(RoundingMode.CEILING); test = new ProcessGame(iterations, doorCount); Double stayTag = test.calculatePercent(test.countCars(test.getStayResults())); Double switchTag = test.calculatePercent(test.countCars(test.getSwitchResults())); stayPercentLabel.setText(df.format(stayTag) + "%"); switchPercentLabel.setText(df.format(switchTag) + "%"); x.addSpace(); } }); inputPanel.add(closeButton); closeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { x.closeFile(); System.exit(0); } }); add(inputPanel); setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupGUI() {\r\n\t\tPaperToolkit.initializeLookAndFeel();\r\n\t\tgetMainFrame();\r\n\t}", "public GUI() {\n\t\t// sets up file choosers\n\t\tsetFileChoosers();\n\t\t// initialises JFrame\n\t\tsetContent();\n\t\t// sets default window attributes\n\t\tthis.setDefaultAttributes();\n\t\t// instantiates controller object\n\t\tsetController();\n\t\t// sets toolbar to go over frame\n\t\tJPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\t\tToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);\n\t\t// sets antialiasing\n\t\t((Graphics2D) this.getGraphics()).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n\t\t\t\tRenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\t}", "private static void initAndShowGUI() {\n }", "public GUI() {\n initComponents();\n this.setVisible(true);\n }", "public GUI()\n {\n //Initializes the variables and UI aspects\n UI.initialise();\n UI.addTextField(\"Search Title/Director/Genre\", this::searchEither);\n UI.addButton(\"Add Movie\", this::newMovie);\n UI.addButton(\"Rate Movie\", this::rateMovie);\n UI.addButton(\"Show All Movies\", this::printAll);\n UI.addButton(\"Recommend Movies\", this::recommendMovie);\n UI.setMouseListener(r::manageMouse);\n UI.addButton(\"Quit\", UI::quit);\n \n // Sets the size of the whole window and the divider\n UI.setWindowSize(CANVASWIDTH, CANVASHEIGHT);\n UI.setDivider(0.4);\n this.drawMain();\n }", "public MainGui() {\n initComponents();\n this.setVisible(true);\n configuracoesSalvas();\n }", "private void initGUI() {\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\t// This is the story we took from Wikipedia.\n\t\tString story = \"The Internet Foundation Classes (IFC) were a graphics \"\n\t\t\t\t+ \"library for Java originally developed by Netscape Communications \"\n\t\t\t\t+ \"Corporation and first released on December 16, 1996.\\n\\n\"\n\t\t\t\t+ \"On April 2, 1997, Sun Microsystems and Netscape Communications\"\n\t\t\t\t+ \" Corporation announced their intention to combine IFC with other\"\n\t\t\t\t+ \" technologies to form the Java Foundation Classes. In addition \"\n\t\t\t\t+ \"to the components originally provided by IFC, Swing introduced \"\n\t\t\t\t+ \"a mechanism that allowed the look and feel of every component \"\n\t\t\t\t+ \"in an application to be altered without making substantial \"\n\t\t\t\t+ \"changes to the application code. The introduction of support \"\n\t\t\t\t+ \"for a pluggable look and feel allowed Swing components to \"\n\t\t\t\t+ \"emulate the appearance of native components while still \"\n\t\t\t\t+ \"retaining the benefits of platform independence. This feature \"\n\t\t\t\t+ \"also makes it easy to have an individual application's appearance \"\n\t\t\t\t+ \"look very different from other native programs.\\n\\n\"\n\t\t\t\t+ \"Originally distributed as a separately downloadable library, \"\n\t\t\t\t+ \"Swing has been included as part of the Java Standard Edition \"\n\t\t\t\t+ \"since release 1.2. The Swing classes are contained in the \"\n\t\t\t\t+ \"javax.swing package hierarchy.\\n\\n\";\n\t\t// We create the TextArea and pass the story in as an argument.\n\t\tJTextArea storyArea = new JTextArea(story);\n\t\tstoryArea.setEditable(true);\n\t\tstoryArea.setWrapStyleWord(true);\n\t\t// We create the ScrollPane and instantiate it with the TextArea as an argument\n\t\tJScrollPane area = new JScrollPane(storyArea);\t\t\t\n\t\tmainPanel.add(area);\t\n\t\tthis.setContentPane(mainPanel);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setSize(350, 300);\n\t\tthis.setVisible(true);\n\t}", "public mainGUI() {\n initComponents();\n setSize(Toolkit.getDefaultToolkit().getScreenSize());\n }", "public void GUISetup(){\n simTime.setText(\"50\");\n qMean.setText(\"24\");\n dMean.setText(\"45\");\n pMean.setText(\"55\");\n changeNorth.add(simTime2);\n changeNorth.add(simTime);\n changeNorth.add(pMean2);\n changeNorth.add(pMean);\n changeNorth.add(dMean2);\n changeNorth.add(dMean);\n changeNorth.add(qMean2);\n changeNorth.add(qMean);\n changeSouth.add(okay);\n \n resultDisplay.setEditable(false);\n descriptionDisplay.setEditable(false);\n \n changeFrame.add(changeNorth, BorderLayout.NORTH);\n changeFrame.add(changeSouth, BorderLayout.SOUTH);\n \n center.add(totalCus, BorderLayout.CENTER);\n center.add(doorCus, BorderLayout.CENTER);\n center.add(phoneCus, BorderLayout.CENTER);\n center.add(unhelped, BorderLayout.CENTER);\n\n help.add(programDescription);\n menuBar.add(help);\n north.add(menuBar);\n \n frame.setBounds(650, 400, 500, 200);\n changeFrame.setBounds(500, 400, 1100, 145);\n resultFrame.setBounds(500, 200, 600, 500);\n dFrame.setBounds(500, 200, 600, 500);\n frame.add(north, BorderLayout.NORTH);\n frame.add(south, BorderLayout.SOUTH);\n frame.add(center, BorderLayout.CENTER);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n resultFrame.add(scroll);\n dFrame.add(dScroll);\n showDetails.setEnabled(false);\n \n south.add(runSim);\n south.add(showDetails);\n south.add(changeSimProp);\n \n time = simTime.getText();\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n frame.setVisible(true);\n buttonFunctions();\n }", "public ExecutantGui() {\n initComponents();\n }", "public GUI() {\n\t\tinitComponents();\n\t}", "protected void initializeGUI() {\n\n\t}", "private void makeGUI() {\n //Create the canvas and Components for GUI.\n canvas = new Canvas();\n\n canvas.setBounds(0, 0, getWidth(), getHeight());\n getContentPane().setBackground(DrawAttribute.whiteblue);\n searchArea = new JTextField();\n searchArea.setForeground(Color.GRAY);\n searchArea.setText(promptText);\n\n //Make the components for the frame.\n makeComponents();\n addComponentsToLayers();\n }", "private void setGUI()\r\n\t{\r\n\t\tbubblePB = setProgressBar(bubblePB);\r\n\t\tinsertionPB = setProgressBar(insertionPB);\r\n\t\tmergePB = setProgressBar(mergePB);\r\n\t\tquickPB = setProgressBar(quickPB);\r\n\t\tradixPB = setProgressBar(radixPB);\r\n\t\t\r\n\t\tsetLabels();\r\n\t\tsetPanel();\r\n\t\tsetLabels();\r\n\t\tsetFrame();\r\n\t}", "public gui() {\n initComponents();\n }", "public gui() {\n initComponents();\n }", "private void setupGUI()\n\t{\n\t\t//initializes labelNumberOfASCII and adds to frame \n\t\tlabelNumberOfASCII = new JLabel();\n\t\tlabelNumberOfASCII.setLocation(12, 8);\n\t\tlabelNumberOfASCII.setSize(191,26);\n\t\tlabelNumberOfASCII.setText(\"Number of ASCII characters used\");\n\t\tgetContentPane().add(labelNumberOfASCII);\n\t\t\n\t\t//initialized comboCharSet and adds to frame\n\t\tString comboCharSet_tmp[]={\"Small\", \"Medium\", \"Large\"};\n\t\tcomboCharSet = new JComboBox<String>(comboCharSet_tmp);\n\t\tcomboCharSet.setLocation(294, 12);\n\t\tcomboCharSet.setSize(96, 25);\n\t\tcomboCharSet.setEditable(true);\n\t\tcomboCharSet.addActionListener(this);\n\t\tgetContentPane().add(comboCharSet);\n\n\t\t//initializes labelNumberofPixels and adds to frame\n\t\tlabelNumberOfPixels = new JLabel();\n\t\tlabelNumberOfPixels.setLocation(12,28);\n\t\tlabelNumberOfPixels.setSize(240,51);\n\t\tlabelNumberOfPixels.setText(\"Number of pixels per ASCII character: \");\n\t\tgetContentPane().add(labelNumberOfPixels);\n\t\t\n\t\t//initializes comboNumberOfPixels and adds to frame\n\t\tString comboNumberOfPixels_tmp[]={\"1\",\"3\",\"5\",\"7\",\"10\"};\n\t\tcomboNumberOfPixels = new JComboBox<String>(comboNumberOfPixels_tmp);\n\t\tcomboNumberOfPixels.setLocation(294,40);\n\t\tcomboNumberOfPixels.setSize(96,25);\n\t\tcomboNumberOfPixels.setEditable(true);\n\t\tcomboNumberOfPixels.addActionListener(this);\n\t\tgetContentPane().add(comboNumberOfPixels);\n\n\t\t//initializes outputPathLabel and adds to frame\n\t\toutputPathLabel = new JLabel();\n\t\toutputPathLabel.setLocation(12, 55);\n\t\toutputPathLabel.setText(\"Output folder:\");\n\t\toutputPathLabel.setSize(218, 51);\n\t\toutputPathLabel.setVisible(true);\n\t\tgetContentPane().add(outputPathLabel);\n\n\t\t//initializes outputPathTextField and adds to frame\n\t\toutputPathTextField = new JTextField();\n\t\tString initPath;\n\t\t//sets default output to default directory, created in Main.java. looks according to operating system.\n\t\tif (OSUtils.isUnixOrLinux())\n\t\t\tinitPath = System.getProperty(\"user.home\") + \"/.picture-to-ascii/output\";\n\t\telse if (OSUtils.isWindows())\n\t\t\tinitPath = System.getProperty(\"user.home\") + \"\\\\My Documents\\\\picture-to-ascii\\\\output\";\n\t\telse\n\t\t\tinitPath = \"(output path)\";\n\t\t//if the directory failed to create for reasons other than incompatible OS, we want (output path).\n\t\tif (!new File(initPath).isDirectory())\n\t\t\tinitPath = \"(output path)\";\n\n\t\toutputPathTextField.setLocation(150, 70);\n\t\toutputPathTextField.setSize(240,25);\n\t\toutputPathTextField.setText(initPath);\n\t\tgetContentPane().add(outputPathTextField);\n\n\t\tfontSizeTextField = new JTextField();\n\t\tfontSizeTextField.setLocation(150, 100);\n\t\tfontSizeTextField.setSize(240,25);\n\t\tfontSizeTextField.setText(\"5\");\n\t\tgetContentPane().add(fontSizeTextField);\n\n\t\tfontSizeLabel = new JLabel();\n\t\tfontSizeLabel.setText(\"Font size:\");\n\t\tfontSizeLabel.setSize(125, 51);\n\t\tfontSizeLabel.setLocation(12, 85);\n\t\tfontSizeLabel.setVisible(true);\n\t\tgetContentPane().add(fontSizeLabel);\n\t}", "void initGUI(){\n\t\t// use border layout for our main frame\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t// create a new TitlePage and add it to the GUI. This is initially the only instantiated item\n\t\ttitlePage = new TitlePage(this);\n\t\tadd(titlePage);\n\t\t\n\t\tsetBackground( new Color(30, 130, 76) );\t// set a green background\n\t\tsetResizable(false); \t\t\t\t\t\t// User can't change the window's size.\n\t\tsetDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\t// exit when we close\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\t\t\t\t\t// set size of JFrame\n\t\t// set it to visible\n\t\tsetVisible(true);\n\t}", "public void initGUI(){\n\t\t\n\t\t//the layout is a new BorderLayout\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t//the label will be north\t\n\t\tadd(createHeroList(), BorderLayout.NORTH);\n\t\t\n\t\t//the questions will be displayed center\t\t\n\t\tadd(createQuestions(), BorderLayout.CENTER);\n\t\t//the button panel should be south\n\t\tadd(createAnswerButtonPanel(), BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t \n\t}", "public JavierGUI() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t\tthis.setJavier(getJavier());\r\n\t\tbtnHome.doClick();\r\n\t}", "public MHTYGUI() {\n\t\t\tinitComponents();\n\t\t}", "public static void prepareGUI() {\n\t\tframe = new JFrame(\"Solid Adventure : Catch All Virtumon\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Driver demo = new Driver();\n demo.addComponentToPane(frame.getContentPane());\n\n //Display the window.\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\t}", "public DesktopGUI() {\n initComponents();\n }", "private void initializeGUI() {\n\n\t\t// system's main frame and its properties\n\t\tframeSystem = new JFrame(\"NBodies System Configuration\");\n\t\tframeSystem.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframeSystem.setResizable(false);\n\t\tframeSystem.setBackground(Color.white);\n\n\t\t// number of bodies controls and their properties\n\t\tlblNBodies = new JLabel(\" Insert the system bodies's number: \");\n\t\tlblNBodies.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\ttxtNBodies = new JTextField(\"0\");\n\t\ttxtNBodies.setAlignmentX(JTextField.CENTER_ALIGNMENT);\n\n\t\t// time controls and their properties\n\t\tlblTime = new JLabel(\" Insert the system's evolution time: \");\n\t\tlblTime.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\ttxtTime = new JTextField(\"0\");\n\t\ttxtTime.setAlignmentX(JTextField.CENTER_ALIGNMENT);\n\n\t\t// number of bodies console and its properties and internal controls\n\t\tnumberBodiesControlConsole = new JPanel();\n\t\tnumberBodiesControlConsole.setBounds(0, 0, 550, 28);\n\t\tnumberBodiesControlConsole.setBackground(Color.white);\n\t\tLayoutManager numberLayout = new BorderLayout();\n\t\tnumberBodiesControlConsole.setLayout(numberLayout);\n\t\tnumberBodiesControlConsole.add(lblNBodies, BorderLayout.WEST);\n\t\tnumberBodiesControlConsole.add(txtNBodies, BorderLayout.CENTER);\n\n\t\t// time console and its properties and internal controls\n\t\ttimeControlConsole = new JPanel();\n\t\ttimeControlConsole.setBounds(0, 28, 550, 30);\n\t\ttimeControlConsole.setBackground(Color.white);\n\t\tLayoutManager timeLayout = new BorderLayout();\n\t\ttimeControlConsole.setLayout(timeLayout);\n\t\ttimeControlConsole.add(lblTime, BorderLayout.WEST);\n\t\ttimeControlConsole.add(txtTime, BorderLayout.CENTER);\n\n\t\t// start and communication console and its properties and internal\n\t\t// controls\n\t\tstartAndCommunicationConsole = new JPanel();\n\t\tstartAndCommunicationConsole.setBounds(0, 56, 550, 58);\n\t\tstartAndCommunicationConsole.setBackground(Color.white);\n\t\tLayoutManager startLayout = new BorderLayout();\n\t\tstartAndCommunicationConsole.setLayout(startLayout);\n\n\t\t// master panel and its layout's properties\n\t\tmasterPanel = new JPanel();\n\t\tmasterPanel.setLayout(null);\n\t\tmasterPanel.add(numberBodiesControlConsole);\n\t\tmasterPanel.add(timeControlConsole);\n\t\tmasterPanel.add(startAndCommunicationConsole);\n\n\t\t// button to start the n-bodies system and its properties\n\t\tbtnStartSystem = new JButton(\"Start the n-bodies system\");\n\t\tstartAndCommunicationConsole.add(btnStartSystem, BorderLayout.CENTER);\n\n\t\tbtnOpenFileConfig = new JButton(\n\t\t\t\t\"Start System from a Configuration File\");\n\t\tSystemConfigurationViewController controller = new SystemConfigurationViewController(\n\t\t\t\tthis);\n\t\tstartAndCommunicationConsole.add(btnOpenFileConfig, BorderLayout.NORTH);\n\t\tbtnOpenFileConfig.addActionListener(controller\n\t\t\t\t.getChooseConfigurationFileListener());\n\t\tbtnStartSystem.addActionListener(controller.getStartListener());\n\n\t\t// view's main frame and its properties\n\t\tframeSystem.setContentPane(masterPanel);\n\n\t\t// label to show errors and its properties\n\t\tlblCommunication = new JLabel(\n\t\t\t\t\" Please insert the n-bodies system's configuration values.\");\n\t\tlblCommunication.setBounds(0, 114, 550, 36);\n\t\tmasterPanel.add(lblCommunication);\n\t\tlblCommunication.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\tlblCommunication.setForeground(Color.BLUE);\n\t\tframeSystem.setSize(new Dimension(550, 181));\n\t\tframeSystem.setLocationRelativeTo(null);\n\t\tframeSystem.setVisible(true);\n\t}", "public History_GUI(){\n super();\n InitializeComponents();\n ConfigureWin();\n\n }", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "private void setUpGUI()\n\t{\n\t\tgetContentPane().setLayout(new BorderLayout());\n\n\t\t//center panel (project and developer dropdown lists, and state of\n\t\t//server label)\n\t\tJPanel centerPanel = new JPanel();\n\t\tcenterPanel.setLayout(new GridLayout(3, 2));\n\n\t\tcenterPanel.add(new JLabel(\"Choose a project\"));\n\t\tprojectsComboBox = new JComboBox<String>(selectADBString);\n\t\tcenterPanel.add(projectsComboBox);\n\n\t\tcenterPanel.add(new JLabel(\"Choose a developer group\"));\n\t\tdevNamesComboBox = new JComboBox<String>(selectADBString);\n\t\tcenterPanel.add(devNamesComboBox);\n\n\t\tstateOfServerLabel = new JLabel(\"The server is NOT running\");\n\t\tcenterPanel.add(stateOfServerLabel);\n\n\t\tgetContentPane().add(centerPanel, BorderLayout.CENTER);\n\n\t\t//south panel (start the server)\n\t\tJPanel southPanel = new JPanel();\n\t\tsouthPanel.setLayout(new FlowLayout());\n\n\t\tstartStopServerButton = new JButton(START_SERVER_BUTTON_TEXT);\n\t\tstartStopServerButton.addActionListener(this);\n\n\t\topenPlaybackInBrowserCheckbox = new JCheckBox(\"Open the playback in the browser?\");\n\n\t\tsouthPanel.add(startStopServerButton);\n\t\tsouthPanel.add(openPlaybackInBrowserCheckbox);\n\n\t\tgetContentPane().add(southPanel, BorderLayout.SOUTH);\n\n\t\t//create the north panel by looking for the last used db file\n\t\tJPanel northPanel = createNorthPanel();\n\n\t\tgetContentPane().add(northPanel, BorderLayout.NORTH);\n\n\t\t//window controls\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetSize(800, 250);\n\t\tsetVisible(true);\n\t}", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "public orgGui() {\n initComponents();\n }", "public void makeGUI()\n\t{\n\t\tbuttonPanel = new ButtonPanel(this,ship,planet);\n\t\tgamePanel = new GamePanel(this,ship,planet);\n\n\t\tJMenuBar menubar = new JMenuBar();\n\t\tJMenu menuHelp = new JMenu(\"Help\");\n\t\thelpItem = new JMenuItem(\"Help\");\n\t\tmenuHelp.add(helpItem);\n\t\tmenubar.add(menuHelp);\n\t\tsetJMenuBar(menubar);\n\n\t\tsounds = new AudioClip[2];\n\n\t\ttry\n\t\t{\n\t\t\turl = new URL(getCodeBase() + \"/thrust.au\");\n\t\t\tsounds[0] = Applet.newAudioClip(url);\n\t\t\turl = new URL(getCodeBase() + \"/crash.au\");\n\t\t\tsounds[1] = Applet.newAudioClip(url);\n\t\t}\n\t\tcatch(Exception e){}\n\n\t\thelpItem.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif(e.getSource() == helpItem)\n\t\t\t\t{\n\t\t\t\t\tString helpMessage = \"The goal of the game is to land\\nthe ship on the red lines (pads).\\nThe ship must be completely contained\\nwithin the bounds of the red pad.\\nThere are 10 levels total\\nand you will have a certain amount\\nof time to complete each level.\\nGood Landing: velocities must be <10\\nOK Landing: velocities must be <20\\nThe ship's bottom must be facing the ground.\";\n\t\t\t\t\tJOptionPane.showMessageDialog(lander, helpMessage, \"Help Display\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tgetContentPane().add(gamePanel, BorderLayout.PAGE_START);\n\t\tgetContentPane().add(buttonPanel, BorderLayout.PAGE_END);\n\t\tsetVisible(true);\n\t}", "public GUI() {\n initComponents();\n }", "public GUI() {\n initComponents();\n }", "public AplicationGUI() {\n initComponents();\n }", "public Gui() {\n\t\tsuper();\n\t\tinitGUI();\n\t}", "public GUI() {\n app = new Aplikasi();\n initComponents();\n }", "public GuiController()\n {\n\n DefaultTerminalFactory terminalFactory = new DefaultTerminalFactory();\n PageStack = new ArrayDeque<>(); // Gives us a screen stack\n window = new BasicWindow(\"Just put anything, I don't even care\");\n try\n {\n screen = terminalFactory.createScreen(); //Populates screen\n screen.startScreen(); //Runs screen\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n textGUI = new MultiWindowTextGUI(screen);\n\n }", "public mythologyBattleGui() {\n initComponents();\n labelClear();\n groupBoardArea();\n playBoard.initGame();\n initRan(18);\n }", "private void startGUI() {\r\n myFrame.setTitle(\"Media Library\");\r\n myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n myFrame.setLocationByPlatform(true);\r\n myFrame.pack();\r\n\r\n myFrame.setVisible(true);\r\n }", "private void createAndShowGUI(){\r\n initComponents();\r\n openMazefile.addActionListener(this);\r\n solveMaze.addActionListener(this);\r\n clearSolution.addActionListener(this);\r\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\r\n pack();\r\n setVisible(true);\r\n }", "private GUI()\n {\n makeGUI();\n }", "public GUI() {\n \n \n initComponents();\n this.setLocationRelativeTo(null);\n \n \n }", "private static void createAndShowGUI() {\n\n frame = new JFrame(messages.getString(\"towers.of.hanoi\"));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n addComponentsToPane(frame.getContentPane());\n frame.pack();\n frame.setSize(800, 600);\n frame.setVisible(true);\n }", "public HomePageGUI() {\n initComponents();\n }", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private ProgramGUI() {\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setLayout(new GridLayout(1, 2));\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));\n\t\tpanel.add(new JLabel(\"Enter Command: \"));\n\t\tcmd = new JTextField();\n\t\tpanel.add(cmd);\n\t\tadd(panel, BorderLayout.NORTH);\n\t\tJPanel button = new JPanel();\n\t\tJButton ok = new JButton(\"Confirm Command\");\n\t\tJButton logout = new JButton(\"Log Out\");\n\t\tok.addActionListener(new OKListener());\n\t\tlogout.addActionListener(new LogoutListener());\n\t\tbutton.add(ok);\n\t\tbutton.add(logout);\n\t\tadd(button, BorderLayout.SOUTH);\n\t\tsetVisible(true);\n\t\tif(isTillOpen) {\n\t\t\tsetTitle(\"Till Open\");\n\t\t}\n\t\telse {\n\t\t\tsetTitle(\"Till Closed\");\n\t\t}\n\t}", "private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}", "@Override\n public void initGui()\n {\n super.initGui();\n }", "public mainUI() {\n initComponents();\n }", "public MediaLibraryGUI() {\r\n initializeFields();\r\n\r\n makeMenu();\r\n\r\n makeCenter();\r\n\r\n makeSouth();\r\n\r\n startGUI();\r\n }", "public GUI()\n\t{\n\t\tsetSize(550,200);\n\t\tsetTitle(\"cs206sp2012 Project\");\n\t\tsetResizable(false);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tinputPanel = new JPanel (new FlowLayout());\n\t\t\n\t\taddNumberOfIterationsField();\n\t\taddNumberOfFinalSolutionsField();\n\t addNumberOfRulesPerSolutionField();\n\t\taddSampleSummaryUrlField();\n\t addMetrixFileUrlField();\n\t addRunButton();\n\t integrateComponents();\n\t}", "private void initUI () {\n\t\t\t\n\t\t\tJFrame error = new JFrame();\n\t\t\tJFrame tmp = new JFrame();\n\t\t\ttmp.setSize(50, 50);\n\t\t\tString select = \"cheese\";\n\t\t\tboolean boolTemp = false;\n\t\t\tif(new File(\"prefFile.txt\").exists() == false){ //if this is the first run\n\t\t\t\twhile(select.equals(\"cheese\")){\n\t\t\t\t\tselect = JOptionPane.showInputDialog(tmp, \"It appears this is your first run. \"\n\t\t\t\t\t\t\t+ \"Enter the city name of your current location:\"); //prompts user for their current location\n\t\t\t\t\tif(select != null){\n\t\t\t\t\t\tboolTemp = searchBoxUsedTwo(select); //used the search function\n\t\t\t\t\t}\n\t\t\t\t\tif(boolTemp == false){\n\t\t\t\t\t\tselect = \"cheese\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tapp.setCurrentLocation(app.getVisibleLocation()); //sets the current location\n\t\t\t}\n\t\t\telse{ //if it's been run before\n\t\t\t\tlocation tmpLoc = new location();\n\t\t\t\ttry {\n\t\t\t\t\ttmpLoc = app.loadPref(); //load the location from memory\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(error, \"An error occured\");\n\t\t\t\t}\n\t\t\t\tapp.setCurrentLocation(tmpLoc); //and set it as the current location\n\t\t\t\tapp.setVisibleLocation(tmpLoc);\n\t\t\t\t\n\t\t\t}\n\t\t\tthis.setTitle(\"Weather Application\"); //sets title of frame \n\t\t\tthis.setSize(1300, 600); //sets size of frame\n\t\t\tthis.setLocationRelativeTo(null);\n\t\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE); //initiates exit on close command\n\t\t\tthis.setJMenuBar(this.createMenubar()); \n\t\t\t\n\t\t\tcreateFormCalls();\n\t\t\t\n\t\t\ttabbedPane.addTab(\"Current\", null, currentPanel); //fills a tab window with current data\n\t\t\ttabbedPane.addTab(\"Short Term\", null, shortPanel); //fills a tab window with short term data\n\t\t\ttabbedPane.addTab(\"Long Term\", null, longPanel); //fills a tab window with short term data\n\t\t\ttabbedPane.addTab(\"Mars Weather\", null, marsPanel); //fills a tab window with short term data\n\t\t\t\n\t\t\tGroupLayout layout = new GroupLayout(this.getContentPane());\n\t\t\tlayout.setAutoCreateGaps(true);\n\t\t\tlayout.setAutoCreateContainerGaps(true);\n\t\t\tlayout.setHorizontalGroup( layout.createSequentialGroup() //sets the vertical groups\n\t\t\t\t\t\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) \n\t\t\t\t\t\t\t\t.addComponent(tabbedPane)\n\t\t\t\t\t\t\t\t.addComponent(refreshLabel)\n\t\t\t\t\t\t)\n\n\t\t\t);\n\t\t\tlayout.setVerticalGroup( layout.createSequentialGroup() //sets the vertical groups\n\t\t\t\t\t\n\t\t\t\t\t.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE) \n\t\t\t\t\t\t\t.addComponent(tabbedPane)\n\t\t\t\t\t)\n\t\t\t\t\t.addComponent(refreshLabel)\n\n\t\t\t);\n\t\t\t\n\t\t\tthis.getContentPane().setLayout(layout);\n\t\t}", "public SysRunGUI() {\n initComponents();\n this.run();\n }", "public Gui() { \n preInitComponents(); \n initComponents();\n postInitComponents(); \n setVisible(true);\n appInitialization();\n }", "private static void createAndShowGUI() {\n //\n // Use the normal window decorations as defined by the look-and-feel\n // schema\n //\n JFrame.setDefaultLookAndFeelDecorated(true);\n //\n // Create the main application window\n //\n mainWindow = new MainWindow();\n //\n // Show the application window\n //\n mainWindow.pack();\n mainWindow.setVisible(true);\n }", "public GUI(){\n\t\tSIZE = promptSIZE();\n\t\tframe = new JFrame(\"Five in a row developed by Wonjohn Choi in G.Y.G.D.\");\n\t\tframe.setLayout(new GridLayout(SIZE, SIZE));\n\t\t\n\t\tbuttonGrid = new JButton[SIZE][SIZE];\n\t\t\n\t\tfor(int row=0;row<SIZE;row++){\n\t\t\tfor(int col=0;col<SIZE;col++){\n\t\t\t\tbuttonGrid[row][col] = new JButton();\n\t\t\t\tframe.add(buttonGrid[row][col]);\n\t\t\t\tbuttonGrid[row][col].addActionListener(this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tframe.setSize(50*SIZE, 50*SIZE);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t\t\n\t\tengine = new Engine(SIZE);\n\t}", "private static void createAndShowGUI() {\r\n //Disable boldface controls.\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); \r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"Exertion Scripting\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Create and set up the content pane.\r\n NetletEditor newContentPane = new NetletEditor(null);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "private static void createAndShowGUI() {\n\t\tgui = new GUI();\n\t}", "private void setupGUI() {\n\t\tcollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbarLayout);\n\t\tlogo = (SmartImageView) findViewById(R.id.logoo);\n\t\tnomePosto = (TextView) findViewById(R.id.nomeposto);\n\t\tdescrizione = (TextView) findViewById(R.id.descrizioneposto);\n\t\twebsite = (TextView) findViewById(R.id.websiteposto);\n\t\tnumtelefono = (TextView) findViewById(R.id.telefonoposto);\n\t\tcitta = (TextView) findViewById(R.id.cittaposto);\n\t\tbtnMappa = (FloatingActionButton) findViewById(R.id.fabbuttonmappa);\n\t\tgallery = (LinearLayout) findViewById(R.id.gallery);\n\t\tgalleryContainer = (CardView) findViewById(R.id.cv1);\n\t\t// rvofferte = (RecyclerView) findViewById(R.id.rvofferte);\n\t\t// LinearLayoutManager llm = new\n\t\t// LinearLayoutManager(DetPlaActivity.this);\n\t\t// rvofferte.setLayoutManager(llm);\n\t\t// rvofferte.setSaveEnabled(false);\n\t}", "public void buildGui() {\n\t}", "private void initGUI() {\n\t\tContainer cp = getContentPane();\n\t\tcp.setLayout(new BorderLayout());\n\t\t\n\t\tJPanel top = new JPanel(new GridLayout(0, 1));\n\t\tcp.add(top, BorderLayout.PAGE_START);\n\t\t\n\t\ttop.add(createMenuBar());\n\n\t\tJTabbedPane tabs = new JTabbedPane();\n\t\ttabs.add(\"Encryptor\", encryptorPanel);\n\t\ttabs.add(\"Decryptor\", decryptorPanel);\n\t\ttabs.setSelectedComponent(encryptorPanel);\n\t\t\n\t\tcp.add(tabs);\n\t}", "public CreateGUI() throws IOException{\r\n\t\tthis.setFocusable(false);\r\n\t\tthis.setTitle(\"Dance Dance Revolution - 201B Edition\");\r\n\t\tthis.setSize(800, 600);\t\t \t\r\n\t\tthis.setLocation(100, 100); \t\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tthis.setResizable(false);\r\n\t\tcp = getContentPane();\r\n\t\tcp.setBackground(Color.black);\r\n\t\tarrowlistener = new ArrowListener();\r\n\t\tscore = new Score();\r\n\t\tcombo = new ComboImage();\r\n\t}", "public void createGui() {\r\n setResizable(false);\r\n setSize(500, 300);\r\n setTitle(\"TechAndCrack StopWatch\");\r\n setLocation(s.width / 2 - getWidth() / 2, s.height / 2 - getHeight()\r\n / 2);\r\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n setLayout(new BorderLayout());\r\n \r\n textarea.setEditable(false);\r\n textarea.setLineWrap(true);\r\n JScrollPane scrollpane = new JScrollPane(textarea);\r\n \r\n toppanel.add(scrollpane);\r\n toppanel.setLayout(new GridLayout());\r\n add(toppanel, BorderLayout.NORTH);\r\n \r\n labeltimer.setForeground(Color.GRAY);\r\n labeltimer.setFont(new Font(\"Courier New\", Font.BOLD, 36));\r\n centerpanel.add(labeltimer);\r\n add(centerpanel, BorderLayout.CENTER);\r\n \r\n add(bottompanel, BorderLayout.PAGE_END);\r\n bottompanel.setLayout(new GridLayout());\r\n bottompanel.add(btstart);\r\n bottompanel.add(btreset);\r\n bottompanel.add(btlap);\r\n \r\n btstart.addActionListener(new buttonstart());\r\n btreset.addActionListener(new buttonreset());\r\n btlap.addActionListener(new buttonlap());\r\n \r\n setVisible(true);\r\n }", "public BBDJPAAdminGUI() {\n initComponents();\n\n myInit();\n }", "private static void createAndShowGUI() {\r\n\t\tString pathwayFile = System.getenv(\"PATHWAY_FILE\");\r\n\t\tString defaultsFile = System.getenv(\"DEFAULTS_FILE\");\r\n\r\n\t\tPathway path;\r\n\r\n\t\tif (defaultsFile == null) {\r\n\t\t\tpath = new Pathway(pathwayFile);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Using defaults file \" + defaultsFile);\r\n\t\t\tpath = new Pathway(pathwayFile, defaultsFile);\r\n\t\t}\r\n\r\n\t\t// Disable boldface controls.\r\n\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n\r\n\t\t// Create and set up the window.\r\n\t\tJFrame frame = new JFrame(\"Pathway Simulator\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Create and set up the content pane.\r\n\t\tSimPanel newContentPane = new SimPanel(path);\r\n\t\tnewContentPane.setOpaque(true); // content panes must be opaque\r\n\t\tframe.setContentPane(newContentPane);\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "private void initializeGUI() {\n\n\t\t// system's view windows dimensions\n\t\twindowsDimension = new Dimension(900, 700);\n\n\t\t// system's main frame and its properties\n\t\tframeSystem = new JFrame(\"NBodies System Viewer\");\n\t\tframeSystem.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframeSystem.setResizable(false);\n\t\tframeSystem.setBackground(Color.white);\n\n\t\t// buttons and their properties\n\t\tbtnNextStep = new JButton(\"Next Step\");\n\t\tbtnStart = new JButton(\"Start\");\n\t\tbtnStart.setSize(btnNextStep.getSize());\n\t\tbtnPause = new JButton(\"Pause\");\n\t\tbtnPause.setSize(btnNextStep.getSize());\n\t\tbtnReset = new JButton(\"Reset\");\n\t\tbtnReset.setSize(btnNextStep.getSize());\n\t\tbtnRestart = new JButton(\"Restart Application\");\n\t\tbtnRestart.setSize(btnNextStep.getSize());\n\n\t\t// control console and its properties and internal buttons\n\t\tcontrolConsole = new JPanel();\n\t\tcontrolConsole.setBackground(new Color(180, 180, 180));\n\t\tcontrolConsole.add(btnStart);\n\t\tcontrolConsole.add(btnNextStep);\n\t\tcontrolConsole.add(btnPause);\n\t\tcontrolConsole.add(btnReset);\n\t\tcontrolConsole.add(btnRestart);\n\n\t\t// label related to the number of bodies involved in the system and its\n\t\t// properties\n\t\tlblNBodies = new JLabel(\"- Number of bodies: 0\", JLabel.RIGHT);\n\t\tcontrolConsole.add(lblNBodies);\n\n\t\t// bodies's display and its properties (background color black to\n\t\t// simulate the space)\n\t\tbodiesDisplay = new BodiesSystemDisplay(model);\n\t\tbodiesDisplay.setBackground(new Color(0, 0, 0));\n\n\t\t// master panel and its layout's properties\n\t\tmasterPanel = new JPanel();\n\t\tLayoutManager layout = new BorderLayout();\n\t\tmasterPanel.setLayout(layout);\n\t\tmasterPanel.add(BorderLayout.NORTH, controlConsole);\n\t\tmasterPanel.add(BorderLayout.CENTER, bodiesDisplay);\n\n\t\t// view's main frame and its properties\n\t\tframeSystem.setContentPane(masterPanel);\n\t\tframeSystem.setSize(windowsDimension);\n\t\tframeSystem.setLocationRelativeTo(null);\n\t\tframeSystem.setVisible(true);\n\t\t\n\t\tbodiesDisplay.setUpBuffer();\n\t}", "public static void showGUI() {\n Display display = Display.getDefault();\n Shell shell = new Shell(display);\n EntropyUIconfig inst = new EntropyUIconfig(shell, SWT.NULL);\n Point size = inst.getSize();\n shell.setLayout(new FillLayout());\n shell.layout();\n if (size.x == 0 && size.y == 0) {\n inst.pack();\n shell.pack();\n } else {\n Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n shell.setSize(shellBounds.width, shellBounds.height);\n }\n shell.open();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n }", "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 lblNewLabel = new JLabel(\" VforU\");\n\t\tlblNewLabel.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tlblNewLabel.setBounds(180, 6, 117, 22);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Find the Best Volunteer for You\");\n\t\tlblNewLabel_1.setFont(new Font(\"Lucida Grande\", Font.BOLD | Font.ITALIC, 13));\n\t\tlblNewLabel_1.setBounds(130, 40, 229, 16);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\tJTextPane textPane = new JTextPane();\n\t\ttextPane.setBounds(18, 68, 411, 67);\n\t\tframe.getContentPane().add(textPane);\n\t\tString text=\"VforU matches you with volunteers who can help you when ever and where ever you are in need.\";\n\t\ttext=text+\" We assure you to provide your required assistance. Connect with our volunteers and get your job done\";\n\t\ttextPane.setText(text);\n\t\ttextPane.setEditable(false);\n\t\t\n\t\tloginbutton = new JButton(\"Login\");\n\t\t\n\t\tloginbutton.setBounds(86, 167, 117, 29);\n\t\tframe.getContentPane().add(loginbutton);\n\t\t\n\t\tsignupbutton = new JButton(\"Signup\");\n\t\t\n\t\tsignupbutton.setBounds(242, 167, 117, 29);\n\t\tframe.getContentPane().add(signupbutton);\n\t\t\n\t}", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Gomaku - 5 In A Row\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(600, 600);\n\n //Add the ubiquitous \"Hello World\" label.\n JPanel board = new JPanel();\n board.setSize(400, 400);\n board.set\n frame.getContentPane().add(board);\n\n //Display the window.\n frame.setVisible(true);\n }", "public ServerGUI() {\n\t\t\n\t\tinitialize();\n\n\t}", "private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }", "private void $$$setupUI$$$()\n {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(6, 1, new Insets(20, 20, 20, 20), -1, -1));\n panel.setAutoscrolls(true);\n buttonSettings = new JButton();\n buttonSettings.setEnabled(true);\n buttonSettings.setText(\"Open Application Settings\");\n panel.add(buttonSettings,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonStartGit = new JButton();\n buttonStartGit.setEnabled(true);\n buttonStartGit.setText(\"Start Git Management\");\n panel.add(buttonStartGit,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n null, new Dimension(500, 500), null, 0, false));\n textPaneConsole = new JTextPane();\n textPaneConsole.setEditable(false);\n scrollPane1.setViewportView(textPaneConsole);\n buttonOpenBenchmarkDialog = new JButton();\n buttonOpenBenchmarkDialog.setText(\"Open YCSB Benchmark Dialog\");\n panel.add(buttonOpenBenchmarkDialog,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonShowGitSettings = new JButton();\n buttonShowGitSettings.setEnabled(true);\n buttonShowGitSettings.setText(\"Open Git Management\");\n panel.add(buttonShowGitSettings,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Console Output\");\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,\n null, null, 0, false));\n }", "public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"FrameDemo\");\n frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\n //main input TextArea\n JTextArea mainIn = new JTextArea(\"Type your Command here.\", 3, 1);\n \n //main Output Display Displays htmlDocuments\n JTextPane mainOut = new JTextPane(new HTMLDocument());\n mainOut.setPreferredSize(new Dimension(800, 600));\n \n //add components to Pane\n frame.getContentPane().add(mainOut);\n frame.getContentPane().add(mainIn);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "public void createAndShowGUI() {\n\t\tcontroller = new ControllerClass(); \r\n\r\n\t\t// Create and set up the window\r\n\t\twindowLookAndFeel();\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetTitle(\"Media Works - Add Screen\");\r\n\t\tsetResizable(false);\r\n\t\tadd(componentSetup());\r\n\t\tpack();\r\n\t\tsetSize(720,540);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t}", "private void makeGUI()\n {\n mainFrame = new JFrame();\n mainFrame.setPreferredSize(new Dimension(750,400));\n aw = new AccountWindow();\n mainFrame.add(aw);\n mainFrame.setVisible(true);\n mainFrame.pack();\n }", "public GUI(Display display) {\n\t\t/* Init fields */\n\t\tGUI.display = display;\n\t\tGUI.gui = this;\n\t\t// displayThread = Thread.currentThread();\n\t\t/* Startup process */\n\t}", "public Mainwindow(){\n \n try \n {\n //LookAndFeel asd = new SyntheticaAluOxideLookAndFeel();\n //UIManager.setLookAndFeel(asd);\n } \n catch (Exception e) \n {\n e.printStackTrace();\n }\n initComponents();\n \n \n userinitComponents();\n \n \n }", "public static void setupGUI() {\n\t\t\n\t\t//My GUI Frame\n\t\tJFrame GUIframe = new JFrame(\"ChatBot Conversation GUI\");\n\t\tGUIframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tGUIframe.setSize(800,400);\n\t\t\n\t\t//GUI Panel Setup\n\t\tJPanel panel1 = new JPanel();\n\t\tJButton enter = new JButton(\"Enter\");\n\t\t\n\t\t//Listener for the Submit button\n\t\tenter.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString newUserInput = (myTextField.getText()).trim();\n\t\t\t\t\n\t\t\t\tif(newUserInput.length()>=1){\n\t\t\t\t\tagent.execute(conversation, newUserInput);\n\t\t\t\t\tmyTextField.setText(\"\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t//Listener to enable users to press Enter into the textfield\n\t\tmyTextField.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString newUserInput = (myTextField.getText()).trim();\n\t\t\t\t\n\t\t\t\tif(newUserInput.length()>=1){\n\t\t\t\t\tagent.execute(conversation, newUserInput);\n\t\t\t\t\tmyTextField.setText(\"\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tpanel1.add(myTextField);\n\t\tpanel1.add(enter);\n\t\t\n\t\t//JTextArea chat = new JTextArea();\n\t\tchat.setEditable(false);\n\t\tJScrollPane letsScroll = new JScrollPane(chat);\n\t\t\n\t\tGUIframe.getContentPane().add(BorderLayout.SOUTH, panel1);\n\t\t//GUIframe.getContentPane().add(BorderLayout.CENTER, chat);\n\t\tGUIframe.getContentPane().add(BorderLayout.CENTER, letsScroll);\n\t\tGUIframe.setVisible(true);\t\n\n\t\t\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 630, 550);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(650,400);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(0, 0, 614, 512);\n\t\tframe.getContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJButton buttonTreinos = new JButton(\"Visualizar treinos\");\n\t\tbuttonTreinos.setBounds(224, 136, 186, 23);\n\t\tpanel.add(buttonTreinos);\n\t\t\n\t\tJButton btnAlunos = new JButton(\"Lista de Alunos\");\n\t\tbtnAlunos.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew ListaDeAlunos().frame.setVisible(true);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnAlunos.setBounds(224, 163, 186, 23);\n\t\tpanel.add(btnAlunos);\n\t\t\n\t\tJLabel lblGymManager = new JLabel(\"Gym Manager\");\n\t\tlblGymManager.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\tlblGymManager.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblGymManager.setBounds(220, 46, 165, 27);\n\t\tpanel.add(lblGymManager);\n\t\t\n\t\tJButton btnMatricularAluno = new JButton(\"Matricular Aluno\");\n\t\tbtnMatricularAluno.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew TelaAlunoCadastro().setVisible(true);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnMatricularAluno.setBounds(224, 192, 186, 23);\n\t\tpanel.add(btnMatricularAluno);\n\t}", "private GuiTest() {\n // Load custom resources (fonts, etc.)\n ResourceLoader.loadResources();\n\n // Load the user accounts into the system\n UserController.getInstance().loadUsers();\n\n // Set up GuiController and the main window.\n GuiController.instantiate(1280, 720, \"FPTS\");\n\n char[] password = {'p', 'a', 's', 's', 'w', 'o', 'r', 'd'};\n UserController.getInstance().login(\"rhochmuth\", password);\n\n // Show the screen/window\n PortfolioController.getInstance().showAddHoldingView();\n GuiController.getInstance().showWindow();\n\n // Load the market information and update it every 2 minutes\n MarketController.getInstance().StartTimer();\n }", "public CalculatorGUI() {\n initComponents();\n setTitle(\"Calculator\");\n //setLookAndFeel(\"Windows\");\n }", "@Override\n public void initGUI() {\n\n }", "public LeagueChampionApp() {\r\n init();\r\n\r\n main = new JFrame(\"League Champion App\");\r\n main.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n main.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\r\n main.setPreferredSize(new Dimension(938, 950));\r\n main.setLocationRelativeTo(null); //centers in middle of screen\r\n main.getContentPane().setLayout(new BoxLayout(main.getContentPane(), BoxLayout.Y_AXIS));\r\n\r\n startUpMain();\r\n\r\n makeEarnButton();\r\n makePurchaseButton();\r\n makeAcquireButton();\r\n makeObtainButton();\r\n makeCheckBEButton();\r\n makeGetRPButton();\r\n makeReceiveButton();\r\n makeFavouriteButton();\r\n makePrintButton();\r\n makeSaveButton();\r\n makeLoadButton();\r\n\r\n main.pack();\r\n main.setVisible(true);\r\n }", "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}", "public EindopdrachtGUI() {\n initComponents();\n }", "public static void createGUI() {\n\t\tSimpleGUI gui = new SimpleGUI();\n\t\tgui.setVisible(true);\n\t}", "public void setupGUI() {\t\n\t\t\n\t\t// Menu Frame\n\t\tmenuFrame = new JFrame();\n\t\t\n\t\t// ContentPane\n\t\tmenuFrame.getContentPane().setEnabled(false);\n\t\tmenuFrame.setBounds(100, 100, 1000, 680);\n\t\tmenuFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tmenuFrame.getContentPane().setLayout(null);\t\n\t\t\n\t\t// Label username\n\t\tusernameLabel = new JLabel(\"Username:\");\n\t\tusernameLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tusernameLabel.setBounds(58, 80, 117, 35);\n\t\tmenuFrame.getContentPane().add(usernameLabel);\n\t\t\n\t\t// Label password\n\t\tpasswordLabel = new JLabel(\"Password:\");\n\t\tpasswordLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tpasswordLabel.setBounds(357, 77, 122, 41);\n\t\tmenuFrame.getContentPane().add(passwordLabel);\n\t\t\n\t\t// Textfield for username\n\t\tusernameTextField = new JTextField();\n\t\tusernameTextField.setBounds(159, 88, 169, 19);\n\t\tmenuFrame.getContentPane().add(usernameTextField);\n\t\tusernameTextField.setColumns(10);\n\t\t\n\t\t// Passwordfield for password\n\t\tpasswordField = new JPasswordField();\n\t\tpasswordField.setBounds(447, 88, 169, 19);\n\t\tmenuFrame.getContentPane().add(passwordField);\n\t\t\n\t\t// Label currently logged in as\n\t\tcurrentUserLabel = new JLabel(\"You are currently logged in as an anonymous Player\");\n\t\tcurrentUserLabel.setFont(new Font(\"Dialog\", Font.BOLD, 18));\n\t\tcurrentUserLabel.setBounds(12, 12, 580, 33);\n\t\tmenuFrame.getContentPane().add(currentUserLabel);\n\t\t\n\t\t// Button login\n\t\tloginButton = new JButton(\"Login\");\n\t\tloginButton.addActionListener(new ActionListener() {\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString name = usernameTextField.getText();\n\t\t\t\tString password = passwordField.getText();\t\n\t\t\t\t\n\t\t\t\tif(login(name, password)) {\n\t\t\t\t\tisLoggedIn = true;\n\t\t\t\t\tplayerName = name;\n\t\t\t\t\tJOptionPane.showMessageDialog(menuFrame, \"your login was successful\");\n\t\t\t\t\tcurrentUserLabel.setText(\"You are currently logged in as \" + playerName);\n\n\t\t\t\t\tupdateSetupGUI();\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid username or password\", \"Login Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\tpasswordField.setText(null);\n\t\t\t\t\tusernameTextField.setText(null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\tloginButton.setBounds(277, 130, 117, 25);\n\t\tmenuFrame.getContentPane().add(loginButton);\n\t\t\n\t\t// Sperator\n\t\tseparator_2 = new JSeparator();\n\t\tseparator_2.setBounds(12, 57, 604, 11);\n\t\tmenuFrame.getContentPane().add(separator_2);\n\t\t\n\t\t// Button create account\n\t\tcreateAccountButton = new JButton(\"Create Account\");\n\t\tcreateAccountButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString newUser = JOptionPane.showInputDialog(\"Enter your user name:\");\n\t\t\t\tString newPassword1 = JOptionPane.showInputDialog(\"Enter your password:\");\n\t\t\t\tString newPassword2 = JOptionPane.showInputDialog(\"Enter your password again\");\n\t\t\t\t\n\t\t\t\tif (newPassword1.contentEquals(newPassword2)) {\n\t\t\t\t\tcreateAccount(newUser, newPassword1);\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(menuFrame, \"Your passwords do not match\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcreateAccountButton.setBounds(406, 587, 186, 25);\n\t\tmenuFrame.getContentPane().add(createAccountButton);\n\t\t\n\t\t// Seperator\n\t\tseparator_1 = new JSeparator();\n\t\tseparator_1.setBounds(12, 518, 965, 11);\n\t\tmenuFrame.getContentPane().add(separator_1);\n\t\t\n\t\t// Label create account\n\t\tcreateAccountLabel = new JLabel(\"if you dont have an account yet, feel free to create one, to save your current Game\");\n\t\tcreateAccountLabel.setFont(new Font(\"Dialog\", Font.BOLD, 13));\n\t\tcreateAccountLabel.setBounds(203, 549, 685, 15);\n\t\tmenuFrame.getContentPane().add(createAccountLabel);\n\t\t\n\t\t// Label for all games\n\t\tselectGameLabel = new JLabel(\"You can play one of the following games\");\n\t\tselectGameLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tselectGameLabel.setBounds(12, 242, 348, 15);\n\t\tmenuFrame.getContentPane().add(selectGameLabel);\n\t\t\n\t\t// Button play chess\n\t\tplayChessButton = new JButton(\"Play Chess\");\n\t\tplayChessButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tdos.writeUTF(\"<Gamemode=Chess>\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tplayChessButton.setBounds(413, 232, 117, 41);\n\t\tmenuFrame.getContentPane().add(playChessButton);\n\t\t\n\t\t// Button play mill\n\t\tplayMillButton = new JButton(\"Play Mill\");\n\t\tplayMillButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tdos.writeUTF(\"<Gamemode=Mill>\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tplayMillButton.setBounds(646, 229, 117, 44);\n\t\tmenuFrame.getContentPane().add(playMillButton);\n\t\t\n\t\t// Label restore Game\n\t\trestoreGameLabel = new JLabel(\"Or you can restore your latest game\");\n\t\trestoreGameLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\trestoreGameLabel.setBounds(12, 350, 316, 15);\n\t\tmenuFrame.getContentPane().add(restoreGameLabel);\n\t\t\n\t\t// Button restore Game\n\t\trestoreGameButton = new JButton(\"Restore Game\");\n\t\trestoreGameButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t//TODO restore latest game from database\n\t\t\t}\n\t\t});\n\t\trestoreGameButton.setBounds(413, 337, 155, 41);\n\t\tmenuFrame.getContentPane().add(restoreGameButton);\n\t\t\n\t\t// Window Listener for Closing\n\t\tmenuFrame.addWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdos.writeUTF(\"<Connectionstatus=Exit>\");\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\te.getWindow().dispose();\n\t\t\t}\n\t\t});\n\t\n\t\tupdateSetupGUI();\n\t\tmenuFrame.setVisible(true);\n\t}", "private void initGui()\n {\n setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.WHITE));\n\n setLayout(new GridBagLayout());\n\n GridBagConstraints gbc = new GridBagConstraints();\n\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n\n this.add(lblHint, gbc);\n }", "public void showGui()\n {\n // TODO\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setResizable(false);\n\t\tframe.setBounds(100, 100, 600, 400);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tlabel = new JLabel(\"\");\n\t\tlabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabel.setForeground(Color.GREEN);\n\t\tlabel.setFont(new Font(\"Agency FB\", Font.BOLD, 18));\n\t\tlabel.setOpaque(true);\n\t\tlabel.setBackground(Color.GRAY);\n\t\tlabel.setBounds(0, 0, 594, 111);\n\t\tframe.getContentPane().add(label);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"<html>Read from File</html>\");\n\t\tbtnNewButton.setBackground(Color.LIGHT_GRAY);\n\t\tbtnNewButton.setForeground(Color.GREEN);\n\t\tbtnNewButton.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tJTextField field;\n\t\t\t\t\tfield = new JTextField();\n\t\t\t\t\tJOptionPane.showMessageDialog(null, field, \"Enter your Filename without extension\", 1);\n\t\t\t\t\tString name = field.getText();\n\t\t\t\t\tshell.readFile(name);\n\t\t\t\t\tlabel.setText(\"<html>\"+\"First minimal Solution is \"+shell.getFirstAnswer()+\"<br>\"\n\t\t\t\t\t\t\t+\"You can find the complete answer in the text file \"+ shell.getWriteName()+\"</html>\");\n\t\t\t\t} catch (StackOverflowError sd) {\n\t\t\t\t\tlabel.setText(\"<html>Couldn't find the file named like this. Please put in the same destination as the program.</html>\");\n\t\t\t\t} catch (Exception eds) {\n\t\t\t\t\tlabel.setText(\"<html>An Error has happenend! please read the help instructions first.</html>\");\n\t\t\t\t}\n\t\t\t}});\n\t\tbtnNewButton.setBounds(427, 124, 155, 91);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJButton btnenterInputs = new JButton(\"<html>Enter Inputs</html>\");\n\t\tbtnenterInputs.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tJTextField field;\n\t\t\t\t\tint num;\n\t\t\t\t\tArrayList<Integer> m = new ArrayList<Integer>();\n\t\t\t\t\tArrayList<Integer> d = new ArrayList<Integer>();\n\t\t\t\t\tdo {\n\t\t\t\t\t\tfield = new JTextField();\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, field, \"Enter your minterms\", 1);\n\t\t\t\t\t\tnum = Integer.parseInt(field.getText());\n\t\t\t\t\t\tif (num != -1) {\n\t\t\t\t\t\t\tm.add(num);\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (num != -1);\n\t\t\t\t\tdo {\n\t\t\t\t\t\tfield = new JTextField();\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, field, \"Enter your don't care terms\", 1);\n\t\t\t\t\t\tnum = Integer.parseInt(field.getText());\n\t\t\t\t\t\tif (num != -1) {\n\t\t\t\t\t\t\td.add(num);\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (num != -1);\n\t\t\t\t\tCollections.sort(m);\n\t\t\t\t\tCollections.sort(d);\n\t\t\t\t\tshell.solTwoList(m, d);\n\t\t\t\t\tlabel.setText(\"<html>\"+\"First minimal Solution is \"+shell.getFirstAnswer()+\"<br>\"\n\t\t\t\t\t\t\t+\"You can find the complete answer in the text file \"+ shell.getWriteName()+\"</html>\");\n\t\t\t\t} catch (Exception eds) {\n\t\t\t\t\tlabel.setText(\"<html>An Error has happenend! please read the help instructions first.</html>\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnenterInputs.setForeground(Color.GREEN);\n\t\tbtnenterInputs.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\n\t\tbtnenterInputs.setBackground(Color.LIGHT_GRAY);\n\t\tbtnenterInputs.setBounds(10, 124, 155, 91);\n\t\tframe.getContentPane().add(btnenterInputs);\n\t\t\n\t\tJButton btnhelp = new JButton(\"<html>Help</html>\");\n\t\tbtnhelp.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html>This is a program that solves digital problems by using\"\n\t\t\t\t\t\t+ \" tabular method.<br> You can Enter the terms manually and end the insertion of a certain type by inputing -1\"\n\t\t\t\t\t\t+ \".<br> If you choose a file , then you must have m before the minterms and d before the dont'care terms.<br> And between each number a comma.<br>\"\n\t\t\t\t\t\t+ \"And you input the textfile name without extension<br>\"\n\t\t\t\t\t\t+ \"have fun :D\");\n\t\t\t}\n\t\t});\n\t\tbtnhelp.setForeground(Color.GREEN);\n\t\tbtnhelp.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\n\t\tbtnhelp.setBackground(Color.LIGHT_GRAY);\n\t\tbtnhelp.setBounds(221, 124, 155, 91);\n\t\tframe.getContentPane().add(btnhelp);\n\t\t\n\t\tJLabel lblMadeByAmr = new JLabel(\"Made by Amr Nasr & Michael Raafat\");\n\t\tlblMadeByAmr.setForeground(Color.YELLOW);\n\t\tlblMadeByAmr.setFont(new Font(\"Algerian\", Font.BOLD, 21));\n\t\tlblMadeByAmr.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblMadeByAmr.setOpaque(true);\n\t\tlblMadeByAmr.setBackground(Color.LIGHT_GRAY);\n\t\tlblMadeByAmr.setBounds(0, 274, 594, 91);\n\t\tframe.getContentPane().add(lblMadeByAmr);\n\t}", "private void initGui(){\n // TODO: add code for GUI initialization for a given auction\n }", "public void initGui()\n {\n Keyboard.enableRepeatEvents(true);\n this.buttons.clear();\n GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format(\"selectWorld.edit.resetIcon\")));\n this.buttons.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format(\"selectWorld.edit.openFolder\")));\n this.buttons.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectWorld.edit.save\")));\n this.buttons.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\")));\n guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, \"icon.png\").isFile();\n ISaveFormat isaveformat = this.mc.getSaveLoader();\n WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);\n String s = worldinfo == null ? \"\" : worldinfo.getWorldName();\n this.nameEdit = new GuiTextField(2, this.fontRenderer, this.width / 2 - 100, 60, 200, 20);\n this.nameEdit.setFocused(true);\n this.nameEdit.setText(s);\n }", "public void createGUI() {\n\n\t\tcontents = getContentPane();\n\t\tcontents.setLayout(new GridLayout(size, size));\n\n\t\t// Set Up Menu Bar\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tsetJMenuBar(menuBar);\n\n\t\tJMenu game = new JMenu(\"Game\");\n\t\tmenuBar.add(game);\n\t\tJMenuItem clearBoard = new JMenuItem(\"New Game\");\n\t\tgame.add(clearBoard);\n\t\tJMenuItem boardSize = new JMenuItem(\"Change Size\");\n\t\tgame.add(boardSize);\n\t\tJMenuItem exit = new JMenuItem(\"Exit\");\n\t\tgame.add(exit);\n\n\t\tJMenu help = new JMenu(\"Help\");\n\t\tmenuBar.add(help);\n\t\tJMenuItem rules = new JMenuItem(\"How to Play\");\n\t\thelp.add(rules);\n\t\tJMenuItem about = new JMenuItem(\"About\");\n\t\thelp.add(about);\n\n\t\tJMenu playerSelect = new JMenu(\"Players: \" + players);\n\t\tmenuBar.add(playerSelect);\n\t\tJMenuItem players2 = new JMenuItem(\"2 Player Game\");\n\t\tplayerSelect.add(players2);\n\t\tJMenuItem players3 = new JMenuItem(\"3 Player Game\");\n\t\tplayerSelect.add(players3);\n\t\tJMenuItem players4 = new JMenuItem(\"4 Player Game\");\n\t\tplayerSelect.add(players4);\n\n\t\tmenuBar.add(Box.createHorizontalGlue());\n\n\t\tplayerTurnLbl.setFont(new Font(\"Lucida Grande\", Font.BOLD, 12)); // Player 1's Turn\n\t\tmenuBar.add(playerTurnLbl);\n\t\tplayerTurnLbl.setVisible(true);\n\n\t\tinvalidMoveLbl.setFont(new Font(\"Lucida Grande\", Font.BOLD, 12)); // Invalid Move Alert\n\t\tinvalidMoveLbl.setForeground(Color.RED);\n\t\tmenuBar.add(invalidMoveLbl);\n\t\tinvalidMoveLbl.setVisible(false);\n\n\t\t// Exit Button Action\n\t\texit.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\n\t\t// Board Size Button Action\n\t\tboardSize.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\trestartGame();\n\t\t\t}\n\t\t});\n\n\t\t// Reset Board Button Action\n\t\tclearBoard.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// Rules Button Action\n\t\trules.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"1. Players take turns moving up, down, left, or right to generate a self-avoiding walk.\\n\\tClick on a square to make your move.\\n\\n2. A player who makes a self-intersecting move loses the game. \\n\\n3. A player can win the game by making a self-intersecting move that creates a self-avoiding polygon.\\n\\tThis is only valid after at least 4 moves.\",\n\t\t\t\t\t\t\"Self-Avoiding Walk Game Rules\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t}\n\t\t});\n\n\t\t// About Button Action\n\t\tabout.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"Self-Avoiding Walk Multiplayer Game\\nDeveloped by Adam Binder\\nCopyright 2019\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t});\n\n\t\t// 2 Player Button Action\n\t\tplayers2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 2;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// 3 Player Button Action\n\t\tplayers3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 3;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// 4 Player Button Action\n\t\tplayers4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 4;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// Create event handlers:\n\t\tButtonHandler buttonHandler = new ButtonHandler();\n\n\t\t// Create and add board components:\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tsquares[i][j] = new JButton();\n\t\t\t\tsquares[i][j].setBorder(null);\n\t\t\t\tsquares[i][j].setOpaque(true);\n\t\t\t\tsquares[i][j].setBorderPainted(false);\n\t\t\t\tif ((i + j) % 2 != 0) {\n\t\t\t\t\tsquares[i][j].setBackground(colorGray);\n\t\t\t\t\tsquares[i][j].setBorder(null);\n\t\t\t\t\tsquares[i][j].setOpaque(true);\n\t\t\t\t}\n\t\t\t\tcontents.add(squares[i][j]);\n\t\t\t\tsquares[i][j].addActionListener(buttonHandler);\n\t\t\t}\n\t\t}\n\t}", "public userGUI() throws Exception {\n setUpPanel();\n Screen.welcomeMessage(panel);\n buttonInit();\n cards();\n panel.add(functions);\n add(panel);\n }", "private void setupComponents() {\n\t\tframe.setLayout(null);\r\n\r\n\t\t\r\n\t\t\r\n\t\t// Add label for title ..\r\n\t\tJLabel titleField = new JLabel();\r\n\t\ttitleField.setBounds(50, 10, 300, 30);// x, y, width, height - (pixels)\r\n\t\ttitleField.setText(\"Simple Swing Application\");\r\n\t\ttitleField.setFont(new Font(\"Arial\", Font.BOLD, 24));\r\n\t\ttitleField.setForeground(Color.red);\r\n\t\ttitleField.setVisible(true);\r\n\t\tframe.add(titleField);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Add label for output message ..\r\n\t\tJLabel textField = new JLabel();\r\n\t\ttextField.setBounds(50, 200, 300, 30);\r\n\t\ttextField.setVisible(true);\r\n\t\tframe.add(textField);\r\n\r\n\t\t// Add a YES button ..\r\n\t\tJButton yesButton = new JButton(\"Yes\");\r\n\t\tyesButton.setBounds(50, 150, 90, 30);\r\n\t\tyesButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(yesButton);\r\n\r\n\t\t// Add a NO button ..\r\n\t\tJButton noButton = new JButton(\"No\");\r\n\t\tnoButton.setBounds(150, 150, 90, 30);\r\n\t\tnoButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(noButton);\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public GUI() {\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n this.setContentPane(new ZombiePanel());\n pack();\n }", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "public GUI() {\n initComponents();\n }", "private void initUI() {\n\t\t//Creating the window for our game\n\t\tframe = new JFrame(GAME_TITLE);\n\t\tframe.setSize(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\t//Creating a canvas to add to the window\n\t\tcanvas = new Canvas();\n\t\tcanvas.setPreferredSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMaximumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMinimumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\t\n\t\tframe.add(canvas);\n\t\tframe.pack();\n\t\t\n\t}", "public void init(){\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSwingUtilities.invokeAndWait(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tbuildWindow();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"createGUI didn't complete successfully\");\r\n\t\t}\r\n\t}", "public soal2GUI() {\n initComponents();\n }" ]
[ "0.79224825", "0.7708217", "0.76555544", "0.762984", "0.7626841", "0.76148117", "0.7594321", "0.7587123", "0.7534302", "0.7531533", "0.75247467", "0.75181806", "0.7472798", "0.7463905", "0.7448484", "0.7448484", "0.74481267", "0.7437503", "0.74179566", "0.7416493", "0.7411672", "0.73941267", "0.73913264", "0.73853666", "0.73760545", "0.73713064", "0.7367829", "0.7366859", "0.7352856", "0.7349393", "0.7345943", "0.7345943", "0.733245", "0.73156714", "0.7303719", "0.72836167", "0.7281409", "0.72790676", "0.7278751", "0.72782403", "0.7274434", "0.7265909", "0.72446185", "0.7241598", "0.7236993", "0.7215658", "0.7210305", "0.72087634", "0.7202692", "0.7190909", "0.7186666", "0.7179592", "0.7173369", "0.717262", "0.7162995", "0.71533203", "0.7152266", "0.7136887", "0.7129692", "0.71264774", "0.7124126", "0.71231484", "0.71168447", "0.7113457", "0.71123856", "0.71109754", "0.7093646", "0.7093079", "0.70901465", "0.7082906", "0.70823854", "0.7067995", "0.70668787", "0.70622176", "0.70509094", "0.70493865", "0.7047015", "0.70401865", "0.701872", "0.7017632", "0.7016697", "0.7016339", "0.7013523", "0.7012174", "0.70067805", "0.70010036", "0.69986135", "0.6993028", "0.6988534", "0.6988409", "0.6984947", "0.6980894", "0.697648", "0.6975325", "0.69714004", "0.69703615", "0.69654787", "0.69643", "0.6964141", "0.69607943", "0.6959933" ]
0.0
-1
Constructor de la clase
public StringFileManager() { // TODO Auto-generated constructor stub }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Pasien() {\r\n }", "public CyanSus() {\n\n }", "public Clade() {}", "public Carrera(){\n }", "public Classe() {\r\n }", "public Chauffeur() {\r\n\t}", "public AntrianPasien() {\r\n\r\n }", "public SlanjePoruke() {\n }", "public Alojamiento() {\r\n\t}", "public Curso() {\r\n }", "private Instantiation(){}", "public prueba()\r\n {\r\n }", "public Cohete() {\n\n\t}", "public Achterbahn() {\n }", "public Lanceur() {\n\t}", "public Cgg_jur_anticipo(){}", "public PSRelation()\n {\n }", "public Pitonyak_09_02() {\r\n }", "public Corso() {\n\n }", "public Supercar() {\r\n\t\t\r\n\t}", "public Coche() {\n super();\n }", "public Caso_de_uso () {\n }", "public TTau() {}", "public Kullanici() {}", "public Aritmetica(){ }", "public Trening() {\n }", "public CSSTidier() {\n\t}", "public Odontologo() {\n }", "public Rol() {}", "defaultConstructor(){}", "public Vehiculo() {\r\n }", "public Chick() {\n\t}", "public _355() {\n\n }", "public Libro() {\r\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "public TCubico(){}", "private TMCourse() {\n\t}", "public Anschrift() {\r\n }", "public TebakNusantara()\n {\n }", "public Phl() {\n }", "private void __sep__Constructors__() {}", "public NhanVien()\n {\n }", "public Livro() {\n\n\t}", "public Tigre() {\r\n }", "public Propuestas() {}", "public Troco() {\n }", "public Student(){}", "public Excellon ()\n {}", "public Postoj() {}", "public Orbiter() {\n }", "public Busca(){\n }", "public JSFOla() {\n }", "public Mitarbeit() {\r\n }", "public Mannschaft() {\n }", "private BaseDatos() {\n }", "protected Asignatura()\r\n\t{}", "public Demo() {\n\t\t\n\t}", "public Persona() {\n\t}", "public DetArqueoRunt () {\r\n\r\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public Car(){\n\t\t\n\t}", "public EnsembleLettre() {\n\t\t\n\t}", "public Mueble() {\n }", "public Aktie() {\n }", "public OOP_207(){\n\n }", "public Banco(){}", "public Tbdtokhaihq3() {\n super();\n }", "public Candidatura (){\n \n }", "public Data() {\n \n }", "public Plato(){\n\t\t\n\t}", "public Datos(){\n }", "public Funcionario() {\r\n\t\t\r\n\t}", "public Chant(){}", "public Parameters() {\n\t}", "public Tbdcongvan36() {\n super();\n }", "void DefaultConstructor(){}", "public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }", "public Prova() {}", "public CCuenta()\n {\n }", "public Corrida(){\n\n }", "public RptPotonganGaji() {\n }", "public SgaexpedbultoImpl()\n {\n }", "public Persona() {\n }", "public Tarifa() {\n ;\n }", "public Exercicio(){\n \n }", "public OVChipkaart() {\n\n }", "public Demo3() {}", "public Lotto2(){\n\t\t\n\t}", "public Venda() {\n }", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }", "public Contato() {\n }", "public Aanbieder() {\r\n\t\t}", "public Person() {\n\t\t\n\t}", "public Classroom() {\n\t}", "public Magazzino() {\r\n }", "public Gasto() {\r\n\t}", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Produto() {}" ]
[ "0.8376671", "0.82482725", "0.7757712", "0.76491547", "0.764287", "0.75641066", "0.7557304", "0.7555219", "0.75255686", "0.7461729", "0.74616057", "0.7438721", "0.74067116", "0.7393601", "0.73794305", "0.737154", "0.73671997", "0.7337879", "0.7337316", "0.73341864", "0.7313249", "0.7308003", "0.73014486", "0.7286598", "0.72854495", "0.72806126", "0.7276211", "0.726982", "0.72578394", "0.7255836", "0.7244511", "0.72424406", "0.72343045", "0.7224225", "0.71780586", "0.717157", "0.7157366", "0.71555436", "0.71501595", "0.7147036", "0.7146139", "0.71375966", "0.7127987", "0.71212405", "0.7110599", "0.710362", "0.7101352", "0.7091096", "0.70835495", "0.7081683", "0.70791984", "0.70779765", "0.70618206", "0.70607895", "0.70521325", "0.70498455", "0.70493287", "0.7046411", "0.7041636", "0.704", "0.70373034", "0.7026407", "0.70260817", "0.70260626", "0.7022154", "0.70123565", "0.70032346", "0.70011115", "0.69987345", "0.69925755", "0.69866824", "0.6981651", "0.69783765", "0.6977111", "0.69766194", "0.6976283", "0.69717973", "0.696329", "0.69617575", "0.6959797", "0.69580036", "0.69540024", "0.6949844", "0.69443756", "0.69405514", "0.6939727", "0.69326776", "0.69310296", "0.69284743", "0.69282734", "0.69281584", "0.6924836", "0.69237673", "0.6921983", "0.69213474", "0.6916805", "0.69099265", "0.69089574", "0.6905706", "0.6896925", "0.6894953" ]
0.0
-1
Constructor de la clase
public StringFileManager(String name) throws Exception { super(name); // TODO Auto-generated constructor stub }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Pasien() {\r\n }", "public CyanSus() {\n\n }", "public Clade() {}", "public Carrera(){\n }", "public Classe() {\r\n }", "public Chauffeur() {\r\n\t}", "public AntrianPasien() {\r\n\r\n }", "public SlanjePoruke() {\n }", "public Alojamiento() {\r\n\t}", "public Curso() {\r\n }", "private Instantiation(){}", "public prueba()\r\n {\r\n }", "public Cohete() {\n\n\t}", "public Achterbahn() {\n }", "public Lanceur() {\n\t}", "public Cgg_jur_anticipo(){}", "public PSRelation()\n {\n }", "public Pitonyak_09_02() {\r\n }", "public Corso() {\n\n }", "public Supercar() {\r\n\t\t\r\n\t}", "public Coche() {\n super();\n }", "public Caso_de_uso () {\n }", "public TTau() {}", "public Kullanici() {}", "public Aritmetica(){ }", "public Trening() {\n }", "public CSSTidier() {\n\t}", "public Odontologo() {\n }", "public Rol() {}", "defaultConstructor(){}", "public Vehiculo() {\r\n }", "public Chick() {\n\t}", "public _355() {\n\n }", "public Libro() {\r\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "public TCubico(){}", "private TMCourse() {\n\t}", "public Anschrift() {\r\n }", "public TebakNusantara()\n {\n }", "public Phl() {\n }", "private void __sep__Constructors__() {}", "public NhanVien()\n {\n }", "public Livro() {\n\n\t}", "public Tigre() {\r\n }", "public Propuestas() {}", "public Troco() {\n }", "public Student(){}", "public Excellon ()\n {}", "public Postoj() {}", "public Orbiter() {\n }", "public Busca(){\n }", "public JSFOla() {\n }", "public Mitarbeit() {\r\n }", "public Mannschaft() {\n }", "private BaseDatos() {\n }", "protected Asignatura()\r\n\t{}", "public Demo() {\n\t\t\n\t}", "public Persona() {\n\t}", "public DetArqueoRunt () {\r\n\r\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public Car(){\n\t\t\n\t}", "public EnsembleLettre() {\n\t\t\n\t}", "public Mueble() {\n }", "public Aktie() {\n }", "public OOP_207(){\n\n }", "public Banco(){}", "public Tbdtokhaihq3() {\n super();\n }", "public Candidatura (){\n \n }", "public Data() {\n \n }", "public Plato(){\n\t\t\n\t}", "public Datos(){\n }", "public Funcionario() {\r\n\t\t\r\n\t}", "public Chant(){}", "public Parameters() {\n\t}", "public Tbdcongvan36() {\n super();\n }", "void DefaultConstructor(){}", "public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }", "public Prova() {}", "public CCuenta()\n {\n }", "public Corrida(){\n\n }", "public RptPotonganGaji() {\n }", "public SgaexpedbultoImpl()\n {\n }", "public Persona() {\n }", "public Tarifa() {\n ;\n }", "public Exercicio(){\n \n }", "public OVChipkaart() {\n\n }", "public Demo3() {}", "public Lotto2(){\n\t\t\n\t}", "public Venda() {\n }", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }", "public Contato() {\n }", "public Aanbieder() {\r\n\t\t}", "public Person() {\n\t\t\n\t}", "public Classroom() {\n\t}", "public Magazzino() {\r\n }", "public Gasto() {\r\n\t}", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Produto() {}" ]
[ "0.8376671", "0.82482725", "0.7757712", "0.76491547", "0.764287", "0.75641066", "0.7557304", "0.7555219", "0.75255686", "0.7461729", "0.74616057", "0.7438721", "0.74067116", "0.7393601", "0.73794305", "0.737154", "0.73671997", "0.7337879", "0.7337316", "0.73341864", "0.7313249", "0.7308003", "0.73014486", "0.7286598", "0.72854495", "0.72806126", "0.7276211", "0.726982", "0.72578394", "0.7255836", "0.7244511", "0.72424406", "0.72343045", "0.7224225", "0.71780586", "0.717157", "0.7157366", "0.71555436", "0.71501595", "0.7147036", "0.7146139", "0.71375966", "0.7127987", "0.71212405", "0.7110599", "0.710362", "0.7101352", "0.7091096", "0.70835495", "0.7081683", "0.70791984", "0.70779765", "0.70618206", "0.70607895", "0.70521325", "0.70498455", "0.70493287", "0.7046411", "0.7041636", "0.704", "0.70373034", "0.7026407", "0.70260817", "0.70260626", "0.7022154", "0.70123565", "0.70032346", "0.70011115", "0.69987345", "0.69925755", "0.69866824", "0.6981651", "0.69783765", "0.6977111", "0.69766194", "0.6976283", "0.69717973", "0.696329", "0.69617575", "0.6959797", "0.69580036", "0.69540024", "0.6949844", "0.69443756", "0.69405514", "0.6939727", "0.69326776", "0.69310296", "0.69284743", "0.69282734", "0.69281584", "0.6924836", "0.69237673", "0.6921983", "0.69213474", "0.6916805", "0.69099265", "0.69089574", "0.6905706", "0.6896925", "0.6894953" ]
0.0
-1
TODO Autogenerated method stub
@Override public T get() { 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
@Override public void save(T elemento) { }
{ "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 boolean buscar(T elemento) { return false; }
{ "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 boolean getElemento(T elemento) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void close() throws Exception { }
{ "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
/ Simple counts of topic messages
@Incoming("orders_broadcast") @Counted("inventorydemo.orders.count") void ordersToSocket(Order order) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int countTopics() {\n\t\treturn 0;\r\n\t}", "int getMessagesCount();", "int getMessagesCount();", "int getMessagesCount();", "int getMsgCount();", "int getMsgCount();", "int countByExample(UserTopicExample example);", "int countByExample(UserTopicExample example);", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "public int getTotalMessageCount(){\n Query query = new Query(\"Message\");\n Query query2 = new Query(\"Question\");\n PreparedQuery results = datastore.prepare(query);\n PreparedQuery results2 = datastore.prepare(query2);\n return results.countEntities(FetchOptions.Builder.withLimit(1000)) + results2.countEntities(FetchOptions.Builder.withLimit(1000));\n}", "int countByExample(TbMessageExample example);", "int getMessageIdCount();", "int countByExample(TopicFragmentExample example);", "long countByExample(PrivateMessageExample example);", "int countByExample(MessageGroupExample example);", "public int getCountForum();", "long getMessageFrequency();", "public int getTotalNumOfMsg(){ return allmessage.size();}", "int getPayloadCount();", "int getSubscriptionCount();", "java.lang.String listMessageCounter() throws java.lang.Exception;", "int countByExample(WxNewsExample example);", "int countByExample(TSubjectInfoExample example);", "long getReceivedEventsCount();", "int countByExample(AlertQueueExample example);", "public int getUnreadChatMessageCount();", "public synchronized int messageCount() {\n \tfinal Query q = mDB.query();\n q.constrain(MessageReference.class);\n q.descend(\"mBoard\").constrain(this).identity();\n return q.execute().size();\n }", "public int searchTopicCount(String collectionId, String query) {\r\n int toReturn = 0;\r\n if (null == collectionId || 0 == collectionId.length() || query == null || 0 == query.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"query\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"topic_count_query\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY,\r\n \"\", paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"query\", query);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0445\", \"getting number of topics with given query wasn't successful: coll_id=\" + collectionId\r\n + \"/query=\" + query);\r\n } else {\r\n wrapError(\"APIL_0445\", \"getting number of topics with given query wasn't successful: coll_id=\" + collectionId\r\n + \"/query=\" + query);\r\n }\r\n } else {\r\n toReturn = Tools.parseInt(response.getValue(\"count\"));\r\n }\r\n return toReturn;\r\n }", "public int getTotalMessageCount() {\n Query query = new Query(\"Message\");\n PreparedQuery results = datastore.prepare(query);\n return results.countEntities(FetchOptions.Builder.withLimit(1000));\n }", "public int getWordsPerTopic() {\n return topicWords == null ? 0 : topicWords.size();\n }", "public int getMessagesCount() {\n return messages_.size();\n }", "int getDeliveredCount();", "int getChannelStatisticsCount();", "public int getNumAnnouncements(){\n return message.length;\n }", "int getMessageCount(@Nullable CompilerMessageCategory category);", "public int getMessageListCount() {\n\t\t\tint rowcount = 0;\n\t\t\ttry {\n\t\t\t\tconn = ds.getConnection();\n\t\t\t\tpstmt = conn.prepareStatement(\"select count(*) from Message\");\n\t\t\t\trs = pstmt.executeQuery();\n\t\t\t\tif (rs.next()) {\n\t\t\t\t\trowcount = rs.getInt(1);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rowcount;\n\t\t}", "public void example() {\n KStream<String, String> kStream = streamsBuilder().stream(\"TOPIC1\",\n Consumed.with(Serdes.String(), Serdes.String()));\n KGroupedStream<String, String> groupedStream = kStream.groupByKey();\n KTable<String, Long> totalCount = groupedStream.count();\n KTable<String, Long> windowedCount = groupedStream.count();\n groupedStream.count();\n }", "public Integer getMessageCount() {\r\n return messageCount;\r\n }", "long getTotalAcceptCount();", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "private int getMessageCount() {\r\n return mMessages.length;\r\n }", "public synchronized int getCount() throws MessagingException {\n/* 244 */ parse();\n/* 245 */ return super.getCount();\n/* */ }", "int postsCount();", "int countByExample(TSourceChannelsExample example);", "long getTopic();", "@Override\n\t\tpublic void messageArrived(String topic, MqttMessage mqttMessage)\n\t\t\t\tthrows Exception {\n\t\t\tsuper.messageArrived(topic, mqttMessage);\n\n\t\t\tMatcher matcher = pattern.matcher(topic);\n\t\t\tif (matcher.matches()) {\n\t\t\t\tString deviceid = matcher.group(1);\n\t\t\t\tString payload = new String(mqttMessage.getPayload());\n\t\t\t\t\n\t\t\t\t//Parse the payload in Json Format\n\t\t\t\tJSONObject jsonObject = new JSONObject(payload);\n\t\t\t\tJSONObject contObj = jsonObject.getJSONObject(\"d\");\n\t\t\t\tint count = contObj.getInt(\"count\");\n\t\t\t\tSystem.out.println(\"Receive count \" + count + \" from device \"\n\t\t\t\t\t\t+ deviceid);\n\n\t\t\t\t//If count >=4, start a new thread to reset the count\n\t\t\t\tif (count >= 4) {\n\t\t\t\t\tnew ResetCountThread(deviceid, 0).start();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static int countReceivedMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countReceivedMessages(messageClassType);\n\n\treturn sum;\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessagesCount() {\n return messages_.size();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "@Override\r\n\tpublic int count(Integer bno) {\n\t\treturn replyMapper.count(bno); \r\n\t}", "@Override\n public int numberOfMessages() {\n return messages.size();\n }", "int getDocumentCount();", "long countByExample(DiscussExample example);", "int countByExample(OfUserWechatExample example);", "int countByExample(NewsInfoExample example);", "public void reportNoOfSalesMessage(Map<String, List<Message>> msgMap);", "int countByExample(NewsExample example);", "int getTotalCount();", "@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}", "int countByExample(TbComEqpModelExample example);", "int countByExample(CmstTransfdeviceExample example);", "public int get_count();", "public Integer CounterPublishNum(int count){\r\n\t\treturn ++count;\r\n\t}", "@Override\n\tpublic int countNews() {\n\t\treturn comNewsMapper.selectCountNews();\n\t}", "@Override\n\tpublic int queryMsgCount(Object object, int minPrice, int maxPrice,\n\t\t\tint minDis, int maxDis, int minAge, int maxAge) {\n\t\treturn 0;\n\t}", "long countByExample(EventsWaitsSummaryByInstanceExample example);", "int getChannelsCount();", "@Override\n\tpublic void updateStatisticCounts(long topicCoutn, long postCount)\n\t\t\tthrows Exception {\n\n\t}", "@Override\n\tpublic SuccessMessage countByKw(String kw) {\n\t\tthrow new I18nMessageException(\"502\");\n\t}", "int getNetTransferMsgsCount();", "org.jboss.mq.server.MessageCounter[] getMessageCounter() throws java.lang.Exception;", "public int getUnreadChatMessageCountFromActiveLocals();", "long countByExample(SysNoticeExample example);", "@Override\n\tpublic <S extends Translator> long count(Example<S> example) {\n\t\treturn 0;\n\t}", "int getObject_nbmsg();", "public AsyncResult<Integer> requestNumberOfMessages() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverInformation(null, OfflineMessage.NAMESPACE).thenApply(infoDiscovery -> {\r\n if (!infoDiscovery.getExtensions().isEmpty()) {\r\n DataForm dataForm = infoDiscovery.getExtensions().get(0);\r\n if (dataForm != null) {\r\n for (DataForm.Field field : dataForm.getFields()) {\r\n if (\"number_of_messages\".equals(field.getVar())) {\r\n String numberOfMessages = field.getValues().get(0);\r\n return Integer.valueOf(numberOfMessages);\r\n }\r\n }\r\n }\r\n }\r\n return 0;\r\n });\r\n }", "Long getAllCount();", "public int getPublishMessageTotalRows(int userid){\r\n\t\tif(userid==0){\r\n\t\t\treturn baseDAO.queryFactory(new RealActivity(), \"t_realactivity\", \" \").size();\r\n\t\t}else{\r\n\t\t\treturn baseDAO.queryFactory(new RealActivity(), \"t_realactivity\", \" and userId=\"+userid).size();\r\n\t\t}\r\n\t\t/*return ALLPageNum;*/\r\n\t}", "@Override\r\n\tpublic int count(int bno) {\n\t\treturn replyDAO.count(bno);\r\n\t}", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "@Override\r\n\tpublic int selectMessageCount() {\n\t\treturn messageMapper.selectMessageCount();\r\n\t}", "public long count() ;", "protected long doGetNumberOfSupertypes(Topic type) {\r\n\t\treturn getParentIndex().getSupertypes(type).size();\r\n\t}", "public int getTopicCount(String collectionId) {\r\n int toReturn = 0;\r\n if (null == collectionId || 0 == collectionId.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"topic_count\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\",\r\n paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0421\", \"retrieval of number of topics wasn't successful: coll_id=\" + collectionId);\r\n } else {\r\n wrapError(\"APIL_0421\", \"retrieval of number of topics wasn't successful: coll_id=\" + collectionId);\r\n }\r\n } else {\r\n toReturn = Tools.parseInt(response.getValue(\"count\"));\r\n }\r\n\r\n return toReturn;\r\n }", "public int count();", "public int count();", "public int count();", "public int count();", "int getUserCount();", "int getUserCount();" ]
[ "0.774565", "0.7379583", "0.7379583", "0.7379583", "0.7281022", "0.7281022", "0.72675294", "0.72675294", "0.720014", "0.720014", "0.720014", "0.720014", "0.720014", "0.70004356", "0.6822052", "0.6793419", "0.67047507", "0.66922504", "0.66574883", "0.65337414", "0.6458525", "0.6391475", "0.6381806", "0.63507295", "0.63423145", "0.6329704", "0.6329402", "0.6311121", "0.62948847", "0.6267662", "0.6262638", "0.6256699", "0.6215612", "0.6206051", "0.6199119", "0.61754996", "0.615648", "0.61511135", "0.6139682", "0.6124646", "0.6121978", "0.6117054", "0.61165816", "0.6115711", "0.6115711", "0.61030364", "0.60897803", "0.60876256", "0.6085237", "0.60785735", "0.6075026", "0.6061673", "0.60577035", "0.60577035", "0.60577035", "0.60577035", "0.60577035", "0.60558057", "0.6036562", "0.6036562", "0.60335195", "0.5994305", "0.59757966", "0.5973471", "0.59552956", "0.59358287", "0.5927985", "0.59184414", "0.5915885", "0.5913613", "0.59055", "0.5903527", "0.5890366", "0.58851415", "0.5883323", "0.5881748", "0.58712476", "0.5869542", "0.5869444", "0.5864881", "0.586298", "0.58604413", "0.5845657", "0.58421224", "0.5840341", "0.5829724", "0.5829573", "0.582361", "0.580795", "0.57848346", "0.5781499", "0.578081", "0.5767733", "0.5760118", "0.5760011", "0.5757431", "0.5757431", "0.5757431", "0.5757431", "0.57558185", "0.57558185" ]
0.0
-1
TipoActividadDAO classe per englobar les funcions de tipos d'actividades.
public interface TipoActividadDAO { /** * Funció que engloba les funcións que s'utilitzen per crear tipus d'activitat * @param tipoAct * @return String * @throws PersistenceException * @throws ClassNotFoundException */ public abstract String callCrear(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException; /** * Verifica que no existeixi un tipus amb el mateix nom * @param tipoAct * @return int * @throws PersistenceException * @throws ClassNotFoundException */ public abstract int getTipoByName(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException; /** * Inserta un tipus d'activitat en la base de dades * @param tipoAct * @return String * @throws PersistenceException * @throws ClassNotFoundException */ public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException; /** * Agafa els tipus d'activitats que esten actius * @return List de TipoActividad * @throws PersistenceException * @throws ClassNotFoundException */ public abstract List<TipoActividad> getTiposActividad() throws PersistenceException, ClassNotFoundException; /** * Agafa tots els tipus d'activitats * @return List de TipoActividad * @throws PersistenceException * @throws ClassNotFoundException */ public abstract List<TipoActividad> getTiposActividadAdm() throws PersistenceException, ClassNotFoundException; /** * Seleccionar el tipo de actividad d'una actividad * @param activity * @return String * @throws PersistenceException * @throws ClassNotFoundException */ public abstract String getTipoByAct(Actividad activity) throws PersistenceException, ClassNotFoundException; /** * Guarda la sessió del tipus d'activitat * @param tipoAct * @param pagina * @throws PersistenceException * @throws ClassNotFoundException */ public abstract void guardarSession(TipoActividad tipoAct, String pagina) throws PersistenceException, ClassNotFoundException; /** * Funció que engloba les funcións per editar un tipus d'activitat * @param tipoAct * @return String * @throws PersistenceException * @throws ClassNotFoundException */ public abstract String callEditar(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException; /** * Funció que permet editar el Tipus d'activitat * @param tipoAct * @return String * @throws PersistenceException * @throws ClassNotFoundException */ public abstract String editarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActividadDAO getActividadDAO() {\n return actividadDAO;\n }", "public interface TipoDao {\r\n\r\n /**\r\n * Inserta un nuevo registro en la tabla Tipos.\r\n */\r\n public TipoPk insert(Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Actualiza un unico registro en la tabla Tipos.\r\n */\r\n public void update(TipoPk pk, Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Elimina un unico registro en la tabla Tipos.\r\n */\r\n public void delete(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un unico registro en la tabla Tipos que conicida con la\r\n * primary-key especificada.\r\n */\r\n public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el criterio\r\n * 'id_tipo = :idTipo'.\r\n */\r\n public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el\r\n * criterio 'nombre_tipo LIKE %:nombre%'.\r\n */\r\n public Tipo[] findByName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el\r\n * criterio 'nombre_tipo = :nombre'.\r\n */\r\n public Tipo findByFullName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todas las filas de la tabla Tipos.\r\n */\r\n public Tipo[] findAll() throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con la\r\n * sentencia SQL especificada arbitrariamente\r\n */\r\n public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el WHERE\r\n * SQL especificado arbitrariamente\r\n */\r\n public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Sets the value of maxRows\r\n */\r\n public void setMaxRows(int maxRows);\r\n\r\n /**\r\n * Gets the value of maxRows\r\n */\r\n public int getMaxRows();\r\n\r\n /**\r\n * Retorna la conexión actual del usuario\r\n * \r\n * @return Connection\r\n */\r\n public Connection getUserConn();\r\n\r\n /**\r\n * Setea la conexión a usar con la BD\r\n * \r\n * @param userConn\r\n */\r\n public void setUserConn(Connection userConn);\r\n\r\n}", "public TblActividadUbicacion() {\r\n }", "public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;", "public empresaDAO(){\r\n \r\n }", "public abstract String getTipoByAct(Actividad activity) throws PersistenceException, ClassNotFoundException;", "public UnidadDAO() {\n this.setCon(cs.getConection());\n \n }", "public TrabajadoresDAO(TransactionContext context) {\n super(context);\n this.context = context;\n log = Logger.getLogger(this.getClass());\n }", "public JanelaTipoContato() {\r\n initComponents();\r\n try {\r\n\r\n List<TipoContato> tipoContatos = (List<TipoContato>) (Object) tipoContatoDao.pesquisarTodos();\r\n adicionarListaTipoContatosTabela(tipoContatos);\r\n } catch (Exception exception) {\r\n }\r\n }", "public abstract List<TipoActividad> getTiposActividad() throws PersistenceException, ClassNotFoundException;", "public abstract int getTipoByName(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;", "public abstract List<TipoActividad> getTiposActividadAdm() throws PersistenceException, ClassNotFoundException;", "CRUDGenerico<?, ?> getDAO(Class<?> entidade) throws ExcecaoGenerica;", "public AtendimentoServicoDao() {\r\n super(AtendimentoServico.class);\r\n }", "public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "public UsuarioDAO(Activity activity) {\n conex = new Conexion(activity);\n }", "public PacienteDAO(){ \n }", "Tablero consultarTablero();", "@Transactional\n\t@Override\n\tpublic List<Activos> buscar(Integer delegacionId, String codActivo, String descripcion, Integer estadoFisicoId, Integer proyectoId) {\n\t\t\tList<Activos> listaActivos = new ArrayList<Activos>();\n\t\t\tlistaActivos = oActivoDAO.ListadoActivosFiltro( delegacionId, codActivo, descripcion, estadoFisicoId,proyectoId); \n\t\t\treturn listaActivos;\t\t\n\t}", "public void menuTipoActividad() {\n\t\tSystem.out.println(\"MENU TIPOS ACTIVIDAD\");\n\t\tSystem.out.println(\"1. LOW\");\n\t\tSystem.out.println(\"2. MEDIUM\");\n\t\tSystem.out.println(\"3. HIGH\");\n\t}", "public interface GvEstadoDocumentoDAO extends GenericOracleAsignacionesDAO<GvEstadoDocumento, Long>{\n public GvEstadoDocumento buscarPorCodigo(long idEstadoDocumento);\n public GvEstadoDocumento buscarPorNombre(String descripcion);\n\tpublic List<GvEstadoDocumento> buscarGvEstadoDocumentos();\n\tpublic void guardarGvEstadoDocumento(GvEstadoDocumento gvEstadoDocumento) throws EducacionDAOException;\n}", "public TblActividadFinanciamientoDet() {\n // Este lo usa Jpa para realizar los Mapping\n }", "public DescritoresDAO() {\n\t\t\n\t}", "public TipoUsuario(int id_tipousuario, String usuario) {\n this.id_tipousuario = id_tipousuario;\n this.usuario = usuario;\n }", "public ControladorUsuario(UsuarioDAO usuarioDAO) {\n\n this.usuarioDAO = usuarioDAO;\n \n }", "public Propiedad() {\n bdPropiedad = new DaoPropiedad();\n bdComentario = new DaoComentario();\n }", "public TipoUsuario(int id_tipousuario) {\n this.id_tipousuario = id_tipousuario;\n }", "public List<Permiso> obtenerTodosActivos();", "public List<ActividadEntitie> LoadAllActividades() {\r\n\t\t\r\n\t\tCursor cursor = this.myDatabase.query(ActividadTablaEntidad.nombre_tabla,\r\n\t\t\t\t new String[] {ActividadTablaEntidad.id,ActividadTablaEntidad.actividad_codigo,ActividadTablaEntidad.actividad_descripcion}, \r\n\t\t\t\t null,null,null,null,ActividadTablaEntidad.actividad_codigo);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\tActividadEntitie datos = null;\r\n\t\tArrayList<ActividadEntitie> actividadList = null;\r\n\t\t\r\n\t\tif (cursor != null ) {\r\n\t\t\t\r\n\t\t\tactividadList = new ArrayList<ActividadEntitie>();\r\n\t\t\t\r\n\t\t\t\r\n\t\t if (cursor.moveToFirst()) {\r\n\t\t do {\r\n\t\t \t\r\n\t\t \tdatos = new ActividadEntitie();\r\n\t\t \tdatos.set_codigoActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_codigo)));\r\n\t\t \tdatos.set_descripcionActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_descripcion)));\r\n\t\t \tdatos.set_id(cursor.getLong(cursor.getColumnIndex(ActividadTablaEntidad.id)));\r\n\t\t \t\r\n\t\t \tactividadList.add(datos);\r\n\t\t \t\r\n\t\t }while (cursor.moveToNext());\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\tif(cursor != null)\r\n cursor.close();\r\n\t\t\r\n\t\treturn actividadList;\r\n\t}", "public void setFechaImplementacionActividad(int IdActividad, String tipo) throws IOException{\n TipoActividad tipoActividad = TipoActividad.valueOf(tipo.toUpperCase());\n FechaImplementacion = new Date();\n if((fDatos.setFechaImplementacionActividad(FechaImplementacion, IdActividad, AccionSeleccionada.getId()))== -1){\n switch(tipoActividad){\n case CORRECTIVA->mostrarErrorCorrectiva(IdActividad);\n case PREVENTIVA->mostrarErrorPreventiva(IdActividad);\n default->mostrarErrorActividad(IdActividad);\n }\n }else{\n // recargar vista de seguimiento\n String url = FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();\n FacesContext.getCurrentInstance().getExternalContext().redirect(url+\"/Views/Acciones/General/SeguimientoAccion.xhtml?id=\"+AccionSeleccionada.getId());\n }\n }", "public abstract java.lang.Long getCod_actividad();", "public Actividad(String id, String titulo, String descactividad, List<Recurso> recursos) {\n\t\t\tthis.id = id;\n\t\t\tthis.titulo = titulo;\n\t\t\tthis.descactividad = descactividad;\n\t\t\tthis.recursos = recursos;\n\t\t}", "@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}", "public NodoArbolSintactico(String nombre, int tipo) {\r\n hijos = new ArrayList<>();\r\n this.nombre = nombre;\r\n accion = null;\r\n this.tipo = tipo;\r\n }", "public interface EscalaDAO {\r\n\r\n /**\r\n * Select numero manifiesto aeat.\r\n *\r\n * @param srvcId\r\n * the srvc id\r\n * @return the string\r\n */\r\n String selectNumeroManifiestoAeat(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del estado de una escala a partir del estado de sus atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateRecalcularEstado(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del codigo de exencion de una escala a partir del codigo de exencion de sus atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateExencion(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de estancia de una escala a partir del tipo de estancia de sus atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateEstancia(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de navegacion de entrada de una escala a partir del puerto anterior.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateNavegacionEntrada(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de navegacion de salida de una escala a partir del puerto siguiente.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateNavegacionSalida(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de IVA de una escala a partir de datos de la escala.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateTipoIva(final Long srvcId);\r\n\r\n /**\r\n * Modificacion de las fechas de inicio/fin de una escala a partir las fechas de inicio/fin de sus\r\n * atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateRecalcularFechas(final Long srvcId);\r\n}", "public void construirTabla(String tipo) {\r\n\r\n\t\t\r\n\t\tif(tipo == \"lis\") {\r\n\t\t\tlistaPersonas = datarPersonas();\r\n\t\t} else if (tipo == \"bus\") {\r\n\t\t\tlistaPersonas = datarPersonasBusqueda();\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> titulosList=new ArrayList<>();\r\n\t\t\r\n\t\t//Estos son los encabezados de las columnas\r\n\t\t\r\n\t\ttitulosList.add(\"DNI\");\r\n\t\ttitulosList.add(\"NOMBRE\");\r\n\t\ttitulosList.add(\"APELLIDO\");\r\n\t\ttitulosList.add(\"CUENTA BANCARIA\");\r\n\t\ttitulosList.add(\"PASSWORD\");\r\n\t\ttitulosList.add(\"FECHA DE NACIMIENTO\");\r\n\t\ttitulosList.add(\"TELEFONO\");\r\n\t\ttitulosList.add(\"CORREO ELECTRONICO\");\r\n\t\ttitulosList.add(\"ROL\");\r\n\t\ttitulosList.add(\"Modificar\");\r\n\t\ttitulosList.add(\"Eliminar\"); \r\n\t\t\t\t\r\n\t\t//se asignan los títulos de las columnas para enviarlas al constructor de la tabla\r\n\t\t\r\n\t\tString titulos[] = new String[titulosList.size()];\r\n\t\tfor (int i = 0; i < titulos.length; i++) {\r\n\t\t\ttitulos[i]=titulosList.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tObject[][] data = arrayDatos(titulosList);\r\n\t\tcrearTabla(titulos,data);\r\n\t\t\r\n\t}", "public interface DAO<PK extends Serializable, T> {\n\t/**\n\t * Enumerate para saber de que forma ordenar los resultados ASC o DESC\n\t * \n\t * @author Victor Huerta\n\t * \n\t */\n\tpublic enum Ord {\n\t\tASCENDING(\"ASC\"), DESCENDING(\"DESC\"), UNSORTED(\"\");\n\t\tprivate final String ord;\n\n\t\tprivate Ord(String ord) {\n\t\t\tthis.ord = ord;\n\t\t}\n\n\t\tpublic String getOrd() {\n\t\t\treturn ord;\n\t\t}\n\t}\n\n\t/**\n\t * Metodo para recuperar la session actual\n\t * \n\t * @return la session actual\n\t */\n\tSession getCurrentSession();\n\n\t/**\n\t * Metodo para guardar un registro\n\t * \n\t * @param entity\n\t * Entidad a guardar\n\t * @return true si se guardo correctamente false en otro caso\n\t */\n\tBoolean save(T entity);\n\n\t/**\n\t * Metodo para eliminar un registro\n\t * \n\t * @param entity\n\t * Registro a borrar\n\t * @return true si se elimino correctamente false en otro caso\n\t */\n\tBoolean delete(T entity);\n\n\t/**\n\t * Metodo para recuperar todos los objetos de la tabla\n\t * \n\t * @return lista con todos los objetos de la tabla\n\t */\n\tList<T> getAll();\n\n\t/**\n\t * Metodo para recuberar un objeto por el id, este metodo esta destinado a\n\t * los objetos que ya tienen definido el tipo T\n\t * \n\t * @param id\n\t * El id el objeto que se busca\n\t * @return El objeto encontrado\n\t */\n\tT getById(PK id);\n\n\t/**\n\t * Con este metodo se pueden buscar registros con propiedades similares a\n\t * las del objeto que se pasa, no sirve para buscaquedas por id.\n\t * \n\t * @param entity\n\t * Entidad con propiedades que se van a buscar\n\t * @return Lista de entidades encontradas\n\t */\n\tList<T> searchByExample(T entity);\n\n\t/**\n\t * Metodo para buscar registros con propiedades similares a la del objeto\n\t * que recibe, ordenarlos por el campo que manda con el limite y paginas\n\t * dadas\n\t * \n\t * @param entity\n\t * Ejemplo para la busqueda\n\t * @param sortBy\n\t * Campor por el que se desea ordenar\n\t * @param limit\n\t * Numero maximo de registros\n\t * @param page\n\t * Numero de pagina\n\t * @return\n\t */\n\tList<T> searchByExamplePages(T entity, String sortBy, Ord ord,\n\t\t\tInteger limit, Integer page);\n\n\t/**\n\t *\n\t * Metodo para buscar registros con propiedades similares a la del objeto\n\t * que recibe, ordenarlos por el campo que manda con el limite y paginas\n\t * dadas.\n\t * \n\t * @param entity\n\t * Ejemplo para la busqueda\n\t * @param sortBy\n\t * Campor por el que se desea ordenar\n\t * @param limit\n\t * Numero maximo de registros\n\t * @param page\n\t * Numero de pagina\n\t * @param associations\n\t * \t\t\t Mapa propiedad objeto\n\t * \n\t * @return List<T>\n\t */\n\n\tList<T> searchByExamplePages(T entity, String sortBy, Ord ord,\n\t\t\tInteger limit, Integer page, Map<String, Object> associations);\n\n\t/**\n\t * Cuenta todos los registros de la tabla\n\t * \n\t * @return Numero de registros en la tabla\n\t */\n\tInteger countAll();\n\n\t/**\n\t * Cuenta todos los resultados que coinciden con un ejemplo\n\t * \n\t * @param entity\n\t * Entidad de ejemplo para la busqueda\n\t * @return Numero de registros encontrados\n\t */\n\tInteger countByExample(T entity);\n\n\t/**\n\t * Numero de paginas que se obtendran buscando con el ejemplo dado y usando\n\t * un limite\n\t * \n\t * @param entity\n\t * Entidad de ejemplo para la busqueda\n\t * @param limit\n\t * Limite de registros por pagina\n\t * @return\n\t */\n\tInteger countByExamplePages(T entity, Integer limit);\n\n\t/**\n\t * Retorna la clase del tipo generico, la clase de la entidad. Destinada a\n\t * solo funcionar cuando se implemente esta interfaz definiendo el tipo T\n\t * \n\t * @return Clase del tipo generico\n\t */\n\tClass<?> getEntityClass();\n}", "public PresuTipoProyectoLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.presutipoproyectoDataAccess = new PresuTipoProyectoDataAccess();\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectos= new ArrayList<PresuTipoProyecto>();\r\n\t\t\tthis.presutipoproyecto= new PresuTipoProyecto();\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectoObject=new Object();\r\n\t\t\tthis.presutipoproyectosObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectoDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.presutipoproyectoDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public CrontabEntryDAO getContrabEntryDAO();", "@Override\r\n\tprotected DAO<UnidadFuncional_VO> getDao() {\n\t\treturn null;\r\n\t}", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Banco\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tBanco entity = new Banco();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,BancoDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Tesoreria.Banco.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\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\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseBanco(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public abstract TasksDAO tasksDAO();", "void iniciarOperacion() throws DAOException;", "public interface PertenenciaDAO extends GenericDao<Pertenencia, Long> {\n\n}", "public interface UsuarioDao extends GenericDao<Usuario, Integer> {\n\n List<Usuario> getAllUsuario();\n List<Usuario> getUsuarioByEstado(Object[] parameters);\n\n}", "public static ArrayList<Actividad> selectActividadesProyecto(int idProyecto) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = \"SELECT * FROM Actividades a, Fases f, Proyectos p WHERE a.idFase=f.id AND f.idProyecto=p.id AND f.id=? ORDER BY a.anoInicio, a.mesInicio, a.diaInicio ASC\";\n ArrayList<Actividad> actividades = new ArrayList<Actividad>();\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, idProyecto);\n rs = ps.executeQuery();\n while (rs.next()) {\n String fechaInicio = String.format(\"%02d/%02d/%04d\", rs.getInt(6), rs.getInt(7), rs.getInt(8));\n String fechaFin = String.format(\"%02d/%02d/%04d\", rs.getInt(9), rs.getInt(10), rs.getInt(11));\n Actividad a = new Actividad(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5), fechaInicio, fechaFin, rs.getInt(12), rs.getString(13).charAt(0), rs.getInt(14));\n actividades.add(a);\n }\n rs.close();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return actividades;\n }", "public DAOImpl(String baseDatos, String usuario, String clave){\n this.baseDatos = baseDatos;\n this.usuario = usuario;\n this.clave = clave;\n }", "public TermDAOImpl(){\n connexion= new Connexion();\n }", "public void addTipoContrato(String nombre, int diasIndemnizacion)throws BusinessException;", "public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }", "public interface ProgramaTVDAO {\n\t/**\n\t * Crea una nueva monitorización\n\t * @param titulo Título del programa\n\t * @param episodeCode Código del Episodio (ej. T01E03)\n\t * @param fechaInicio Fecha y hora de Inicio\n\t * @param fechaFin Fecha y hora de Fin\n\t * @param hashtag Hashtag que se monitorizará\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV crearMonitorizacion(String titulo, String episodeCode, Date fechaInicio, Date fechaFin, String hashtag);\n\n\t/**\n\t * Monitorización por clave primaria\n\t * @param primaryKey Clave primaria\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV programaPorId(Long primaryKey);\n\t\n\t/**\n\t * Todas las monitorizaciones que llevan el mismo hashtag\n\t * @param hashtag Hashtag\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> ProgramasPorHashtag(String hashtag);\n\t\n\t/**\n\t * Lista de monitorizaciones del mismo programa\n\t * @param titulo Título del programa\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> programasPorTitulo(String titulo);\n\t\n\t /**\n\t * Todas las monitorizaciones\n\t * @return Lists de todos los objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> todosLosProgramas();\n\t\n\t/**\n\t * Top 5 programas más vistos\n\t * @return Array ordenado de los 5 programas más vistos\n\t */\n\tpublic ProgramaTV[] programasTop5();\n\n\t/**\n\t * Actualiza monitorizacion\n\t * @param prog Objeto ProgramaTV\n\t */\n\tpublic void updateProgramaTV(ProgramaTV prog);\n\n\n\t/**\n\t * Borra una monitorización\n\t * @param prog Clave primaria de la monitorización\n\t */\n\tpublic void deleteProgramaTV(Long prog);\n\t\n\t/**\n\t * Borra todos los programas\n\t */\n\tpublic void deleteAll();\n\t\n\n\t\n\n\t}", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Empresa\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tEmpresa entity = new Empresa();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,EmpresaDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Seguridad.Empresa.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\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\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseEmpresa(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public interface RecuPromotionAccordeeDAO {\n \n public RecuPromotionAccordee findById(int id);\n\t\t\n\t\tpublic void add(RecuPromotionAccordee recuPromotionAccordee);\n\t\t\n\t\tpublic RecuPromotionAccordee edit(RecuPromotionAccordee e);\n\t\t\n\t\tpublic void delete(RecuPromotionAccordee e); \n\t\t\n\t\tpublic List<RecuPromotionAccordee> findAll();\n \n public List<RecuPromotionAccordee> findByEtat (String etat);\n}", "public PlanListAccionDao(Context context) {\n dbhandler = new TablaPlanesAccion(context);\n }", "public static void main(String [] args){\n\t\t\r\n\t\tEstadoDAO dao = new EstadoDAO();\r\n\t//\tdao.salvar(estado);\r\n\t\tList<Estado> estados= dao.list();\r\n\t\t \r\n\t\t for(Estado est: estados){\r\n\t\t System.out.println(est.getEstado());\r\n\t\t \r\n\t\t\t\t\r\n\r\n\t\t \r\n\t\t // CidadeDAO dao = new CidadeDAO();\r\n\t\t // cidades = dao.buscartudo();\r\n\t\t // for(Cidade cid: cidades){\r\n\t\t // System.out.println(cid.getNome_cidade());\r\n\t\t }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t}", "public interface ProcesoMAEClasificacionClientesDAO extends DAO {\n\n\t/**\n\t * Proceso que realiza la actualizacin de clasificacion de Clientes\n\t * \n\t * @param criteria\n\t */\n\tpublic void executeProcesarClasificacion(Map criteria);\n\n\t/**\n\t * Proceso que realiza la actualizacin de clasificacion LOVE de Clientes\n\t * \n\t * @param criteria\n\t */\n\tpublic void executeProcesarClasificacionLove(Map criteria);\n\n\t/**\n\t * Proceso que realiza la actualizacin de datos de Clientes\n\t * \n\t * @param criteria\n\t */\n\tpublic void executeActualizarDatosClientes(Map criteria);\n\n\t/**Proceso q se encarga de ejecutar las validaciones de MAE\n\t * @param criteria\n\t */\n\tpublic void executeValidacionClientes(Map criteria);\n\n\t/**\n\t * Proceso que realiza la Inactivación de conultoras registradas \n\t * despues de dos capañasde creadas en el maestro\n\t * \n\t * @param criteria\n\t */\n\tpublic void executeInactivarConsultora2campanas(Map criteria);\n}", "public CrudRolUsuario(Context context){\n db = Conexion.obtenerBaseDatosLectura(context , null );\n }", "public interface ProcesoEDURegistroCalificacionEjecutivaDAO extends DAO {\n\n\n\t/** \n\t * Devuelve una lista de registros de cabeceras de cursos dictados\n\t * @param historicoCursoDictado\n\t * \t\t\tobjeto HistoricoCursoDictado poblado\n\t */\n\tpublic List getHistoricoCursoDictado(HistoricoCursoDictado historicoCursoDictado);\n\n\t/** \n\t * Devuelve una lista de registros de detalle de capacitadas\n\t * @param historicoCapacitadasDetalle\n\t * \t\t\tobjeto HistoricoCapacitadasDetalle poblado\n\t */\n\tpublic List getHistoricoCapacitadasDetalle(HistoricoCapacitadasDetalle historicoCapacitadasDetalle);\n\t\n\t/**\n\t * Actualiza la Evaluacin efectuada a la Instructora\n\t * @param historicoCapacitadasDetalle\n\t * \t\t\tobjeto HistoricoCapacitadasDetalle poblado\n\t * @param usuario\n\t *\t\t\tobjeto Usuario para el registro de Auditora \n\t */\n\tpublic void updateEvaluacionInstructoraCapacitadas(HistoricoCapacitadasDetalle historicoCapacitadasDetalle, Usuario usuario);\n\n\t/**\n\t * Actualiza la Evaluacin efectuada a la Instructora\n\t * @param historicoCursoDictadoDetalle\n\t * \t\t\tobjeto HistoricoCursoDictadoDetalle poblado\n\t * @param usuario\n\t *\t\t\tobjeto Usuario para el registro de Auditora \n\t */\n\tpublic void updateDetalleDictadoCalificacionEjecutiva(HistoricoCursoDictadoDetalle historicoCursoDictadoDetalle, Usuario usuario);\n\n\t/**\n\t * Actualiza la Evaluacin efectuada a la Instructora en el Resumen de Dictado\n\t * @param historicoCursoDictado\n\t * \t\t\tobjeto HistoricoCursoDictado poblado\n\t * @param usuario\n\t *\t\t\tobjeto Usuario para el registro de Auditora \n\t */\n\tpublic void updateDictadoCalificacionEjecutiva(HistoricoCursoDictado historicoCursoDictado, Usuario usuario);\n\n}", "public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }", "public IndexProyecto(Usuario session) {\n this.session=session;\n initComponents();\n setResizable(false); //Quitar Resize\n setLocationRelativeTo(null);//Centra pantalla\n setLayout(null); // Libre seleccion de tamaño\n getContentPane().setBackground(Color.decode(\"#FFFFFF\"));//Colocamos fondo blanco\n modelTblProgramadores=(DefaultTableModel)tblProgramadores.getModel();\n modelTblActividades=(DefaultTableModel)tblActividades.getModel();\n try\n {\n Bdd baseDatos= new Bdd();\n st = baseDatos.con.createStatement();\n rs=st.executeQuery(\"SELECT count(*) FROM Proyecto WHERE aceptado=1 AND eliminado=0\");\n rs.next();\n numeroProyectos=rs.getInt(\"count(*)\");\n \n idProyecto=new int[numeroProyectos];\n avanceProyecto=new int[numeroProyectos];\n nombreProyecto=new String[numeroProyectos];\n fechaCreacion=new String[numeroProyectos];\n fechaInicio=new String[numeroProyectos];\n \n if(numeroProyectos>0)\n {\n rs=st.executeQuery(\"SELECT idProyecto,titulo,fechaInicio,fechaCreacion FROM Proyecto WHERE aceptado=1 AND eliminado=0\");\n for(int i =0; i<numeroProyectos;i++)\n {\n rs.next();\n idProyecto[i]=rs.getInt(\"idProyecto\");\n nombreProyecto[i]=rs.getString(\"titulo\");\n fechaCreacion[i]=rs.getString(\"fechaCreacion\");\n fechaInicio[i]=rs.getString(\"fechaInicio\");\n }\n lblNumero.setText(\"/\"+String.valueOf(numeroProyectos));\n \n //Actividades\n for(int i =0;i<numeroProyectos;i++)\n {\n rs=st.executeQuery(\"SELECT count(*) FROM Actividades WHERE idProyecto=\"+idProyecto[i]+\" AND eliminado=0\");\n rs.next();\n int numeroActividadesTotales=rs.getInt(\"count(*)\");\n if(numeroActividadesTotales>0)\n {\n rs=st.executeQuery(\"SELECT count(*) FROM Actividades WHERE idProyecto=\"+idProyecto[i]+\" AND eliminado=0 AND estado=1\");\n rs.next();\n int numeroActividadesTerminadas=rs.getInt(\"count(*)\");\n avanceProyecto[i]=(int)(numeroActividadesTerminadas*100/numeroActividadesTotales);\n }\n else\n avanceProyecto[i]=0; \n } \n //Fin Actividades\n \n //PERMISOS (SeguridadProyectos(IDMODULO,IDUSUARIO,CONNECTION,AGREGAR[],MODIFICAR[],ELIMINAR[])\n Component[] agregar={btnNuevaActividad};\n Component[] eliminar={btnEliminarActividad,btnEliminarProgramador};\n Component[] modificar={btnEditarActividad};\n SeguridadProyectos Seg=new SeguridadProyectos(2,session,agregar,modificar,eliminar);\n // Fin PERMISOS\n mostrarDatos();\n }\n else\n JOptionPane.showMessageDialog(null, \"No hay ningun proyecto que gestionar\"); \n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, \"Error en BDD: \"+e.toString());\n }\n\n }", "public static Actividad selectActividad(int idActividad) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = \"SELECT * FROM Actividades WHERE id=?\";\n Actividad a = null;\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, idActividad);\n rs = ps.executeQuery();\n if (rs.next()) {\n String fechaInicio = String.format(\"%02d/%02d/%04d\", rs.getInt(7), rs.getInt(6), rs.getInt(8));\n String fechaFin = String.format(\"%02d/%02d/%04d\", rs.getInt(10), rs.getInt(9), rs.getInt(11));\n a = new Actividad(idActividad, rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5), fechaInicio, fechaFin, rs.getInt(12), rs.getString(13).charAt(0), rs.getInt(14));\n }\n rs.close();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return a;\n }", "public void casdastrar(RelatorioDAO obj) throws SQLException {\n\t\t\n\t}", "public ControladorCatalogoEstado() {\r\n }", "CTipoPersona selectByPrimaryKey(String idTipoPersona) throws SQLException;", "public interface TProvinciasDAO {\n\t\n\tpublic ArrayList<TProvinciasBean> obtenerProvincias(String codigoDepartamento) throws DataAccessException;\n\t\n}", "public OnibusDAO() {}", "public TarjetaCreditoLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.tarjetacreditoDataAccess = new TarjetaCreditoDataAccess();\r\n\t\t\t\r\n\t\t\tthis.tarjetacreditos= new ArrayList<TarjetaCredito>();\r\n\t\t\tthis.tarjetacredito= new TarjetaCredito();\r\n\t\t\t\r\n\t\t\tthis.tarjetacreditoObject=new Object();\r\n\t\t\tthis.tarjetacreditosObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.tarjetacreditoDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.tarjetacreditoDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public Long getActividad() {\n return this.actividad;\n }", "public ProductosPuntoVentaDaoImpl() {\r\n }", "@Override\n\tpublic List<TipoAsiento> listaTipoAsientosActivas() throws Exception {\n\t\treturn null;\n\t}", "public ProtocoloDAO() {\n }", "public TelaCaixa() {\n initComponents();\n InterfaceUtils.preparaTela(this);\n\n List<Caixa> caixas;\n Caixa caixa = null;\n CaixaJpaController caixaController = new CaixaJpaController(ipsum2.Ipsum2.getFactory());\n caixas = caixaController.getEntityManager().createNamedQuery(\"Caixa.findAll\").getResultList();\n for (Caixa c : caixas) {\n if (c.getCodcaixa() == 1) {\n caixa = c;\n }\n }\n if (caixa == null) {\n caixa = new Caixa();\n caixa.setCodcaixa(1);\n caixa.setSaldo(0.0);\n caixa.setStatus(Short.parseShort(\"1\"));\n try {\n caixaController.create(caixa);\n } catch (Exception ex) {\n Logger.getLogger(TelaCaixa.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n if (caixa.getStatus() == 1) {\n statusCaixa.setText(\"Aberto\");\n alterar.setEnabled(true);\n novoLanc.setEnabled(true);\n\n } else {\n statusCaixa.setText(\"Fechado\");\n alterar.setEnabled(false);\n novoLanc.setEnabled(false);\n }\n List<Lancamento> lancamentos;\n LancamentoJpaController lancamentoController = new LancamentoJpaController(ipsum2.Ipsum2.getFactory());\n lancamentos = lancamentoController.getEntityManager().createNamedQuery(\"Lancamento.findAll\").getResultList();\n this.listLancamentos = lancamentos;\n lancamentos = lancamentoController.getEntityManager().createNamedQuery(\"Lancamento.findByEstorno\").setParameter(\"estorno\", (short) 0).getResultList();\n this.listLancamentosAtivos = lancamentos;\n double saldoCaixa = 0.0;\n for (Lancamento l : lancamentos) {\n if (l.getLancamentoEntrada() != null && l.getEstorno() == 0) {\n saldoCaixa += l.getValor();\n }\n if (l.getLancamentoSaida() != null && l.getEstorno() == 0) {\n saldoCaixa -= l.getValor();\n }\n if (l.getLancamentoRecforn() != null && l.getEstorno() == 0) {\n saldoCaixa += l.getValor();\n }\n if (l.getLancamentoPagfunc() != null && l.getEstorno() == 0) {\n saldoCaixa -= l.getValor();\n }\n }\n saldo.setText(\"R$ \" + String.valueOf(saldoCaixa).replace(\".\", \",\"));\n this.saldoFinal = saldoCaixa;\n caixa.setSaldo(saldoCaixa);\n this.caixa = caixa;\n try {\n caixaController.edit(caixa);\n } catch (Exception ex) {\n Logger.getLogger(TelaCaixa.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n this.insereTabela(lancamentos);\n\n }", "public static void insertActividad(Actividad actividad) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n int diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin;\n int[] fechaInicio = getFechaInt(actividad.getFechaInicio());\n diaInicio = fechaInicio[0];\n mesInicio = fechaInicio[1];\n anoInicio = fechaInicio[2];\n int[] fechaFin = getFechaInt(actividad.getFechaFin());\n diaFin = fechaFin[0];\n mesFin = fechaFin[1];\n anoFin = fechaFin[2];\n String query = \"INSERT INTO Actividades (login, descripcion, rol, duracionEstimada, diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin, duracionReal, estado, idFase) VALUES ('\"\n + actividad.getLogin() + \"','\"\n + actividad.getDescripcion() + \"','\"\n + actividad.getRolNecesario() + \"',\"\n + actividad.getDuracionEstimada() + \",\"\n + diaInicio + \",\"\n + mesInicio + \",\"\n + anoInicio + \",\"\n + diaFin + \",\"\n + mesFin + \",\"\n + anoFin + \",\"\n + actividad.getDuracionReal() + \",'\"\n + actividad.getEstado() + \"',\"\n + actividad.getIdFase() + \")\";\n try {\n ps = connection.prepareStatement(query);\n ps.executeUpdate();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setActividad(Actividad actividad) {\r\n\t\tthis.actividad = actividad;\r\n\t}", "public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }", "public CadastrarFuncionario(Kernel obj,int acao,Object texto) {\n kernel = obj; \n bd_Funcionario = new BD_Funcionario(kernel);\n bd_Nivel = new BD_Nivel(kernel);\n \n initComponents(); \n \n /********* PREENCHENDO O VETOR Nivel *************/ \n Nivel[] Nivel_vetor = null;\n try {\n Nivel_vetor = bd_Nivel.getNivels();\n } catch (SQLException exx) {\n Logger.getLogger(CadastrarFuncionario.class.getName()).log(Level.SEVERE, null, exx);\n }\n String dados4[] = new String[Nivel_vetor.length];\n\n obj_Nivel = new Nivel();\n int pos4 = 0;\n for(int i=0; i < Nivel_vetor.length; i++){\n obj_Nivel = (Nivel)Nivel_vetor[i];\n dados4[i] = String.valueOf(obj_Nivel.getNome()).toUpperCase(); \n if(i==0){\n Nivel_id.setText(String.valueOf(obj_Nivel.getNivel_id()));\n }\n }\n combo_nivel.setModel(new javax.swing.DefaultComboBoxModel(dados4)); \n \n if(acao!=0){\n combo_nivel.setSelectedIndex(pos4);\n } \n /*****************************************************************/\n \n if(acao!=0){\n try {\n PreencherFormulario(acao);\n } catch (SQLException ex) {\n Logger.getLogger(CadastrarFuncionario.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n \n }", "List<O> obtenertodos() throws DAOException;", "public void setProprietarioDao(IProprietarioDAO proprietarioDao);", "ParqueaderoEntidad agregar(String nombre);", "public DAOImpl(String urlBase, String baseDatos, String usuario, String clave){\n this.urlBase = urlBase;\n this.baseDatos = baseDatos;\n this.usuario = usuario;\n this.clave = clave;\n }", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "public DTOUnidadAdministrativa obtenerUAActiva(Long oidCliente, Long oidPeriodo) throws MareException {\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Entrada\"); \n BelcorpService bs;\n RecordSet resultado = new RecordSet();\n bs = UtilidadesEJB.getBelcorpService();\n\n DTOUnidadAdministrativa dtoS = new DTOUnidadAdministrativa();\n\n StringBuffer query = new StringBuffer();\n\n try {\n query.append(\" SELECT distinct sub.PAIS_OID_PAIS, sub.MARC_OID_MARC, sub.CANA_OID_CANA, OID_SUBG_VENT, \");\n query.append(\" OID_REGI, OID_ZONA, OID_SECC, TERR_OID_TERR, t.COD_NSE1, t.COD_NSE2, t.COD_NSE3, \");\n query.append(\" OID_TERR_ADMI, pi.FEC_INIC, unid.PERD_OID_PERI_INI, unid.PERD_OID_PERI_FIN \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN unid, \");\n query.append(\" ZON_TERRI_ADMIN tadm, \");\n query.append(\" \t ZON_TERRI t, \");\n query.append(\" \t ZON_SECCI, \");\n query.append(\" \t ZON_ZONA, \");\n query.append(\" \t ZON_REGIO, \");\n query.append(\" \t ZON_SUB_GEREN_VENTA sub, \");\n query.append(\" CRA_PERIO pi, \");\n query.append(\" \t CRA_PERIO pi2 \");\n query.append(\" WHERE unid.CLIE_OID_CLIE = \" + oidCliente);\n query.append(\" AND unid.IND_ACTI = 1 \"); // Unidad Administrativa \"Activa\" \n query.append(\" AND unid.PERD_OID_PERI_INI = pi.OID_PERI \");\n query.append(\" AND pi.FEC_INIC <= (SELECT FEC_INIC FROM CRA_PERIO WHERE OID_PERI = \" + oidPeriodo + \")\");\n query.append(\" AND ((unid.PERD_OID_PERI_FIN = pi2.OID_PERI \");\n query.append(\" AND pi2.FEC_FINA >= (SELECT FEC_FINA FROM CRA_PERIO WHERE OID_PERI = \" + oidPeriodo + \") )\");\n query.append(\" OR unid.PERD_OID_PERI_FIN is NULL) \");\n query.append(\" AND ZTAD_OID_TERR_ADMI = OID_TERR_ADMI \");\n query.append(\" AND TERR_OID_TERR = OID_TERR \");\n query.append(\" AND ZSCC_OID_SECC = OID_SECC \");\n query.append(\" AND ZZON_OID_ZONA = OID_ZONA \");\n query.append(\" AND ZORG_OID_REGI = OID_REGI \");\n query.append(\" AND ZSGV_OID_SUBG_VENT = OID_SUBG_VENT \"); \n query.append(\" order by pi.FEC_INIC desc \");\n\n bs = BelcorpService.getInstance();\n resultado = bs.dbService.executeStaticQuery(query.toString());\n } catch (Exception e) {\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n if (resultado.esVacio()) {\n UtilidadesLog.debug(\"...no hay registros de obtenerUAActiva\");\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Salida\"); \n return null;\n } else {\n UtilidadesLog.debug(\"...resultado de obtenerUAActiva es: \" + resultado);\n dtoS.setNSE1(objToString(resultado.getValueAt(0, \"COD_NSE1\")));\n dtoS.setNSE2(objToString(resultado.getValueAt(0, \"COD_NSE2\")));\n dtoS.setNSE3(objToString(resultado.getValueAt(0, \"COD_NSE3\")));\n dtoS.setOidCanal(objToLong(resultado.getValueAt(0, \"CANA_OID_CANA\")));\n dtoS.setOidMarca(objToLong(resultado.getValueAt(0, \"MARC_OID_MARC\")));\n dtoS.setOidPais(objToLong(resultado.getValueAt(0, \"PAIS_OID_PAIS\")));\n dtoS.setOidRegion(objToLong(resultado.getValueAt(0, \"OID_REGI\")));\n dtoS.setOidSeccion(objToLong(resultado.getValueAt(0, \"OID_SECC\")));\n dtoS.setOidSGV(objToLong(resultado.getValueAt(0, \"OID_SUBG_VENT\")));\n dtoS.setOidTerritorio(objToLong(resultado.getValueAt(0, \"TERR_OID_TERR\")));\n dtoS.setOidTerritorioAdministrativo(objToLong(resultado.getValueAt(0, \"OID_TERR_ADMI\")));\n dtoS.setOidZona(objToLong(resultado.getValueAt(0, \"OID_ZONA\")));\n \n dtoS.setOidCliente(oidCliente);\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Salida\"); \n return dtoS;\n }\n }", "public CadastroDeEmpresa() {\n initComponents();\n preencherTabela(\"select * from empresa order by id\");\n }", "@Override\n\tpublic List<ActividadesMejora> leerActividad() {\n\n\t\tConnection con = null;\n\t\tStatement stm = null;\n\t\tResultSet rs = null;\n\n\t\tString sql = \"SELECT idactividadmejora, actividadesmejora.nombre as nombre, fechainicio, fechatermino, estado, detalle, profesional_id_profesional, cliente_id_cliente, profesional.nombre || ' ' || apellido as profesional, nombreempresa as cliente FROM actividadesmejora INNER JOIN profesional ON profesional_id_profesional=id_profesional INNER JOIN cliente ON cliente_id_cliente=id_cliente\";\n\n\t\tList<ActividadesMejora> listaActividades = new ArrayList<ActividadesMejora>();\n\n\t\ttry {\n\t\t\tcon = ConexionSingleton.getConnection();\n\t\t\tstm = con.createStatement();\n\t\t\trs = stm.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tActividadesMejora c = new ActividadesMejora();\n\t\t\t\tc.setIdActMejora(rs.getInt(\"idactividadmejora\"));\n\t\t\t\tc.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tc.setFechaInicio(rs.getString(\"fechainicio\"));\n\t\t\t\tc.setFechaTermino(rs.getString(\"fechatermino\"));\n\t\t\t\tc.setEstado(rs.getString(\"estado\"));\n\t\t\t\tc.setDetalle(rs.getString(\"detalle\"));\n\t\t\t\tc.setProfesional(rs.getString(\"profesional\"));\n\t\t\t\tc.setCliente(rs.getString(\"cliente\"));\n\t\t\t\tlistaActividades.add(c);\n\t\t\t}\n\t\t\tstm.close();\n\t\t\trs.close();\n\t\t\tcon.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Error: Clase ActividadesMejoraDao, metodo leerActividad \");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn listaActividades;\n\t}", "public String getTipo(){\r\n return Tipo;\r\n }", "public vistaAlojamientos() {\n initComponents();\n \n try {\n miConn = new Conexion(\"jdbc:mysql://localhost/turismo\", \"root\", \"\");\n ad = new alojamientoData(miConn);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(vistaAlojamientos.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "@Dao\n@TypeConverters({DateConverter.class})\npublic interface DAO {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insert(DatabaseModel databaseModels);\n\n @Query(\"Select *from todoitem\")\n LiveData<List<DatabaseModel>> getAllTask();\n\n @Query(\"Select * from todoitem where id = :id\")\n LiveData<DatabaseModel> getTaskById(int id);\n\n @Query(\"Select * from todoitem where tag = :tag\")\n LiveData<List<DatabaseModel>> getTaskByTag(String tag);\n\n @Query(\"Select * from todoitem where priority = :priority\")\n LiveData<List<DatabaseModel>> getTaskByPriority(String priority);\n\n @Query(\"Select * from todoitem where isTaskDone = :isDone\")\n LiveData<List<DatabaseModel>> getTaskByStatus(Boolean isDone);\n\n @Query(\"Delete from todoitem where id = :id\")\n void deleteById(int id);\n\n @Delete\n void delete(DatabaseModel databaseModel);\n\n\n}", "public BeneficiaireDAO() {\n\t\t// chargement du pilote de bases de donn闂佹唶\n\t\t\n\t\ttry {\n\t\t\t Class.forName( \"com.mysql.jdbc.Driver\" );\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Impossible de charger le pilote de BDD, ne pas oublier d'importer le fichier .jar dans le projet\");\n\t\t}\n\n\t}", "public interface Dao <Entidade extends EntityBase, Chave extends Serializable> {\n\n /**\n * Obter um elemento atraves da chave primaria\n * @param chave\n * @return Entidade\n */\n Entidade obter(Chave chave);\n\n /**\n * Incluir um novo elemento na tabela\n * @param entidade\n */\n void incluir(Entidade entidade);\n\n /**\n * Alterar um elemento na tabela\n * @param entidade\n */\n void alterar(Entidade entidade);\n\n /**\n * Excluir um elemento na tabela\n * @param chave\n */\n void excluir(Chave chave);\n\n /**\n * Listar todos os elementos da tabela\n * @return List<Entidade>\n */\n List<Entidade> listarTodos();\n}", "public List<ActDetalleActivo> listarDetalleActivoLaboratorio(long codigoSalaLaboratorio,long codigoTipo,String amie, int estado,int anio);", "public Tipo[] findByName(String nombre) throws TipoDaoException;", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List cargarDato(UnidadFuncional tipo) {\n\t\treturn null;\r\n\t}", "public abstract ToDoDao toDoDao();", "public interface SubGeneroDAO {\n /**\n * Método que permite guardar un subgénero.\n * @param subGenero {@link SubGenero} objeto a guardar.\n */\n void guardar(SubGenero subGenero);\n\n /**\n * Método que permite actualizar un subgénero.\n * @param subGenero {@link SubGenero} objeto a actualizar.\n */\n void actualizar(SubGenero subGenero);\n\n /**\n * Método que permite eliminar un subgénero por su identificador.\n * @param id {@link Long} identificador del subgénero a eliminar.\n */\n void eliminiar(Long id);\n\n /**\n * Método que permite consultar la lista de subgéneros.\n * @return {@link List} lista de subgéneros consultados.\n */\n List<SubGenero> consultar();\n\n /**\n * Método que permite consultar un SubGenero a partir de su identificador.\n * @param id {@link Long} identificador del subgénero a consultar.\n * @return {@link SubGenero} un objeto subgénero consultado.\n */\n SubGenero consultarById(Long id);\n\n\n}", "@Override\n\tpublic TipoTelefonoDAO getTipoTelefonoDAO() {\n\t\treturn new JPATipoTelefonoDAO();\n\t}", "public <T> List<T> obtem(BaseJDBC baseJDBC, Class<T> classe, Object condicao, int profundidade, Class<?>[] classes, int classesVerifica, List<OMObtido> jaObtidos) throws Exception\r\n\t{\r\n\t\tObject objeto;\r\n\t\tAnnotation[] annotations;\r\n\t\tAnnotation annotation;\r\n\t\tField[] fields;\r\n\t\tField field;\r\n\t\tObject id;\r\n\t\tboolean consideraIgnora = classesVerifica==CONSIDERAR_CLASSES;\r\n\t\t\r\n\t\tResultSQL resultSQL=null;\r\n\t\tif(condicao instanceof String)\r\n\t\t{ \r\n\t\t\tresultSQL = baseJDBC.executaSelect((String)condicao, false);\r\n\t\t}\r\n\t\telse if(condicao instanceof QuerySQL)\r\n\t\t{\r\n\t\t\tresultSQL = baseJDBC.executaSelect(((QuerySQL)condicao).toString(baseJDBC), false); \r\n\t\t}\r\n\t\telse if(condicao instanceof Long)\r\n\t\t{\r\n\t\t\tQuerySQL querySQL = BaseDAOSQL.classeToSelectRegistroSQL(classe, (Long)condicao, baseJDBC);\r\n\t\t\tresultSQL = baseJDBC.executaSelect(querySQL.toString(baseJDBC), false);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new Exception(\"Parametro desconhecido: 'condicao' em obtem, BaseDAO: \" + condicao);\r\n\t\t}\r\n\t\t\r\n\t\tList<T> lista = BaseDAOSQL.resultSQLToList(classe, resultSQL);\r\n\t\t//jaObtidos.addAll(lista);\r\n\t\tif(profundidade>-1)\r\n\t\t{\r\n\t\t\tfor(int i=0; i<lista.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tobjeto = lista.get(i);\r\n\t\t\t\tfields = getFields(objeto.getClass());\r\n\t\t\t\tfor(int j=0; j<fields.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfield = fields[j];\r\n\t\t\t\t\tannotations = getAnnotations(field);\r\n\t\t\t\t\tfor(int k=0; k<annotations.length; k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tannotation = annotations[k];\r\n\t\t\t\t\t\tif(annotation instanceof JoinColumn)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tid = resultSQL.get(i, ((JoinColumn)annotation).name());\r\n\t\t\t\t\t\t\tif(id!=null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfield.setAccessible(true);\r\n\t\t\t\t\t\t\t\tif((classes==null && classesVerifica==CONSIDERAR_CLASSES) || (classes!=null && contem(field.getType(), classes)==consideraIgnora))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tfield.set(objeto, buscaRegistro(baseJDBC, field.getType(), id, profundidade-1, classes, classesVerifica, jaObtidos));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;", "public interface LogNotificacionDao extends GenericDao<LogNotificacion, Integer> {\n}" ]
[ "0.699596", "0.6638656", "0.6570733", "0.65668845", "0.6469174", "0.636244", "0.63609535", "0.63436913", "0.6299133", "0.6275231", "0.6248411", "0.62046176", "0.6192744", "0.6124913", "0.6091818", "0.60542274", "0.6035445", "0.6018121", "0.60092723", "0.59871244", "0.59695387", "0.5961058", "0.59505147", "0.5915022", "0.59029305", "0.58983314", "0.5897709", "0.58954644", "0.58841085", "0.58588195", "0.5842044", "0.58367616", "0.5836517", "0.5819483", "0.5807507", "0.5802136", "0.57982284", "0.5798092", "0.57962567", "0.57897985", "0.57615864", "0.5749162", "0.5731127", "0.5721701", "0.5716811", "0.5713366", "0.570384", "0.5699068", "0.5698951", "0.56982917", "0.5698207", "0.5698097", "0.56973505", "0.56856453", "0.5681136", "0.567922", "0.5670421", "0.56676507", "0.5661226", "0.5645447", "0.5633544", "0.56319994", "0.5627021", "0.56243086", "0.56224054", "0.5618684", "0.56180525", "0.56146705", "0.5606369", "0.5605326", "0.5604317", "0.5594379", "0.5589712", "0.55845046", "0.558397", "0.557656", "0.5575832", "0.55751354", "0.5568807", "0.5561773", "0.5554881", "0.5552642", "0.55523795", "0.55458456", "0.5545011", "0.55386055", "0.5531505", "0.5530737", "0.5523503", "0.55229884", "0.5522332", "0.5521897", "0.55150473", "0.5511997", "0.5511494", "0.55095387", "0.55012417", "0.5498989", "0.54987067", "0.54969627" ]
0.7555637
0
Verifica que no existeixi un tipus amb el mateix nom
public abstract int getTipoByName(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean verificaUnicidadeNome() {\n\t\tif(!EntidadesDAO.existeNome(entidades.getNome())) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "private boolean hasNomeInvalido(String[] n) throws Exception {\n boolean invalido = false;\n for (int i = 0; i < n.length; i++) {\n if (n[i].equals(\"bank\")) {\n invalido = true;\n }\n }\n return invalido;\n }", "private boolean characterDontExist(Account account, String nome) {\r\n for(Dilleyer di : account.characters){\r\n if(di.nome.equals(nome))\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean verificarNombre(String nombreEtiqueta){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n if(this.listaEtiquetas.get(i).getEtiqueta().equals(nombreEtiqueta)){ //Si existe el nombre en la lista de etiquetas\n return true;\n }\n }\n return false;\n }", "private boolean hasErroNome(String nome) {\r\n\t\terroNome.setText(\"\");\r\n\t\terroNome.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\terroNome.setBounds(150, 155, 250, 20);\r\n\t\terroNome.setForeground(Color.RED);\r\n\r\n\t\tif (!Validacao.validaLength(nome)) {\r\n\t\t\terroNome.setText(\"Minimo de 3 caracteres\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse if (!Validacao.isAlfabetico(nome)) {\r\n\t\t\terroNome.setText(\"Nao pode conter Numeros\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse if (!Validacao.validaCompleto(nome)) {\r\n\t\t\terroNome.setText(\"Nome precisa ser Completo\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\terroNome.setText(\"Nome Valido!\");\r\n\t\t\terroNome.setForeground(Color.BLUE);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean hasNomeRepetido(String[] listaNomes) {\n for (int i = 0; i < listaNomes.length; i++) {\n for (int j = 0; j < listaNomes.length; j++) {\n if ((i != j) && (listaNomes[i].equals(listaNomes[j]))) {\n return true;\n }\n }\n }\n\n return false;\n }", "public boolean poistaMatkaNimella(String nimi, String kansio) {\n int pois = -1;\n for (int i = 0; i < matkat.size(); i++) {\n if (nimi.equals(matkat.get(i).getMatkanNimi())) {\n pois = i;\n }\n }\n\n if (pois != -1) {\n matkat.remove(pois);\n File poistettava = new File(kansio + \"/\" + nimi + \".txt\");\n boolean ok = poistettava.delete();\n return true;\n }\n\n return false;\n }", "boolean existe(String nombre);", "private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }", "@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "private boolean comandosNoPermitidos(String comandos){\n \tboolean encontrado = false;\n \tString iniciar = \"INICIAR\".toUpperCase();\n \tString paso = \"paso\".toUpperCase();\n \tString vaciar = \"vaciar\".toUpperCase();\n \tString crearCelula = \"crearCelula\".toUpperCase();\n \tString eliminarCelula = \"eliminarCelula\".toUpperCase();\n\n \t\n \tcomandos = comandos.toUpperCase();\n \tString[] words = comandos.split(\" \");\n \tif(words[0].equals(iniciar)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(paso)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(vaciar)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(crearCelula)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(eliminarCelula)){\n \t\tencontrado = true;\n \t}\n \t\n \treturn encontrado;\n }", "public boolean isTuttaOccupata() {\n\t\tfor (Strada x : stradeConfinanti)\n\t\t\tif (!(x.isOccupata()))\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean comprobarCampos(String dni, String nombre, String apellido, String clave) {\n\t\t\n\n\t\tif (dni.equals(\"\") || nombre.equals(\"\") || apellido.equals(\"\") || clave.equals(\"\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "private void verificaNome() {\r\n\t\thasErroNome(nome.getText());\r\n\t\tisCanSave();\r\n\t}", "boolean checkNoDuplicateFields() {\n\t if (duplicateNames == null | duplicateNames.isEmpty())\n\t return true;\n\t Iterator iter = duplicateNames.iterator();\n\t String names = \"\";\n\t while (iter.hasNext()) {\n\t names = names + iter.next(); \n\t }\n\t cat.error(loc,DUPLICATE_COLUMN_NAMES,new Object[] {names});\n\t return false;\n\t }", "private boolean camposValidos() {\n boolean valido = false;\n\n if (txtInfectados.getText().equals(\"\")\n || txtFecha.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Rellene todos los campos\");\n } else {\n valido = true;\n }\n\n return valido;\n }", "public void verifyToDoNotExist(String todoName) {\n try {\n getLogger().info(\"Verify deleted todo: \" + todoName);\n boolean isExisted = false;\n for (int i = 0; i < eleToDoNameRow.size(); i++) {\n if (todoName.equals(getTextByAttributeValue(eleToDoNameRow.get(i), \"Todo expected not Exist\"))) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Fail: Todo still existed: \" + todoName, LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n isExisted = true;\n }\n }\n if (!isExisted) {\n NXGReports.addStep(\"Todo deleted success\", LogAs.PASSED, null);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "private boolean isUmJogador(String nome) {\n for (int i = 0; i < listaJogadores.size(); i++) {\n Jogador jogador = listaJogadores.get(i);\n\n if (jogador.getNome().equals(nome)) {\n return true;\n }\n\n }\n\n return false;\n }", "@Test\n public void nao_deve_aceitar_descricao_nula() {\n telefone.setDescricao(null);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }", "private boolean validar(String nombre,String direccion, int numero, String estado) {\r\n\t\tif (nombre == null || nombre.equals(\"\") || direccion == null || direccion.equals(\"\") || estado == null || estado == null || numero==0) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n public void labelIsNotWithInvalidPattern() {\n String[] invalidLabels = StringUtil.INVALID_USERNAME;\n for (String label : invalidLabels) {\n propertyIsNot(label, descriptionS, CodeI18N.FIELD_PATTERN_INCORRECT_USERNAME,\n \"label property does not fulfill the username pattern restrictions\");\n }\n }", "private boolean hayCamposVacios() {\r\n\t\tif(nomTextField.getText().isEmpty()\r\n\t\t\t|| claveTextField.getText().isEmpty()\r\n\t\t\t\t|| reingresoTextField.getText().isEmpty()\r\n\t\t\t\t\t|| preguntaTextField.getText().isEmpty()\r\n\t\t\t\t\t\t|| respuestaTextField.getText().isEmpty())\r\n\t\t\treturn true;\t\t\r\n\t\treturn false;\r\n\t}", "@Test\n public void nao_deve_aceitar_descricao_vazia() {\n telefone.setDescricao(EMPTY);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }", "@Test\n\tpublic void testLecturaNombre() {\n\t\tassertTrue(!esquemaReal.getNombrePatron().equals(\"\"));\n\t}", "public boolean Info_repetida(String nombre_archivo, String nombre_dis_peli) {\r\n boolean disponible = true;\r\n String line;\r\n String[] info;\r\n try (BufferedReader br = new BufferedReader(new FileReader(nombre_archivo))) {\r\n while ((line = br.readLine()) != null) {\r\n info = line.split(\";\");\r\n if (info[0].equals(nombre_dis_peli)) {\r\n disponible = false;\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(\"Se despicho\" + ex);\r\n }\r\n return disponible;\r\n }", "public boolean isValid(String Tipo){\n\t\treturn getUnidades() > 0 && getAsignada() == null && getTipo().equals(Tipo);\n\t}", "public void testexisteDescripcion()\n\t{\n\t\tString descripcion = new String(\"admin\");\n\t\tLong id = new Long(\"-1\");\n\t\t\n\t\tBoolean bol = servicio.existeDescripcion(descripcion, id);\n\t\t\tassertEquals(bol.booleanValue(), true);\n\t}", "@Test\n public void testExistenceTestuJedneOsoby() {\n osBeznyMuz = new Osoba(120, 150, Barva.MODRA);\n testJedneOsoby(osBeznyMuz, 120, 150, 70, 140, Barva.MODRA);\n }", "public boolean tieneEmpleados(String text) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t//Se usa para ver cuando se puede eliminar un Dpto.\r\n\t\t//esto es, cuando solo queda su jefe (que siempre\r\n\t\t//está ahí)\r\n\t\treturn this.getEmpleadosDepartamento(text).size()>1;\r\n\t}", "public static boolean ehCampoVazio(JTextField... campos) {\n String vazio = \"\";\n \n for (JTextField c : campos) {\n if (c.getText().equals(vazio)) {\n return true;\n }\n }\n return false;\n }", "@Test\n public void nao_deve_aceitar_descricao_com_caracteres_especiais() {\n telefone.setDescricao(\"celular empresarial: (11)9####-####.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}", "public boolean validarIngresosUsuario_interno(JTextField motivoTF, JTextField detalleTF,\n\t\t\tJTextField montoTF){\n\t\t\n\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\tif(montoTF.getText().length() >30) return false;\n\t\tif(!validarInt(motivoTF.getText())) return false;\n\t\tif(motivoTF.getText().length() >30) return false;\n\t\tif(detalleTF.getText().equals(\"\")) return false;\n\t\tif(detalleTF.getText().length() >100) return false;\n\t\t//if(numero < 0) return false;\n\t\tif(numero_double < 0) return false;\n\t\n\t\treturn true;\n\t}", "public static void checkNonPersonalProperName(Token t) {\r\n\t\tIterator<String> it = WordLists.nonPersonalIdentifierCues().iterator();\r\n\t\t\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tString npic = it.next();\r\n\t\t\t\r\n\t\t\tif(t.getName().equalsIgnoreCase(npic)) {\r\n\t\t\t\tt.getFeatures().setNonPersonalProperName(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testRemovePregunta(){\n\t\tej1.addPregunta(pre);\n\t\tej1.removePregunta(pre);\n\t\tassertFalse(ej1.getPreguntas().contains(pre));\n\t}", "boolean isSetName();", "public boolean hapusdata (String nama){\n return data.delete(nama_table, kolom1+\"=\\\"\"+nama+\"\\\"\",null)>0;\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8) != 0;\n }\n }", "@Test\n\tpublic void testNameExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col2);\n\t\tcol2.setNome(\"Sergio\");\n\t\tboolean result = grupo.nameExistsInGroup(\"Sergio\");\n\n\t\tassertTrue(result);\n\t}", "private boolean noTipoPrimitivo(String tipo) {\r\n\t\tif (tipo.equals(\"arregloBoolean\")|| tipo.equals(\"arregloChar\")|| tipo.equals(\"arregloInt\")|| tipo.equals(\"boolean\")|| \r\n\t\t\t\ttipo.equals(\"char\")|| tipo.equals(\"int\")|| tipo.equals(\"string\")|| tipo.equals(\"void\"))\r\n\t\t\t\treturn false;\r\n\t\telse\r\n\t\t\t\treturn true;\t\r\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_numeros() {\n telefone.setDescricao(random(10, true, true));\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "@Test\n public void testExistNotation(){\n assertFalse(notationService.existNotation(null));\n\n // not existing notation\n assertFalse(notationService.existNotation(epcNotation.getIdentifier() + \"_\"));\n\n assertTrue(notationService.existNotation(epcNotation.getIdentifier()));\n assertTrue(notationService.existNotation(hierarchyNotation.getIdentifier()));\n\n // order doesn't matter\n assertTrue(notationService_reverse.existNotation(epcNotation.getIdentifier()));\n assertTrue(notationService_reverse.existNotation(hierarchyNotation.getIdentifier()));\n\n // empty notation model\n assertFalse(notationService_empty.existNotation(epcNotation.getIdentifier()));\n assertFalse(notationService_empty.existNotation(hierarchyNotation.getIdentifier())); \n }", "private static boolean duplicateSetName(String setName){\n boolean duplicate = false;\n for (Set set : SetManager.getInstance().getSets()) {\n if (set.getName() != null) {\n if (set.getName().equals(setName)) {\n duplicate = true;\n }\n }\n }\n return duplicate;\n }", "public boolean checkNofitication(String titulo, String msg) {\n\t\tString[] campos = new String[] { \"titulo\" };\n\t\tString[] args = new String[] { titulo };\n\n\t\tString[] campos2 = new String[] { \"mensaje\" };\n\t\tString[] args2 = new String[] { msg };\n\n\t\tCursor c = db.query(\"Notificaciones\", campos, \"titulo=?\", args, null,\n\t\t\t\tnull, null);\n\t\tif (c.getCount() <= 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tCursor c2 = db.query(\"Notificaciones\", campos2, \"mensaje=?\", args2,\n\t\t\t\t\tnull, null, null);\n\t\t\tif (c2.getCount() <= 0) {\n\t\t\t\treturn false;\n\t\t\t} else\n\t\t\t\treturn true;\n\t\t}\n\t}", "private boolean propriedadesIguais( Integer pro1, Integer pro2 ){\r\n\t if ( pro2 != null ){\r\n\t\t if ( !pro2.equals( pro1 ) ){\r\n\t\t\t return false;\r\n\t\t }\r\n\t } else if ( pro1 != null ){\r\n\t\t return false;\r\n\t }\r\n\t \r\n\t // Se chegou ate aqui quer dizer que as propriedades sao iguais\r\n\t return true;\r\n\t}", "public static boolean checkEmptyFields(Node... itemToCheck) {\n List<Node> failedFields = new ArrayList<>();\n toolTip.setStyle(\"-fx-background-color: linear-gradient(#FF6B6B , #FFA6A6 );\"\n + \" -fx-font-weight: bold;\");\n hackTooltipStartTiming(toolTip);\n for (Node n : arrayToList(itemToCheck)) {\n // Validate TextFields\n if (n instanceof TextField) {\n TextField textField = (TextField) n;\n textField.textProperty().addListener((ObservableValue<? extends String> observable, String oldValue, String newValue) -> {\n removeToolTipAndBorderColor(textField, toolTip);\n });\n if (textField.getText() == null || textField.getText().trim().equals(\"\")) {\n failedFields.add(n);\n addToolTipAndBorderColor(textField, toolTip);\n } else {\n removeToolTipAndBorderColor(textField, toolTip);\n }\n } // Validate Combo Box\n else if (n instanceof ComboBox) {\n ComboBox comboBox = (ComboBox) n;\n comboBox.valueProperty().addListener((ObservableValue observable, Object oldValue, Object newValue) -> {\n removeToolTipAndBorderColor(comboBox, toolTip);\n });\n if (comboBox.getValue() == null) {\n failedFields.add(n);\n addToolTipAndBorderColor(comboBox, toolTip);\n } else {\n removeToolTipAndBorderColor(comboBox, toolTip);\n }\n } // Validate TextArea\n else if (n instanceof TextArea) {\n TextArea textArea = (TextArea) n;\n textArea.textProperty().addListener((ObservableValue<? extends String> observable, String oldValue, String newValue) -> {\n removeToolTipAndBorderColor(textArea, toolTip);\n });\n if (textArea.getText() == null || textArea.getText().trim().equals(\"\")) {\n failedFields.add(n);\n addToolTipAndBorderColor(textArea, toolTip);\n } else {\n removeToolTipAndBorderColor(textArea, toolTip);\n }\n }\n //ADD YOUR VALIDATION HERE\n //TODO\n }\n\n return failedFields.isEmpty();\n }", "@Test\n public void testGetProductsByName() throws Exception {\n System.out.println(\"getProductsByName\");\n for (Product p : products) {\n prs = dao.getProductsByName(p.getName());\n assertTrue(prs.size() == 1);\n assertTrue(prs.contains(p));\n \n }\n prs = dao.getProductsByName(nonExisten.getName());\n assertTrue(prs.isEmpty());\n }", "public static boolean verificarExistenciaPersona(Personas persona)\n {\n //Este método permite verificar si el usuario a crear es vendedor, comprador o ninguno. Validacion en el main y para el metodo que agrega los tipo de usuario\n ArrayList<Personas> personas = Personas.desserializarPersonas(\"Personas.ser\");\n for(Personas pe: personas)\n {\n if(pe.getCorreoElectronico().equals(persona.getCorreoElectronico()) && pe.getTipo().equals(pe.getTipo()) ) \n \n return true;\n }\n return false;\n }", "private boolean checkAction() {\n if (nodes == null || nodes.length > 1) {\r\n return false;\r\n }\r\n // Emptry node name\r\n if (jtfChildName.getText().isEmpty()) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutName\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n // No parent\r\n if (nodes == null || nodes.length != 1) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutParent\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isNilUniqueName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(UNIQUENAME$10, 0);\r\n if (target == null) return false;\r\n return target.isNil();\r\n }\r\n }", "@Override\n public boolean containsNameCurso(String Curso) {\n try {\n Curso curso = (Curso) this.findByNameCurso(Curso);\n if(Curso.equals(curso.getNombre())){\n return true;\n } ;\n } catch (Exception ex) {\n //Exception Handler\n }\n return false;\n }", "@Test\n public void nao_deve_aceitar_descricao_com_menos_de_15_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "public boolean textVacio(JTextField txtDNI, JPasswordField pwsPass, JTextField txtNom,\n JTextField txtApe, JTextField txtTele, JTextField txtCorreo, JComboBox cbx, JLabel lblMensaje) {\n\n try {\n\n boolean veri = txtDNI.getText().trim().isEmpty() || pwsPass.getText().trim().isEmpty() || txtNom.getText().trim().isEmpty()\n || txtApe.getText().trim().isEmpty() || txtTele.getText().trim().isEmpty() || txtCorreo.getText().trim().isEmpty()\n || cbx.getSelectedIndex() == 0;\n\n if (veri == true) {\n lblMensaje.setText(\"TODOS LOS CAMPOS SON NECESARIOS\".toUpperCase());\n return true;\n } else {\n lblMensaje.setText(\"\".toUpperCase());\n return false;\n }\n } catch (Exception e) {\n System.err.println(\"Erro bro :(\");\n }\n return true;\n }", "private boolean isRenameValid()\n{\n String ntext = rename_field.getText();\n if (!isValidId(ntext)) return false;\n if (ntext.equals(start_name)) return false;\n\n return true;\n}", "public static boolean isNameUnique(int ID, String name) throws IOException {\r\n if (pcQD == null) throw new IOException(\"Can't verify new component\");\r\n for (QuickDic qd : pcQD)\r\n if (qd.getID() != ID && qd.getFirstVal().equalsIgnoreCase(name))\r\n return false;\r\n return true;\r\n }", "private boolean checkData() {\n if (txtMaMay.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(this, \"Mã máy không được để trống!\\n\"\n + \"Quy tắc đặt tên mã máy: số hiệu máy+mã phòng\");\n return false;\n } else if (txtcauhinh.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(this, \"Cấu hình máy không được để trống!\");\n return false;\n } else if (txtTinhtrang.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(this, \"Tình trạng máy không được để trống!\");\n return false;\n } else if (txtphanmem.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(this, \"Mã phòng không được để trống!\");\n return false;\n }\n return true;\n }", "public static boolean isCampoComboboxMultiploInformado(String[] campo) {\r\n\t\tif (isVazioOrNulo(campo)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (campo.length == 1 && !isCampoComboboxInformado(campo[0])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "private static void concretizarAtribuicao(String nome) {\n\t\tif (gestor.atribuirLugar(nome))\n\t\t\tSystem.out.println(\"ATRIBUICAO de lugar a \" + nome);\n\t\telse\n\t\t\tSystem.out.println(\"ERRO: Nao foi possivel atribuir lugar a \" + nome);\n\t}", "public boolean validarNotas() {\n\t\treturn !notas.isEmpty();\n\t}", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "public boolean isSetUniqueName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(UNIQUENAME$10) != 0;\r\n }\r\n }", "private boolean esDeMipropiedad(Casilla casilla){\n boolean encontrado = false;\n \n for(TituloPropiedad propiedad: this.propiedades){\n if(propiedad.getCasilla() == casilla){\n encontrado = true;\n break;\n }\n }\n return encontrado; \n }", "public void noExiste()\n {\n\n AlertDialog.Builder dialogo1 = new AlertDialog.Builder(BuscarLibro.this);\n dialogo1.setTitle(\"Aviso\");\n dialogo1.setMessage(\"No existe ningun libro con esos datos\");\n dialogo1.setCancelable(false);\n dialogo1.setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogo1, int id) {\n\n }\n });\n dialogo1.setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogo1, int id) {\n\n }\n });\n dialogo1.show();\n\n }", "public abstract boolean isNatureExist(long id);", "@Test\n\tpublic void testNoNulos() {\n\t\tassertNotNull(\"Error: La bici es nula\", bicicleta);\n\t\tassertNotNull(\"Error: La velocidad es nula\", bicicleta.getVelocidad());\n\t\tassertNotNull(\"Error: El espacio es nulo\", bicicleta.getEspacioRecorrido());\n\t\tassertNotNull(\"Error: El piñon actual es nulo\", bicicleta.getPinhonactual());\n\t\tassertNotNull(\"Error: El plato actual es nulo\", bicicleta.getPlatoactual());\n\t\tassertNotNull(\"Error: El radio de la rueda es nulo\", bicicleta.getRadiorueda());\n\t}", "public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(NAME$2) != null;\r\n }\r\n }", "boolean isNameRequired();", "public void testExisteProjeto() {\n String nome = \"projetoNaoExistente\";\n assertFalse(ProjetoDAO.existeProjeto(nome));\n }", "public Boolean verificarCaracteres(String nome){\n\n this.resultado = false;\n Pattern pattern = Pattern.compile(\"^[a-zA-Z]*$\");\n Matcher matcher = pattern.matcher(nome);\n\n if(matcher.find()){\n this.resultado = true;\n }\n\n return this.resultado;\n }", "public boolean isTheSame(String titolo, String autore, String desc, String prezzo, String editore, String url, String nCopie){\n return (current.getTitolo().equals(titolo) && current.getAutore().equals(autore) && current.getDescrizione().equals(desc)\n && current.getPrezzo().equals(Double.parseDouble(prezzo)) && current.getEditore().equals(editore) && url.equals(current.getUrl()) && Integer.parseInt(nCopie) == (current.getCopie()));\n }", "@Test\n public void deve_aceitar_descricao_entre_15_e_30_caracteres_valido() {\n telefone.setDescricao(random(20, true, false));\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "@Override\r\n\tpublic boolean existe(String nomeEmpresa) {\n\t\treturn false;\r\n\t}", "private boolean verificarCamposVacios() {\n \n boolean bandera = false; // false = campos no vacios\n \n if(this.jTextFieldDigiteCodigo.getText().equals(\"\") || this.jTextFieldDigiteCodigo.getText().equals(\"Digite Código\"))\n {\n mostrarError(jLabelErrorDigiteCodigo, \"Rellenar este campo\",jTextFieldDigiteCodigo);\n bandera=true;\n }\n return bandera;\n }", "private boolean checkIfExist(int klik, int x, int y){\r\n\t\tif (klik == 1){\r\n\t\t\tif (discTable[x][y].owner != 0 && discTable[x][y].owner <= 2) return true;\r\n\t\t\telse return false;\r\n\t\t}else return false;\r\n\t}", "public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(NAME$0) != 0;\r\n }\r\n }", "@Test(expected = NotExistElementsException.class)\n\tpublic void shouldThrowsNotExistElementsExceptionWhenNotExistElement() \n\t\t\tthrows NotExistElementsException {\n\t\tRandomChoiceUtil.randomChoice(null).name();\n\t}", "private static Sintoma sintomaPorNombre(String nomSintoma) {\n return sintomas.stream().filter(s -> s.getTipo().equalsIgnoreCase(nomSintoma)).findAny().orElse(null);\n }", "private void validateCanDeleteName(long truthSetId) throws NameSystemException {\n DbTruthSet dbTruthSet = getTruthSetDAO().get(truthSetId);\n if (dbTruthSet == null) {\n throw new NameDataException(getMessage(\"name.05.not_found\", truthSetId));\n }\n\n List<DbTruth> dbAttrs = getTruthDAO().getByNameId(truthSetId);\n if (dbAttrs != null && dbAttrs.size() > 0) {\n //TODO: Need log entry to bring up to current logging standard\n throw new NameDataException(getMessage(\"name.06.has_attr\", truthSetId));\n }\n }", "@Test\n public void nao_deve_aceitar_descricao_com_mais_de_30_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "public void exibeMatriculaJaExiste() {\n JOptionPane.showMessageDialog(\n null,\n Constantes.GERENCIAR_FUNCIONARIO_MATRICULA_JA_EXISTENTE,\n Constantes.GERENCIAR_FUNCIONARIO_TITULO,\n JOptionPane.PLAIN_MESSAGE\n );\n }", "private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }", "boolean hasDataName();", "private boolean checkMultipleUnitEdit() {\r\n\t\tboolean flag=false;\r\n\t\tfor(UIUnitType model:uiUnitType.getUnitValueList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "private boolean isMetadataFileExist(String idpName, String metadata) {\n\n return StringUtils.isNotEmpty(idpName) && StringUtils.isNotEmpty(metadata);\n }", "public boolean nouvelleFonction(String fonction, int label, String t) {\n\t \n\t Iterator<TableSymboleFonction> iter = list.iterator(); \n\t \n\t while(iter.hasNext()){\n\t \t\t\n\t \tTableSymboleFonction f = iter.next();\n\t \t\n\t \tif( f.getIdent().equals( fonction ) && f.getType().equals( t ) ){\n\t \t\t\n\t \t\t System.err.println(\"Fonction \\\"\"+ fonction + \"\\\" déjà définie avec type de retour \\\"\" + t +\"\\\".\");\n\t \t\t System.exit(0);\n\t \t\t return false;\n\t \t}\n\t }\n\t \n\t TableSymboleFonction nouvelleFonc = new TableSymboleFonction( fonction , label , t);\n\t list.add( nouvelleFonc );\n\t\treturn true;\n\t \n\t}", "private boolean validarNombre (String nombre){\n Pattern pattern = Pattern.compile(\"[a-zA-Z-ZñÑáéíóúÁÉÍÓÚ]+\\\\s[a-zA-Z-ZñÑáéíóúÁÉÍÓÚ\\\\s]+\");\n if (!nombre.matches(String.valueOf(pattern))){\n errorDu.setText(\"Debe cargar Nombre y Apellido y solo se permiten letras\");\n errorDu.setVisibility(View.VISIBLE);\n\n }\n return nombre.matches(String.valueOf(pattern));\n }", "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "private boolean isNameUnique(String name) {\n boolean isUnique = true;\n for (User user : this.users) {\n if (user.getName().equals(name)) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n }", "private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }", "public boolean verificaDuplicidade(String s) {\n\t\tfor (Compromisso c : this.compromisso) {\n\t\t\tif (c.getDataInicio().equals(s)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean uniqueCheck(Person person){\r\n\t\treturn (housePosition!=person.housePosition) && (color!=person.color) && (nationality!=person.nationality) \r\n\t\t\t\t && (beverage!=person.beverage) && (cigar!=person.cigar) && (pet!=person.pet);\r\n\t}", "private boolean checkFields() {\n boolean test = true;\n if (fname.isEmpty()) {\n test = false;\n }\n if (lname.isEmpty()) {\n test = false;\n }\n if (cin.isEmpty()) {\n test = false;\n }\n if (typeCompte.equals(\"Bancaire\")) {\n if (decouvertNF.isEmpty())\n test = false;\n } else if (typeCompte.equals(\"Epargne\")) {\n if (tauxInteretNF.isEmpty())\n test = false;\n }\n if (s_datePK.getValue() == null) {\n s_datePK.setStyle(\"-fx-border-color:red;-fx-border-radius:3px;-fx-border-size: 1px;\");\n test = false;\n }\n\n return test;\n }", "@Test\n public void shouldReturnEmptyForInvalidCodename()\n {\n assertEquals(0, DatabaseHelper.getCodenamesForClue(\"supercalifragilisticexpialidocious\").length);\n }", "private void checkFileNames(DSpaceRunnable dSpaceRunnable, List<MultipartFile> files) {\n List<String> fileNames = new LinkedList<>();\n for (MultipartFile file : files) {\n String fileName = file.getOriginalFilename();\n if (fileNames.contains(fileName)) {\n throw new UnprocessableEntityException(\"There are two files with the same name: \" + fileName);\n } else {\n fileNames.add(fileName);\n }\n }\n\n List<String> fileNamesFromOptions = dSpaceRunnable.getFileNamesFromInputStreamOptions();\n if (!fileNames.containsAll(fileNamesFromOptions)) {\n throw new UnprocessableEntityException(\"Files given in properties aren't all present in the request\");\n }\n }", "private void checkLabelTextComponentPairs(){\n Iterator i = labelForPointingComponents.iterator();\n while(i.hasNext()){\n Component component = (Component)(i.next());\n Iterator j = labels.iterator();\n \n while(j.hasNext()){\n Component labelFor = ((JLabel)(j.next())).getLabelFor();\n if ((labelFor != null) && (labelFor == component)){\n i.remove();\n break;\n }\n }\n }\n }", "protected boolean sameMissingInputAttributes(Instance inst1,\r\n\t\t\tInstance inst2, InstanceAttributes atts) {\r\n\t\tboolean sameMVs = true;\r\n\r\n\t\tfor (int i = 0; i < atts.getInputNumAttributes() && sameMVs; i++) {\r\n\t\t\tif (inst1.getInputMissingValues(i) != inst2\r\n\t\t\t\t\t.getInputMissingValues(i))\r\n\t\t\t\tsameMVs = false;\r\n\t\t}\r\n\r\n\t\treturn sameMVs;\r\n\t}", "public boolean existUser(String campo1, String campo2);", "private boolean contactHasNoName(String[] attributes, int numAttributes) {\n if (attributes[0].matches(\"\")) {\n return true;\n }\n return false;\n }", "private boolean validTitle(String targetTitle) {\n Query q = new Query(\"Location\").setFilter(new FilterPredicate(\"title\", FilterOperator.EQUAL,\n targetTitle));\n int numOfSameEntities = ds.prepare(q).countEntities();\n return (numOfSameEntities == 0);\n }" ]
[ "0.60486907", "0.6026516", "0.5889424", "0.5740883", "0.5672301", "0.56393254", "0.56189615", "0.560846", "0.56042665", "0.56041175", "0.55753267", "0.5566427", "0.54807615", "0.54401547", "0.54120386", "0.53795594", "0.53591335", "0.5352627", "0.53272647", "0.53233755", "0.53119993", "0.5279243", "0.52748686", "0.52708304", "0.5261284", "0.5247436", "0.52092737", "0.52064264", "0.52008456", "0.51960826", "0.51818323", "0.5176942", "0.5176766", "0.51714134", "0.5161945", "0.5153149", "0.5144788", "0.514353", "0.5140779", "0.51280445", "0.5103665", "0.51030284", "0.509525", "0.5093893", "0.5088924", "0.50875664", "0.50765836", "0.5074255", "0.5072551", "0.5071748", "0.5069616", "0.50683546", "0.50631726", "0.50496787", "0.50472754", "0.50458944", "0.5044372", "0.50400543", "0.50382924", "0.502248", "0.5021618", "0.5021618", "0.5009718", "0.5007349", "0.50067633", "0.4995762", "0.49922723", "0.49918944", "0.49898136", "0.49801388", "0.4976238", "0.49722806", "0.49721617", "0.49699077", "0.49625912", "0.49611276", "0.4958164", "0.49555776", "0.4953761", "0.49476177", "0.49473014", "0.4946798", "0.49442258", "0.4942346", "0.4941198", "0.49398333", "0.4932754", "0.4929125", "0.49287772", "0.4927946", "0.49272633", "0.49222878", "0.49148697", "0.4907736", "0.49076998", "0.49060193", "0.4905054", "0.49018645", "0.48975986", "0.48945716", "0.48929185" ]
0.0
-1
Inserta un tipus d'activitat en la base de dades
public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n\tpublic void add(Activitat activitat) {\r\n\t\tqueryString = \"INSERT INTO\" + ACTIVITATTABLENAME + \" NOM, DESCRIPCIO, DIA, HORA, ESPAI) VALUES(?,?,?,?,?)\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\t\r\n\t\t\ts.setString(0, activitat.getNom());\r\n\t\t\ts.setString(1,activitat.getDescripcio());\r\n\t\t\ts.setDate(2, new java.sql.Date(activitat.getData_realitzacio().getTime()\r\n\t\t\t\t\t.getTime()));\r\n\t\t\ts.setTimestamp(3, new java.sql.Timestamp(activitat.getHora().getTime()));\r\n\t\t\ts.setString(4, activitat.getEspai());\r\n\t\t\t\r\n\t\t\ts.executeUpdate();\r\n\t\t\t\r\n\t\t\ts.close();\r\n\t\t\tconexio.close();\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}\r\n\t\t\r\n\t}", "public void insertEstadisticas(String IdPregunta, Integer validacicion, String co_nivel, String co_categoria){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"co_estudios\", consultarEstudioUltimaId() );\n registro.put(\"co_pregunta\", IdPregunta);\n registro.put(\"co_nivel\", co_nivel);\n registro.put(\"co_categoria\", co_categoria);\n registro.put(\"validacion\", validacicion);\n\n System.out.println( \" ------------- Insert RESPUESTA ------------------\");\n System.out.println( \" IdEstudio \" + validacicion );\n\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estadisticas\", null, registro);\n BasesDeDatos.close();\n\n }", "public static void insertActividad(Actividad actividad) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n int diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin;\n int[] fechaInicio = getFechaInt(actividad.getFechaInicio());\n diaInicio = fechaInicio[0];\n mesInicio = fechaInicio[1];\n anoInicio = fechaInicio[2];\n int[] fechaFin = getFechaInt(actividad.getFechaFin());\n diaFin = fechaFin[0];\n mesFin = fechaFin[1];\n anoFin = fechaFin[2];\n String query = \"INSERT INTO Actividades (login, descripcion, rol, duracionEstimada, diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin, duracionReal, estado, idFase) VALUES ('\"\n + actividad.getLogin() + \"','\"\n + actividad.getDescripcion() + \"','\"\n + actividad.getRolNecesario() + \"',\"\n + actividad.getDuracionEstimada() + \",\"\n + diaInicio + \",\"\n + mesInicio + \",\"\n + anoInicio + \",\"\n + diaFin + \",\"\n + mesFin + \",\"\n + anoFin + \",\"\n + actividad.getDuracionReal() + \",'\"\n + actividad.getEstado() + \"',\"\n + actividad.getIdFase() + \")\";\n try {\n ps = connection.prepareStatement(query);\n ps.executeUpdate();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tpublic void insertar() {\n\t\t\tutilitario.getTablaisFocus().insertar();\n\n\t\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "int insertSelective(Tipologia record);", "public StavkaFaktureInsert() {\n initComponents();\n CBFakture();\n CBProizvod();\n }", "public void inserir(Comentario c);", "void insertSelective(CTipoComprobante record) throws SQLException;", "public void insertar(Trabajo t){\r\n\t\tif(!estaLlena()){\r\n\t\t\tultimo = siguiente(ultimo);\r\n\t\t\telementos[ultimo] = t;\r\n\t\t}\r\n\t}", "public boolean insert(Contribuyente contribuyente){\n return true;\n }", "public void insertEstudio(){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n //Metodo apra almacenar fecha en SQLite\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = sdf.format(new Date());\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"fecha\", date); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n registro.put(\"co_actividad\", \"1\"); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estudios\", null, registro);\n BasesDeDatos.close();\n\n }", "public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "public boolean insert(String pTabla, String pDatos) {\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n //String campos = \"(cod_articulo, descripcion, precio_sin_impuesto, costo_proveedor, activo, existencia)\";\n sentencia = \"INSERT INTO \" + pTabla /*+ campos */+ \" VALUES (\" + pDatos + \");\"; // se crea el insert\n s.execute(sentencia); //\n return true;\n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n return false;\n }\n }", "public int ajouter(Activite activite) {\n\n int rowAffected = super.executeUpdate(String.format(\n \"INSERT INTO activite(nom, detail, dateDebut, dateFin, heureDebut, heureFin)\" +\n \"VALUES ('%s', '%s', '%s', '%s', '%s', '%s')\", \n activite.getNom(), \n activite.getDetail(), \n activite.getDateDebut(),\n activite.getDateFin(),\n activite.getHeureDebut(),\n activite.getHeureFin()\n ));\n\n return rowAffected;\n }", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public long insertActividad(ActividadEntitie actividad){\r\n\t\t\r\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(ActividadTablaEntidad.actividad_codigo, actividad.get_codigoActividad());\r\n\t\tvalues.put(ActividadTablaEntidad.actividad_descripcion, actividad.get_descripcionActividad());\r\n\t\tlong id = this.myDatabase.insert(ActividadTablaEntidad.nombre_tabla, null, values);\r\n\t\t\r\n\t\treturn id;\r\n\t}", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "@Override\n public boolean insert(Transaksi transaksi) {\n try {\n String query = \"INSERT INTO transaksi (id, tgl_transaksi) VALUES (?, ?)\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getId());\n ps.setString(2, transaksi.getTglTransaksi());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "public void insertarTratamiento(String fecha, String tratamiento)\n {\n ContentValues valores = new ContentValues();\n valores.put(\"fecha\",fecha);\n valores.put(\"tipoTratamiento\",tratamiento);\n db.insert(\"tratamiento\",null,valores);\n\n }", "int insert(Tipologia record);", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "void insert(CTipoComprobante record) throws SQLException;", "public void insertarAlimento (int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas, float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}", "private void jBotonAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBotonAgregarActionPerformed\n // TODO add your handling code here:\n if (this.jnombre.getText().length()!=0){ // validar que jnombre no este vacio\n // otro comentario \n String nombre = this.jnombre.getText();\n boolean activo = this.jactivo.isSelected();\n int tipo = 0;\n if (activo==true) {\n tipo=1;\n }\n JOptionPane.showMessageDialog(rootPane, \"Comuna Ingresada\"); // agregar mensaje\n this.jnombre.setText(\"\");\n this.jactivo.isSelected(); // error falta marcar el select ()\n \n Conexion cn = new Conexion();\n cn.InsertarDatos(nombre,tipo);\n \n IniciarTabla();\n \n \n \n \n \n \n } else {\n \n \n JOptionPane.showMessageDialog(rootPane, \"Tiene que ingresar datos\"); // agregar mensaje \n \n \n \n }//GEN-LAST:event_jBotonAgregarActionPerformed\n }", "int insertSelective(AdminTab record);", "public boolean Add() {\n String query = \"INSERT INTO Proveedores(nombre, idContacto, activo) \"\r\n + \"VALUES('\" + nombre + \"',\" + idContacto + \",\" + activo + \");\";\r\n return dataAccess.Execute(query) >= 1;\r\n }", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "@Override\n\tpublic Tutorial insert(Tutorial t) {\n\t\treturn cotizadorRepository.save(t);\n\n\t\t\n\t}", "@Transactional\n\tpublic void insert(UserMtl userMtl,Integer idt){\n\t\tTree pasteT = owsSession.getSourceT();\n\t\tlog.debug(idt);\n\t\tlog.debug(pasteT);\n\t\tinsert(idt,pasteT,idt);\n\t}", "public void insert(taxi ta)throws ClassNotFoundException,SQLException\r\n {\n String taxino=ta.getTaxino();\r\n String drivername=ta.getDrivername();\r\n String driverno=ta.getDriverno();\r\n String taxitype=ta.getTaxitype();\r\n String state=ta.getState();\r\n String priority=ta.getPriority();\r\n connection= dbconnection.createConnection();\r\nString sqlString=\"INSERT INTO taxi (taxino,drivername,driverno,taxitype,state,priority) VALUES ('\"+taxino+\"','\"+drivername+\"','\"+driverno+\"','\"+taxitype+\"','\"+state+\"','\"+priority+\"')\";\r\n PreparedStatement preparedStmt = connection.prepareStatement(sqlString); \r\n preparedStmt.execute(); \r\n connection.close();\r\n \r\n }", "public boolean InsertarInformacionInmueble(String id,String direccion,String lugarReferencia,String tamano, String estrato,String tipo,String habitaciones,String usuario,String precio){\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"insert into inmuebles (direccion,lugarReferencia,tamano,estrato,tipo,habitaciones,idUsuario,precio) values(?,?,?,?,?,?,?,?)\");\n\t\t\tstatement.setString(1, direccion);\n\t\t\tstatement.setString(2, lugarReferencia);\n\t\t\tstatement.setInt(3, Integer.parseInt(tamano));\n\t\t\tstatement.setInt(4, Integer.parseInt(estrato));\n\t\t\tstatement.setString(5, tipo);\n\t\t\tstatement.setInt(6, Integer.parseInt(habitaciones));\n\t\t\tstatement.setString(7, usuario);\n\t\t\tstatement.setInt(8, Integer.parseInt(precio));\n\t\t\tstatement.execute();\n\t\t\tstatement.close();\n\t\t\treturn true;\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception);\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean insert(Vacante vacante) {\n try {\n //Variable que lleva la sentencia SQL\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n String sql = \"INSERT INTO vacante VALUES(?,?,?,?,?)\";\n //Permite ejecutar una sentencia SQL\n PreparedStatement ps = conn.getConnection().prepareStatement(sql);\n ps.setInt(1, vacante.getId());\n ps.setString(2, format.format(vacante.getFechaPublicacion()));\n ps.setString(3, vacante.getNombre());\n ps.setString(5, vacante.getDetalle());\n ps.setString(4, vacante.getDescripcion());\n ps.executeUpdate();\n return true;\n\n } catch (Exception e) {\n System.out.println(\"Error VacanteDao.insert\" + e.getMessage());\n return false;\n }\n\n }", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "int insertSelective(ParUsuarios record);", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "public void insertDB() {\n sql = \"Insert into Order (OrderID, CustomerID, Status) VALUES ('\"+getCustomerID()+\"','\"+getCustomerID()+\"', '\"+getStatus()+\"')\";\n db.insertDB(sql);\n \n }", "public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\n }", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "public boolean insertAdministrador(int id,int idEscuela,String nombre){\n boolean retorno = false;\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"IDADMIN\",id);\n contentValues.put(\"IDESCUELA\",idEscuela);\n contentValues.put(\"NOMADMIN\",nombre);\n long resul = db.insert(\"ADMINISTRADOR\",null,contentValues);\n db.close();\n if (resul ==-1){\n retorno=false;\n }else{\n retorno=true;\n }\n return retorno;\n }", "public void insertarPlanDieta(int id_plan_de_dieta, int caloria_max_diarias, Date fecha_Inicio, Date Fecha_fin, int n_comidas_diarias,int id_paciente,int id_nutricionista);", "int insertSelective(Movimiento record);", "private void insertaTS(String sToken, int sTipo) {\n tSimbolos[tabla_idx] = new TablaSimbolos(sToken, sTipo, 1);\n tabla_idx++;\n }", "void insertSelective(CTipoPersona record) throws SQLException;", "@PrePersist\n void preInsert() {\n this.isActive = true;\n }", "int insertSelective(ActActivityRegister record);", "public void processInsertar() {\n }", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "public void ajouter(Etudiant t) {\n\t\tdao.ajouter(t);\r\n\t}", "public void insertInfo(editUserSetGet eu);", "private void InsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_InsertActionPerformed\n try{\n if(isEmpty())\n throw new Exception(\"Introdu toate datele!\");\n\n // if phone is frequency dont insert\n if(isExitsPhone())\n throw new Exception(\"Eroare nr telefon!\");\n\n boolean ok = insert();\n if(ok){\n Vector data = getData(\"\");\n showData(data);\n } else\n throw new Exception(\"Eroare la inserare!\");\n\n }catch(Exception e){\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }", "@Override\n\tpublic void ajouter(Zone t) {\n\t\ttry {\n\t\t\t //preparation de la requete\n\t\t\tString sql=\"INSERT into zone (lieu,frequence,id_chaine) values(?, ?,?)\";\n\t\t\tPreparedStatement pst=Con.prepareStatement(sql);\n\t\t\t//transmission des valeurs aux parametres de la requete\n\t\t\tpst.setString(1,t.getLieu());\n\t\t\tpst.setString(2,t.getFrequence());\n\t\t\tpst.setInt(3, t.getChaine().getId_chaine());\n\t\t\t//execussion de la requete\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"zone ajoutees \");\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\tSystem.out.println(\"Probleme de driver ou connection avec la BD\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "void insertSelective(Disproduct record);", "void setInsertableMode(boolean b) {\n this.setInsertMode(b);\n }", "private void insertar(String nombre, String edad) {\n\n BDAdapter db = new BDAdapter(this);\n db.abrirBD();\n\n boolean guardado = db.insertarContacto(nombre, edad);\n\n //Si se ha guardado bien reseteamos los eddittext, sino mostramos un error\n if (guardado) {\n\n edtNombre.setText(\"\");\n edtEdad.setText(\"\");\n\n Toast.makeText(this, \"Guardado con éxito\", Toast.LENGTH_SHORT).show();\n\n } else {\n\n Toast.makeText(this, \"No se puede guardar\", Toast.LENGTH_SHORT).show();\n\n }\n\n db.cerrarBD();\n\n }", "public void agregaAntNoPato(String id_antNP, String religion_antNP, String lugarNaci_antNP, String estaCivil_antNP, \n String escolaridad_antNP, String higiene_antNP, String actividadFisica_antNP, int frecuencia_antNP, \n String sexualidad_antNP, int numParejas_antNP, String sangre_antNP, String alimentacion_antNP, String id_paciente,\n boolean escoCompInco_antNP, String frecVeces_antNP, Connection conex){\n String sqlst = \"INSERT INTO antnopato\\n \"+\n \"(`id_antNP`,\\n\" +\n \"`religion_antNP`,\\n\" +\n \"`lugarNaci_antNP`,\\n\" +\n \"`estaCivil_antNP`,\\n\" +\n \"`escolaridad_antNP`,\\n\" +\n \"`higiene_antNP`,\\n\" +\n \"`actividadFisica_antNP`,\\n\" +\n \"`frecuencia_antNP`,\\n\" +\n \"`sexualidad_antNP`,\\n\" +\n \"`numParejas_antNP`,\\n\" +\n \"`sangre_antNP`,\\n\" +\n \"`alimentacion_antNP`,\\n\" +\n \"`id_paciente`,\\n\"+\n \"`escoCompInco_antNP`,\\n\"+\n \"`frecVeces_antNP`)\\n\"+\n \"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n try(PreparedStatement sttm = conex.prepareStatement(sqlst)) {\n conex.setAutoCommit(false);\n sttm.setString (1, id_antNP);\n sttm.setString (2, religion_antNP);\n sttm.setString (3, lugarNaci_antNP);\n sttm.setString (4, estaCivil_antNP);\n sttm.setString (5, escolaridad_antNP);\n sttm.setString (6, higiene_antNP);\n sttm.setString (7, actividadFisica_antNP);\n sttm.setInt (8, frecuencia_antNP);\n sttm.setString (9, sexualidad_antNP);\n sttm.setInt (10, numParejas_antNP);\n sttm.setString (11, sangre_antNP);\n sttm.setString (12, alimentacion_antNP);\n sttm.setString (13, id_paciente);\n sttm.setBoolean (14, escoCompInco_antNP);\n sttm.setString (15, frecVeces_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos han sido guardados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public boolean insert(Panier nouveau) {\n\t\treturn false;\r\n\t}", "int insertSelective(Prueba record);", "public void crear(Tarea t) {\n t.saveIt();\n }", "@Insert(onConflict = OnConflictStrategy.IGNORE)\n void insert(DataTugas dataTugas);", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Override\r\n\tpublic String insert() {\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doSave(admin)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"²åÈë\");\r\n\t\treturn SUCCESS;\r\n\t}", "public static void InsertarAutos(Session sesion){\n String[] colores = \"rojo,azul,amarillo,rojo,azul,verde\".split(\",\");\n String[] marca = \"peugeot,mazda,mercedes,fiat,ford,audi\".split(\",\");\n String[] modelo = \"308,tornado,1114,siena,fiesta,tt\".split(\",\");\n String[] precio = \"100000,100000,1000,1000,1000,10000\".split(\",\");\n \n Transaction tx = sesion.beginTransaction();\n \n for (int i = 0; i < colores.length; i++) {\n Autos auto = new Autos();\n auto.setColor(colores[i]);\n auto.setConcesionario(\"1\");\n auto.setMarca(marca[i]);\n auto.setModelo(modelo[i]);\n sesion.save(auto);\n }\n \n tx.commit();\n }", "@Override\n\tpublic void insertTask(DetailedTask dt) throws SQLException, ClassNotFoundException\n\t{\n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t\t Statement stmt = null;\n\t\t \n\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t\t c.setAutoCommit(false);\n\t\t \n\t\t logger.info(\"Opened database successfully (insertTask)\");\n\n\t\t stmt = c.createStatement();\n\t\t String sql = \"INSERT INTO task (status, id, description, strasse, plz, ort, latitude, longitude,\"\n\t\t + \" typ, information, auftragsfrist, eingangsdatum, items, hilfsmittel, images) \"\n\t\t + \"VALUES ('\"+dt.getStatus()+\"', \"+dt.getId()+\", '\"+dt.getDescription()+\"', '\"\n\t\t +dt.getStrasse()+\"', \"+dt.getPlz()+\", '\"+dt.getOrt()+\"', \"+dt.getLatitude()+\", \"\n\t\t +dt.getLongitude()+\", '\"+dt.getType()+\"', '\"+dt.getInformation()+\"', \"+dt.getAuftragsfrist()\n\t\t +\", \"+dt.getEingangsdatum()+\", '\"+gson.toJson(dt.getItems())+\"', '\"\n\t\t +gson.toJson(dt.getHilfsmittel())+\"', '\"+dt.getImages()+\"' );\";\n\n\t\t stmt.executeUpdate(sql);\n\n\t\t stmt.close();\n\t\t c.commit();\n\t\t c.close();\n\t\t \n\t\t logger.info(\"Task inserted successfully\");\n\t }", "public void registrarClasificacion() {\n Clasificacion clasifi;\n Estado estado;\n // clasifi = data.getClasificaList().get(numClasif);\n // estado = data.getEstadoList().get(numEstado);\n\n /*Toast.makeText(this, \"REG-\" + numClasif,\n Toast.LENGTH_SHORT).show();\n System.out.println(\"REG-\" + numEstado);*/\n\n\n AdmSQLiteOpenHelper admin = new AdmSQLiteOpenHelper(this.context);\n\n try {\n admin.createDataBase();\n //admin.openDataBase();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // \"lesvena3\", null, 1)\n //AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(this,\n // \"lesvena3\", null, 1);\n SQLiteDatabase bd = admin.getWritableDatabase();\n /* String cod = et3_comun.getText().toString();\n String descri = et4_cientifico.getText().toString();\n String pre = et7_descripcion.getText().toString();\n String est = et8_estado.getText().toString();*/\n\n // Estado estado = new Estado();\n //Clasificacion clasifica = new Clasificacion();\n/* estado.setEstado(est);\n clasifica.setNombre_comun(cod);\n clasifica.setNombre_cientifico(descri);\n clasifica.setDescripcion(pre);\n data.setEstado(estado);\n data.setClasifica(clasifica);\n */\n\n ContentValues registro = new ContentValues();\n //registro.put(\"id\", 2);\n registro.put(\"nombre_comun\", \"FLOR\");\n registro.put(\"nombre_cientifico\", \"silvestre\");\n registro.put(\"descripcion\", \"AMARI\");\n bd.insert(\"clasificacion\", null, registro);\n bd.close();\n /* et3_comun.setText(\"\");\n et4_cientifico.setText(\"\");\n et7_descripcion.setText(\"\");\n et8_estado.setText(\"\");*/\n Toast.makeText(this.context, \"Se cargaron los datos de Clasificacion\",\n Toast.LENGTH_SHORT).show();\n/*\n Intent k = new Intent(this, Summary.class);\n startActivity(k);\n */\n }", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void insertConsultoraNivel1(ConsultoraNivel1 consultoraNivel1);", "public void add(Instalacion t) {\n if (instalaciones.get(t.getId()) == null) {\n this.instalaciones.save(t);\n }\n }", "private void inseredados() {\n // Insert Funcionários\n\n FuncionarioDAO daoF = new FuncionarioDAO();\n Funcionario func1 = new Funcionario();\n func1.setCpf(\"08654683970\");\n func1.setDataNasc(new Date(\"27/04/1992\"));\n func1.setEstadoCivil(\"Solteiro\");\n func1.setFuncao(\"Garcom\");\n func1.setNome(\"Eduardo Kempf\");\n func1.setRg(\"10.538.191-3\");\n func1.setSalario(1000);\n daoF.persisteObjeto(func1);\n\n Funcionario func2 = new Funcionario();\n func2.setCpf(\"08731628974\");\n func2.setDataNasc(new Date(\"21/08/1992\"));\n func2.setEstadoCivil(\"Solteira\");\n func2.setFuncao(\"Caixa\");\n func2.setNome(\"Juliana Iora\");\n func2.setRg(\"10.550.749-6\");\n func2.setSalario(1200);\n daoF.persisteObjeto(func2);\n\n Funcionario func3 = new Funcionario();\n func3.setCpf(\"08731628974\");\n func3.setDataNasc(new Date(\"03/05/1989\"));\n func3.setEstadoCivil(\"Solteiro\");\n func3.setFuncao(\"Gerente\");\n func3.setNome(\"joão da Silva\");\n func3.setRg(\"05.480.749-2\");\n func3.setSalario(3000);\n daoF.persisteObjeto(func3);\n\n Funcionario func4 = new Funcionario();\n func4.setCpf(\"01048437990\");\n func4.setDataNasc(new Date(\"13/04/1988\"));\n func4.setEstadoCivil(\"Solteiro\");\n func4.setFuncao(\"Garçon\");\n func4.setNome(\"Luiz Fernandodos Santos\");\n func4.setRg(\"9.777.688-1\");\n func4.setSalario(1000);\n daoF.persisteObjeto(func4);\n\n TransactionManager.beginTransaction();\n Funcionario func5 = new Funcionario();\n func5.setCpf(\"01048437990\");\n func5.setDataNasc(new Date(\"13/04/1978\"));\n func5.setEstadoCivil(\"Casada\");\n func5.setFuncao(\"Cozinheira\");\n func5.setNome(\"Sofia Gomes\");\n func5.setRg(\"3.757.688-8\");\n func5.setSalario(1500);\n daoF.persisteObjeto(func5);\n\n // Insert Bebidas\n BebidaDAO daoB = new BebidaDAO();\n Bebida bebi1 = new Bebida();\n bebi1.setNome(\"Coca Cola\");\n bebi1.setPreco(3.25);\n bebi1.setQtde(1000);\n bebi1.setTipo(\"Refrigerante\");\n bebi1.setDataValidade(new Date(\"27/04/2014\"));\n daoB.persisteObjeto(bebi1);\n\n Bebida bebi2 = new Bebida();\n bebi2.setNome(\"Cerveja\");\n bebi2.setPreco(4.80);\n bebi2.setQtde(1000);\n bebi2.setTipo(\"Alcoolica\");\n bebi2.setDataValidade(new Date(\"27/11/2013\"));\n daoB.persisteObjeto(bebi2);\n\n Bebida bebi3 = new Bebida();\n bebi3.setNome(\"Guaraná Antatica\");\n bebi3.setPreco(3.25);\n bebi3.setQtde(800);\n bebi3.setTipo(\"Refrigerante\");\n bebi3.setDataValidade(new Date(\"27/02/2014\"));\n daoB.persisteObjeto(bebi3);\n\n Bebida bebi4 = new Bebida();\n bebi4.setNome(\"Água com gás\");\n bebi4.setPreco(2.75);\n bebi4.setQtde(500);\n bebi4.setTipo(\"Refrigerante\");\n bebi4.setDataValidade(new Date(\"27/08/2013\"));\n daoB.persisteObjeto(bebi4);\n\n Bebida bebi5 = new Bebida();\n bebi5.setNome(\"Whisky\");\n bebi5.setPreco(3.25);\n bebi5.setQtde(1000);\n bebi5.setTipo(\"Alcoolica\");\n bebi5.setDataValidade(new Date(\"03/05/2016\"));\n daoB.persisteObjeto(bebi5);\n\n // Insert Comidas\n ComidaDAO daoC = new ComidaDAO();\n Comida comi1 = new Comida();\n comi1.setNome(\"Batata\");\n comi1.setQuantidade(30);\n comi1.setTipo(\"Kilograma\");\n comi1.setDataValidade(new Date(\"27/04/2013\"));\n daoC.persisteObjeto(comi1);\n\n Comida comi2 = new Comida();\n comi2.setNome(\"Frango\");\n comi2.setQuantidade(15);\n comi2.setTipo(\"Kilograma\");\n comi2.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi2);\n\n Comida comi3 = new Comida();\n comi3.setNome(\"Mussarela\");\n comi3.setQuantidade(15000);\n comi3.setTipo(\"Grama\");\n comi3.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi3);\n\n Comida comi4 = new Comida();\n comi4.setNome(\"Presunto\");\n comi4.setQuantidade(10000);\n comi4.setTipo(\"Grama\");\n comi4.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi4);\n\n Comida comi5 = new Comida();\n comi5.setNome(\"Bife\");\n comi5.setQuantidade(25);\n comi5.setTipo(\"Kilograma\");\n comi5.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi5);\n\n\n // Insert Mesas\n MesaDAO daoM = new MesaDAO();\n Mesa mes1 = new Mesa();\n mes1.setCapacidade(4);\n mes1.setStatus(true);\n daoM.persisteObjeto(mes1);\n\n Mesa mes2 = new Mesa();\n mes2.setCapacidade(4);\n mes2.setStatus(true);\n daoM.persisteObjeto(mes2);\n\n Mesa mes3 = new Mesa();\n mes3.setCapacidade(6);\n mes3.setStatus(true);\n daoM.persisteObjeto(mes3);\n\n Mesa mes4 = new Mesa();\n mes4.setCapacidade(6);\n mes4.setStatus(true);\n daoM.persisteObjeto(mes4);\n\n Mesa mes5 = new Mesa();\n mes5.setCapacidade(8);\n mes5.setStatus(true);\n daoM.persisteObjeto(mes5);\n\n // Insert Pratos\n PratoDAO daoPr = new PratoDAO();\n Prato prat1 = new Prato();\n List<Comida> comI = new ArrayList<Comida>();\n comI.add(comi1);\n prat1.setNome(\"Porção de Batata\");\n prat1.setIngredientes(comI);\n prat1.setQuantidadePorcoes(3);\n prat1.setPreco(13.00);\n daoPr.persisteObjeto(prat1);\n\n Prato prat2 = new Prato();\n List<Comida> comII = new ArrayList<Comida>();\n comII.add(comi2);\n prat2.setNome(\"Porção de Frango\");\n prat2.setIngredientes(comII);\n prat2.setQuantidadePorcoes(5);\n prat2.setPreco(16.00);\n daoPr.persisteObjeto(prat2);\n\n Prato prat3 = new Prato();\n List<Comida> comIII = new ArrayList<Comida>();\n comIII.add(comi1);\n comIII.add(comi3);\n comIII.add(comi4);\n prat3.setNome(\"Batata Recheada\");\n prat3.setIngredientes(comIII);\n prat3.setQuantidadePorcoes(3);\n prat3.setPreco(13.00);\n daoPr.persisteObjeto(prat3);\n\n Prato prat4 = new Prato();\n List<Comida> comIV = new ArrayList<Comida>();\n comIV.add(comi2);\n comIV.add(comi3);\n comIV.add(comi4);\n prat4.setNome(\"Lanche\");\n prat4.setIngredientes(comIV);\n prat4.setQuantidadePorcoes(3);\n prat4.setPreco(13.00);\n daoPr.persisteObjeto(prat4);\n\n Prato prat5 = new Prato();\n prat5.setNome(\"Porção especial\");\n List<Comida> comV = new ArrayList<Comida>();\n comV.add(comi1);\n comV.add(comi3);\n comV.add(comi4);\n prat5.setIngredientes(comV);\n prat5.setQuantidadePorcoes(3);\n prat5.setPreco(13.00);\n daoPr.persisteObjeto(prat5);\n\n // Insert Pedidos Bebidas\n PedidoBebidaDAO daoPB = new PedidoBebidaDAO();\n PedidoBebida pb1 = new PedidoBebida();\n pb1.setPago(false);\n List<Bebida> bebI = new ArrayList<Bebida>();\n bebI.add(bebi1);\n bebI.add(bebi2);\n pb1.setBebidas(bebI);\n pb1.setIdFuncionario(func5);\n pb1.setIdMesa(mes5);\n daoPB.persisteObjeto(pb1);\n\n PedidoBebida pb2 = new PedidoBebida();\n pb2.setPago(false);\n List<Bebida> bebII = new ArrayList<Bebida>();\n bebII.add(bebi1);\n bebII.add(bebi4);\n pb2.setBebidas(bebII);\n pb2.setIdFuncionario(func4);\n pb2.setIdMesa(mes4);\n daoPB.persisteObjeto(pb2);\n\n TransactionManager.beginTransaction();\n PedidoBebida pb3 = new PedidoBebida();\n pb3.setPago(false);\n List<Bebida> bebIII = new ArrayList<Bebida>();\n bebIII.add(bebi2);\n bebIII.add(bebi3);\n pb3.setBebidas(bebIII);\n pb3.setIdFuncionario(func2);\n pb3.setIdMesa(mes2);\n daoPB.persisteObjeto(pb3);\n\n PedidoBebida pb4 = new PedidoBebida();\n pb4.setPago(false);\n List<Bebida> bebIV = new ArrayList<Bebida>();\n bebIV.add(bebi2);\n bebIV.add(bebi5);\n pb4.setBebidas(bebIV);\n pb4.setIdFuncionario(func3);\n pb4.setIdMesa(mes3);\n daoPB.persisteObjeto(pb4);\n\n PedidoBebida pb5 = new PedidoBebida();\n pb5.setPago(false);\n List<Bebida> bebV = new ArrayList<Bebida>();\n bebV.add(bebi1);\n bebV.add(bebi2);\n bebV.add(bebi3);\n pb5.setBebidas(bebV);\n pb5.setIdFuncionario(func1);\n pb5.setIdMesa(mes5);\n daoPB.persisteObjeto(pb5);\n\n // Insert Pedidos Pratos\n PedidoPratoDAO daoPP = new PedidoPratoDAO();\n PedidoPrato pp1 = new PedidoPrato();\n pp1.setPago(false);\n List<Prato> praI = new ArrayList<Prato>();\n praI.add(prat1);\n praI.add(prat2);\n praI.add(prat3);\n pp1.setPratos(praI);\n pp1.setIdFuncionario(func5);\n pp1.setIdMesa(mes5);\n daoPP.persisteObjeto(pp1);\n\n PedidoPrato pp2 = new PedidoPrato();\n pp2.setPago(false);\n List<Prato> praII = new ArrayList<Prato>();\n praII.add(prat1);\n praII.add(prat3);\n pp2.setPratos(praII);\n pp2.setIdFuncionario(func4);\n pp2.setIdMesa(mes4);\n daoPP.persisteObjeto(pp2);\n\n PedidoPrato pp3 = new PedidoPrato();\n pp3.setPago(false);\n List<Prato> praIII = new ArrayList<Prato>();\n praIII.add(prat1);\n praIII.add(prat2);\n pp3.setPratos(praIII);\n pp3.setIdFuncionario(func2);\n pp3.setIdMesa(mes2);\n daoPP.persisteObjeto(pp3);\n\n PedidoPrato pp4 = new PedidoPrato();\n pp4.setPago(false);\n List<Prato> praIV = new ArrayList<Prato>();\n praIV.add(prat1);\n praIV.add(prat3);\n pp4.setPratos(praIV);\n pp4.setIdFuncionario(func3);\n pp4.setIdMesa(mes3);\n daoPP.persisteObjeto(pp4);\n\n PedidoPrato pp5 = new PedidoPrato();\n pp5.setPago(false);\n List<Prato> praV = new ArrayList<Prato>();\n praV.add(prat1);\n praV.add(prat2);\n praV.add(prat3);\n praV.add(prat4);\n pp5.setPratos(praV);\n pp5.setIdFuncionario(func1);\n pp5.setIdMesa(mes5);\n daoPP.persisteObjeto(pp5);\n\n }", "public TipoPk insert(Tipo dto) throws TipoDaoException;", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "int insertSelective(UserTips record);", "@FXML\n private void guardarNuevaTarea(ActionEvent event) {\n String asignadoA = usuario.getUsuario();\n if (asignarComboBox.getSelectionModel().getSelectedItem().equals(\"otro usuario\")) {\n asignadoA = asignadoFX.getText();\n }\n String porcentaje = labelPorcentaje.getText().replace(\" %\", \"\");\n\n Tarea nuevaTarea = new Tarea(tituloFX.getText(), descripcionFX.getText(), prioridadFX.getValue(),\n estadoFX.getValue(), usuario.getUsuario(), asignadoA, Integer.parseInt(porcentaje));\n\n Connection con = Conexion.conectar(\"gestortareas\", \"proyecto\", \"proyecto\");\n try {\n PreparedStatement consulta = con.prepareStatement(\"INSERT INTO Tareas(Titulo, Descripcion, Prioridad, Estado, Creador, Asignacion, Progreso) \"\n + \"VALUES(?, ?, ?, ?, ?, ?, ?);\", Statement.RETURN_GENERATED_KEYS);\n consulta.setString(1, nuevaTarea.getTitulo());\n consulta.setString(2, nuevaTarea.getDescripcion());\n consulta.setString(3, nuevaTarea.getPrioridad());\n consulta.setString(4, nuevaTarea.getEstado());\n consulta.setString(5, nuevaTarea.getCreador());\n consulta.setString(6, nuevaTarea.getAsignacion());\n consulta.setInt(7, nuevaTarea.getProgreso());\n consulta.executeUpdate();\n // Se obtiene la clave generada por la base de datos\n ResultSet rs = consulta.getGeneratedKeys();\n rs.next();\n int codigo = rs.getInt(1);\n\n // Se envía la nueva tarea a la ventana de tareas para actualizar la tabla\n ventana.anyadirTareaTabla(nuevaTarea);\n\n Stage stage = (Stage) buttonGuardar.getScene().getWindow();\n stage.close();\n } catch (SQLException e) {\n Dialogo.error(\"Error\", null, \"Error al insertar en la base de datos.\");\n }\n Conexion.desconectar(con);\n }", "int insert(AdminTab record);", "public TblActividadUbicacion() {\r\n }", "@Override\n\tpublic void insert(Categoria cat) throws SQLException {\n\t\t\n\t}", "public boolean insertar(vpoliza dts) {\r\n sSql = \"INSERT INTO poliza\\n\"\r\n + \"(monto_total,fecha_inicio, fecha_venc, cliente_vehiculo_chapaId) \\n\"\r\n + \"VALUES\\n\"\r\n + \"(?,?,?,?);\";\r\n try {\r\n PreparedStatement pst = cn.prepareStatement(sSql);\r\n /*Se crea un objeto pst del tipo PreparedStatement (prepara la consulta sql)\r\n para insertar los datos en la base de datos mediante insert into*/\r\n pst.setInt(1, dts.getMonto_total());\r\n pst.setDate(2, dts.getFecha_inicio());\r\n pst.setDate(3, dts.getFecha_venc());\r\n \r\n pst.setString(4, dts.getCliente_vehiculo_chapaId());\r\n \r\n int n = pst.executeUpdate();\r\n \r\n if (n != 0) {\r\n return true;\r\n }\r\n return false;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n JOptionPane.showMessageDialog(null, \"LO SENTIMOS HA OCURRIDO UN ERROR >> \" + ex + \" <<\");\r\n return false;\r\n }\r\n }", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "private void populaFaixaEtariaCat()\n {\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Até 15 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 16 a 19 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 20 a 30 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 31 a 45 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 46 a 60 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Mais de 60 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Todas as idades\"));\n\n }", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "public void inserirLigas() throws SQLException {\n observableListLigas = FXCollections.observableArrayList(ligas);\n selecionarLiga.setItems(observableListLigas);\n \n }", "public void addAnzeige(Anzeige anzeigeToAdd) throws StoreException {\n \r\n \t try {\r\n PreparedStatement preparedStatement = connection\r\n .prepareStatement(\"insert into Dbp71.Anzeige (titel, text, preis, ersteller, status) values (?,?,?,?,?)\");\r\n \t\t\r\n //preparedStatement.setInt(1, anzeigeToAdd.getId_Anzeige());\r\n preparedStatement.setString(1, anzeigeToAdd.getTitel());\r\n preparedStatement.setString(2, anzeigeToAdd.getText());\r\n preparedStatement.setBigDecimal(3, BigDecimal.valueOf(anzeigeToAdd.getPreis()));\r\n // preparedStatement.setString(5, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(4, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(5, anzeigeToAdd.getStatus());\r\n System.out.println(anzeigeToAdd.getTitel()+ anzeigeToAdd.getText()+ BigDecimal.valueOf(anzeigeToAdd.getPreis())\r\n + anzeigeToAdd.getErsteller()+ anzeigeToAdd.getErsteller()+ anzeigeToAdd.getStatus());\r\n preparedStatement.executeUpdate();\r\n \r\n \r\n }\r\n catch (SQLException e) {\r\n throw new StoreException(e);\r\n }\r\n }", "public void insereFim(TinfoTransicao item) {\t\t\n\t\tTnodoTransicao novo = new TnodoTransicao(item);\n\t\tnovo.proximo = this.ultimo.proximo;\n\t\tthis.ultimo.proximo = novo;\n\t\tthis.ultimo = novo;\t\n\t}", "public void insertOption(Opcion o){\n\t\topciones.persist(o);\n\t}", "private void insertOrUpdateItem(){\n Toaster toaster = new Toaster(getContext());\n DBManager dbManager = new DBManager(getContext());\n if((Afegir.getText() == getText(R.string.actualitza) && updateItem(dbManager)) ||\n (Afegir.getText() == getText(R.string.afegir) && insertItem(dbManager))){\n\n ((MainActivity) getActivity()).swapFrameLayoutVisibility(true);\n ((MainActivity) getActivity()).refreshListView();\n toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.commit_insert).toString(), null);\n reset(true);\n }\n\n else toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.reboke_action).toString(), getContext().getDrawable(R.drawable.ic_error_vector));\n }", "protected String createInsert(T t) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"INSERT INTO \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" VALUES \");\n\t\treturn sb.toString();\n\t}", "@Override\n\tpublic void insert(Unidade obj) {\n\n\t}", "int insertSelective(Tourst record);", "public boolean ADDCHEDTransact(CHEDTransact trans) {\n query = \"INSERT INTO transact(NumberO)\";\n try {\n ps = con.prepareStatement(query);\n\n java.util.Date dateP = trans.getiTDate();\n\n Date dateSigned = new Date(dateP.getYear(), dateP.getMonth(), dateP.getDay());\n\n ps.setInt(1, trans.getNumberOFTrees());\n ps.setString(2, trans.getLotNumber());\n ps.setString(3, trans.getiTvoucher());\n ps.setString(4, trans.gettRvoucher());\n ps.setDate(5, dateSigned);\n ps.setFloat(6, trans.getAmountPayable());\n\n if (ps.executeUpdate() != 0) {\n status = true;\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(FarmerManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return status;\n }", "@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}", "@Override\n @Transactional(readOnly = false)\n public void insertar(DycpCompensacionDTO dycpCompensacionDTO, boolean regAut) throws SIATException {\n try {\n jdbcTemplateDYC.update(null != dycpCompensacionDTO.getFechaInicioTramite() ? SQLOracleDyC.INSERTAR_CASOCOMPENSACION.toString() :\n SQLOracleDyC.INSERTAR_CASOCOMPENSACION1.toString(), getDatosCompensacion(dycpCompensacionDTO, regAut));\n log.info(\"Se guardo en dycp_compensacion : \" + dycpCompensacionDTO.getDycpServicioDTO().getNumControl());\n } catch (DataAccessException siatE) {\n log.error(ConstantesDyC1.TEXTO_1_ERROR_DAO + siatE.getMessage() + ConstantesDyC1.TEXTO_2_ERROR_DAO +\n SQLOracleDyC.INSERTAR_CASOCOMPENSACION + ConstantesDyC1.TEXTO_3_ERROR_DAO +\n dycpCompensacionDTO.getNumControl() );\n throw new SIATException(siatE);\n }\n }", "public void insertFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);", "public static void altaEstructura(int cantidad, boolean activo, String version, int idProducto, int idArticulo) {\n String sql = Queries.ESTRUCTURA_ALTAESTRUCTURA;\n sql = sql.replaceAll(\"CANT\", String.valueOf(cantidad));\n sql = sql.replaceAll(\"ACT\", String.valueOf(activo));\n sql = sql.replaceAll(\"VER\", version);\n sql = sql.replaceAll(\"IDPROD\", String.valueOf(idProducto));\n sql = sql.replaceAll(\"IDART\", String.valueOf(idArticulo));\n\n DBConnection.execSQL(sql);\n }", "public pInsertar() {\n initComponents();\n }", "int insertSelective(PensionRoleMenu record);" ]
[ "0.7018214", "0.67856", "0.66328424", "0.66278535", "0.64676934", "0.64231545", "0.62784195", "0.62653327", "0.62639755", "0.6193233", "0.61708516", "0.6160613", "0.6150246", "0.61411446", "0.61161584", "0.611487", "0.61120486", "0.60653806", "0.6050347", "0.60220504", "0.60007024", "0.59989077", "0.59985864", "0.5990488", "0.596636", "0.59595364", "0.5939793", "0.5932791", "0.59280235", "0.592437", "0.5923148", "0.59099394", "0.5865113", "0.5862583", "0.5849148", "0.5848769", "0.5830884", "0.5817662", "0.5810413", "0.580562", "0.5803824", "0.580154", "0.5797638", "0.57919943", "0.57897186", "0.57793677", "0.5779327", "0.5768199", "0.57642066", "0.5763695", "0.57534546", "0.5746593", "0.573281", "0.5726546", "0.5725169", "0.57223654", "0.57208383", "0.57096714", "0.57063544", "0.56966954", "0.56934625", "0.5690567", "0.56808233", "0.56723046", "0.566805", "0.56648487", "0.5663889", "0.56560224", "0.5643174", "0.56425697", "0.56373996", "0.5634715", "0.56308454", "0.56303585", "0.5625784", "0.5621306", "0.5620967", "0.56177", "0.5615585", "0.56130296", "0.560676", "0.5605934", "0.56048036", "0.5601585", "0.55944455", "0.5587324", "0.55848527", "0.5579747", "0.5571874", "0.5569725", "0.5569072", "0.5568349", "0.5567759", "0.5559939", "0.55457705", "0.5544591", "0.5543045", "0.5541547", "0.55406016", "0.554047" ]
0.6565001
4
Agafa els tipus d'activitats que esten actius
public abstract List<TipoActividad> getTiposActividad() throws PersistenceException, ClassNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void menuTipoActividad() {\n\t\tSystem.out.println(\"MENU TIPOS ACTIVIDAD\");\n\t\tSystem.out.println(\"1. LOW\");\n\t\tSystem.out.println(\"2. MEDIUM\");\n\t\tSystem.out.println(\"3. HIGH\");\n\t}", "private void setActiveActions() {\n\t\tnewBinaryContext.setEnabled(true);\n\t\tnewValuedContext.setEnabled(true);\n\t\tnewNestedContext.setEnabled(true);\n\t\topenContext.setEnabled(true);\n\t\tsaveContext.setEnabled(true);\n\t\tsaveAsContext.setEnabled(true);\n\t\tsaveAllContexts.setEnabled(true);\n\t\tcloseContext.setEnabled(true);\n\t\tcloseAllContexts.setEnabled(true);\n\t\tquitViewer.setEnabled(true);\n\n\t\tif (contextPanes.size() == 0) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(false);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(false);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t\treturn;\n\t\t}\n\n\t\tContextTableScrollPane selectedPane = contextPanes\n\t\t\t\t.elementAt(currentContextIdx);\n\t\tContext currentContext = ((ContextTableModel) selectedPane\n\t\t\t\t.getContextTable().getModel()).getContext();\n\n\t\tif (currentContext instanceof NestedContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(true);\n\t\t\tshowRulesBtn.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(true);\n\t\t\taddContextLevel.setEnabled(true);\n\t\t\tremoveLevel.setEnabled(true);\n\t\t\torderLevels.setEnabled(true);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(true);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(true);\n\t\t}\n\n\t\telse if (currentContext instanceof BinaryContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(true);\n\t\t\tnewObjectBtn.setEnabled(true);\n\t\t\tdelAttributeBtn.setEnabled(true);\n\t\t\tdelObjectBtn.setEnabled(true);\n\t\t\tshowLatBtn.setEnabled(true);\n\t\t\tshowRulesBtn.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(true);\n\t\t\taddAttribute.setEnabled(true);\n\t\t\tmergeAttributes.setEnabled(true);\n\t\t\tlogicalAttribute.setEnabled(true);\n\t\t\tremoveObject.setEnabled(true);\n\t\t\tremoveAttribute.setEnabled(true);\n\t\t\tcreateClusters.setEnabled(true);\n\t\t\tcompareAttributes.setEnabled(true);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(true);\n\t\t}\n\n\t\telse if (currentContext instanceof ValuedContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(true);\n\t\t\tnewObjectBtn.setEnabled(true);\n\t\t\tdelAttributeBtn.setEnabled(true);\n\t\t\tdelObjectBtn.setEnabled(true);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(true);\n\t\t\taddAttribute.setEnabled(true);\n\t\t\tmergeAttributes.setEnabled(true);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(true);\n\t\t\tremoveAttribute.setEnabled(true);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(true);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t}\n\n\t\telse {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(false);\n\t\t\topenBtn.setEnabled(false);\n\t\t\tnewBinCtxBtn.setEnabled(false);\n\t\t\tremoveCtxBtn.setEnabled(false);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t}\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "public void activities(){\n if (exercise.isSelected()){\n newStudent.addActivity(\"exercise\");\n }\n if (sleeping.isSelected()){\n newStudent.addActivity(\"sleeping\");\n }\n if (sports.isSelected()){\n newStudent.addActivity(\"sports\");\n }\n if (music.isSelected()){\n newStudent.addActivity(\"music\");\n }\n if (fishing.isSelected()){\n newStudent.addActivity(\"fishing\");\n }\n if (familyTime.isSelected()){\n newStudent.addActivity(\"familyTime\");\n }\n if (watchingTV.isSelected()){\n newStudent.addActivity(\"watchingTV\");\n }\n if (reading.isSelected()){\n newStudent.addActivity(\"reading\");\n }\n }", "boolean hasActive();", "private void comprobarActividades(List<DetectedActivity> actividadesProvables){\n for( DetectedActivity activity : actividadesProvables) {\n //preguntamos por el tipo\n switch( activity.getType() ) {\n case DetectedActivity.IN_VEHICLE: {\n //preguntamos por la provabilidad de que sea esa actividad\n //si es mayor de 75 (de cien) mostramos un mensaje\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En vehiculo\");\n }\n break;\n }\n case DetectedActivity.ON_BICYCLE: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En bici\");\n }\n break;\n }\n case DetectedActivity.ON_FOOT: {\n //este lo dejamos vacio por que va implicito en correr y andar\n break;\n }\n case DetectedActivity.RUNNING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Corriendo\");\n }\n break;\n }\n case DetectedActivity.WALKING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Andando\");\n }\n break;\n }\n case DetectedActivity.STILL: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Quieto\");\n }\n break;\n }\n case DetectedActivity.TILTING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Tumbado\");\n }\n break;\n }\n\n case DetectedActivity.UNKNOWN: {\n //si es desconocida no decimos nada\n break;\n }\n }\n }\n }", "public boolean isActivo()\r\n/* 173: */ {\r\n/* 174:318 */ return this.activo;\r\n/* 175: */ }", "private void tourIA(int nbAlluChoisies) {\r\n\t\t//Liste de toutes les allumettes visibles\r\n\t\tObservableList<Node> alluVisibles = boxAllumettes.getChildren().filtered(t->t.isVisible());\r\n\t\t\r\n\t\tfor (int i=0; i<nbAlluChoisies; i++)\r\n\t\t\ttabAllRetirer.add(alluVisibles.get(i));\r\n\t}", "@Override\n\tpublic Boolean isActve() {\n\t\treturn active;\n\t}", "private void activarControles(boolean estado) {\n this.panPrincipioActivo.setEnabled(estado);\n this.lblNombre.setEnabled(estado);\n this.txtNombre.setEditable(estado);\n this.lblDescripcion.setEnabled(estado);\n this.txtDescripcion.setEditable(estado);\n this.chkVigente.setEnabled(estado);\n this.btnAceptar.setEnabled(estado);\n this.btnCancelar.setEnabled(estado);\n \n this.panListadoPA.setEnabled(! estado);\n this.tblListadoPA.setEnabled(! estado);\n this.btnNuevo.setEnabled(! estado);\n this.btnModificar.setEnabled(! estado);\n \n if(estado == true){\n this.txtNombre.requestFocusInWindow();\n }else{\n this.tblListadoPA.requestFocusInWindow();\n }\n }", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "public void displayActivations(){\n for (int i = 0; i < neurons.size(); i++){\n System.out.println(\"Neuron \" + i + \": \" + neurons.get(i).getActivation());\n }\n }", "public void setActivo(Boolean activo) {\n this.activo = activo;\n }", "public boolean isActivo()\r\n/* 144: */ {\r\n/* 145:245 */ return this.activo;\r\n/* 146: */ }", "public boolean isActiv(){\r\n\t\treturn this.activ;\r\n\t}", "public ConsultaListaTitular(FacturacionPrincipal principal, int estado) {\n\t\tsuper(MensajesVentanas.ventanaActiva);\n\t\tthis.principal = principal;\n\t\tthis.estado = estado;\n\t\tinitialize();\n\t\tCalendar fechaActual = Calendar.getInstance();\n\t\tCalendar fechaEvento = Calendar.getInstance();\n\t\tfechaEvento.setTimeInMillis(CR.meServ.getListaRegalos().getFechaEvento().getTime()+(24*60*60*1000));\n\t\tif(fechaActual.after(fechaEvento)){\n\t\t\tgetJButton4().setEnabled(false);\n\t\t\tgetJButton8().setEnabled(false);\n\t\t} else\n\t\t\tgetJButton7().setEnabled(false);\n\t\tgetJButton1().setEnabled(false);\n\t\tgetJButton2().setEnabled(false);\n\t\tgetJButton5().setEnabled(false);\n\t\tthis.repintarPantalla();\n\t\tagregarListeners();\n\t}", "public String[] getActivations(){\n return activations;\n }", "public List<PeriodoLetivo> listAllActive() {\n EntityManager em = super.entityManager;\n CriteriaBuilder cb = em.getCriteriaBuilder();\n CriteriaQuery<PeriodoLetivo> criteriaQuery = cb.createQuery(this.type);\n Root<PeriodoLetivo> root = criteriaQuery.from(this.type);\n \n Predicate ativeCondition = cb.equal(root.get(PeriodoLetivo.PROP_SITUACAO), SITUACAO_ATIVO);\n \n criteriaQuery.where(ativeCondition);\n \n TypedQuery<PeriodoLetivo> query = em.createQuery(criteriaQuery);\n return query.getResultList();\n }", "public void setacto()\n\t\t{\n\t\t\tacto=1;\n\t\tavance=0;\n\t\t}", "public Boolean getActivo() {\n return activo;\n }", "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 }", "public String getActivo() {\r\n\t\treturn activo;\r\n\t}", "@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}", "@Override\n\tpublic void activarModoPrestamo() {\n\t\tif(uiHomePrestamo!=null){\n\t\t\tif(uiHomePrestamo.getModo().equals(\"HISTORIAL\")){\n\t\t\t\tbtnNuevo.setVisible(false);\t\n\t\t\t\tbtnEliminar.setVisible(false);\n\t\t\t}else{\n\t\t\t\tbtnNuevo.setVisible(true);\n\t\t\t\tbtnEliminar.setVisible(true);\n\t\t\t}\n\t\t}else if(uiHomeCobranza!=null){\n\t\t\tbtnEliminar.setVisible(false);\n\t\t\tbtnNuevo.setVisible(true);\n\t\t\t//pnlEstadoPrestamo.setVisible(false);\n\t\t}\n\t\t\n\t}", "public void activate(){\r\n\t\tactive=true;\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (jcb_Actividad.getSelectedIndex() == 1) {\n jcb_Maestro.setEnabled(true);\n jcb_Hora_Clase.setEnabled(true);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Consultar_Maestros();\n\n }\n if (jcb_Actividad.getSelectedIndex() == 0) {\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n }\n if (jcb_Actividad.getSelectedIndex() == 2) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n if (jcb_Actividad.getSelectedIndex() == 3) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n\n if (jcb_Actividad.getSelectedIndex() == 4) {\n jcb_razones.setEnabled(true);\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n// btnEntrar.setEnabled(true);\n }\n }", "public void setActiveStatus(Boolean active){ this.status = active; }", "public boolean isActivo()\r\n/* 110: */ {\r\n/* 111:138 */ return this.activo;\r\n/* 112: */ }", "public boolean getActive();", "public boolean getActive();", "@Override\n\tpublic String toString() {\n\t\treturn \"inactive\";\n\t}", "Activite getActiviteCourante();", "public boolean buttonActive(int i) {\n boolean b = false;\n if (categories.get(i).isActive()) {\n b = true;\n }\n return b;\n }", "private void activationON() {\n\n switch(afficheChoix) {\n case AFFICHE_SPOOL :\n ecranSpool.activatedContents();\n shell.layout();\n break;\n case AFFICHE_USER :\n ecranUser.activatedContents();\n shell.layout();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.activatedContents();\n shell.layout();\n break;\n default: break;\n }\n\n }", "public void setActive() {\n\t\tactive = true;\n\t}", "public int getNumActive();", "protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}", "public void setStatus( boolean avtive ){\r\n\t\tthis.activ = avtive;\r\n\t}", "public void setAktiivisuus()\r\n\t{\r\n\t\tonAktiivinen = false;\r\n\t}", "private void enableBotonAceptar()\r\n\t{\r\n\t\t\r\n\t}", "public void ocultaBotoesDeSegundoPlanoAtd(){\n JButton[] botSegPlan = botoesDeSegPlanoAtd();\n \n for(int i = 0; i<botSegPlan.length; i++){\n botSegPlan[i].setVisible(false);\n }\n }", "public void setActivo(String activo) {\r\n\t\tthis.activo = activo;\r\n\t}", "public void activarNuevoAlmacen() {\n\t\ttxtId.setVisible(false);\n\t\tpnAlmacen.setVisible(true);\n\t\tsetTxtUbicacion(\"\");\n\t\tgetPnTabla().setVisible(false);\n\t\tadd(pnAlmacen,BorderLayout.CENTER);\n\t \n\t}", "public void activated() \r\n\t{\r\n\t\t\r\n\t}", "private void jTabPane_AccueilMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabPane_AccueilMouseClicked\n if(numOnglet() == 0 ){\n // On cache le bouton qui lance la procedure Prospect vers Client\n jBtn_ProspectToClient.setVisible(false);\n if(jTable_Clients.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n }\n else{\n jBtn_Modifier.setVisible(true);\n jBtn_Supprimer.setVisible(true);\n }\n }else{\n if(jTable_Prospects.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n jBtn_ProspectToClient.setVisible(false);\n }else{\n jBtn_Modifier.setVisible(true);\n jBtn_Supprimer.setVisible(true);\n // On fait apparaitre le bouton qui lance la procedure Prospect vers Client\n jBtn_ProspectToClient.setVisible(true);\n }\n }\n }", "public void activer() throws ActivationImpossibleException {\n throw new ActivationImpossibleException(\"Serrure non activable sans objet, faut pas jouer au plus malin avec moi.\");\n }", "boolean isActive();", "boolean isActive();", "boolean isActive();", "public boolean isActive() { return true; }", "private void obterDadosActivityLista() {\r\n bNnovo = getIntent().getExtras().getBoolean(\"novo\");\r\n }", "public void activar(){\n\n }", "protected List<String> getActives() {\n\t\treturn myActives;\n\t}", "private void listadoTipos() {\r\n sessionProyecto.getTipos().clear();\r\n sessionProyecto.setTipos(itemService.buscarPorCatalogo(CatalogoEnum.TIPOPROYECTO.getTipo()));\r\n }", "@Override\n\tpublic List<TipoAsiento> listaTipoAsientosActivas() throws Exception {\n\t\treturn null;\n\t}", "private void toggle(int a) {\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < et.size(); i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), false);\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < toggle; i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), true);\r\n\t\t\t}\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"T\".concat(Library.toString(a)), \"Activated\"));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"Error\", \"Activated\"));\r\n\t\t}\r\n\t}", "public void setActive( boolean tof ) {\n\t\tthis.active = tof;\n\t}", "public void show(ITutor activeTutor) {\r\n // Update times spent per tutor\r\n int count = 0;\r\n for (final ITutor tutor: this.tutors.values()) {\r\n Label timeLabel = tutorTimeLabels[count++];\r\n timeLabel.setText(Format.formatTime(tutor.getStats()[ITutor.TIME_SPENT]));\r\n if (tutor.getStats()[ITutor.PERCENT_PROGRESS] == 100) {\r\n Image status = new Image(ScienceEngine.getTextureRegion(\"check\"));\r\n TextButton tutorButton = (TextButton) findActor(tutor.getId());\r\n tutorButton.addActor(status);\r\n ScreenComponent.scalePositionAndSize(status, 70, TUTOR_HEIGHT - 64, 60, 60);\r\n }\r\n }\r\n // Update active tutor\r\n activeTutorButton = (TextButton) findActor(activeTutor.getId());\r\n if (activeTutorButton != null) {\r\n activeTutorButton.addActor(userImage);\r\n }\r\n }", "public void updatePossibleActions(Map<Integer, String> availability){\n System.out.println(availability);\n for (Integer i : availability.keySet()) {\n\n coverImages.get(i).setVisible(true);\n }\n\n for(int r=0;r<25;r++) {\n\n if (!availability.containsKey(r)) {\n\n coverImages.get(r).setVisible(false);\n }\n }\n }", "@Override\n\tpublic void showActiveTodo() {\n\n\t}", "public boolean activate(){\n mIsActive = true;\n return mIsActive;\n }", "public List<TaskDescription> getActiveTasks();", "public boolean check(String... activator){\n for (int i = 0; i < activator.length; i++) {\n for (int j = 0; j < this.activations.length; j++) {\n if(activator[i].equalsIgnoreCase(activations[j])){\n onClick();\n return true;\n }\n }\n }\n return false;\n }", "public void activarVista(){\r\n\tvista.getVerVistaAutorObra().addActionListener(r->{\r\n\t\tCrearVista.crearVIstaAutorObra(con);\r\n\t\tvista.getTable().removeAll();\r\n\t\tlistaArte= new ArrayList<ObraArte>();\r\n\t\tlistaArte.removeAll(listaArte);\r\n\t\tlistaArte=SeleccionarDatosVista.getTodosRegistros(con);\r\n\t\ttableModelArteVista= new TableModelArteVista(listaArte, CABECERA);\r\n\t\tvista.getTable().setModel(tableModelArteVista);\r\n\t\tvista.getTxtBarraStatus().setText(\"VISTA CREADA. DICHA VISTA NO ES EDITABLE.\");\r\n\t\tvista.getButton_Modificar().setEnabled(false);\r\n\t\tvista.getButtonBorrar().setEnabled(false);\r\n\t\tvista.getMntmBorrarFila().setEnabled(false);\r\n\t\tvista.getButtonInsertarNuevo().setEnabled(false);\r\n\t\tvista.getLabelSize().setText(vista.getTable().getRowCount()+\" elementos.\");\r\n\t\t\r\n\t});\r\n}", "public void activate() {\n\t\t// set cooldown counter\n\t}", "static private void showMissions() {\n\n Iterator iteratorMissionStatus = allMissions.missionStatus.entrySet().iterator();\n\n while (iteratorMissionStatus.hasNext()) {\n HashMap.Entry entry = (HashMap.Entry) iteratorMissionStatus.next();\n System.out.println((String) entry.getKey() + \": \");\n\n if ((boolean) (entry.getValue()) == false) {\n System.out.print(\"mission in progress\");\n System.out.println(\"\");\n }\n if ((boolean) (entry.getValue()) == true) {\n System.out.print(\"mission is complete\");\n System.out.println(\"\");\n }\n System.out.println(\"\");\n\n }\n }", "public boolean activate() { //if true continue to execute\n\n if (Inventory.getCount(PowerFletch.LOG) >= 1) {\n System.out.println(\"cutting activated\");\n\n return true;\n }\n\n return false;\n }", "public void cliniciansTabAreInViewMode() {\n\n\tString icon=addIconClinicians.getAttribute(\"data-ng-click\");\n\tif(icon.contains(\"isDisabled\")) {\n\t\tAssert.assertTrue(true);\n\t}\n\t\t\n\t}", "public CalculoNotaBimestral() {\n initComponents();\n NotadaProva.setEnabled(false);\n Resultado.setEnabled(false);\n }", "public void setActive(boolean active) { \n this.active = active;\n }", "public boolean isAktiv() {\n\t\treturn false;\n\t}", "public int getNumActive() {\n return numActive;\n }", "@Override\r\n\tpublic void activate() {\n\t\tif(CID==true) {\r\n\t\t\tinter.setState(inter.getResults());\r\n\t\t}\r\n\t}", "public void setActivo(boolean activo)\r\n/* 149: */ {\r\n/* 150:255 */ this.activo = activo;\r\n/* 151: */ }", "final void habilitarcampos(boolean valor){\n TXT_CodCliente.setEnabled(valor);\n TXT_Aparelho.setEnabled(valor);\n TXT_Valor.setEnabled(valor);\n TXT_Informacao.setEnabled(valor); \n TXT_CodServico.setEnabled(valor); \n TXT_Clientes.setEnabled(valor); \n TXT_Serial.setEnabled(valor);\n TXT_Data.setEnabled(valor);\n}", "public void activateInterArrivalTimeTally() {\n\t\tactivateInterArrivalTimeTally(false);\n\t}", "public void activarAceptar() {\n aceptar = false;\n }", "private void eventoSuperficie(){\n s1.setChecked(true);\n s2.setChecked(false);\n s3.setChecked(false);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np3));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUPERFICIE);\n }", "int getNumActive();", "@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}", "public void VerifyButtons(){\n if (currentTurn.getSiguiente() == null){\n next_turn.setEnabled(false);\n } else{\n next_turn.setEnabled(true);\n }\n if (currentTurn.getAnterior() == null){\n prev_turn.setEnabled(false);\n } else{\n prev_turn.setEnabled(true);\n }\n if (current.getSiguiente() == null){\n next_game.setEnabled(false);\n } else{\n next_game.setEnabled(true);\n }\n if (current.getAnterior() == null){\n prev_game.setEnabled(false);\n } else{\n prev_game.setEnabled(true);\n }\n }", "@Override\n public void updateActionUI() {\n JSONObject jobContractsAndItsBidIds = getJobContractsAndItsBidIds(getContracts(), super.getId());\n JSONArray jobContracts = jobContractsAndItsBidIds.getJSONArray(\"jobContracts\");\n JSONArray offerContracts = jobContractsAndItsBidIds.getJSONArray(\"offerContracts\");\n JSONArray jobContractBidsJSONArray = jobContractsAndItsBidIds.getJSONArray(\"jobContractBids\");\n aboutToExpireContracts = jobContractsAndItsBidIds.getJSONArray(\"aboutToExpireContracts\");\n\n // converting jobContractBidsJSONArray into an arraylist\n ArrayList<String> jobContractBids = new ArrayList<>();\n for (int i = 0; i < jobContractBidsJSONArray.length(); i++) {\n jobContractBids.add(jobContractBidsJSONArray.getString(i));\n }\n\n //get available bids\n JSONArray availableBids = getAvailableBids(jobContractBids, getBids(true), super.getCompetencies(), getId());\n\n // getting tutor's actions\n ArrayList<Action> tutorActions = getTutorActions(view, availableBids, jobContracts, offerContracts, this);\n\n // getting default user actions and adding them to tutor's actions\n ArrayList<Action> defaultActions = getDefaultActions();\n\n for (int i =0; i < defaultActions.size(); i++) {\n tutorActions.add(defaultActions.get(i));\n }\n\n // setting user's action as tutor's action\n super.setActions(tutorActions);\n }", "public void printActiveCourses() \n {\n for (String c: courses.keySet()) \n {\n if (courses.get(c).getActive()) \n {\n System.out.println(courses.get(c)); \n }\n }\n }", "public void activate() {\n\t\tactivated = true;\n\t}", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public void updateAllFilteredListToShowAllActiveEntries();", "@Override\n public int howManyActivated(){\n return (gameboardPanel.howManyActivated() + leaderCardsPanel.howManyActivated());\n }", "public void activate(){\r\n\r\n\t}", "private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }", "public boolean isActived() {\r\n\t\treturn isActived;\r\n\t}", "public boolean getStatus(){\n return activestatus;\n }", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();" ]
[ "0.64715034", "0.5931246", "0.58816624", "0.58816624", "0.5851466", "0.5837698", "0.5798177", "0.56474245", "0.5630221", "0.56220824", "0.5600948", "0.55868113", "0.5555778", "0.5554963", "0.55329716", "0.5528163", "0.551601", "0.550885", "0.5459777", "0.5458364", "0.5442832", "0.5436494", "0.5408566", "0.54018855", "0.5397689", "0.5388711", "0.5380737", "0.5374014", "0.5369791", "0.5367976", "0.5367472", "0.5359378", "0.5359378", "0.53518623", "0.53514016", "0.53512245", "0.5343227", "0.5334861", "0.5330981", "0.5327784", "0.53205955", "0.5320039", "0.5314023", "0.53027743", "0.5298598", "0.52908003", "0.52810663", "0.52734625", "0.5269206", "0.5260602", "0.5260602", "0.5260602", "0.5246121", "0.5233583", "0.5231278", "0.52215916", "0.52200377", "0.52187204", "0.52013963", "0.5197843", "0.51772076", "0.5167158", "0.5163273", "0.51621044", "0.5151007", "0.51503325", "0.51499116", "0.51495105", "0.51494795", "0.5137419", "0.51347363", "0.5133174", "0.5131402", "0.5123887", "0.51231784", "0.51230955", "0.5121496", "0.5119906", "0.51153415", "0.5113019", "0.5111643", "0.5104867", "0.51005644", "0.50996906", "0.5098339", "0.5092534", "0.5087347", "0.50829005", "0.5081065", "0.5080123", "0.50793326", "0.5077232", "0.50736237", "0.50694627", "0.5068897", "0.5068897", "0.5068897", "0.5068897", "0.5068897", "0.5068897", "0.5068897" ]
0.0
-1
Agafa tots els tipus d'activitats
public abstract List<TipoActividad> getTiposActividadAdm() throws PersistenceException, ClassNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void menuTipoActividad() {\n\t\tSystem.out.println(\"MENU TIPOS ACTIVIDAD\");\n\t\tSystem.out.println(\"1. LOW\");\n\t\tSystem.out.println(\"2. MEDIUM\");\n\t\tSystem.out.println(\"3. HIGH\");\n\t}", "private void listadoTipos() {\r\n sessionProyecto.getTipos().clear();\r\n sessionProyecto.setTipos(itemService.buscarPorCatalogo(CatalogoEnum.TIPOPROYECTO.getTipo()));\r\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public TelaPernas() {\n initComponents();\n lblTipo.setVisible(false);\n lblCobra.setVisible(false);\n lblSaci.setVisible(false);\n lblBipede.setVisible(false);\n lblMiniBoi.setVisible(false);\n lblFormiga.setVisible(false);\n lblMiranha.setVisible(false);\n lblEt.setVisible(false);\n \n }", "private void tourIA(int nbAlluChoisies) {\r\n\t\t//Liste de toutes les allumettes visibles\r\n\t\tObservableList<Node> alluVisibles = boxAllumettes.getChildren().filtered(t->t.isVisible());\r\n\t\t\r\n\t\tfor (int i=0; i<nbAlluChoisies; i++)\r\n\t\t\ttabAllRetirer.add(alluVisibles.get(i));\r\n\t}", "void setPosiblesTipos(String[] tipos);", "private void setToolTips() {\n \t// set tool tips\n Tooltip startTip, stopTip, filterTip, listViewTip, viewAllTip, viewInfoTip, removeTip, editRuleFileTip, editRulePathTip;\n startTip = new Tooltip(ToolTips.getStarttip());\n stopTip = new Tooltip(ToolTips.getStoptip());\n filterTip = new Tooltip(ToolTips.getFiltertip());\n listViewTip = new Tooltip(ToolTips.getListviewtip());\n viewAllTip = new Tooltip(ToolTips.getViewalltip());\n viewInfoTip = new Tooltip(ToolTips.getViewinfotip());\t\n removeTip = new Tooltip(ToolTips.getRemovetip());\n editRuleFileTip = new Tooltip(ToolTips.getEditrulefiletip());\n editRulePathTip = new Tooltip(ToolTips.getEditrulepathtip());\n \n startButton.setTooltip(startTip);\n stopButton.setTooltip(stopTip);\n filterButton.setTooltip(filterTip);\n unseenPacketList.setTooltip(listViewTip);\n viewAll.setTooltip(viewAllTip);\n viewInformation.setTooltip(viewInfoTip);\n removeButton.setTooltip(removeTip);\n editRuleFileButton.setTooltip(editRuleFileTip);\n editRuleFilePath.setTooltip(editRulePathTip);\n }", "@Override\n\tpublic String getTareas() {\n\t\treturn \"TAREA COMERCIAL 3: VENDE MUCHO TODOS LOS DÍAS\";\n\t}", "private List<String> tipoNotificaciones() {\n\t\tList<String> tipos = new LinkedList<String>();\n\t\ttipos.add(\"Estrenos\");\n\t\ttipos.add(\"Promociones\");\n\t\ttipos.add(\"Noticias\");\n\t\ttipos.add(\"Eventos\");\n\t\ttipos.add(\"Pre-Ventas\");\n\n\t\treturn tipos;\n\t}", "public void activarNuevoAlmacen() {\n\t\ttxtId.setVisible(false);\n\t\tpnAlmacen.setVisible(true);\n\t\tsetTxtUbicacion(\"\");\n\t\tgetPnTabla().setVisible(false);\n\t\tadd(pnAlmacen,BorderLayout.CENTER);\n\t \n\t}", "public void tip()\r\n\t{\n\t\tSystem.out.println(\"Tipul de organizare: SAT!\");\r\n\t}", "private void cargarNotasAclaratorias() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"tipo\", INotas.NOTAS_ACLARATORIAS);\r\n\t\ttabboxContendor\r\n\t\t\t\t.abrirPaginaTabDemanda(false, \"/pages/nota_aclaratoria.zul\",\r\n\t\t\t\t\t\t\"NOTAS ACLARATORIAS\", parametros);\r\n\t}", "private void setActiveActions() {\n\t\tnewBinaryContext.setEnabled(true);\n\t\tnewValuedContext.setEnabled(true);\n\t\tnewNestedContext.setEnabled(true);\n\t\topenContext.setEnabled(true);\n\t\tsaveContext.setEnabled(true);\n\t\tsaveAsContext.setEnabled(true);\n\t\tsaveAllContexts.setEnabled(true);\n\t\tcloseContext.setEnabled(true);\n\t\tcloseAllContexts.setEnabled(true);\n\t\tquitViewer.setEnabled(true);\n\n\t\tif (contextPanes.size() == 0) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(false);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(false);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t\treturn;\n\t\t}\n\n\t\tContextTableScrollPane selectedPane = contextPanes\n\t\t\t\t.elementAt(currentContextIdx);\n\t\tContext currentContext = ((ContextTableModel) selectedPane\n\t\t\t\t.getContextTable().getModel()).getContext();\n\n\t\tif (currentContext instanceof NestedContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(true);\n\t\t\tshowRulesBtn.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(true);\n\t\t\taddContextLevel.setEnabled(true);\n\t\t\tremoveLevel.setEnabled(true);\n\t\t\torderLevels.setEnabled(true);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(true);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(true);\n\t\t}\n\n\t\telse if (currentContext instanceof BinaryContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(true);\n\t\t\tnewObjectBtn.setEnabled(true);\n\t\t\tdelAttributeBtn.setEnabled(true);\n\t\t\tdelObjectBtn.setEnabled(true);\n\t\t\tshowLatBtn.setEnabled(true);\n\t\t\tshowRulesBtn.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(true);\n\t\t\taddAttribute.setEnabled(true);\n\t\t\tmergeAttributes.setEnabled(true);\n\t\t\tlogicalAttribute.setEnabled(true);\n\t\t\tremoveObject.setEnabled(true);\n\t\t\tremoveAttribute.setEnabled(true);\n\t\t\tcreateClusters.setEnabled(true);\n\t\t\tcompareAttributes.setEnabled(true);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(true);\n\t\t}\n\n\t\telse if (currentContext instanceof ValuedContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(true);\n\t\t\tnewObjectBtn.setEnabled(true);\n\t\t\tdelAttributeBtn.setEnabled(true);\n\t\t\tdelObjectBtn.setEnabled(true);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(true);\n\t\t\taddAttribute.setEnabled(true);\n\t\t\tmergeAttributes.setEnabled(true);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(true);\n\t\t\tremoveAttribute.setEnabled(true);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(true);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t}\n\n\t\telse {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(false);\n\t\t\topenBtn.setEnabled(false);\n\t\t\tnewBinCtxBtn.setEnabled(false);\n\t\t\tremoveCtxBtn.setEnabled(false);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t}\n\t}", "public void displayActivations(){\n for (int i = 0; i < neurons.size(); i++){\n System.out.println(\"Neuron \" + i + \": \" + neurons.get(i).getActivation());\n }\n }", "@Override\n\tpublic void activarModoPrestamo() {\n\t\tif(uiHomePrestamo!=null){\n\t\t\tif(uiHomePrestamo.getModo().equals(\"HISTORIAL\")){\n\t\t\t\tbtnNuevo.setVisible(false);\t\n\t\t\t\tbtnEliminar.setVisible(false);\n\t\t\t}else{\n\t\t\t\tbtnNuevo.setVisible(true);\n\t\t\t\tbtnEliminar.setVisible(true);\n\t\t\t}\n\t\t}else if(uiHomeCobranza!=null){\n\t\t\tbtnEliminar.setVisible(false);\n\t\t\tbtnNuevo.setVisible(true);\n\t\t\t//pnlEstadoPrestamo.setVisible(false);\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void showActiveTodo() {\n\n\t}", "public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }", "@Override\n public boolean showTips() {\n return mesoCfgXML.getTipsOption();\n }", "public void ocultaBotoesDeSegundoPlanoAtd(){\n JButton[] botSegPlan = botoesDeSegPlanoAtd();\n \n for(int i = 0; i<botSegPlan.length; i++){\n botSegPlan[i].setVisible(false);\n }\n }", "private void activationON() {\n\n switch(afficheChoix) {\n case AFFICHE_SPOOL :\n ecranSpool.activatedContents();\n shell.layout();\n break;\n case AFFICHE_USER :\n ecranUser.activatedContents();\n shell.layout();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.activatedContents();\n shell.layout();\n break;\n default: break;\n }\n\n }", "private void findATip() {\n\n TextView tipsText = (TextView) findViewById(R.id.tipsText);\n TipManager tipManager = new TipManager();\n //Uses the TipManager to get a random tip\n this.tip = tipManager.getATip();\n //Gets the text of the tip\n String tipText = this.tip.getTipText();\n //Gets the activity that the tip should go to\n String tipIntent = this.tip.getTipIntent();\n tipsText.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n goSomewhere();\n }\n });\n tipsText.setText(tipText);\n tipsText.setTypeface(FontHelper.getLatoRegular(getApplicationContext()));\n //Log.d(\"Logthis \",tip);\n\n }", "public void imprimir(){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n System.out.println(\"- \"+(i+1)+this.listaEtiquetas.get(i).getEtiqueta()+\" descripcion\"+this.listaEtiquetas.get(i).getDescripcion());\n }\n }", "public void setLabelEstados(int pokemon){\r\n if(pokemon ==0){\r\n if(pokemon_activo1.getConfuso() == true) vc.setjL_Estado1(\"Confuso\");\r\n else if(pokemon_activo1.getCongelado()== true) vc.setjL_Estado1(\"Congelado\");\r\n else if(pokemon_activo1.getDormido()== true) vc.setjL_Estado1(\"Dormido\");\r\n else if(pokemon_activo1.getEnvenenado()== true) vc.setjL_Estado1(\"Envenenado\");\r\n else if(pokemon_activo1.getParalizado()== true) vc.setjL_Estado1(\"Paralizado\");\r\n else if(pokemon_activo1.getQuemado()== true) vc.setjL_Estado1(\"Quemado\");\r\n else if(pokemon_activo1.getCongelado() == false && pokemon_activo1.getDormido() == false && pokemon_activo1.getEnvenenado() == false && \r\n pokemon_activo1.getParalizado() == false && pokemon_activo1.getQuemado() == false){\r\n vc.setjL_Estado1(\"Normal\");\r\n }\r\n }\r\n if(pokemon ==1){\r\n if(pokemon_activo2.getConfuso() == true) vc.setjL_Estado2(\"Confuso\");\r\n else if(pokemon_activo2.getCongelado()== true) vc.setjL_Estado2(\"Congelado\");\r\n else if(pokemon_activo2.getDormido()== true) vc.setjL_Estado2(\"Dormido\");\r\n else if(pokemon_activo2.getEnvenenado()== true) vc.setjL_Estado2(\"Envenenado\");\r\n else if(pokemon_activo2.getParalizado()== true) vc.setjL_Estado2(\"Paralizado\");\r\n else if(pokemon_activo2.getQuemado()== true) vc.setjL_Estado2(\"Quemado\");\r\n else if(pokemon_activo2.getCongelado() == false && pokemon_activo2.getDormido() == false && pokemon_activo2.getEnvenenado() == false && \r\n pokemon_activo2.getParalizado() == false && pokemon_activo2.getQuemado() == false){\r\n vc.setjL_Estado2(\"Normal\");\r\n }\r\n }\r\n }", "public void informarTeclaPressionada( Tecla t );", "private void jTabPane_AccueilMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabPane_AccueilMouseClicked\n if(numOnglet() == 0 ){\n // On cache le bouton qui lance la procedure Prospect vers Client\n jBtn_ProspectToClient.setVisible(false);\n if(jTable_Clients.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n }\n else{\n jBtn_Modifier.setVisible(true);\n jBtn_Supprimer.setVisible(true);\n }\n }else{\n if(jTable_Prospects.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n jBtn_ProspectToClient.setVisible(false);\n }else{\n jBtn_Modifier.setVisible(true);\n jBtn_Supprimer.setVisible(true);\n // On fait apparaitre le bouton qui lance la procedure Prospect vers Client\n jBtn_ProspectToClient.setVisible(true);\n }\n }\n }", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "@NotifyChange({\"matkulKur\", \"addNew\", \"resetInputIcon\"}) \n @Command(\"batal\")\n public void batal(){\n if (isAddNew()==true) setMatkulKur(getTempMatkulKur()); //\n setResetInputIcon(false);\n setAddNew(false); //apapun itu buat supaya tambah baru selalu kondisi false\n }", "public void show(ITutor activeTutor) {\r\n // Update times spent per tutor\r\n int count = 0;\r\n for (final ITutor tutor: this.tutors.values()) {\r\n Label timeLabel = tutorTimeLabels[count++];\r\n timeLabel.setText(Format.formatTime(tutor.getStats()[ITutor.TIME_SPENT]));\r\n if (tutor.getStats()[ITutor.PERCENT_PROGRESS] == 100) {\r\n Image status = new Image(ScienceEngine.getTextureRegion(\"check\"));\r\n TextButton tutorButton = (TextButton) findActor(tutor.getId());\r\n tutorButton.addActor(status);\r\n ScreenComponent.scalePositionAndSize(status, 70, TUTOR_HEIGHT - 64, 60, 60);\r\n }\r\n }\r\n // Update active tutor\r\n activeTutorButton = (TextButton) findActor(activeTutor.getId());\r\n if (activeTutorButton != null) {\r\n activeTutorButton.addActor(userImage);\r\n }\r\n }", "private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }", "public ConsultaListaTitular(FacturacionPrincipal principal, int estado) {\n\t\tsuper(MensajesVentanas.ventanaActiva);\n\t\tthis.principal = principal;\n\t\tthis.estado = estado;\n\t\tinitialize();\n\t\tCalendar fechaActual = Calendar.getInstance();\n\t\tCalendar fechaEvento = Calendar.getInstance();\n\t\tfechaEvento.setTimeInMillis(CR.meServ.getListaRegalos().getFechaEvento().getTime()+(24*60*60*1000));\n\t\tif(fechaActual.after(fechaEvento)){\n\t\t\tgetJButton4().setEnabled(false);\n\t\t\tgetJButton8().setEnabled(false);\n\t\t} else\n\t\t\tgetJButton7().setEnabled(false);\n\t\tgetJButton1().setEnabled(false);\n\t\tgetJButton2().setEnabled(false);\n\t\tgetJButton5().setEnabled(false);\n\t\tthis.repintarPantalla();\n\t\tagregarListeners();\n\t}", "public abstract List<TipoActividad> getTiposActividad() throws PersistenceException, ClassNotFoundException;", "public void setTipusPartida(int tipus) {\r\n\t\tthis.tipus = tipus;\r\n\t}", "public peliculasAntiguas(Taquilla pelisAntiguas) {\n initComponents();\n this.taquilla=pelisAntiguas;\n mostrarPeliculasAntiguas();\n }", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "public TelaSecundaria() {\n initComponents();\n ArrayTexto();\n btpara.setVisible(false);\n btresposta.setVisible(false);\n }", "public String getActivo() {\r\n\t\treturn activo;\r\n\t}", "public void mostrarAyuda() {\r\n\t\t\r\n\t\tEnum_Instrucciones[] arrayEnumerado;\r\n\t\t\r\n\t\tarrayEnumerado = Enum_Instrucciones.getArrayEnumerados();\r\n\t\t\r\n\t\t// El tamano del array de enumerados es 8.\r\n\t\tfor(int i = 0; i < Enum_Instrucciones.tamanoArrayEnumerados(); i++) {\r\n\t\t\tSystem.out.println(arrayEnumerado[i].getDescripcionOrden());\r\n\t\t}\r\n\t}", "@Override\n public String toString() {\n return tla;\n }", "private void showfivetype() {\n\r\n\t\tbtn_menu1.setText(ticketname[btn_menu1_int]);\r\n\t\tbtn_menu2.setText(ticketname[btn_menu2_int]);\r\n\t\tbtn_menu3.setText(ticketname[btn_menu3_int]);\r\n\t\tbtn_menu4.setText(ticketname[btn_menu4_int]);\r\n\t\tbtn_menu5.setText(ticketname[btn_menu5_int]);\r\n\t\tif (btn_menu1_int == 0) {\r\n\t\t\tbtn_menu1.setVisibility(View.GONE);\r\n\t\t} else {\r\n\t\t\tbtn_menu1.setVisibility(View.VISIBLE);\r\n\t\t}\r\n\t\tif (btn_menu2_int == 0) {\r\n\t\t\tbtn_menu2.setVisibility(View.GONE);\r\n\t\t} else {\r\n\t\t\tbtn_menu2.setVisibility(View.VISIBLE);\r\n\t\t}\r\n\t\tif (btn_menu3_int == 0) {\r\n\t\t\tbtn_menu3.setVisibility(View.GONE);\r\n\t\t} else {\r\n\t\t\tbtn_menu3.setVisibility(View.VISIBLE);\r\n\t\t}\r\n\t\tif (btn_menu4_int == 0) {\r\n\t\t\tbtn_menu4.setVisibility(View.GONE);\r\n\t\t} else {\r\n\t\t\tbtn_menu4.setVisibility(View.VISIBLE);\r\n\t\t}\r\n\t\tif (btn_menu5_int == 0) {\r\n\t\t\tbtn_menu5.setVisibility(View.GONE);\r\n\t\t} else {\r\n\t\t\tbtn_menu5.setVisibility(View.VISIBLE);\r\n\t\t}\r\n\t}", "private void mostrarTablero() {\n Jugada objJugada = null;\n if (! this.objJuegoTresEnRaya.getMovimientos().estaVacia())\n objJugada = this.objJuegoTresEnRaya.getMovimientos().ultimo();\n\n if (objJugada == null) {\n tab0x0.setEnabled(true);\n tab0x1.setEnabled(true);\n tab0x2.setEnabled(true);\n \n tab1x0.setEnabled(true);\n tab1x1.setEnabled(true);\n tab1x2.setEnabled(true);\n \n tab2x0.setEnabled(true);\n tab2x1.setEnabled(true);\n tab2x2.setEnabled(true);\n \n tab0x0.setText(\"\");\n tab0x1.setText(\"\");\n tab0x2.setText(\"\");\n \n tab1x0.setText(\"\");\n tab1x1.setText(\"\");\n tab1x2.setText(\"\");\n \n tab2x0.setText(\"\");\n tab2x1.setText(\"\");\n tab2x2.setText(\"\");\n return;\n }\n \n if (objJugada.getTablero(0, 0) > 0) {\n tab0x0.setEnabled(false);\n tab0x0.setText(getTexto(objJugada.getTablero(0, 0)));\n }\n if (objJugada.getTablero(0, 1) > 0) {\n tab0x1.setEnabled(false);\n tab0x1.setText(getTexto(objJugada.getTablero(0, 1)));\n }\n if (objJugada.getTablero(0, 2) > 0) {\n tab0x2.setEnabled(false);\n tab0x2.setText(getTexto(objJugada.getTablero(0, 2)));\n }\n\n if (objJugada.getTablero(1, 0) > 0) {\n tab1x0.setEnabled(false);\n tab1x0.setText(getTexto(objJugada.getTablero(1, 0)));\n }\n if (objJugada.getTablero(1, 1) > 0) {\n tab1x1.setEnabled(false);\n tab1x1.setText(getTexto(objJugada.getTablero(1, 1)));\n }\n if (objJugada.getTablero(1, 2) > 0) {\n tab1x2.setEnabled(false);\n tab1x2.setText(getTexto(objJugada.getTablero(1, 2)));\n }\n\n if (objJugada.getTablero(2, 0) > 0) {\n tab2x0.setEnabled(false);\n tab2x0.setText(getTexto(objJugada.getTablero(2, 0)));\n }\n if (objJugada.getTablero(2, 1) > 0) {\n tab2x1.setEnabled(false);\n tab2x1.setText(getTexto(objJugada.getTablero(2, 1)));\n }\n if (objJugada.getTablero(2, 2) > 0) {\n tab2x2.setEnabled(false);\n tab2x2.setText(getTexto(objJugada.getTablero(2, 2)));\n }\n \n this.numNodosResultLabel.setText(\"\" + objJuegoTresEnRaya.getNumeroNodosUltima());\n \n if (objJuegoTresEnRaya.estaTerminado()) {\n tab0x0.setEnabled(false);\n tab0x1.setEnabled(false);\n tab0x2.setEnabled(false);\n \n tab1x0.setEnabled(false);\n tab1x1.setEnabled(false);\n tab1x2.setEnabled(false);\n \n tab2x0.setEnabled(false);\n tab2x1.setEnabled(false);\n tab2x2.setEnabled(false);\n \n this.quienGanoResultLabel.setText(getTexto(objJuegoTresEnRaya.getQuienGano()));\n }\n }", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }", "public void setActivo(Boolean activo) {\n this.activo = activo;\n }", "public void mostrarTareas(){\n System.out.println(\"Tareas existentes:\");\n System.out.println(tareas);\n }", "public List<PeriodoLetivo> listAllActive() {\n EntityManager em = super.entityManager;\n CriteriaBuilder cb = em.getCriteriaBuilder();\n CriteriaQuery<PeriodoLetivo> criteriaQuery = cb.createQuery(this.type);\n Root<PeriodoLetivo> root = criteriaQuery.from(this.type);\n \n Predicate ativeCondition = cb.equal(root.get(PeriodoLetivo.PROP_SITUACAO), SITUACAO_ATIVO);\n \n criteriaQuery.where(ativeCondition);\n \n TypedQuery<PeriodoLetivo> query = em.createQuery(criteriaQuery);\n return query.getResultList();\n }", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "protected void setToolTipText(Tile tile) {\n\t\tif(!peek && hidden) { tile.setToolTipText(\"concealed tile\"); }\n\t\telse {\n\t\t\tString addendum = \"\";\n\t\t\tif(playerpanel.getPlayer().getType()==Player.HUMAN) { addendum = \" - click to discard during your turn\"; }\n\t\t\ttile.setToolTipText(tile.getTileName()+ addendum); }}", "private void activarControles(boolean estado) {\n this.panPrincipioActivo.setEnabled(estado);\n this.lblNombre.setEnabled(estado);\n this.txtNombre.setEditable(estado);\n this.lblDescripcion.setEnabled(estado);\n this.txtDescripcion.setEditable(estado);\n this.chkVigente.setEnabled(estado);\n this.btnAceptar.setEnabled(estado);\n this.btnCancelar.setEnabled(estado);\n \n this.panListadoPA.setEnabled(! estado);\n this.tblListadoPA.setEnabled(! estado);\n this.btnNuevo.setEnabled(! estado);\n this.btnModificar.setEnabled(! estado);\n \n if(estado == true){\n this.txtNombre.requestFocusInWindow();\n }else{\n this.tblListadoPA.requestFocusInWindow();\n }\n }", "public CalculoNotaBimestral() {\n initComponents();\n NotadaProva.setEnabled(false);\n Resultado.setEnabled(false);\n }", "public static void setTipps(int[] t) {\r\n\t\t\ttipps = new ArrayList<Integer>();\r\n\t\t\tfor (int i = 0; i < t.length; i = i + 2) {\r\n\t\t\t\tif (t[i] == -1) {\r\n\t\t\t\t\ttipps.add(NICHT_GESETZT);\r\n\t\t\t\t\ttipps.add(NICHT_GESETZT);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (t[i] == t[i + 1]) {\r\n\t\t\t\t\t\ttipps.add(UNENTSCHIEDEN);\r\n\t\t\t\t\t\ttipps.add(UNENTSCHIEDEN);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (t[i] > t[i + 1]) {\r\n\t\t\t\t\ttipps.add(SIEG);\r\n\t\t\t\t\ttipps.add(NIEDERLAGE);\r\n\t\t\t\t}\r\n\t\t\t\tif (t[i] < t[i + 1]) {\r\n\t\t\t\t\ttipps.add(NIEDERLAGE);\r\n\t\t\t\t\ttipps.add(SIEG);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}", "@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}", "public void activities(){\n if (exercise.isSelected()){\n newStudent.addActivity(\"exercise\");\n }\n if (sleeping.isSelected()){\n newStudent.addActivity(\"sleeping\");\n }\n if (sports.isSelected()){\n newStudent.addActivity(\"sports\");\n }\n if (music.isSelected()){\n newStudent.addActivity(\"music\");\n }\n if (fishing.isSelected()){\n newStudent.addActivity(\"fishing\");\n }\n if (familyTime.isSelected()){\n newStudent.addActivity(\"familyTime\");\n }\n if (watchingTV.isSelected()){\n newStudent.addActivity(\"watchingTV\");\n }\n if (reading.isSelected()){\n newStudent.addActivity(\"reading\");\n }\n }", "public ConsultoriosExtAntecedentes() {\n initComponents();\n QuitarLaBarraTitulo();\n mensaje.setVisible(false);\n }", "public void activar(){\n\n }", "public PanelInformesYEstadisticas() {\r\n\t\tinitComponents();\r\n\t\t//Util.personaSinResultados(lbSinResultados, true);\r\n\t}", "public vtnAdminMenuUsuariosA() {\n initComponents();\n Image icono = Toolkit.getDefaultToolkit().getImage(\"src/design/softipet.png\");\n this.setIconImage(icono);\n }", "public pnl_Gestionar_info_laboratorio() {\n initComponents();\n listar_info_lab.setSelected(true);\n new CambiaPanel(panel_contenedor, new paneles_de_paneles.de_gestionar_info_laboratorio_listar());\n pnl_Gestionar_contrato.color_performed(listar_info_lab,add_info_lab);\n }", "public menuFornecedorView() {\n initComponents();\n botoes(true,true,false,true,false,false);\n campos(false,true,false,false,false,false);\n }", "public void setActivo(String activo) {\r\n\t\tthis.activo = activo;\r\n\t}", "private void initializeTooltips() {\n\t\ttooltipPitch = new Tooltip();\n\t\tbuttonInfoPitch.setTooltip(tooltipPitch);\n\n\t\ttooltipGain = new Tooltip();\n\t\tbuttonInfoGain.setTooltip(tooltipGain);\n\n\t\ttooltipEcho = new Tooltip();\n\t\tbuttonInfoEcho.setTooltip(tooltipEcho);\n\n\t\ttooltipFlanger = new Tooltip();\n\t\tbuttonInfoFlanger.setTooltip(tooltipFlanger);\n\n\t\ttooltipLowPass = new Tooltip();\n\t\tbuttonInfoLowPass.setTooltip(tooltipLowPass);\n\t}", "private void iniciarTela() {\n\t\tsetValorPagar(getValorTotal());\n\t\tgetjPanelVendasProsseguir().getjTFieldValorTotCompra().setText(String.format(\" R$ %.2f\", getValorTotal()));\n\t\tgetjPanelVendasProsseguir().getjTFieldValorPagar().setText(String.format(\" R$ %.2f\", getValorPagar()));\n\t\tgetjPanelVendasProsseguir().getjTFieldDesconto().requestFocus();\n\t}", "public TelaInicio() {\n initComponents();\n //j[0] - Jogador 1\n //j[1] - Jogador 2\n j[0] = Jogador.getInstance();\n j[1] = Jogador.getInstance2();\n p[0] = Personagem.getInstance();\n String nomeP1 = p[0].getNome();\n p[0].GetPersonagem(nomeP1);\n Icon icon = new ImageIcon(\"../images/f3.png\");\n txtNomeJ1.setText(j[0].getNome());\n txtApelidoJ1.setText(j[0].getApelido());\n J2Nome.setText(j[1].getNome());\n J2Apelido.setText(j[1].getApelido());\n if(!jRPar.isSelected() && !jRImpar.isSelected())\n btnComecar.setEnabled(false);\n\n }", "private void defineToolBar() {\r\n //ARREGLO CON LOS BOTONES ORDENADOS POR POSICION\r\n tools = new ImageView[]{im_tool1,im_tool2,im_tool3,im_tool4,im_tool5,im_tool6,im_tool7,im_tool8,im_tool9,im_tool10,im_tool11,im_tool12}; \r\n //CARGA DE LA BD LA CONFIGURACION DE USUARIO PARA LA PANTALLA\r\n toolsConfig = Ln.getInstance().loadToolBar();\r\n // arreglo con cada etiqueta, ordenado por boton\r\n tooltips = new String[]{\r\n \"Nueva \" + ScreenName + \" \",\r\n \"Editar \" + ScreenName + \" \",\r\n \"Guardar \" + ScreenName + \" \",\r\n \"Cambiar Status de \" + ScreenName + \" \",\r\n \"Imprimir \" + ScreenName + \" \",\r\n \"Cancelar \",\r\n \"Sin Asignar \",\r\n \"Faltante en \" + ScreenName + \" \",\r\n \"Devolución en \" + ScreenName + \" \",\r\n \"Sin Asignar\",\r\n \"Sin Asignar\",\r\n \"Buscar \" + ScreenName + \" \"\r\n };\r\n //se asigna la etiqueta a su respectivo boton\r\n for (int i = 0; i < tools.length; i++) { \r\n Tooltip tip_tool = new Tooltip(tooltips[i]);\r\n Tooltip.install(tools[i], tip_tool);\r\n }\r\n \r\n im_tool7.setVisible(false);\r\n im_tool8.setVisible(false);\r\n im_tool9.setVisible(false);\r\n im_tool10.setVisible(false);\r\n im_tool11.setVisible(false);\r\n }", "private void tampil_kereta() {\n kereta_combo.addItem (\"Argo Parahyangan\");\n kereta_combo.addItem (\"Argo Jati\");\n kereta_combo.addItem (\"Bangun Karta\");\n kereta_combo.addItem (\"Bima\");\n kereta_combo.addItem (\"Kahuripan\");\n kereta_combo.addItem (\"Lodaya\"); \n kereta_combo.addItem (\"Sembari\");\n kereta_combo.addItem (\"Turangga\");\n \n }", "public void setTrangThaiImage(String active){\n if(active.equals(\"true\")){\n mTrangThaiImage.setImageResource(R.drawable.ic_notifications_on_white_24dp);\n }else if (active.equals(\"false\")) {\n mTrangThaiImage.setImageResource(R.drawable.ic_notifications_off_grey600_24dp);\n }\n }", "public CadastrarNota() {\n initComponents();\n setLocationRelativeTo(this);\n setTitle(\"Cadastro de Alunos\");\n setResizable(false);\n Atualizar();\n }", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "private void opciones() {\n switch (cboTipo.getSelectedIndex()) {\n case 1:\n txtPractica.setEditable(false);\n txtLaboratorio.setEditable(false);\n txtTrabajo.setEditable(false);\n break;\n case 2:\n txtPractica.setEditable(true);\n txtLaboratorio.setEditable(false);\n txtTrabajo.setEditable(false);\n break;\n case 3:\n txtPractica.setEditable(true);\n txtLaboratorio.setEditable(true);\n txtTrabajo.setEditable(false);\n break;\n case 4:\n txtPractica.setEditable(true);\n txtLaboratorio.setEditable(true);\n txtTrabajo.setEditable(true);\n break;\n }\n\n }", "@Override\n public String toString()\n {\n if(!isActive()) return \"Task \" + title + \" is inactive\";\n else\n {\n if(!isRepeated()) return \"Task \" + title + \" at \" + time;\n else return \"Task \" + title + \" from \" + start + \" to \" + end + \" every \" + repeat + \" seconds\";\n }\n }", "public agendaVentana() {\n initComponents();\n setIconImage(new ImageIcon(this.getClass().getResource(\"/IMG/maqui.png\")).getImage());\n citasDAO = new CitasDAO();\n clienteDAO = new ClienteDAO();\n loadmodel();\n loadClientesCombo();\n loadClientesComboA();\n jTabbedPane1.setEnabledAt(2, false);\n\n }", "public void activarVista(){\r\n\tvista.getVerVistaAutorObra().addActionListener(r->{\r\n\t\tCrearVista.crearVIstaAutorObra(con);\r\n\t\tvista.getTable().removeAll();\r\n\t\tlistaArte= new ArrayList<ObraArte>();\r\n\t\tlistaArte.removeAll(listaArte);\r\n\t\tlistaArte=SeleccionarDatosVista.getTodosRegistros(con);\r\n\t\ttableModelArteVista= new TableModelArteVista(listaArte, CABECERA);\r\n\t\tvista.getTable().setModel(tableModelArteVista);\r\n\t\tvista.getTxtBarraStatus().setText(\"VISTA CREADA. DICHA VISTA NO ES EDITABLE.\");\r\n\t\tvista.getButton_Modificar().setEnabled(false);\r\n\t\tvista.getButtonBorrar().setEnabled(false);\r\n\t\tvista.getMntmBorrarFila().setEnabled(false);\r\n\t\tvista.getButtonInsertarNuevo().setEnabled(false);\r\n\t\tvista.getLabelSize().setText(vista.getTable().getRowCount()+\" elementos.\");\r\n\t\t\r\n\t});\r\n}", "public TelaContaUnica() {\n initComponents();\n }", "public void jLabelActionPerformedGeneral(String sTipo,ActionEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//SELECCIONA FILA A OBJETO ACTUAL\t\t\t\r\n\t\t\tthis.seleccionarFilaTablaPagosAutorizadosActual();\r\n\t\t\t\t\r\n\t\t\tthis.actualizarInformacion(\"EVENTO_CONTROL\",false,this.pagosautorizados);\r\n\t\t\t\r\n\t\t\tthis.actualizarInformacion(\"INFO_PADRE\",false,this.pagosautorizados);\r\n\t\t\t\t\r\n\t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,PagosAutorizadosConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }", "public void setNombreTI(String nombreTI) {\n this.nombreTI = nombreTI;\n }", "public void setAktiivisuus()\r\n\t{\r\n\t\tonAktiivinen = false;\r\n\t}", "public misTutores() {\n initComponents();\n }", "public void cambiarFondobtnPagoTarjeta(){\n btnPagoTarjeta.setBackgroundResource(R.drawable.btn_met_pgo_seleccion);\n btnPagoBancolo.setChecked(false);\n btnPagoNequi.setChecked(false);\n btnPagoPSE.setChecked(false);\n }", "private void popularTela() {\n ClearMsgsEvent.fire(this);\n CadastroContatoView v = getView();\n v.nome().setValue(contato.getNome());\n v.sobrenome().setValue(contato.getSobrenome());\n v.email().setValue(contato.getEmail());\n v.numero().setValue(contato.getNumero());\n v.dataNascimento()\n .setValue(contato.getDataNascimento() == null ? new Date() : contato.getDataNascimento());\n }", "public void limpiarLabelsVacios() {\r\n label_nombre.setText(\"\");\r\n label_horas_teoria.setText(\"\");\r\n label_horas_practica.setText(\"\");\r\n label_creditos.setText(\"\");\r\n }", "public void tenta(int t) {\n \tif(this.checkBoxHelp.isSelected()) {\r\n \t\t//distinguo se sono ancora in gara o meno\r\n \t\tif(Integer.parseInt(this.tentativiRimasti.getText()) > 0) {\r\n \t\t\tif(t == segreto) {\r\n \t\t\t\tthis.output.setText(\"Hai vinto! Il numero era: \" + this.segreto + \". Hai utilizzato \" + this.tentativiFatti + \" tentativi.\");\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\tif(t < segreto) {\r\n \t\t\t\t\tif(t > min) {\r\n \t\t\t\t\t\tmin = t;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tthis.output.setText(\"Troppo basso! Inserisci un numero tra [\" + min + \" - \" + max + \"]. Suggerimento:\" + ((int)(min+max)/2));\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\t// tentativo troppo alto\r\n \t\t\t\t\tif(t > segreto) {\r\n \t\t\t\t\t\tif(t < max) {\r\n \t\t\t\t\t\t\tmax = t;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tthis.output.setText(\"Troppo alto! Inserisci un numero tra [\" + min + \" - \" + max + \"]. Suggerimento:\" + ((int)(min+max)/2));\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\telse {\r\n \t\t\t// ho perso\r\n \t\t\tthis.output.setText(\"Hai perso! Il numero era: \" + this.segreto);\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t}\r\n \t}\r\n \telse {\r\n \t\t// Modalita normale\r\n \t\t//distinguo se sono ancora in gara o meno\r\n \t\tif(Integer.parseInt(this.tentativiRimasti.getText()) > 0) {\r\n \t\t\tif(t == segreto) {\r\n \t\t\t\tthis.output.setText(\"Hai vinto! Il numero era: \" + this.segreto + \". Hai utilizzato \" + this.tentativiFatti + \" tentativi.\");\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\tif(t < segreto) {\r\n \t\t\t\t\tthis.output.setText(\"Troppo basso!\");\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\t// tentativo troppo alto\r\n \t\t\t\t\tthis.output.setText(\"Troppo alto!\");\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\t// ho perso\r\n \t\t\tthis.output.setText(\"Hai perso! Il numero era: \" + this.segreto);\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t}\r\n \t}\r\n \t\r\n }", "public Tabla(int tip) {\n\t\tthis.sirinaTable = 20;\n\t\tthis.visinaTable = 20;\n\t\tthis.tip = tip;\n\t\tthis.tabla = new char[20][20];\n\t\tfor (int i = 0; i < this.visinaTable;i++) {\n\t\t\tfor (int j = 0; j < this.sirinaTable;j++) {\n\t\t\t\ttabla[i][j] = '.';\n\t\t\t}\n\t\t}\n\t\trezultat = 0;\n\t\tzmija = new ArrayList<Cvor>();\n\t\t\n\t\tif (tip == 2) {\n\t\t\tthis.dodajZidove();\n\t\t}\n\t\telse if(tip == 3) {\n\t\t\tthis.dodajPrepreke1();\n\t\t}\n\t\telse if(tip == 4) {\n\t\t\tthis.dodajPrepreke2();\n\t\t}\n\t\tthis.dodajZmijuPocetak();\n\t\tthis.dodajHranu();\n\t\tthis.smjer = 'd';\n\t}", "public JLabel[] todasLabels(){\n JLabel[] todasLabels = new JLabel[]{lbData, lbNomeCliente, lbStatus};\n \n return todasLabels;\n }", "public String toString(){\n\t\tif(categoria == 1)\n\t\t\treturn \"Profesor Ayudante\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse if(categoria == 2)\n\t\t\treturn \"Profesor Titular de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse\n\t\t\treturn \"Profesor Catedrático de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t}", "public String GiveTask(){\n return \"[\" + getStatusIcon() + \"] \" + this.description;\n }", "public void toolbarImplementacionIsmael() {\n\t\t// ToolBar Fuente\n\t\tbtnFuente = new JButton(\"Fuente\");\n\t\tbtnFuente.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnFuente.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnFuente);\n\n\t\tbtnSeleccionarTodo = new JButton(\"Selec.Todo\");\n\t\tbtnSeleccionarTodo.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnSeleccionarTodo.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnSeleccionarTodo);\n\n\t\tbtnHora = new JButton(\"Hora\");\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnHora.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnHora);\n\t}", "public boolean isActivo()\r\n/* 173: */ {\r\n/* 174:318 */ return this.activo;\r\n/* 175: */ }", "public void setIconTablaPlantilla() {\n\t\t// Establece el icono del boton editar\n\t\tFile archivo1 = new File(\"imagenes\" + File.separator + \"lapices.png\");\n\t\tImage imagen1 = new Image(archivo1.toURI().toString(), 50, 50, true, true, true);\n\t\tbtnModificar.setGraphic(new ImageView(imagen1));\n\t\tbtnModificar.setContentDisplay(ContentDisplay.CENTER);\n\t}", "private void constroiObjetosNotas()\n {\n img_voltarN = (ImageView) vw_notas.findViewById(R.id.img_voltar);\n pager = (ViewPager) vw_notas.findViewById(R.id.pager);\n tabs = (SlidingTabLayout) vw_notas.findViewById(R.id.tabs);\n\n img_voltarN.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n area_geral.removeViewAt(2);\n pagina = PaginaAtual.PORTAL_DISCENTE;\n web.loadUrl(\"https://www.sigaa.ufs.br/sigaa/verPortalDiscente.do\");\n }\n });\n }", "public String getNombreTI() {\n return this.nombreTI;\n }", "public void actionsTouches () {\n\t\t//Gestion des deplacements du mineur si demande\n\t\tif (Partie.touche == 'g' || Partie.touche == 'd' || Partie.touche == 'h' || Partie.touche == 'b') deplacements();\n\n\t\t//Affichage du labyrinthe et des instructions, puis attente de consignes clavier.\n\t\tpartie.affichageLabyrinthe();\n\n\t\t//Quitte la partie si demande.\n\t\tif (Partie.touche == 'q') partie.quitter();\n\n\t\t//Trouve et affiche une solution si demande.\n\t\tif (Partie.touche == 's') affichageSolution();\n\n\t\t//Recommence la partie si demande.\n\t\tif (Partie.touche == 'r') {\n\t\t\tgrille.removeAll();\n\t\t\tpartie.initialisation();\n\t\t}\n\n\t\t//Affichage de l'aide si demande\n\t\tif (Partie.touche == 'a') {\n\t\t\tString texteAide = new String();\n\t\t\tswitch(themeJeu) {\n\t\t\tcase 2 : texteAide = \"Le but du jeu est d'aider Link à trouver la sortie du donjon tout en récupérant le(s) coffre(s).\\n Link doit egalement recuperer la Master Sword qui permet de tuer le monstre bloquant le chemin.\\n\\nLink se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 3 : texteAide = \"Le but du jeu est d'aider Samus à trouver la sortie du vaisseau tout en récupérant le(s) émeraude(s).\\nSamus doit egalement recuperer la bombe qui permet de tuer le metroid qui bloque l'accès à la sortie.\\n\\nSamus se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 4 : texteAide = \"Le but du jeu est d'aider le pompier à trouver la sortie du batiment tout en sauvant le(s) rescapé(s).\\nLe pompier doit egalement recuperer l'extincteur qui permet d'éteindre le feu qui bloque l'accès à la sortie.\\n\\nLe pompier se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 5 : texteAide = \"Le but du jeu est d'aider Mario à trouver le drapeau de sortie tout en ramassant le(s) pièce(s).\\nMario doit egalement recuperer l'étoile d'invincibilité qui permet de se débarasser du Goomba qui l'empêche de sortir.\\n\\nMario se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Here we gooo !\"; break;\n\t\t\tdefault : texteAide = \"Le but du jeu est d'aider le mineur à trouver la sortie du labyrinthe tout en extrayant le(s) filon(s).\\nLe mineur doit egalement recuperer la clef qui permet l'ouverture de le porte qui bloque l'accès à la sortie.\\n\\nLe mineur se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n============================================ AIDE ========================================\\n\\n\" + texteAide + \"\\n\\n==========================================================================================\\n\");\n\t\t\tJOptionPane.showMessageDialog(null, texteAide, \"Aide\", JOptionPane.QUESTION_MESSAGE);\n\t\t\tPartie.touche = ' ';\n\t\t}\n\n\t\t//Affichage de les infos si demande\n\t\tif (Partie.touche == 'i') {\n\t\t\tSystem.out.println(\"\\n============================================ INFOS =======================================\\n\\nCe jeu a ete developpe par Francois ADAM et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\\n\\n==========================================================================================\\n\");\n\t\t\tPartie.touche = ' ';\n\t\t\tJOptionPane.showMessageDialog(null, \"Ce jeu a été développé par François Adam et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\", \"Infos\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/EMN.png\")));\n\t\t}\n\n\t\t//Nettoyage de l'ecran de console\n\t\tSystem.out.println(\"\\n==========================================================================================\\n\");\n\t}", "private void afficheAllumettes(int nbAllumette) {\r\n\t\t\r\n\t\tfor (int i=1; i<=nbAllumette; i++) {\r\n\t\t\tString id = \"allumette\".concat(String.valueOf(i));\r\n\t\t\t\r\n\t\t\tButton button = new Button();\r\n\t\t\tbutton.setId(id);\r\n\t\t\tbutton.setOnAction(a -> {\r\n\t\t\t\tchoixAllumette(a);\r\n\t\t\t});\r\n\t\t\tbutton.setMinWidth(5);\r\n\t\t\tbutton.setMaxWidth(5);\r\n\t\t\tbutton.setPrefWidth(5);\r\n\r\n\t\t\tbutton.setMinHeight(150);\r\n\t\t\tbutton.setMaxHeight(150);\r\n\t\t\tbutton.setPrefHeight(150);\r\n\t\t\t\r\n\t\t\tboxAllumettes.getChildren().add(button);\r\n\t\t}\r\n\t\t\r\n\t\tbtn_valider.setDisable(true);\r\n\t}", "public TelaCidadaoDescarte() {\n initComponents();\n }", "public void verEstado(){\n for(int i = 0;i <NUMERO_AMARRES;i++) {\n System.out.println(\"Amarre nº\" + i);\n if(alquileres.get(i) == null) {\n System.out.println(\"Libre\");\n }\n else{\n System.out.println(\"ocupado\");\n System.out.println(alquileres.get(i));\n } \n }\n }", "private void dibujarPuntos() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y].add(obtenerIcono(partida.getTablero()\r\n .getTablero()[x][y].getColor()));\r\n }\r\n }\r\n }", "public TelaInicial() {\n initComponents();\n a_estrela.setVisible(false);\n algoritmo_genetico.setVisible(false);\n }", "public void jLabelActionPerformedGeneral(String sTipo,ActionEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//SELECCIONA FILA A OBJETO ACTUAL\t\t\t\r\n\t\t\tthis.seleccionarFilaTablaLiquidacionImpuestoImporActual();\r\n\t\t\t\t\r\n\t\t\tthis.actualizarInformacion(\"EVENTO_CONTROL\",false,this.liquidacionimpuestoimpor);\r\n\t\t\t\r\n\t\t\tthis.actualizarInformacion(\"INFO_PADRE\",false,this.liquidacionimpuestoimpor);\r\n\t\t\t\t\r\n\t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,LiquidacionImpuestoImporConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }", "private void initializeTecnico() {\r\n\t\t\r\n\t\tcontroleAtividade = new ControleAtividade();\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 640, 480);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\r\n\t\tframe.setTitle(\"Avaliar atividade pendente\");\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\r\n\t\tgroupLayout.setHorizontalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addComponent(panel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 624, Short.MAX_VALUE)\r\n\t\t);\r\n\t\tgroupLayout.setVerticalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addComponent(panel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE)\r\n\t\t);\r\n\t\t\r\n\t\t//TODO Popular a lista dinamicamente;\r\n\t\t\r\n\t\tlist = new JList();\r\n\t\t\r\n\t\tList<Atividade> atividadesPendentes = controleAtividade.recuperarAtividades(Status.PENDENTE);\t\t\r\n\t\tatividadesPendentesArray = new Atividade[atividadesPendentes.size()];\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < atividadesPendentesArray.length; i++)\r\n\t\t\tatividadesPendentesArray[i] = (Atividade) atividadesPendentes.get(i);\r\n\r\n\t\t\r\n\t\tlist.setListData(atividadesPendentesArray);\r\n\t\t\r\n\t\tlist.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t//TODO Seria interessante passar o controle como parametro, afim de usa-lo no listener dos botoes;\r\n\t\t\t\tif(atividadesPendentesArray.length > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tAtividade atividade = (Atividade) list.getSelectedValue();\r\n\t\t\t\t\t\r\n\t\t\t\t\tjanelaDeDecisao = new ViewDecisaoAtividadesPendentes(atividade);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel lblAtividadesPendendentes = new JLabel(\"Atividades pendentes:\");\r\n\t\t\r\n\t\tbtnFechar = new JButton(\"Fechar\");\r\n\t\t\r\n\t\tbtnFechar.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t//TODO Seria interessante passar o controle como parametro, afim de usa-lo no listener dos botoes;\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tGroupLayout gl_panel = new GroupLayout(panel);\r\n\t\tgl_panel.setHorizontalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(list, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 604, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addComponent(lblAtividadesPendendentes)\r\n\t\t\t\t\t\t.addComponent(btnFechar, Alignment.TRAILING))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_panel.setVerticalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addGap(23)\r\n\t\t\t\t\t.addComponent(lblAtividadesPendendentes)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 26, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(list, GroupLayout.PREFERRED_SIZE, 338, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addComponent(btnFechar)\r\n\t\t\t\t\t.addGap(7))\r\n\t\t);\r\n\t\tpanel.setLayout(gl_panel);\r\n\t\tframe.getContentPane().setLayout(groupLayout);\r\n\t}", "private void setTooltip() {\n\t\tif (buttonAddScannable != null && !buttonAddScannable.isDisposed()) {\n\t\t\tgetParentShell().getDisplay().asyncExec(() -> buttonAddScannable.setToolTipText(\"Select scannable to add to list...\"));\n\t\t}\n\t}" ]
[ "0.6838378", "0.63930184", "0.6122191", "0.6122191", "0.61074084", "0.5962456", "0.5825227", "0.57951295", "0.5623764", "0.56198114", "0.5614262", "0.55985606", "0.55878794", "0.55665445", "0.5535824", "0.55330783", "0.5518897", "0.55006284", "0.5462377", "0.5453196", "0.54227906", "0.53953403", "0.5393247", "0.5382517", "0.5350243", "0.532216", "0.5321642", "0.53175694", "0.5313515", "0.53028065", "0.53024715", "0.5282395", "0.52775", "0.52687716", "0.52563345", "0.5249814", "0.52494603", "0.5233015", "0.5226271", "0.5214434", "0.5211033", "0.5210682", "0.5208628", "0.52069247", "0.52056336", "0.5194925", "0.5187368", "0.5182076", "0.51786166", "0.5153231", "0.5151032", "0.5149964", "0.5149678", "0.51442254", "0.5138443", "0.51380706", "0.5127806", "0.5121735", "0.5121225", "0.51202774", "0.51166487", "0.5112614", "0.51103526", "0.5108743", "0.5099415", "0.50933707", "0.50927913", "0.50898767", "0.5087718", "0.5083814", "0.50828207", "0.50792515", "0.5079189", "0.5071996", "0.5067892", "0.50678396", "0.50627625", "0.5059251", "0.5053685", "0.5051753", "0.5051467", "0.50477684", "0.50466514", "0.50465673", "0.5046084", "0.5038621", "0.50382763", "0.503633", "0.5036002", "0.5035829", "0.5031911", "0.5029282", "0.50226885", "0.5018753", "0.50163144", "0.501401", "0.50124264", "0.50112677", "0.5011196", "0.5010409" ]
0.5179568
48
Seleccionar el tipo de actividad d'una actividad
public abstract String getTipoByAct(Actividad activity) throws PersistenceException, ClassNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void menuTipoActividad() {\n\t\tSystem.out.println(\"MENU TIPOS ACTIVIDAD\");\n\t\tSystem.out.println(\"1. LOW\");\n\t\tSystem.out.println(\"2. MEDIUM\");\n\t\tSystem.out.println(\"3. HIGH\");\n\t}", "public void seleccionarTipoComprobante() {\r\n if (com_tipo_comprobante.getValue() != null) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n } else {\r\n tab_tabla1.limpiar();\r\n tab_tabla2.limpiar();\r\n }\r\n tex_num_transaccion.setValue(null);\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales,tex_num_transaccion\");\r\n }", "public void setTipo(int tipo) {\r\n this.tipo = tipo;\r\n }", "public void setTipo(String tipo) {\r\n this.tipo = tipo;\r\n }", "public void setTipo(String tipo);", "public void selectModelItem(final String type, final String name){\n\t\tactivate();\n\t\tDisplay.syncExec(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n DefaultCTabItem tabItem = new DefaultCTabItem(1);\n\t\t\t\ttabItem.activate();\n\t\t\t\tGraphicalViewer viewer = ((IEditorPart) tabItem.getSWTWidget().getData()).getAdapter(GraphicalViewer.class);\n\t\t\t\tviewer.select(ViewerHandler.getInstance().getEditParts(viewer, new ModelEditorItemMatcher(type, name)).get(0));\n\t\t\t}\n\t\t});\n\t}", "public void verSeleccionarAccion(String entidad)\r\n\t{\r\n\t\tseleccionaraccion = new SeleccionarAccion(this, entidad);\r\n\t\tseleccionaraccion.setVisible(true);\r\n\t}", "public void whatTypeOfPastaClicked(View view) {\n\n Intent child = new Intent(this, SelectPastaType.class);\n child.putExtra(\"selectedType\", selectedType);\n\n startActivityForResult(child, REQ_CODE_PASTA_TYPE);\n\n }", "@Override\r\n\tpublic void setSelectedType(int paramInt) {\n\r\n\t}", "@Override\r\n\tpublic void solicitarTipoTransaccion() {\n\t\tSystem.out.println(\"Escoger tipo de transaccion\");\r\n\t\t\r\n\t}", "public void setTipo(String t) {\n\t\tthis.tipo = t;\n\t}", "public void verSeleccionarTipoPrueba(Candidato actualcandidat)\r\n\t{\r\n\t\tactualizarFinalizacionConvocatorias();\r\n\t\tList pruebas = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t pruebas= PruebaBD.listar(conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(pruebas != null)\r\n\t\t{\r\n\t\t\tseleccionarprueba = new SeleccionarTipoPrueba(this, actualcandidat);\r\n\t\t\tseleccionarprueba.setVisible(true);\r\n\t\t}\r\n\t}", "public void verSeleccionarResultadosConvocatoria(String tiporesultado)\r\n\t{\r\n\t\tseleccionarresultadosconvo = new SeleccionarResultadosConvocatoria(this, tiporesultado);\r\n\t\tseleccionarresultadosconvo.setVisible(true);\r\n\t}", "private void selectType(TypeInfo type) {\n if (type == null || !type.getWidget().getSelection()) {\n mInternalTypeUpdate = true;\n mCurrentTypeInfo = type;\n for (TypeInfo type2 : sTypes) {\n type2.getWidget().setSelection(type2 == type);\n }\n updateRootCombo(type);\n mInternalTypeUpdate = false;\n }\n }", "private void setTipo(int tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "public void setType(){\r\n if(rbtnTruncamiento.isSelected()){\r\n interpretador.setTipoValores(1);\r\n in.setTipoValores(1);\r\n }else{\r\n interpretador.setTipoValores(2);\r\n in.setTipoValores(2);\r\n }\r\n getK();\r\n }", "public void setActivo(String activo) {\r\n\t\tthis.activo = activo;\r\n\t}", "public void setTransactionType(int transactionChoice);", "public void setTipo(java.lang.String tipo) {\n this.tipo = tipo;\n }", "public void setTipo(java.lang.String tipo) {\n this.tipo = tipo;\n }", "public SelecioneTipoImportacao() {\n initComponents();\n }", "public void setTipo(Tipo tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "@Override\r\n\tpublic List<Type> selectType() {\n\t\treturn gd.selectType();\r\n\t}", "public void setTipo(String tipo) {\n\t\tthis.tipo = tipo;\n\t}", "public abstract int getTipoByName(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;", "public void setTipo(String x){\r\n tipo = x;\r\n }", "@Override\r\n\tpublic String getModel() {\n\t\treturn \"Activa\";\r\n\t}", "void selectActivityOptions(int activity_number, Model model);", "Object getTipo();", "public void verSeleccionarConvocatoria(String tipoprueba, Candidato actualcandidat)\r\n\t{\r\n\t\tseleccionarconvocatoria = new SeleccionarConvocatoria(this, tipoprueba, actualcandidat);\r\n\t\tseleccionarconvocatoria.setVisible(true);\r\n\t}", "private void jBotonAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBotonAgregarActionPerformed\n // TODO add your handling code here:\n if (this.jnombre.getText().length()!=0){ // validar que jnombre no este vacio\n // otro comentario \n String nombre = this.jnombre.getText();\n boolean activo = this.jactivo.isSelected();\n int tipo = 0;\n if (activo==true) {\n tipo=1;\n }\n JOptionPane.showMessageDialog(rootPane, \"Comuna Ingresada\"); // agregar mensaje\n this.jnombre.setText(\"\");\n this.jactivo.isSelected(); // error falta marcar el select ()\n \n Conexion cn = new Conexion();\n cn.InsertarDatos(nombre,tipo);\n \n IniciarTabla();\n \n \n \n \n \n \n } else {\n \n \n JOptionPane.showMessageDialog(rootPane, \"Tiene que ingresar datos\"); // agregar mensaje \n \n \n \n }//GEN-LAST:event_jBotonAgregarActionPerformed\n }", "public AccountTypeInfomation() {\n initComponents(); \n rbtnSelectAll.setSelected(false);\n btnCreate.setVisible(true);\n btnEdit.setVisible(false);\n btnRemove.setVisible(false);\n loadDefault();\n }", "@Override\r\n\tpublic void setTipo(Tipo t) {\n\t\t\r\n\t}", "public void setTipo(int value) {\n this.tipo = value;\n }", "public void TripType()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"TripType\")).click();\n\t}", "public void verSeleccionarConvocatoriaAnalisis()\r\n\t{\r\n\t\tconvocatoriaanalisis = new SeleccionarConvocatoriaAnalisis(this);\r\n\t\tconvocatoriaanalisis.setVisible(true);\r\n\t}", "private void cargaComboTipoDocumento() {\n\t\tcomboTipoDoc = new JComboBox();\n\t\tfor (TipoDocumentoDTO tipoDocumentoDTO : tip) {\n\t\t\tcomboTipoDoc.addItem(tipoDocumentoDTO.getAbreviacion());\n\t\t}\n\n\t}", "public String getTipo() {\r\n return tipo;\r\n }", "public String getTipo() {\r\n return tipo;\r\n }", "@FXML\n void selectType() {\n \t//hide all errors\n \thideErrors();\n \t//get countries from /type/metadata.txt\n \t//Reset range string\n T3_startYear_ComboBox.setValue(\"\");\n T3_endYear_ComboBox.setValue(\"\");\n //update country list\n String type = T3_type_ComboBox.getValue(); // getting type\n countries.clear();\n for (String country: DatasetHandler.getCountries(type)){\n countries.add(country);\n }\n T3_country_ComboBox.setValue(\"\");\n //clearing the StartYear and EndYear values and lists\n }", "Act getCDAType();", "public void verSeleccionarDatosporID(String entidad, String accion)\r\n\t{\r\n\t\tseleccionardatos = new SeleccionarDatosporID(this,entidad,accion);\r\n\t\tseleccionardatos.setVisible(true);\r\n\t}", "private void getUserTypeChoice() {\n mTypeInput = \"(\";\n if (mBinding.chipApartment.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput = mTypeInput + \"'Apartment'\";\n }\n if (mBinding.chipLoft.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'Loft'\";\n }\n if (mBinding.chipHouse.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'House'\";\n }\n if (mBinding.chipVilla.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'Villa'\";\n }\n if (mBinding.chipManor.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'Manor'\";\n }\n mTypeInput += \")\";\n }", "private void setTipo() {\n if (getNumElementos() <= 0) {\n restartCelda();\n } else if (getNumElementos() > 1) { // Queda más de un elemento\n this.setTipoCelda(Juego.TVARIOS);\n } else { // Si queda solo un tipo de elemento, miramos si es un CR, edificio o un personaje\n if (this.contRecurso != null) {\n this.setTipoCelda(this.contRecurso.getTipo());\n } else if (this.edificio != null) {\n this.setTipoCelda(this.edificio.getTipo());\n } else if (!this.getPersonajes().isEmpty()) {\n this.setTipoCelda(this.getPersonajes().get(0).getTipo());\n }\n }\n }", "public String getTipo(){\r\n return tipo;\r\n }", "private void cargaComboBoxTipoLaboreo() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoLaboreoEntity p\");\n java.util.List<TipoLaboreoEntity> listaTipoLaboreoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoLaboreoEntity tipoLaboreo : listaTipoLaboreoEntity) {\n miVectorTipoLaboreo.add(tipoLaboreo.getTpoNombre());\n cboMomentos.addItem(tipoLaboreo);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }", "public String getTipo();", "public String getTipo();", "List<QtActivitytype> selectByExample(QtActivitytypeExample example);", "private void opciones() {\n switch (cboTipo.getSelectedIndex()) {\n case 1:\n txtPractica.setEditable(false);\n txtLaboratorio.setEditable(false);\n txtTrabajo.setEditable(false);\n break;\n case 2:\n txtPractica.setEditable(true);\n txtLaboratorio.setEditable(false);\n txtTrabajo.setEditable(false);\n break;\n case 3:\n txtPractica.setEditable(true);\n txtLaboratorio.setEditable(true);\n txtTrabajo.setEditable(false);\n break;\n case 4:\n txtPractica.setEditable(true);\n txtLaboratorio.setEditable(true);\n txtTrabajo.setEditable(true);\n break;\n }\n\n }", "public int getTipo() {\r\n return tipo;\r\n }", "public int getTipo() {\r\n\t\treturn tipo;\r\n\t}", "public String getTipo(){\n return tipo;\n }", "public void initChoice() {\n\t\t\t\t\n\t\tChoiceDialog<String> dialog = new ChoiceDialog<>(DB_MYSQL);\n\t\tdialog.setTitle(\"Base de datos\");\n\t\tdialog.setContentText(\"Seleccione una base de datos con la que trabajar\");\n\t\tdialog.getItems().addAll(DB_MYSQL, DB_SQL, DB_ACCESS);\n\t\n\t\tOptional<String> dbType = dialog.showAndWait();\n\t\t\n\t\tif( dbType.isPresent() ) {\t\n\t\t\t// Ajustamos nuestro modelo\n\t\t\tsetBd(dbType.get());\n\t\t\t\n\t\t} else {\n\t\t\tPlatform.exit(); // Entonces hemos acabado\n\t\t}\n\t}", "public SelectType (int _selectType) {\n selectType = _selectType;\n }", "public void setTipoCasilla(int tipo) {\n\t\ttipoCasella = tipo;\n\t}", "private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void getPlanificacion(int tipoPlanificacion);", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public void verSeleccionarCaracterisiticasEscalaId()\r\n\t{\r\n\t\tseleccionarcaract = new SeleccionarCaracterisiticasEscalaId(this);\r\n\t\tseleccionarcaract.setVisible(true);\r\n\t}", "void changeWindowTo(Class activity,TypesManager.obsType _type){\n Intent guestActivity = new Intent(this,activity);\n guestActivity.putExtra(\"obsType\",_type.getValue());\n startActivity(guestActivity);\n }", "@FXML\n private void chooseConnType(ActionEvent event){\n\n int choice;\n choice = srmi.getToggles().indexOf(srmi.getSelectedToggle());\n switch(choice) {\n\n case 0:\n protocolType = SOCKET;\n break;\n\n case 1:\n protocolType = RMI;\n break;\n }\n\n }", "@Then(\"^selects the journey type$\")\n\tpublic void select_flightTypes() throws InterruptedException, IOException {\n\t\tdriver.findElement(By.xpath(\"//input[@class='checkbox__input js-one-way control__one-way']\")).click();\n\t}", "public String getTipo(){\r\n return Tipo;\r\n }", "public int getTipo() {\n return tipo;\n }", "public void setActivo(Boolean activo) {\n this.activo = activo;\n }", "@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}", "private Acao.Tipo getTipo(String tipo) {\n if (tipo.contentEquals(DISPARO.getName())) {\n return DISPARO;\n }\n\n if (tipo.contentEquals(DESCONEXAO.getName())) {\n return DESCONEXAO;\n }\n\n return null;\n }", "public String getTipo(){\n\t\treturn this.tipo;\n\t}", "public void setTipo(Object tipo2) {\n\t\t\n\t}", "public void setTipologia (String tipologia) {\r\n\t\tthis.tipologia=tipologia;\r\n\t}", "TypeAssociation getAssocieCommeSujetInstanceObjet();", "public String tipoConta() {\n return \"Conta Comum\";\n }", "private void changeSet(String type){\n activeList = new ArrayList<>();\n int size = allResultRestaurants.size();\n\n Restaurante aux;\n for(int i = 0; i < size; i++){\n aux = allResultRestaurants.get(i);\n\n if(type.contains(aux.getType())){\n activeList.add(aux);\n }\n }\n\n clear();\n addAll(activeList);\n }", "public void setType(String type) {\n this.type = type;\n }", "private void cargaComboBoxTipoGrano() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoGranoEntity p\");\n java.util.List<TipoGranoEntity> listaTipoGranoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoGranoEntity tipoGrano : listaTipoGranoEntity) {\n miVectorTipoLaboreo.add(tipoGrano.getTgrNombre());\n cbxSemillas.addItem(tipoGrano);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }", "public static TipoProductoEnum obtenerTipo( final String nombre ) {\r\n TipoProductoEnum tipo = null;\r\n for( int i = 0; i < TipoProductoEnum.values().length; i++ ) {\r\n tipo = TipoProductoEnum.values()[ i ];\r\n if( tipo.name().equals( nombre ) ) {\r\n break;\r\n }\r\n }\r\n return tipo;\r\n }", "public void setSelectMethod(Selection s){\n selectType = s;\n }", "public AbstractPokemon.Type selectType()\n {\n JOptionPane typeSelector = new JOptionPane();\n Object message = \"Select which Pokemon this trainer is willing to capture:\";\n Object[] options = {AbstractPokemon.Type.FIRE_TYPE, AbstractPokemon.Type.WATER_TYPE, AbstractPokemon.Type.GRASS_TYPE, AbstractPokemon.Type.ANY_TYPE};\n int type = typeSelector.showOptionDialog(null, message, \"Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, \n options[3]);\n AbstractPokemon.Type faveType;\n switch(type)\n {\n case 0: faveType = AbstractPokemon.Type.FIRE_TYPE; break;\n case 1: faveType = AbstractPokemon.Type.WATER_TYPE; break;\n case 2: faveType = AbstractPokemon.Type.GRASS_TYPE; break;\n case 3: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n default: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n }\n return faveType;\n }", "public void setType (int type) {\n this.type = type;\n }", "public void setType (int type) {\n this.type = type;\n }", "@Override\n public void buildHabilidadSecundaria(int tipo) {\n \n String habilidad;\n \n habilidad = switch (tipo) {\n case 1 -> \"Burbuja\";\n case 2 -> \"Corriente marina\";\n case 3 -> \"Compresion\";\n default -> \"Tsunami\";\n };\n \n this.personaje.setHabilidadSecundaria(habilidad);\n }", "public TipoVehiculo getTipoVehiculo() {\r\n\t\treturn TipoVehiculo.valueOf(cb_TipoVehiculo.getSelectedItem().toString());\r\n\t}", "@FXML\n\tpublic void enableType(ActionEvent event) {\n\t\t// boolean typeExists=false;\n\t\tif (!txtNameDisableProductType.getText().isEmpty()) {\n\t\t\tProductType productType = restaurant.returnProductType(txtNameDisableProductType.getText());\n\t\t\tif (productType != null) {\n\n\t\t\t\ttry {\n\t\t\t\t\tproductType.setCondition(Condition.ACTIVE);\n\t\t\t\t\trestaurant.saveProductTypeData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"El tipo de producto ha sido habilitado\");\n\t\t\t\t\tdialog.setTitle(\"Tipo de producto habilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtNameDisableProductType.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del tipo de producto\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * for(int i=0;i<typeOptions.size() && !typeExists;i++) {\n\t\t\t\t * if(typeOptions.get(i).equals(productType.getName())) typeExists=true; }\n\t\t\t\t * \n\t\t\t\t * if (typeExists==false) { typeOptions.add(productType.getName()); }\n\t\t\t\t */\n\n\t\t\t} else {\n\t\t\t\ttypeOptions.add(txtNameDisableProductType.getText());\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este tipo de producto no existe. Ha sido añadido\");\n\t\t\t\tdialog.setTitle(\"Error, objeto no existente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public void setType(int type) {\n type_ = type;\n }", "ActionType getType();", "private void setSelectTypeData(){\n ArrayList<SelectType> selectTypes = new ArrayList<>();\n //add select types\n selectTypes.add(new SelectType(\"Multiple Choice\", \"multiple\"));\n selectTypes.add(new SelectType(\"True / False\",\"boolean\"));\n\n //fill in data\n ArrayAdapter<SelectType> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item,selectTypes);\n selectType.setAdapter(adapter);\n\n }", "public void TipoCliente() {\n\tint cambio=1;\n\tString tipoCliente=\"\";\n\tdo {\n\t\ttry {\n\t\t\ttipoCliente = (JOptionPane.showInputDialog(null, \"Selecciona el tipo de cliente\", null, JOptionPane.PLAIN_MESSAGE,null, new Object[]\n\t\t\t\t\t{ \"Selecciona\",\"Docente\", \"Administrativo\"}, \"Selecciona\")).toString() ;\n\t\t\t\n\t\t\tif(tipoCliente.equalsIgnoreCase(\"Docente\")) {\n\t\t\t\tingresaDocente();\n\t\t\t\tsetTipoCliente(\"Docente\");\n\t\t\t\t\n\t\t\t}else if(tipoCliente.equalsIgnoreCase(\"Administrativo\")) {\n\t\t\t\tingresaAdministrativo();\n\t\t\t\tsetTipoCliente(\"Administrativo\");\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Escoge una de las dos opciones\");\n\t\t\t}\n\t} catch (Exception e) {\n\t\tJOptionPane.showMessageDialog(null, \"Debes escoger una opcion\");\n\t\tcambio=0;\n\t}\n\t} while (tipoCliente==\"Selecciona\"||tipoCliente==null||cambio==0);\t\n}", "public String getTipo() {\n\t\treturn this.tipo;\n\t}", "public JComboBox getCmbTipoProducto() {\r\n\t\treturn cmbTipoProducto;\r\n\t}", "public void setTipoDocumento(int tipoDocumento);", "public void setTipoConstruccion(Valor tipoConstruccion) {\n this.tipoConstruccion = tipoConstruccion;\n }", "public String productTypeSelected() {\n String productType = \"\";\n rbListAddElement();\n for (int i = 0; i < rbProductType.size(); i++) {\n if (rbProductType.get(i).isSelected()) {\n productType += (rbProductType.get(i).getText());\n System.out.println(\"Selected product type :\" + productType);\n }\n }\n return productType;\n }", "abstract public void cabMultiselectPrimaryAction();", "@Override\r\n\tpublic String getTipo() {\n\t\treturn this.tipo;\r\n\t}", "@And(\"^I go to \\\"([^\\\"]*)\\\" type and select \\\"([^\\\"]*)\\\"$\") //Selecting Type & sub-Type in Create form\r\n\tpublic void selectFormType(String type,String subtype) {\r\n\t\r\n\tenduser.selectFormType(type,subtype);\r\n\t}", "public void setType(int type) {\r\n this.type = type;\r\n }" ]
[ "0.7051573", "0.6442153", "0.59104645", "0.58953464", "0.58294207", "0.58277965", "0.5826968", "0.5822851", "0.5791142", "0.57742715", "0.5768631", "0.57497406", "0.57357967", "0.57303774", "0.5724278", "0.57212454", "0.5652129", "0.5651833", "0.56365293", "0.56365293", "0.56354004", "0.56142986", "0.5603075", "0.55927896", "0.5580794", "0.55756325", "0.5560098", "0.55540615", "0.5549705", "0.5545472", "0.5542332", "0.55415726", "0.5538976", "0.5536226", "0.55264497", "0.55213195", "0.5495771", "0.54855096", "0.54855096", "0.54842216", "0.54724073", "0.5470566", "0.5437761", "0.54198784", "0.54123133", "0.5385917", "0.5363222", "0.5363222", "0.53579324", "0.5334019", "0.5314281", "0.53122365", "0.5293592", "0.52914625", "0.5286788", "0.52807015", "0.5269748", "0.5260962", "0.5260277", "0.5260277", "0.5260277", "0.5260277", "0.5258293", "0.52561915", "0.5252516", "0.52522326", "0.52452636", "0.52418905", "0.5240367", "0.52369356", "0.5234399", "0.5219002", "0.5215865", "0.5213648", "0.5205607", "0.5190016", "0.51888746", "0.5182314", "0.51749355", "0.5172295", "0.5168169", "0.5151776", "0.5151303", "0.5151303", "0.51496595", "0.51473653", "0.5136141", "0.51344454", "0.51343834", "0.51325196", "0.51297975", "0.51292557", "0.51253545", "0.5111742", "0.5108137", "0.51033", "0.50967044", "0.5094122", "0.50940746", "0.509335" ]
0.5855777
4
Start listening on port 80. It should not throw any exceptions. If the port is in use, the test will fail.
@Test public void testServerStart() { assertDoesNotThrow(() -> { Server server = new Server(500); server.start(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void startServer(int port) throws Exception;", "public void start(int port);", "private void startListen() {\n try {\n listeningSocket = new ServerSocket(listeningPort);\n } catch (IOException e) {\n throw new RuntimeException(\"Cannot open listeningPort \" + listeningPort, e);\n }\n }", "public void startListener() throws BindException, Exception{ // NOPMD by luke on 5/26/07 11:10 AM\n\t\tsynchronized (httpServerMutex){\n\t\t\t// 1 -- Shutdown the previous instances to prevent multiple listeners\n\t\t\tif( webServer != null )\n\t\t\t\twebServer.shutdownServer();\n\t\t\t\n\t\t\t// 2 -- Spawn the appropriate listener\n\t\t\twebServer = new HttpServer();\n\t\t\t\n\t\t\t// 3 -- Start the listener\n\t\t\twebServer.startServer( serverPort, sslEnabled);\n\t\t}\n\t}", "public void startNetwork(int port);", "public void start() throws RemoteException, AlreadyBoundException\n {\n start(DEFAULT_PORT);\n }", "public boolean start(int port) {\n try {\n synchronized (mImplMonitor) {\n checkServiceLocked();\n return mImpl.start(port);\n }\n } catch (RemoteException e) {\n throw new EmbeddedTestServerFailure(\"Failed to start server.\", e);\n }\n }", "@Override\n public void start(Future<Void> startFuture) {\n vertx.createHttpServer()\n .requestHandler(getRequestHandler()).listen(8080, http -> {\n if (http.succeeded()) {\n startFuture.complete();\n LOGGER.info(\"HTTP server started on http://localhost:8080\");\n } else {\n startFuture.fail(http.cause());\n }\n });\n }", "@Test\n public void testStart() {\n System.out.println(\"start\");\n int port = 0;\n SServer instance = new SServer();\n instance.start(port);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }", "private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n int port = 7788;\n Server server = new Server(port);\n server.listen();\n }", "public void startServerSocket(Integer port) throws IOException {\n this.port = port;\n startMEthod();\n }", "public void start(String portArgument) {\n if (!Strings.isNullOrEmpty(portArgument)) {\n port(parsePort(portArgument));\n }\n mapExceptions();\n initAccountEndpoints();\n initUserEndpoints();\n initManagementEndpoints();\n }", "@Override\n public void run() {\n\n // Iterate over the given port range to scan\n for (int port = this.portMin; port <= this.portMax; port++) {\n\n // We will use the IOException thrown by Socket on connection failure to\n // determine if a service is running on a given port or not.\n // As such, we use a try-catch block\n try {\n\n // Create socket for port testing\n Socket socket = new Socket();\n\n // We now use the created socket to attempt a connection with the current port,\n // testing if a service is listening on the current port. We can get the\n // loopback address as seen below, or manually enter one of the common loopback\n // addresses: \"127.0.0.1\", \"0.0.0.0\" or \"localhost\".\n InetAddress loopbackAddress = InetAddress.getLoopbackAddress();\n SocketAddress scanAddress = new InetSocketAddress(loopbackAddress, port);\n\n // Since we are scanning our local computer we can set a quite short timeout\n // In this example we use 50 milliseconds\n int timeout = 50;\n\n // Attempt the connection\n socket.connect(scanAddress, timeout);\n socket.close();\n\n // Alternatively, the shorthand:\n // Socket otherSocket = new Socket(InetAddress.getLoopbackAddress(), port);\n // otherSocket.close();\n\n // If the socket successfully connected, we know that a service is listening on\n // the currently tested port, and we print it.\n System.out.println(\"Service listening on port: \" + port);\n\n } catch (IOException e) {\n // If an exception is thrown by the client sockets, we can assume that the port\n // is unused, and we choose to do nothing. Alternatively, we can print port\n // closed:\n // System.out.println(\"No service listening on port: \" + port);\n }\n\n }\n\n }", "public void start() throws IOException {\n super.start();\n\n try {\n socket = new Socket(getIP(), getPort());\n input = new DataInputStream(socket.getInputStream());\n output = new DataOutputStream(socket.getOutputStream());\n }\n catch(Exception e) {\n System.out.println(\"The port \" + getPort() + \" is currently already in use.\");\n }\n }", "private static void openServerSocket(int port) {\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Server Error\");\n\t\t}\n\t}", "private static ServerSocket startServer(int port) {\n if (port != 0) {\n ServerSocket serverSocket;\n try {\n serverSocket = new ServerSocket(port);\n System.out.println(\"Server listening, port: \" + port + \".\");\n System.out.println(\"Waiting for connection... \");\n return serverSocket;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "@Test\n public void testListen_int() throws Exception {\n System.out.println(\"listen\");\n int p = 4000;\n instance.listen(p);\n }", "public void listen(final int port) {\n listen(port, \"localhost\");\n }", "@Test\n public void portConfiguration() throws IOException {\n initJadlerListeningOn(SocketUtils.findAvailableTcpPort());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }", "Integer listeningPort();", "public int start() throws IOException{\n\t\tClientThread listenerThread = new ClientThread(this);\n\t\tlistenerSock = listenerThread.initSocket();\n\t\tint newPort = listenerSock.getLocalPort();\n\t\tclientPort = newPort;\n\t\tt = new Thread(listenerThread);\n\t\tt.start();\n\t\tsock = new Socket(serverIP, port);\n\t\treturn newPort;\n\t}", "public void start() throws Exception {\n ServerSocket socket = new ServerSocket(0);\n port = socket.getLocalPort();\n socket.close();\n\n final String[] localArgs = {\"-inMemory\", \"-port\", String.valueOf(port)};\n server = ServerRunner.createServerFromCommandLineArgs(localArgs);\n server.start();\n url = \"http://localhost:\" + port;\n\n // internal client connection so we can easily stop, cleanup, etc. later\n this.dynamodb = getClient();\n }", "public void testSetPort() {\n }", "@Test\n\tpublic void testBasicDevStartup() throws InterruptedException, ClassNotFoundException, ExecutionException, TimeoutException {\n\t\ttestArgSetup(\"test\");\n\t\t\n\t\t//really just making sure we don't throw an exception...which catches quite a few mistakes\n\t\tDevelopmentServer server = new DevelopmentServer(true);\n\t\t//In this case, we bind a port\n\t\tserver.start();\n\t\t//we should depend on http client and send a request in to ensure operation here...\n\t\t\n\t\tserver.stop();\n\t}", "public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}", "public void setPort(int port);", "public void setPort(int port);", "public void openServer() {\n try {\n this.serverSocket = new ServerSocket(this.portNumber);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "private void probeTcpPort(String ip, int port) throws IOException\n {\n Socket socket = new Socket();\n SocketAddress address = new InetSocketAddress(ip, port);\n\n socket.connect(address, TIMEOUT);\n\n log.debug(\"Ip: \" + ip + \" appears to be open... on port: \" + port);\n\n socket.close();\n\n // let exceptions bubble\n }", "int serverPort ();", "@Test\r\n public void startServerAndThreads() throws IOException {\r\n //init\r\n InetAddress iPAddress = InetAddress.getByName(\"localhost\");\r\n int port = 99;\r\n\r\n Server server = new Server(port, iPAddress);\r\n server.start();\r\n }", "public void launch(int port) {\n try {\n Registry registry = LocateRegistry.createRegistry( port );\n\n EchoService service = new ReversedEchoServiceImpl();\n EchoService stub = (EchoService) UnicastRemoteObject.exportObject(service, 0);\n\n registry.bind(\"com.anotheria.strel.rmi.EchoService\", stub);\n\n log.info(String.format(\"Service is now accessible on port %d with name com.anotheria.strel.rmi.EchoService\", port));\n }\n catch (RemoteException ex) {\n log.fatal(\"Remote Exception: \" + ex.getMessage());\n }\n catch (AlreadyBoundException ex) {\n log.fatal(\"Echo service is already bound with given name: \" + ex.getMessage());\n }\n }", "public void setHttpPort(Integer port) {\n\t\tif (myNode != null) {\n\t\t\tthrow new IllegalStateException(\"change of port only before startup!\");\n\t\t}\n\t\tif (port == null || port < 1) {\n\t\t\thttpPort = 0;\n\t\t} else {\n\t\t\thttpPort = port;\n\t\t}\n\t}", "@Test\n public void testGetPort() {\n System.out.println(\"GetPort\");\n SServer instance = new SServer();\n int expResult = 0;\n int result = instance.GetPort();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void start(String ip, int port) throws IOException {\n if (client != null && !client.isClosed()) client.close();\n this.ip = ip;\n this.port = port;\n client = new Socket(ip, port);\n\n runConnectionEvent(new ClientConnectEvent(this, ConnectionType.CLIENT_SERVER_CONNECT));\n startInThread();\n }", "public void start() {\n\t\tif (serverStarted.get()) {\n\t\t\tthrow new IllegalStateException(\"Server already started. \" + toString());\n\t\t}\n\t\tCallable<Boolean> task;\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t\tserverSocket.setSoTimeout(soTimeout);\n\t\t\tport = serverSocket.getLocalPort();\n\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\tserverStarted.set(true);\n\t\t\ttask = new Callable<Boolean>() {\n\t\n\t\t\t\tpublic Boolean call() {\n\t\t\t\t\tnotifyListener(\"Starting server thread. \" + toString());\n\t\t\t\t\tstopFlag.set(false);\n\t\t\t\t\twhile (!stopFlag.get()) {\n\t\t\t\t\t\tSocket connection = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconnection = serverSocket.accept();\n\t\t\t\t\t\t\tnotifyListener(\"Connection accepted on port. \" + toString());\n\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\tnotifyListener(\"Connection closed on port. \" + toString());\n\t\t\t\t\t\t\tpingCounter.incrementAndGet();\n\t\t\t\t\t\t} catch (SocketTimeoutException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept timed out. Retrying. \" + toString());\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept caused exception [message=\" + e.getMessage() + \"]. Retrying. \" + toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnotifyListener(\"Server socket closed. \" + toString());\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t} catch (IOException e) {\n\t\t\tstopFlag.set(true);\n\t\t\tthrow new IllegalStateException(\"Unable to open socket on port. \" + toString(), e);\n\t\t}\n\t\tserverActivity = scheduler.submit(task);\n\t\tnotifyListener(\"Waiting for server to fully complete start. \" + toString());\n\t\tfor (;;) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t\tif (isStarted()) {\n\t\t\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\n\t\t\t}\n\t\t}\n\t}", "public DefaultTCPServer(int port) throws Exception {\r\n\t\tserverSocket = new ServerSocket(port);\t}", "private void start() throws IOException {\n\n\n int port = 9090;\n server = ServerBuilder.forPort(port)\n .addService(new CounterServiceImpl())\n .build()\n .start();\n // logger.info(\"Server started, listening on \" + port);\n\n /* Add hook when stop application*/\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n // Use stderr here since the logger may have been reset by its JVM shutdown hook.\n // IRedis.USER_SYNC_COMMAND.\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n Count.this.stop();\n System.err.println(\"*** server shut down\");\n\n }\n });\n }", "public static void main(String[] args) {\n new HttpService(getHttpServiceDefinition(8080)).start();\n }", "public void start(int port, Handler<AsyncResult<HttpServer>> handler) {\n init();\n logger.info(\"Starting REST HTTP server on port {}\", port);\n httpServer = vertx.createHttpServer()\n .requestHandler(router)\n .listen(port, handler);\n }", "@Test\n public void testListen_0args() throws Exception {\n System.out.println(\"listen\");\n instance.listen();\n }", "public void testGetPort() {\n }", "protected void bind(InetAddress host, int port) throws IOException {\n localport = port;\n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public void start(int port) {\r\n Thread thread = new Thread(this);\r\n this.port = port;\r\n thread.start();\r\n }", "void port(int port);", "void port(int port);", "@SuppressWarnings(\"resource\")\r\n\tprivate void tryToSetupServer() {\r\n\t\ttry {\r\n\t\t\tsetupStream.write(\"Trying to start on \" + Inet4Address.getLocalHost().toString() + \":\" + port);\r\n\t\t\tcientConn = new ServerSocket(port).accept();\r\n\t\t\tsetupStream.write(\"Client connectd, ready for data\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tif(e.getMessage().contains(\"Bind failed\")) {\r\n\t\t\t\tsetupStream.write(\"You can't use that port\");\r\n\t\t\t} else if(e.getMessage().contains(\"Address already in use\")) {\r\n\t\t\t\tsetupStream.write(\"That port is already in use\");\r\n\t\t\t}\r\n\t\t\tport = -1;\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(8080);\n try\n {\n while (true)\n {\n Socket clientSocket = listener.accept();\n new Thread(new JavaServer(clientSocket)).start();\n }\n }\n finally\n {\n listener.close();\n }\n }", "public void startListening() {\r\n\t\tlisten.startListening();\r\n\t}", "public void startListeningForConnection() {\n startInsecureListeningThread();\n }", "public void start() {\n \t\tinit();\n\t\tif(!checkBackend()){\n\t\t\tvertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {\n\t\t\t\tpublic void handle(HttpServerRequest req) {\n\t\t\t\t String query_type = req.path();\t\t\n\t\t\t\t req.response().headers().set(\"Content-Type\", \"text/plain\");\n\t\t\t\t\n\t\t\t\t if(query_type.equals(\"/target\")){\n\t\t\t\t\t String key = req.params().get(\"targetID\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequest(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t String key = \"1\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequestRange(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}).listen(80);\n\t\t} else {\n\t\t\tSystem.out.println(\"Please make sure that both your DCI are up and running\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void startServer() throws IOException {\n log.info(\"Starting server in port {}\", port);\n try {\n serverSocket = new ServerSocket(port);\n this.start();\n log.info(\"Started server. Server listening in port {}\", port);\n } catch (IOException e) {\n log.error(\"Error starting the server socket\", e);\n throw e;\n }\n }", "void setServicePort( int p );", "@Override\r\n\tpublic boolean listenAt(int port) {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t\tsocket = serverSocket.accept();\r\n\t\t\toutStreamServer = socket.getOutputStream();\r\n\t\t\tinStreamServer = socket.getInputStream();\r\n\t\t\treturn true;\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t}\r\n\t}", "private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}", "default int getPort()\n {\n return getInt(\"port\", 80);\n }", "@Override\n public int getPort() {\n final ServiceTracker<HttpService, HttpService> serviceTracker = new ServiceTracker<>(context, HttpService.class, null);\n serviceTracker.open();\n final ServiceReference<HttpService> serviceReference = serviceTracker.getServiceReference();\n serviceTracker.close();\n return ofNullable(serviceReference)\n .map(it -> it.getProperty(\"org.osgi.service.http.port\"))\n .map(String::valueOf)\n .map(Integer::parseInt)\n .orElse(80);\n }", "@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}", "public void start(int port)\n\t{\n\t\t// Initialize and start the server sockets. 08/10/2014, Bing Li\n\t\tthis.port = port;\n\t\ttry\n\t\t{\n\t\t\tthis.socket = new ServerSocket(this.port);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Initialize a disposer which collects the server listener. 08/10/2014, Bing Li\n\t\tMyServerListenerDisposer disposer = new MyServerListenerDisposer();\n\t\t// Initialize the runner list. 11/25/2014, Bing Li\n\t\tthis.listenerRunnerList = new ArrayList<Runner<MyServerListener, MyServerListenerDisposer>>();\n\t\t\n\t\t// Start up the threads to listen to connecting from clients which send requests as well as receive notifications. 08/10/2014, Bing Li\n\t\tRunner<MyServerListener, MyServerListenerDisposer> runner;\n\t\tfor (int i = 0; i < ServerConfig.LISTENING_THREAD_COUNT; i++)\n\t\t{\n\t\t\trunner = new Runner<MyServerListener, MyServerListenerDisposer>(new MyServerListener(this.socket, ServerConfig.LISTENER_THREAD_POOL_SIZE, ServerConfig.LISTENER_THREAD_ALIVE_TIME), disposer, true);\n\t\t\tthis.listenerRunnerList.add(runner);\n\t\t\trunner.start();\n\t\t}\n\n\t\t// Initialize the server IO registry. 11/07/2014, Bing Li\n\t\tMyServerIORegistry.REGISTRY().init();\n\t\t// Initialize a client pool, which is used by the server to connect to the remote end. 09/17/2014, Bing Li\n\t\tClientPool.SERVER().init();\n\t}", "private void startPortManager() throws GrpcException {\n\t\t/* start PortManager */\t\t\n\t\ttry {\n\t\t\tinformationManager.lockInformationManager();\n\t\t\t\n\t\t\tProperties localHostInfo =\n\t\t\t\t(Properties) informationManager.getLocalMachineInfo();\n\t\t\t\n\t\t\t/* PortManager without SSL */\n\t\t\tint port = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_RAW));\n\t\t\tportManagerNoSecure = new PortManager(this, false, port);\n\n\t\t\t/* PortManager with authonly is not implemented. */\n\n\t\t\t/* PortManager with GSI */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_GSI));\t\n\t\t\tportManagerGSI = new PortManager(this, PortManager.CRYPT_GSI, port);\n\n\t\t\t/* PortManager with SSL */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_SSL));\t\n\t\t\tportManagerSSL = new PortManager(this, PortManager.CRYPT_SSL, port);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new NgInitializeGrpcClientException(e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new NgIOException(e);\n\t\t} finally {\n\t\t\tinformationManager.unlockInformationManager();\n\t\t}\n\t}", "final public static void main(String[] args)\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tServerSocket test = new ServerSocket(9999);\r\n\t\t\ttest.close();\r\n\t\t\ttest = null;\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\t\t\tCommonMethods.displayErrorMessage(Text.MAIN.PORT9999_TAKEN_ERROR);\r\n\t\t\tCommonMethods.terminate();\r\n\t\t}\r\n\t\t//start the program\r\n\t\tStartUp startUp = new StartUp();\r\n\t\tstartUp.addStartUpListener(new StartUpListener(startUp));\r\n\t}", "public abstract void notifyAboutEmbeddedWebServerIpPort(InetAddress ip, int port);", "public static void start(int port) {\r\n\r\n SpringApplication app = new SpringApplication(DaprApplication.class);\r\n\r\n app.run(String.format(\"--server.port=%d\", port));\r\n }", "@Override\n public void start() throws Exception {\n vertx.createHttpServer()\n // The requestHandler is called for each incoming\n // HTTP request, we print the name of the thread\n .requestHandler(req -> {\n req.response().end(\"Hello from \"\n + Thread.currentThread().getName());\n })\n .listen(8080); // start the server on port 8080\n }", "Builder port(int port);", "public ServerMain( int port )\r\n\t{\r\n\t\tthis.port = port;\r\n\t\tserver = new Server( this.port );\r\n\t}", "boolean startNetwork() throws IOException;", "private void initServerSocket()\n\t{\n\t\tboundPort = new InetSocketAddress(port);\n\t\ttry\n\t\t{\n\t\t\tserverSocket = new ServerSocket(port);\n\n\t\t\tif (serverSocket.isBound())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Server bound to data port \" + serverSocket.getLocalPort() + \" and is ready...\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to initiate socket.\");\n\t\t}\n\n\t}", "public static void main(String[] args) throws Exception {\n ServerSocket listener = new ServerSocket(PORT);\n try {\n while (true) {\n new Handler(listener.accept()).start();\n }\n } finally {\n listener.close();\n }\n }", "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }", "int getServicePort();", "public void startServer() {\n server.start();\n }", "abstract protected int PortToRunOn();", "public boolean isOpen(int port)\n {\n try(DatagramSocket connection = new DatagramSocket(port, getInetAddress()))\n {\n addOpenPort(port);\n return true;\n }\n catch(IOException ioe)\n {\n return false;\n }\n }", "public void init() throws IOException {\r\n try {\r\n serverSocket = new ServerSocket(PORT);\r\n this.running = true;\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }", "public void startListening();", "@BeforeAll\n public static void start() throws Exception {\n server = new Server(0);\n ((QueuedThreadPool)server.getThreadPool()).setMaxThreads(20);\n ServletContextHandler context = new ServletContextHandler();\n context.setContextPath(\"/foo\");\n server.setHandler(context);\n context.addServlet(new ServletHolder(TestServlet.class), \"/bar\");\n context.addServlet(new ServletHolder(TimeOutTestServlet.class), \"/timeout\");\n ((ServerConnector)server.getConnectors()[0]).setHost(\"localhost\");\n server.start();\n originalPort = ((ServerConnector)server.getConnectors()[0]).getLocalPort();\n LOG.info(\"Running embedded servlet container at: http://localhost:{}\", originalPort);\n // This property needs to be set otherwise CORS Headers will be dropped\n // by HttpUrlConnection\n System.setProperty(\"sun.net.http.allowRestrictedHeaders\", \"true\");\n }", "public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}", "private void startServer(int port) throws IOException {\n System.out.println(\"Booting the server!\");\n\n // Open the server channel.\n serverSocketChannel = ServerSocketChannel.open();\n serverSocketChannel.bind(new InetSocketAddress(port));\n serverSocketChannel.configureBlocking(false);\n\n // Register the channel into the selector.\n selector = Selector.open();\n serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);\n }", "public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\t// get the command line argument\r\n\t\t\r\n\t\tif (args.length < 1) {\r\n\t\t\tSystem.out.println(\"Error: expected 1 argument containing directory in 'files/'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString path = args[0];\r\n\t\t\r\n\t\tint port = 8000;\r\n\t\t\r\n\t\tif (args.length > 1) {\r\n\t\t\tport = Integer.parseInt(args[1]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// setup the server and listen for incoming connections\r\n\t\t\r\n\t\tServerSocket serverSocket = new ServerSocket(port);\r\n\t\tSystem.out.println(\"Listening on port \" + port + \"...\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile (true) {\r\n\t\t\t\tSocket socket = serverSocket.accept();\r\n\t\t\t\tnew Thread(new HttpConnection(socket, path)).start();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tserverSocket.close();\r\n\t\t}\r\n\t}", "private boolean configureAndStart(int port) {\n\t\ttry {\n\t\t\t//get local host to bind\n\t\t\tString host = InetAddress.getLocalHost().getHostName();\n//\t\t\thost = \"localhost\";\n\t\t\tSystem.out.printf(\"Listening on: Host: %s, Port: %d%n\", host, port);\n\n\t\t\tselector = Selector.open();\n\n\t\t\tserverChannel = ServerSocketChannel.open();\n\t\t\tserverChannel.socket().bind( new InetSocketAddress( host, port ) );\n\t\t\tserverChannel.configureBlocking( false );\n\n\t\t\t//setup selector to listen for connections on this serverSocketChannel\n\t\t\tserverChannel.register( selector, SelectionKey.OP_ACCEPT );\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Configuration for Server failed. Exiting.\");\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"Server Successfully configured\");\n\n\t\t//start up the ThreadPool\n\t\tmanager.start();\n\n\t\t//create timer to handle output, and timeout\n\t\ttimer = new Timer(\"Output_and_timeout\");\n\t\t//schedule output\n\t\ttimer.scheduleAtFixedRate(new ServerOutput(batchTime), Constants.OUTPUT_TIME * 1000,\n\t\t\t\tConstants.OUTPUT_TIME * 1000);\n\t\ttimeout = new ScheduleTimeout(this);\n\t\ttimer.scheduleAtFixedRate(timeout, batchTime * 1000, batchTime * 1000);\n\n\t\treturn true;\n\t}", "public static void main(String[] args) throws Exception {\n\t\tint port = 3030;\n\t\tServerSocket serverSocket = null;\n\n\t\t// Establish the listen socket\n\t\ttry {\n\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t\tSystem.out.println(\"TCP server created on port =\" + port);\n\n\n\t\t// Process HTTP service requests in an infinite loop.\n\t\twhile (true) {\n\t\t\tSocket clientSocket = null;\n\n\t\t\tclientSocket = serverSocket.accept();\n\n\t\t\t// Construct an object process the HTTP request message\n\t\t\tHttpRequest request = new HttpRequest(clientSocket);\n\t\t\t// create a new thread to process the request\n\t\t\tThread thread = new Thread(request);\n\t\t\t// Start the thread\n\t\t\tthread.start();\n\n\t\t}\n\t\t}\n\t\t catch (IOException ex) {\n\t\t\t\tSystem.out.println(\"Error : The server with port=\" + port + \"cannot be created\");\n\t\t\t}\n\t\t// Closing the socket\n\t\tfinally {\n\t\t try { \n\t\t \tserverSocket.close();\n\t\t } catch(Exception e) {\n\t\t // If you really want to know why you can't close the ServerSocket, like whether it's null or not\n\t\t }\n\t\t}\n\n\t}", "public static void main(String args[]) throws Exception {\n\t\t// Get the port to listen on\n\t\tint port = Integer.parseInt(args[0]);\n\t\t// Create a ServerSocket to listen on that port.\n\t\tServerSocket ss = new ServerSocket(port);\n\t\tSystem.out.println(\"Listening\");\n\t\t// Now enter an infinite loop, waiting for & handling connections.\n\t\twhile (true) {\n\t\t\t// Wait for a client to connect. The method will block;\n\t\t\t// when it returns the socket will be connected to the client\n\t\t\tSocket client = ss.accept();\n\t\t\tSystem.out.println(\"Connected\");\n\t\t\tnew Thread(new HttpMultiThreadServer(client)).start();\n\t\t}\n\t}", "public void start(){\r\n\t\tLog.out(\"Start Service...listening on \" + port, 5);\r\n\t\ttry{\r\n\t\t\t//set up\r\n\t\t\tssocket = new ServerSocket(port);\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.out(\"Can't open the port\", 5);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry{\r\n\t\t\twhile(isRun){\r\n\t\t\t\t//accept socket request,but only one.\r\n\t\t\t\tSocket socket = ssocket.accept();\r\n\t\t\t\tLog.out(\"Got a socket from \"+socket.getLocalAddress(), 5);\r\n\t\t\t\t//if no client now\r\n\t\t\t\tif(clientSocket == null){\r\n\t\t\t\t\tLog.out(\"Handle as client.\", 4);\r\n\t\t\t\t\tclientSocket = socket;\r\n\t\t\t\t\tnew Thread(new ServiceReciever(this, socket)).start();\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tLog.out(\"The server is already in use,refuse the request.\",2);\r\n\t\t\t\t\tnew DataOutputStream(socket.getOutputStream()).writeInt(SOCKET_REFUSE);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.out(\"There are something wrong when get the socket.\", 5);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }", "public boolean startAll() throws ServerException;", "public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }", "public boolean startConnection(String ip, int port) throws IOException {\n clientSocket = new Socket(ip, port);\n out = new PrintWriter(clientSocket.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n return clientSocket.isConnected();\n }", "public static void runServer(int port) throws IOException {\n\t\tserver = new CEMSServer(port);\n\t\tuiController.setServer(server);\n\t\tserver.listen(); // Start listening for connections\n\t}", "int localPort();", "public void port (int port) {\n this.port = port;\n }", "public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}", "public WebServer(int port) {\n\t\ttry {\n\t\t\tthis.listen_port = new ServerSocket(port);\n\t\t\tthis.pool = Executors.newFixedThreadPool(40);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setPort(Integer port) {\n this.port = port;\n }", "public abstract void listen(ServiceConfig serviceConfig) throws IOException;" ]
[ "0.67227656", "0.66908634", "0.6507352", "0.6298379", "0.62799597", "0.6223277", "0.61008924", "0.6098022", "0.59314555", "0.5925656", "0.5882275", "0.58155453", "0.5773173", "0.5767598", "0.57423127", "0.57387", "0.5729114", "0.5692014", "0.5680985", "0.5644006", "0.563718", "0.5630664", "0.562587", "0.5613766", "0.5554967", "0.5526988", "0.55202734", "0.54863554", "0.5476202", "0.5476202", "0.547222", "0.54697114", "0.54662067", "0.5444641", "0.543942", "0.5439318", "0.5439308", "0.5422382", "0.54189235", "0.54179144", "0.54080075", "0.5404263", "0.5395019", "0.53893566", "0.53812367", "0.5367826", "0.5352929", "0.53512424", "0.53468543", "0.53468543", "0.5341736", "0.53255856", "0.53194225", "0.53174275", "0.53166527", "0.5305251", "0.529919", "0.5295469", "0.52920413", "0.52835906", "0.52825946", "0.5273546", "0.52722275", "0.5272042", "0.5267364", "0.5266444", "0.52567166", "0.5236903", "0.5236129", "0.5225414", "0.5213444", "0.52081853", "0.5202795", "0.5185122", "0.51813984", "0.5181213", "0.51764864", "0.5175404", "0.51666015", "0.51662153", "0.516618", "0.5164691", "0.51589334", "0.5155431", "0.5151281", "0.5150848", "0.5147942", "0.51442987", "0.51398635", "0.5137869", "0.51371956", "0.51319695", "0.51222426", "0.51169086", "0.5109945", "0.5107759", "0.51005113", "0.50933015", "0.5080257", "0.5077576" ]
0.5511082
27
It tests a few ServerHandler methods. If everything works fine, the test should pass.
@Test public void testServerHandler() throws IOException { ServerHandler handler = new ServerHandler(); // Add user String username = handler.generateUsername(); User user = new User.UserBuilder() .hasUsername(username) .build(); Socket socket = new Socket(); ClientInfo clientInfo = new ClientInfo(user, socket, handler); handler.addUser(clientInfo); // Add another user String username2 = handler.generateUsername(); User user2 = new User.UserBuilder() .hasUsername(username2) .build(); Socket socket2 = new Socket(); ClientInfo clientInfo2 = new ClientInfo(user2, socket2, handler); handler.addUser(clientInfo2); // Remove second user handler.removeUser(handler.getUserClientInfo(username2)); // Get users Vector<ClientInfo> users = handler.getUsers(); // Find user User foundUser = handler.findByUsername(username); // User existence boolean userExists = handler.usernameExists(foundUser.getUsername()); assertEquals(10, foundUser.getUsername().length()); assertEquals(true, userExists); assertEquals(1, users.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testServerStart() {\n assertDoesNotThrow(() -> {\n Server server = new Server(500);\n server.start();\n });\n }", "@Test\n public void serverStarts() {\n }", "@Test\n public void serverConfiguration() throws IOException {\n initJadlerUsing(new JettyStubHttpServer());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }", "@Test\r\n\tpublic void test_InternalServerError_WithMock() throws ApplicationException, IOException {\n\t\tinjector = new MockInjector();\r\n\t\tServerListener s = (ServerListener)injector.getServerListener(8085, 10);\r\n\t\t\r\n\t\t// start the server on a different thread (we need this one to go on)\r\n\t\tThread t = new Thread(s);\r\n\t\tt.start();\r\n\t\t\r\n\t\t// create a connection to the new server\r\n\t\tSocket socket = new Socket(\"localhost\", 8085);\r\n\t\t\r\n\t\t// now let's send a normal request\r\n\t\tRawHttpResponse<?> response = executeRequest(\"GET\", \"/index.html\", \"\", socket);\r\n\t\t// check the response code\r\n\t\tassertEquals(500, response.getStatusCode());\r\n\t\t// check content length\r\n\t\tOptional<String> contentLength = response.getHeaders().getFirst(\"Content-Length\");\r\n\t\tassertTrue(contentLength.isPresent());\r\n\t\tassertEquals(\"0\", contentLength.get());\r\n\t\t// check content type\r\n\t\tOptional<String> contentType = response.getHeaders().getFirst(\"Content-Type\");\r\n\t\tassertTrue(contentType.isPresent());\r\n\t\tassertEquals(\"text/plain\", contentType.get());\r\n\t\t\r\n\t\tsocket.close();\r\n\t\ts.stop();\r\n\t}", "@Test\n public void testServer() throws Exception{\n ServerMain s=new ServerMain(1,3,2,\"test\",InetAddress.getLocalHost(),null);\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.PM);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"testInvalid\",s).getServerVisitor());\n }", "public ZatoHttpResponse testConnection(ZatoServerConfig server) throws IOException {\n return requestHandler.testConnection(server);\n }", "@Test\n public void testSuccessfulServerStart() throws Exception {\n var channel = new EmbeddedServerChannel();\n\n server = getServer(channel.newSucceededFuture(), true);\n\n assertTrue(server.isRunning());\n }", "@Test\n public void testGetIt() {\n String responseMsg = target.path(\"service/servertest\").request().get(String.class);\n assertEquals(\"Got it!\", responseMsg);\n }", "public abstract void handleServer(ServerConnection conn);", "@Test\n public void TestHandleEmptyHandler() {\n final HandlerExecutor handlerExecutor = getExecutor();\n\n final HandlerResult result = handlerExecutor.handle(new VoiceRequest(\"123456789\", 99L, \"whatever\", \"\"));\n assertEquals(result.handlerType, HandlerType.NONE);\n }", "private void handleServers() throws XMLStreamException {\n printf(\"FOUND SERVERS\");\n\n while (skipToStartButNotPast(SERVER, SERVERS)) {\n handleServer();\n }\n }", "@Test\n public void testNoHandlers(TestContext context) {\n NetClient client = vertx.createNetClient();\n final Async async = context.async();\n\n client.connect(7000, \"localhost\").onComplete(context.asyncAssertSuccess(socket -> {\n\n final FrameParser parser = new FrameParser(parse -> {\n context.assertTrue(parse.succeeded());\n JsonObject frame = parse.result();\n\n context.assertEquals(\"err\", frame.getString(\"type\"));\n context.assertEquals(\"#backtrack\", frame.getString(\"address\"));\n\n client.close();\n async.complete();\n });\n\n socket.handler(parser);\n\n FrameHelper.sendFrame(\"send\", \"test\", \"#backtrack\", new JsonObject().put(\"value\", \"vert.x\"), socket);\n }));\n }", "public interface ServerDriver {\n void start() throws Exception;\n\n void stop() throws Exception;\n\n void stopAtShutdown();\n\n void assertArrivedRequestMatching(Matcher<RequestSnapshot>... matchers) throws InterruptedException;\n\n String baseUrl();\n\n void respondAs(String content);\n}", "IMember getServerStub();", "boolean runsServer();", "public ServerTest() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void handleServer(EntityPlayerMP player) {\n\n\t}", "private static void testServer() {\r\n\t\ttry {\r\n\t\t\tserverSocket=new ServerSocket(portno);\r\n\t\t\tSocket temp=serverSocket.accept();\r\n\t\t\tint x=cryptoMessaging.recvInt(temp.getInputStream());\r\n\t\t\tSystem.out.println(\"Got this int: \"+x);\r\n\t\t\tx++;\r\n\t\t\tcryptoMessaging.sendInt(temp.getOutputStream(), x);\r\n\t\t\tx=cryptoMessaging.recvInt(temp.getInputStream());\r\n\t\t\tSystem.out.println(\"Got this int: \"+x);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"IO Error\");\r\n\t\t\tgiveUp();\r\n\t\t}\r\n\t\tSystem.out.println(\"Test complete.\");\r\n\t\tgiveUp();\r\n\t}", "@Before\n public void newHTTPTest() throws IOException {\n code = callHandlerResponse(\"\", \"POST\");\n }", "@Test\r\n public void testHttpServer() throws Exception {\r\n MiniDFSCluster cluster = null;\r\n JournalHttpServer jh1 = null;\r\n\r\n try {\r\n cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build();\r\n\r\n conf.set(DFSConfigKeys.DFS_JOURNAL_EDITS_DIR_KEY, path1.getPath());\r\n jh1 = new JournalHttpServer(conf, new Journal(conf),\r\n NetUtils.createSocketAddr(\"localhost:50200\"));\r\n jh1.start();\r\n\r\n String pageContents = DFSTestUtil.urlGet(new URL(\r\n \"http://localhost:50200/journalstatus.jsp\"));\r\n assertTrue(pageContents.contains(\"JournalNode\"));\r\n\r\n } catch (IOException e) {\r\n LOG.error(\"Error in TestHttpServer:\", e);\r\n assertTrue(e.getLocalizedMessage(), false);\r\n } finally {\r\n if (jh1 != null)\r\n jh1.stop();\r\n if (cluster != null)\r\n cluster.shutdown();\r\n }\r\n }", "public Server() {\n\t\tthis.currentMode = Mode.TEST; // TODO: implement\n\t}", "@Test\n public void happyFlow() throws Exception {\n RegisterHandler registerHandler = new RegisterHandler(service);\n RegistrationVerificationHandler verificationHandler = new RegistrationVerificationHandler(service);\n LoginHandler loginHandler = new LoginHandler(service);\n HttpHandler dummyHandler = new Mockito().mock(HttpHandler.class);\n AuthenticationFilter authenticationFilter = new AuthenticationFilter(service, dummyHandler);\n ResetPasswordHandler resetPasswordHandler = new ResetPasswordHandler(service);\n ChangePasswordHandler changePasswordHandler = new ChangePasswordHandler(service);\n\n String password = \"test\";\n String email = \"[email protected]\";\n\n // Register\n String body = \"{address:\\\"\" + email + \"\\\", password:\\\"\" + password + \"\\\"}\";\n InputStream bodyStream = new ByteArrayInputStream(body.getBytes());\n HttpExchange post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n registerHandler.handle(post);\n\n //intercept verification code\n ArgumentCaptor<String> codeCaptor = ArgumentCaptor.forClass(String.class);\n verify(emailService).sendVerificationCode(codeCaptor.capture(), any(EmailAddress.class));\n\n // Verify code\n body = \"{address:\\\"\" + email + \"\\\", code:\\\"\" + codeCaptor.getValue() + \"\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n verificationHandler.handle(post);\n\n //login\n body = \"{address:\\\"\" + email + \"\\\", password:\\\"\" + password + \"\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n loginHandler.handle(post);\n\n Headers responseHeaders = post.getResponseHeaders();\n String loginToken = responseHeaders.get(\"login-token\").get(0);\n\n // authorized request\n body = \"{dummy:\\\"value\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n Headers headers = new Headers();\n headers.add(\"login-token\", loginToken);\n post = mockHttpExchange(\"POST\", \"\", bodyStream, headers);\n authenticationFilter.handle(post);\n\n ArgumentCaptor<HttpExchange> exchangeCaptor = ArgumentCaptor.forClass(HttpExchange.class);\n verify(dummyHandler).handle(exchangeCaptor.capture());\n assertThat(exchangeCaptor.getValue()).isEqualTo(post);\n\n //login via address\n body = \"{address:\\\"\" + email + \"\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n loginHandler.handle(post);\n\n //intercept login token\n ArgumentCaptor<LoginToken> tokenCaptor = ArgumentCaptor.forClass(LoginToken.class);\n verify(emailService).sendLoginLink(tokenCaptor.capture());\n loginToken = tokenCaptor.getValue().token;\n\n // authorized request\n dummyHandler = new Mockito().mock(HttpHandler.class);\n authenticationFilter = new AuthenticationFilter(service, dummyHandler);\n body = \"{dummy:\\\"value\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n Headers headers2 = new Headers();\n headers2.add(\"login-token\", loginToken);\n post = mockHttpExchange(\"POST\", \"\", bodyStream, headers2);\n authenticationFilter.handle(post);\n\n verify(dummyHandler).handle(exchangeCaptor.capture());\n assertThat(exchangeCaptor.getAllValues().get(1)).isEqualTo(post);\n\n //reset password\n body = \"{address:\\\"\" + email + \"\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n resetPasswordHandler.handle(post);\n\n //intercept new password\n ArgumentCaptor<Login> passwordCaptor = ArgumentCaptor.forClass(Login.class);\n verify(emailService).sendNewLogin(passwordCaptor.capture());\n String resetPassword = passwordCaptor.getValue().password;\n\n //login\n body = \"{address:\\\"\" + email + \"\\\", password:\\\"\" + resetPassword + \"\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n loginHandler.handle(post);\n\n responseHeaders = post.getResponseHeaders();\n assertThat(responseHeaders.get(\"login-token\")).isNotEmpty();\n\n //change password\n String newPassword = \"test2\";\n body = \"{address:\\\"\" + email + \"\\\", oldPassword:\\\"\" + resetPassword + \"\\\", newPassword:\\\"\" + newPassword + \"\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n changePasswordHandler.handle(post);\n\n //login\n body = \"{address:\\\"\" + email + \"\\\", password:\\\"\" + newPassword + \"\\\"}\";\n bodyStream = new ByteArrayInputStream(body.getBytes());\n post = mockHttpExchange(\"POST\", \"\", bodyStream, new Headers());\n loginHandler.handle(post);\n\n responseHeaders = post.getResponseHeaders();\n assertThat(responseHeaders.get(\"login-token\")).isNotEmpty();\n }", "@Test\n public void testLifeCycle() {\n NewServerResponse serverResponse = connection.createServer(\n \"test.ivan.api.com\", \"lenny\", \"MIRO1B\");\n Server server = serverResponse.getServer();\n // Now we have the server, lets restart it\n assertNotNull(server.getId());\n ServerInfo serverInfo = connection.restartServer(server.getId());\n\n // Should be running now.\n assertEquals(serverInfo.getState(), RunningState.RUNNING);\n assertEquals(server.getName(), \"test.ivan.api.com\");\n assertEquals(server.getImageId(), \"lenny\");\n connection.destroyServer(server.getId());\n }", "protected abstract void runHandler();", "@Test\n public void nameserversTest() {\n // TODO: test nameservers\n }", "@Before\r\n public void setUp() {\r\n clientAuthenticated = new MockMainServerForClient();\r\n }", "boolean hasServerHello();", "@Test\n public void testHandleWriteLog() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getWriteLogRequestMsg(getDefaultLogData(1L))\n );\n\n // Prepare a future that can be used by the caller.\n when(mBatchProcessor.<Void>addTask(BatchWriterOperation.Type.WRITE, request))\n .thenReturn(CompletableFuture.completedFuture(null));\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasWriteLogResponse());\n }", "@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}", "@Test\n public void testGetExpiryHandler() {\n System.out.println(\"getExpiryHandler\");\n String sa = \"testhandler\";\n instance.addExpiryHandler(sa, expiredMessageHandler);\n ExpiredMessageHandler expResult = expiredMessageHandler;\n ExpiredMessageHandler result = instance.getExpiryHandler(sa);\n assertEquals(expResult, result);\n }", "void SetupMockRequestHandler2(RequestHandler2 mockHandler, int attemptCount, MockRequestOutcome outcome) {\n\n HttpResponse testResponse = EasyMock.createMock(HttpResponse.class);\n\n // beforeRequest\n EasyMock.reset(mockHandler);\n mockHandler.beforeRequest(EasyMock.<Request<?>>anyObject());\n EasyMock.expectLastCall().once();\n\n for(int i = 0; i < attemptCount; ++i) {\n // beforeAttempt\n mockHandler.beforeAttempt(EasyMock.<HandlerBeforeAttemptContext>anyObject());\n EasyMock.expectLastCall().once();\n\n if (outcome == MockRequestOutcome.Success && i + 1 == attemptCount) {\n // beforeUnmarshalling, requires success-based test\n EasyMock.expect(mockHandler.beforeUnmarshalling(EasyMock.<Request<?>>anyObject(), EasyMock.<HttpResponse>anyObject()))\n .andReturn(testResponse)\n .once();\n }\n\n // afterAttempt\n mockHandler.afterAttempt(EasyMock.<HandlerAfterAttemptContext>anyObject());\n EasyMock.expectLastCall().once();\n }\n\n if(outcome == MockRequestOutcome.Success) {\n // afterResponse, requires success\n mockHandler.afterResponse(EasyMock.<Request<?>>anyObject(), EasyMock.<Response<?>>anyObject());\n EasyMock.expectLastCall().once();\n } else if (outcome == MockRequestOutcome.FailureWithAwsClientException){\n // afterError, only called if exception was an AwsClientException\n mockHandler.afterError(EasyMock.<Request<?>>anyObject(), EasyMock.<Response<?>>anyObject(), EasyMock.<Exception>anyObject());\n EasyMock.expectLastCall().once();\n }\n EasyMock.replay(mockHandler);\n }", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n SServer.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void main(String[] args) {\r\n\r\n\t\tboolean server = false;\r\n\r\n\t\tif (server) {\r\n\t\t\t// This is the server setup.\r\n\t\t\tSystem.out.println(\"STARTING SERVER.\");\r\n\t\t\tServer s = new Server(8222);\r\n\t\t\ts.addPacketHandler(new PacketHandler() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleServerPacket(int id, String[] data, ServerConnection connection) {\r\n\t\t\t\t\tSystem.out.println(\"SERVER HANDLE PACKET\");\r\n\t\t\t\t\tSystem.out.println(\"PACKET TYPE: \" + id);\r\n\t\t\t\t\tSystem.out.println(\"PACKET DATA:\");\r\n\t\t\t\t\tint num = 0;\r\n\t\t\t\t\tfor (String s : data) {\r\n\t\t\t\t\t\tSystem.out.println(\"INDEX \" + num + \" - \" + s);\r\n\t\t\t\t\t\tnum++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleClientPacket(int id, String[] data, Client client) {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t\ts.addClientDisconnectHandler(new DisconnectHandler() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\r\n\t\t\t\t\t// this is ran when on the server side when a clients connection is terminated.\r\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\r\n\t\t\t\t\t// this is never ran if added to the Server.\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t// This is the client setup.\r\n\t\t\tSystem.out.println(\"STARTING CLIENT\");\r\n\t\t\tClient c = new Client(\"localhost\", 8222);\r\n\t\t\tSystem.out.println(\"CLIENT ID: \" + c.getID().toString());\r\n\t\t\tc.addPacketHandler(new PacketHandler() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleClientPacket(int id, String[] data, Client client) {\r\n\t\t\t\t\tSystem.out.println(\"CLIENT HANDLE PACKET\");\r\n\t\t\t\t\tSystem.out.println(\"PACKET TYPE: \" + id);\r\n\t\t\t\t\tSystem.out.println(\"PACKET DATA:\");\r\n\t\t\t\t\tint num = 0;\r\n\t\t\t\t\tfor (String s : data) {\r\n\t\t\t\t\t\tSystem.out.println(\"INDEX \" + num + \" - \" + s);\r\n\t\t\t\t\t\tnum++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleServerPacket(int id, String[] data, ServerConnection connection) {\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tc.addClientDisconnectHandler(new DisconnectHandler() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\r\n\t\t\t\t\t// this is never ran if added to the Client.\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\r\n\t\t\t\t\t// this is ran when the connection to the server is terminated.\r\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n}", "public void addServer(AbstractServer server) {\n // Iterate through all types of CorfuMsgType, registering the handler\n server.getHandler().getHandledTypes()\n .forEach(x -> {\n handlerMap.put(x, server);\n log.trace(\"Registered {} to handle messages of type {}\", server, x);\n });\n }", "@BeforeAll\n public static void start() throws Exception {\n server = new Server(0);\n ((QueuedThreadPool)server.getThreadPool()).setMaxThreads(20);\n ServletContextHandler context = new ServletContextHandler();\n context.setContextPath(\"/foo\");\n server.setHandler(context);\n context.addServlet(new ServletHolder(TestServlet.class), \"/bar\");\n context.addServlet(new ServletHolder(TimeOutTestServlet.class), \"/timeout\");\n ((ServerConnector)server.getConnectors()[0]).setHost(\"localhost\");\n server.start();\n originalPort = ((ServerConnector)server.getConnectors()[0]).getLocalPort();\n LOG.info(\"Running embedded servlet container at: http://localhost:{}\", originalPort);\n // This property needs to be set otherwise CORS Headers will be dropped\n // by HttpUrlConnection\n System.setProperty(\"sun.net.http.allowRestrictedHeaders\", \"true\");\n }", "@Test\n public void testHttp405NotAllowedMethod() {\n final NioEventLoopGroup bootGroup = new NioEventLoopGroup();\n final NioEventLoopGroup processGroup = new NioEventLoopGroup();\n final String json = \"{\\\"action\\\":\\\"ping\\\"}\";\n final ByteBuf content = Unpooled.copiedBuffer(json, StandardCharsets.UTF_8);\n\n final ChannelFuture serverChannel = runServer(bootGroup, processGroup);\n runClient(HttpMethod.PUT, content, uri);\n\n serverChannel.awaitUninterruptibly();\n bootGroup.shutdownGracefully();\n processGroup.shutdownGracefully();\n\n final String expected = \"{\\\"action\\\":\\\"error\\\",\\\"content\\\":\\\"Ping Pong server failure\\\",\\\"status\\\":\\\"405 Method Not Allowed\\\"}\";\n final String actual = buffer.toString();\n logger.info(\"Expected result: {}\", expected);\n logger.info(\"Actual result: {}\", actual);\n Assert.assertEquals(\"Hadn't processed the request: 405 Method Not Allowed\", expected, actual);\n }", "@Before\n public void setup() {\n mServerContext = mock(ServerContext.class);\n mServerRouter = mock(IServerRouter.class);\n mChannelHandlerContext = mock(ChannelHandlerContext.class);\n mBatchProcessor = mock(BatchProcessor.class);\n mStreamLog = mock(StreamLog.class);\n mCache = mock(LogUnitServerCache.class);\n\n // Initialize with newDirectExecutorService to execute the server RPC\n // handler methods on the calling thread.\n when(mServerContext.getExecutorService(anyInt(), anyString()))\n .thenReturn(MoreExecutors.newDirectExecutorService());\n\n // Initialize basic LogUnit server parameters.\n when(mServerContext.getServerConfig())\n .thenReturn(ImmutableMap.of(\n \"--cache-heap-ratio\", \"0.5\",\n \"--memory\", false,\n \"--no-sync\", false));\n\n // Prepare the LogUnitServerInitializer.\n LogUnitServer.LogUnitServerInitializer mLUSI = mock(LogUnitServer.LogUnitServerInitializer.class);\n when(mLUSI.buildStreamLog(\n any(LogUnitServerConfig.class),\n eq(mServerContext),\n any(BatchProcessorContext.class)\n )).thenReturn(mStreamLog);\n\n when(mLUSI.buildLogUnitServerCache(any(LogUnitServerConfig.class), eq(mStreamLog))).thenReturn(mCache);\n when(mLUSI.buildStreamLogCompaction(mStreamLog)).thenReturn(mock(StreamLogCompaction.class));\n when(mLUSI.buildBatchProcessor(\n any(LogUnitServerConfig.class),\n eq(mStreamLog),\n eq(mServerContext),\n any(BatchProcessorContext.class)\n )).thenReturn(mBatchProcessor);\n\n logUnitServer = new LogUnitServer(mServerContext, mLUSI);\n }", "@Test\n public void testServerApp() throws InterruptedException {\n\n }", "public static void main(String... args) throws IOException {\r\n\r\n checkDatabaseConnectivity();\r\n checkServerProperties();\r\n checkSchedulerProperties();\r\n server = new Server(port);\r\n\r\n try {\r\n ServletContextHandler context = new ServletContextHandler(\r\n ServletContextHandler.SESSIONS\r\n | ServletContextHandler.SECURITY);\r\n\r\n context.setInitParameter(\r\n \"org.eclipse.jetty.servlet.SessionIdPathParameterName\",\r\n \"none\");\r\n\r\n context.setContextPath(\"/\");\r\n context.setSecurityHandler(setUpSecurityHandler());\r\n AppServlet.getInstance().setLoginService(\r\n (HashLoginService) context.getSecurityHandler()\r\n .getLoginService());\r\n\r\n context.addServlet(new ServletHolder(AppServlet.getInstance()),\r\n \"/*\");\r\n context.addServlet(new ServletHolder(UserServlet.getInstance()),\r\n \"/users/*\");\r\n context.addServlet(new ServletHolder(ModuleServlet.getInstance()),\r\n \"/modules/*\");\r\n context.addServlet(new ServletHolder(RoomServlet.getInstance()),\r\n \"/rooms/*\");\r\n context.addServlet(\r\n new ServletHolder(EquipmentServlet.getInstance()),\r\n \"/equipment/*\");\r\n context.addServlet(\r\n new ServletHolder(TimeframeServlet.getInstance()),\r\n \"/timeframe/*\");\r\n context.addServlet(\r\n new ServletHolder(SchedulerServlet.getInstance()),\r\n \"/scheduler/*\");\r\n\r\n ContextHandler fileHandler = new ContextHandler();\r\n fileHandler.setContextPath(\"/resources\");\r\n ResourceHandler resourceHandler = new ResourceHandler();\r\n resourceHandler.setResourceBase(\"site/resources\");\r\n fileHandler.setHandler(resourceHandler);\r\n\r\n ContextHandlerCollection contexts = new ContextHandlerCollection();\r\n contexts.setHandlers(new Handler[] { context, fileHandler });\r\n server.setHandler(contexts);\r\n\r\n server.start();\r\n\r\n } catch (Exception e) {\r\n System.err.println(\"Server failed to start.\");\r\n e.printStackTrace();\r\n }\r\n }", "@Before\n public void setUp() throws IOException {\n serverSocket = new ServerSocket(0, 1);\n }", "protected void handlerAdded0(ChannelHandlerContext ctx) throws Exception {}", "@Test\n\tpublic void testServerTrace() {\n\t\tServerTrace serverTrace = new ServerTrace(\"name\", \"formatted\", \"/url/\");\n\t\tserverTrace.push(\"label0\", StepType.METHOD, \"className0\",\n\t\t\t\t\"methodName0\", 0);\n\t\tserverTrace.pop();\n\t\tserverTrace.push(\"label1\", StepType.METHOD, \"className1\",\n\t\t\t\t\"methodName1\", 1);\n\t\tserverTrace.push(\"label2\", StepType.METHOD, \"className2\",\n\t\t\t\t\"methodName2\", 2);\n\t\tserverTrace.pop();\n\t\tserverTrace.pop();\n\n\t\t// Convert to json\n\t\tGson gson = new Gson();\n\t\tString json = gson.toJson(serverTrace);\n\n\t\t// Very basic validation\n\t\tAssert.assertTrue(json.startsWith(\"{\\\"trace\\\":{\\\"id\\\":\\\"\"\n\t\t\t\t+ serverTrace.getId() + \"\\\"\"));\n\t\tAssert.assertTrue(json.endsWith(\",\\\"children\\\":[]}]}}}\"));\n\t\tAssert.assertTrue(json.contains(\"\\\"url\\\":\\\"/url/\" + serverTrace.getId()\n\t\t\t\t+ \"\\\"\"));\n\t}", "@Test\n public void fallbackHandlerTest() {\n String result = fallbackBean.demonstrateFallbackHandler(true);\n Assert.assertTrue(\"Did not get the expected result\", result.equals(FallbackBean.expectedResponse));\n }", "private void msgNoServerConnection() {\r\n\thandler.sendEmptyMessage(1); // enviar error al cargar\r\n }", "@Test public void testRestartLogserver() throws InterruptedException,IOException {\n logServer=new LogServer(host,service,null,getClass().getSimpleName());\n thread=new Thread(new Runnable() {\n @Override public void run() {\n logServer.run();\n }\n },\"log server\");\n thread.start();\n socketHandler=new SocketHandler(host,service);\n socketHandler.setLevel(Level.ALL);\n l.addHandler(socketHandler);\n l.info(expected);\n l.info(\"foo\");\n Thread.sleep(100); // need to wait a bit\n if(true) {\n Copier copier=logServer.copiers.iterator().next();\n copier.isShuttingdown=true;\n copier.flush();\n } else {\n Copier copier=logServer.copiers.iterator().next();\n copier.close();\n StringBuffer stringBuffer=new StringBuffer();\n fromFile(stringBuffer,copier.file);\n //p(\"contents of file: \"+copier.file+\": '\"+stringBuffer.toString()+\"'\");\n assertTrue(stringBuffer.toString().contains(expected));\n // how to kill socket handler?\n logServer.stop();\n }\n Thread.sleep(1_000); // at least 1 second!\n thread.join(1000);\n LogManager.getLogManager().reset();\n socketHandler=new SocketHandler(host,service);\n socketHandler.setLevel(Level.ALL);\n l.addHandler(socketHandler);\n l.info(expected);\n l.info(\"bar\");\n Thread.sleep(100); // need to wait a bit\n logServer.stop();\n thread.join(1000);\n }", "@Test\n public void testServerAndClient() throws InterruptedException {\n NetworkManager.initialize(true);\n Server.LOGGER = new CustomLogger(\"Server\", true, false);\n Client.LOGGER = new CustomLogger(\"Client\", true, false);\n\n final NetworkTest currentInstance = this;\n NetworkTrafficReceiver networkTrafficReceiver = new NetworkTrafficReceiver(new FromNetworkProcessor() {\n public void receiveMessage(String message) {\n currentInstance.processMessageFromNetwork(message);\n }\n });\n\n\n //Server\n ToastNotifier toastNotifier = mock(ToastNotifier.class);\n Mockito.doNothing().when(toastNotifier).showToast(anyString());\n final Server server = new Server(toastNotifier);\n Thread serverThread = new Thread(new Runnable() {\n @Override\n public void run() {\n server.start();\n }\n });\n serverThread.start();\n\n //CLIENT\n Client client = new Client(\"127.0.0.1\");\n client.start();\n\n String testMessage = \"ThisWillBeSended\";\n NetworkManager.sendWithDelay(testMessage);\n\n Thread.sleep(2000);\n synchronized (this) {\n Assert.assertEquals(testMessage, receivedFromNetwork);\n }\n }", "@Test\n public void getNonexistentGameTest() throws IOException {\n int status = callHandler(\"/xxxxxxx\", \"GET\");\n assertEquals(404, status);\n }", "public serverHttpHandler( String rootDir ) {\n this.serverHome = rootDir;\n }", "private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }", "TestNamingServer(Test test) throws IOException\n {\n this.test = test;\n this.registration_skeleton = HttpServer.create(new InetSocketAddress(REGISTRATION_PORT), 0);\n this.registration_skeleton.setExecutor(Executors.newCachedThreadPool());\n\n this.service_skeleton = HttpServer.create(new InetSocketAddress(SERVICE_PORT), 0);\n this.service_skeleton.setExecutor(Executors.newCachedThreadPool());\n\n this.gson = new Gson();\n }", "private void startServer(String ip, int port, String contentFolder) throws IOException{\n HttpServer server = HttpServer.create(new InetSocketAddress(ip, port), 0);\n \n //Making / the root directory of the webserver\n server.createContext(\"/\", new Handler(contentFolder));\n //Making /log a dynamic page that uses LogHandler\n server.createContext(\"/log\", new LogHandler());\n //Making /online a dynamic page that uses OnlineUsersHandler\n server.createContext(\"/online\", new OnlineUsersHandler());\n server.setExecutor(null);\n server.start();\n \n //Needing loggin info here!\n }", "protected void serverStarted()\n {\n // System.out.println\n // (\"Server listening for connections on port \" + getPort());\n }", "@Before\n public void setUp() throws Exception {\n this.setServer(new JaxWsServer());\n this.getServer().setServerInfo(\n new ServerInfo(MovieService.class, new MovieServiceImpl(),\n \"http://localhost:9002/Movie\", false, true));\n super.setUp();\n }", "private void createHandler()\r\n {\r\n serverHandler = new Handler(Looper.getMainLooper())\r\n {\r\n @Override\r\n public void handleMessage(Message inputMessage)\r\n {\r\n int percentage;\r\n switch (inputMessage.what)\r\n {\r\n case LISTENING:\r\n waiting.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Oczekiwanie na połączenie\");\r\n break;\r\n case CONNECTED:\r\n waiting.setVisibility(View.INVISIBLE);\r\n progress.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Przesyłanie pliku\");\r\n break;\r\n case PROGRESS:\r\n percentage = (int) inputMessage.obj;\r\n progress.setProgress(percentage);\r\n break;\r\n case DONE:\r\n messageDialog(\"Przesyłanie zakończone!\", DIALOG_MODE_DONE);\r\n break;\r\n case LISTENING_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Nie udało się utworzyć gniazda\", DIALOG_MODE_ERROR);\r\n break;\r\n case SOCKET_ACCEPT_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd połączenia!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case EXTERNAL_STORAGE_ACCESS_FAILED:\r\n messageDialog(\"Brak dostępu do pamięci masowej!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case FILE_TRANSFER_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd podczas przesyłania danych!\\nPowrót\",\r\n DIALOG_MODE_ERROR);\r\n break;\r\n default:\r\n super.handleMessage(inputMessage);\r\n }\r\n }\r\n };\r\n }", "@Test\npublic void testSendMessage() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = HandlerClient.getClass().getMethod(\"sendMessage\", Socket.class, String.class, boolean.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "public void processRequest() throws ServerException {\r\n\t\tint statusCode = 0;\r\n\r\n\t\tSecureDirectory secureDirectory = getSecureDirectory( request.getURI() );\r\n\t\tswitch ( checkAuthentication( secureDirectory ) ) {\r\n\t\tcase NOT_SECURE_DIR:\r\n\t\t\tstatusCode = processNormalRequest( true );\r\n\t\t\tbreak;\r\n\t\tcase NEED_AUTHENTICATE:\r\n\t\t\tstatusCode = sendAuthenticateMessage( secureDirectory );\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATED:\r\n\t\t\tstatusCode = processNormalRequest( false );\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new ServerException( ResponseTable.INTERNAL_SERVER_ERROR );\r\n\t\t}\r\n\r\n\t\tnew AccessLog().log( request, statusCode );\r\n\t}", "public boolean setServer(String server)\n\t{\n\t\tboolean validServer = false;\n\t\tif(server.length() > 0)\n\t\t{\n\t\t\tSocket toServer;\n\t\t\ttry {\n\t\t\t\tthis.server = server;\n\t\t\t\tSystem.out.println(\"Connecting to: \" + server);\n\t\t\t\ttoServer = new Socket(server,directorySocket);\n\t\t\t\tObjectOutputStream outToServer = new ObjectOutputStream(toServer.getOutputStream());\n\t\t\t\tServerMessage m = new ServerMessage();\n\t\t\t\tm.setCommand(TEST);\n\t\t\t\t\n\t\t\t\toutToServer.writeObject(m);\n\t\t\t\t\n\t\t\t\tObjectInputStream serverInput = new ObjectInputStream(toServer.getInputStream());\n\t\t\t\tString reply = (String) serverInput.readObject();\n\t\t\t\tif(reply.equals(\"ACTIVE\"))\n\t\t\t\t{\n\t\t\t\t\tvalidServer = true;\n\t\t\t\t\tSystem.out.println(\"Server replied; valid server\");\n\t\t\t\t}\n\t\t\t\ttoServer.close();\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace(); \n\t\t\t}\n\t\t}\n\t\treturn validServer;\n\t}", "@Test\n public void testStart() {\n System.out.println(\"start\");\n int port = 0;\n SServer instance = new SServer();\n instance.start(port);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetHandlerForInvalidContainerType() {\n ContainerProtos.ContainerType invalidContainerType =\n ContainerProtos.ContainerType.forNumber(2);\n\n Assert.assertEquals(\"New ContainerType detected. Not an invalid \" +\n \"containerType\", invalidContainerType, null);\n\n Handler dispatcherHandler = dispatcher.getHandler(invalidContainerType);\n Assert.assertEquals(\"Get Handler for Invalid ContainerType should \" +\n \"return null.\", dispatcherHandler, null);\n }", "@Before\n public void setUp() {\n \tserver = super.populateTest();\n }", "private boolean handleServerMessage(String serverMessage){\r\n\t\t// Separating the message STATUS + OTHER\r\n\t\tString[] messageParts = serverMessage.split(SEPARATOR);\r\n\r\n\t\t// Get status code from message\r\n\t\tint messageStatus = Integer.parseInt(messageParts[0]);\r\n\r\n\t\t// Process status\r\n\t\tswitch (messageStatus) {\r\n\t\tcase REQUEST_OK:\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Send Request OK\");\t\t\t\r\n\t\t\treturn true;\r\n\r\n\t\tcase INCORRECT_REQUEST_FORMAT:\r\n\t\t\t\t\t\t\r\n\t\t\tSystem.err.println(\"Oups! \\nSomethin went wrong!\\n Request format was invalid\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase INCORRECT_USER_OR_PASSWOROD:\r\n\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username or password is incorrect!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\r\n\r\n\t\tcase USER_NAME_ALREADY_EXIST:\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username alredy exists!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public abstract void handleServerSide(T message, EntityPlayer player);", "private OutOfProcessServer()\n {\n }", "protected void setUp() {\n\t\tif (!Message.configure(\"wordsweeper.xsd\")) {\r\n\t\t\tfail (\"unable to configure protocol\");\r\n\t\t}\r\n\t\t\r\n\t\t// prepare client and connect to server.\r\n\t\tmodel = new Model();\r\n\t\t\r\n\t\t\r\n\t\tclient = new Application (model);\r\n\t\tclient.setVisible(true);\r\n\t\t\r\n\t\t// Create mockServer to simulate server, and install 'obvious' handler\r\n\t\t// that simply dumps to the screen the responses.\r\n\t\tmockServer = new MockServerAccess(\"localhost\");\r\n\t\t\r\n\t\t// as far as the client is concerned, it gets a real object with which\r\n\t\t// to communicate.\r\n\t\tclient.setServerAccess(mockServer);\r\n\t}", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }", "public static void main(String[] args) throws Exception {\n\n List<RequestHandle> requestHandleList = new ArrayList<RequestHandle>();\n requestHandleList.add(new LsfRequestServerHandle());\n\n final Server server = new Server(new DefaultServerRoute(),new ServerHandler(requestHandleList), GlobalManager.serverPort);\n Thread t= new Thread(new Runnable() {\n public void run() {\n //start server\n try {\n server.run();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n t.start();\n\n ServerConfig serverBean = new ServerConfig();\n serverBean.setAlias(\"test\");\n serverBean.setInterfaceId(IService.class.getCanonicalName());\n serverBean.setImpl(new IServerImpl());\n server.registerServer(serverBean);\n\n\n }", "@Test\n public void testPartialWrite() throws Exception {\n final int port = new Random(System.currentTimeMillis()).nextInt(1024) + 1024;\n final StubServer server = new StubServer(port);\n Thread serverThread = new Thread(server);\n serverThread.start();\n server.awaitForStart();\n final MessageParser<Message> parser = new MessageParser<Message>() {\n @Override public Message parse(ByteBuffer buffer) throws PartialMessageException {\n Assert.fail();\n return null;\n }\n };\n final Callback callback = new Callback();\n final Events events = Events.open();\n Connection<Message> connection = Connection.connect(new InetSocketAddress(\"localhost\", port), parser, callback);\n events.register(connection);\n while (true) {\n if (!events.process(100))\n break;\n }\n server.awaitForStop();\n Assert.assertEquals(callback.total, server.total);\n }", "private void handleHttpRequest(ChannelHandlerContext ctx, HttpRequest req) throws Exception {\n\t\tif (req.getMethod() != HttpMethod.GET) {\n\t\t\tresponseSender.sendResponse(ctx.getChannel(), HttpResponseStatus.FORBIDDEN);\n\t\t\treturn;\n\t\t}\n\n\t\t// Send the demo page and favicon.ico\n\t\tif (req.getUri().equals(\"/\")) {\n\t\t\tresponseSender.sendResponse(ctx.getChannel(), HttpResponseStatus.OK, WebSocketServerIndexPage.getContent(getWebSocketLocation(req)), \"UTF-8\",\n\t\t\t\t\t\"text/html; charset=UTF-8\");\n\t\t\treturn;\n\t\t} else if (req.getUri().equals(\"/favicon.ico\")) {\n\t\t\tresponseSender.sendResponse(ctx.getChannel(), HttpResponseStatus.NOT_FOUND);\n\t\t\treturn;\n\t\t}\n\n\t\t// Handshake\n\t\tWebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(getWebSocketLocation(req), null, false);\n\t\thandshaker = wsFactory.newHandshaker(req);\n\t\tif (handshaker == null) {\n\t\t\twsFactory.sendUnsupportedWebSocketVersionResponse(ctx.getChannel());\n\t\t} else {\n\t\t\thandshaker.handshake(ctx.getChannel(), req).addListener(WebSocketServerHandshaker.HANDSHAKE_LISTENER);\n\t\t}\n\t}", "public void checkHandler()\n {\n ContextManager.checkHandlerIsRunning();\n }", "public void runServer(){\n try {\n serverSocket = new ServerSocket(portNumber);\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n \n while (true) { \n try {\n Socket clientSocket = serverSocket.accept();\n InetAddress inetAddress = clientSocket.getInetAddress();\n System.out.println(\"Connected with \" + inetAddress.getHostName()+ \".\\n IP address: \" + inetAddress.getHostAddress() + \"\\n\");\n new Thread(new RequestHandlerRunnable(clientSocket, database)).start();\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n }\n \n }", "@Test\r\n public void startServerAndThreads() throws IOException {\r\n //init\r\n InetAddress iPAddress = InetAddress.getByName(\"localhost\");\r\n int port = 99;\r\n\r\n Server server = new Server(port, iPAddress);\r\n server.start();\r\n }", "public static void main(String[] args) {\n Server server = new Server(1234);\n server.listen();\n \n // YOUR CODE HERE\n // It is not required (or recommended) to implement the server in\n // this runner class.\n }", "private void applicationHealthHandler(RoutingContext routingContext) {\n HttpServerResponse httpServerResponse = routingContext.response();\n httpServerResponse.setStatusCode(SUCCESS_CODE);\n httpServerResponse.end(\"myRetailApplication is up and running\");\n }", "ServerEntry getServer();", "@Test\n public void testAddExpiryHandler() {\n System.out.println(\"addExpiryHandler\");\n String sa = \"testhandler\";\n instance.addExpiryHandler(sa, expiredMessageHandler);\n }", "public static void main(String[] args) throws Throwable {\n ServerSocket server = new ServerSocket();\n server.bind(new InetSocketAddress(3000));\n System.out.println(\"Blocking Socket : listening for new Request\");\n while (true) { // <1>\n Socket socket = server.accept();\n //each incomming request(socket request) allocate in a separate thread\n new Thread(clientHandler(socket)).start();\n }\n }", "@Test\n public void testRouterAllServersDown() throws Exception {\n defaultServer1.cancelRegistration();\n defaultServer2.cancelRegistration();\n\n testSyncServiceUnavailable();\n Assert.assertEquals(0, defaultServer1.getNumRequests());\n Assert.assertEquals(0, defaultServer2.getNumRequests());\n\n defaultServer1.registerServer();\n defaultServer2.registerServer();\n }", "public static void main(String[] args) {\n\t\tif (args != null && args.length > 0) {\n\t\t\tport = Integer.parseInt(args[0]);\n\t\t}\n\t\tlog.info(\"i am the main for JServer\");\n\t\tlog.info(\"Server will use port: \" + port);\n\t\ttry {\n\t\t\twebServer = new WebServer(port);\n\t\t\t\n\t\t\tjsystem = new JSystemServer();\n\t\t\t\n\t\t\t//create the instances of handlers in server\n\t\t\tapplicationHandler = new JApplicationHandler();\n\t\t\tscenarioHandler = new JScenarioHandler();\n\t\t\t\n\t\t\t\n\t\t\tlogsHandler = new JReporterHandler();\n\t\t\t//register handlers in server\n\t\t\twebServer.addHandler(JServerHandlers.SCENARIO.getHandlerClassName(),scenarioHandler);\n\t\t\twebServer.addHandler(JServerHandlers.APPLICATION.getHandlerClassName(),applicationHandler);\n\t\t\twebServer.addHandler(\"jsystem\", jsystem);\n\t\t\twebServer.addHandler(JServerHandlers.REPORTER.getHandlerClassName(), logsHandler);\n\t\t\twebServer.start();\n\t\t\tSystem.out.println(\"webserver successfully started!!! + listening on port \" + port);\n\t\t} catch (Exception e) {\n\t\t\tlog.warning(\"failed in webserver handler adding or creation on port= \"+port + \"\\n\\n\"+StringUtils.getStackTrace(e));\n\t\t}\n\t}", "@Override\n public void beforeAll(ExtensionContext context) {\n localServer = RSocketFactory.receive()\n .acceptor((setupPayload, rSocket) -> Mono.just(new SimpleResponderImpl(setupPayload, rSocket)))\n .transport(LocalServerTransport.create(\"test\"))\n .start()\n .block();\n }", "public void runServer() throws IOException {\n runServer(0);\n }", "public static void main(String[] args) throws Exception {\n ServerSocket listener = new ServerSocket(PORT);\n try {\n while (true) {\n new Handler(listener.accept()).start();\n }\n } finally {\n listener.close();\n }\n }", "public void handleServerResponse(int REQUEST_TYPE, String string) {\n }", "@Test\n\tpublic void testResponse() throws IOException {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tHashMap<String, Handler> map = new HashMap<String,Handler>();\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckResponse(new RequestObject(\"\", \"\", parameters), HTTPConstants.BAD_REQUEST, map);\n\t\tcheckResponse(new RequestObject(\"PUT\", \"/reviewsearch\", parameters), HTTPConstants.NOT_ALLOWED, map);\n\t\tcheckResponse(new RequestObject(\"PULL\", \"/slackbot\", parameters), HTTPConstants.NOT_ALLOWED, map);\n\t\tcheckResponse(new RequestObject(\"GET\", \"/slackbot\", parameters), HTTPConstants.NOT_FOUND, map);\n\t\tcheckResponse(new RequestObject(\"POST\", \"/slackbot\", parameters), HTTPConstants.NOT_FOUND, map);\n\t\tmap.put(\"/slackbot\", new ChatHandler(config.getConfig()));\n\t\tcheckResponse(new RequestObject(\"POST\", \"/slackbot\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.NOT_FOUND, map);\n\t\tmap.put(\"/reviewsearch\", new ReviewSearchHandler(config.getConfig(), new InvertedIndex()));\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tparameters.put(\"unknown\", \"unknown\");\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tparameters.remove(\"query\");\n\t\tcheckResponse(new RequestObject(\"GET\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tcheckResponse(new RequestObject(\"GET\", \"/\", parameters), HTTPConstants.NOT_FOUND, map);\n\t}", "@Test\n public void itShouldbeAbleToHandleA404Properly() {\n RequestStore requestStore = new RequestStore();\n// requestStore.setDirectory(\"com/angeleah/webserver/TestDirectory/\");\n String body =\"<!DOCTYPE html>\\n<title>Web Server</title>\\n<body>\\n<h1>Not Found</h1>\\n</body>\\n</html>\";\n notFoundHandler.handle(requestStore);\n byte[] b1 = requestStore.getBody();\n byte[] b2 = body.getBytes();\n assertEquals(true, FileByteArrayCompare(b1, b2));\n }", "@Test\n\tpublic void customUserLogger() throws Exception {\n\t\t\n\t\tfinal AuthenticationHandler ah = mock(AuthenticationHandler.class);\n\t\tfinal JsonServerSyslog sysLog = mock(JsonServerSyslog.class);\n\t\tfinal JsonServerSyslog userLog = mock(JsonServerSyslog.class);\n\t\t\n\t\twhen(sysLog.getServiceName()).thenReturn(\"myserv\");\n\t\t\n\t\tfinal FakeServer fs = new FakeServer(ah, false, sysLog, userLog);\n\t\t\n\t\tfs.logErr(\"oh crap\");\n\t\tfs.logInfo(\"oh goody\");\n\t\tfs.logDebug(\"oh what?\");\n\t\t\n\t\tverify(userLog).logErr(\"oh crap\");\n\t\tverify(userLog).logInfo(\"oh goody\");\n\t\tverify(userLog).logDebug(\"oh what?\");\n\t\t\n\t\tverify(sysLog).getServiceName();\n\t\tverifyNoMoreInteractions(sysLog);\n\t}", "void onServerStarted();", "private static void handleServer(){\n // Main program. It should handle all connections.\n try{\n while(true){\n Socket clientSocket= serverSocket.accept();\n ServerThread thread = new ServerThread(clientSocket, connectedUsers, groups);\n thread.start();\n }\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testHandleFlushCache() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.IGNORE),\n getFlushCacheRequestMsg()\n );\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a FLUSH_CACHE response and that the base\n // header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasFlushCacheResponse());\n\n // Verify that cache was flushed.\n verify(mCache).invalidateAll();\n }", "public void testExecute4() throws Exception {\r\n request.getSession().getServletContext().setAttribute(KeyConstants.AUCTION_MANAGER_KEY, auctionManager);\r\n\r\n try {\r\n handler.execute(actionContext);\r\n fail(\"HandlerExecutionException is expected\");\r\n } catch (HandlerExecutionException e) {\r\n // ok.\r\n }\r\n }", "public static <T extends EmbeddedTestServer> T initializeAndStartServer(\n T server, Context context, int port) {\n server.initializeNative(context, ServerHTTPSSetting.USE_HTTP);\n server.addDefaultHandlers(\"\");\n if (!server.start(port)) {\n throw new EmbeddedTestServerFailure(\"Failed to start serving using default handlers.\");\n }\n return server;\n }", "CreateHandler()\n {\n }", "public void serverSideOk();", "public static void main(String[] args) throws Exception\r\n\t{\r\n\t\tSystem.out.println(\"The server is running.\");\r\n\t\tint clientNumber = 0;\r\n\t\tServerSocket listener = new ServerSocket(9898);\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (true)\r\n\t\t\t{\r\n\t\t\t\tnew RequestHandler(listener.accept(), clientNumber++).start();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tSystem.out.println(\"closed server\");\r\n\t\t\tlistener.close();\r\n\t\t}\r\n\t}", "messages.Serverhello.ServerHello getServerHello();", "public SocketServerTest(String testName) {\n\t\tsuper(testName);\n\t}", "@Test\n public void testListen_0args() throws Exception {\n System.out.println(\"listen\");\n instance.listen();\n }", "protected void setUp() throws Exception {\r\n super.setUp();\r\n FailureTestHelper.loadConfig();\r\n handler = new UnlockedDomainsHandler(\"id1\", \"id2\");\r\n }", "@Test\n public void testHandshakeManagerInvoked() throws Exception {\n HandshakeManager handshakeManager = mock(HandshakeManager.class);\n\n when(handshakeManager.handshakeFuture()).thenReturn(CompletableFuture.completedFuture(mock(NettySender.class)));\n when(handshakeManager.init(any())).thenReturn(HandshakeAction.NOOP);\n when(handshakeManager.onConnectionOpen(any())).thenReturn(HandshakeAction.NOOP);\n when(handshakeManager.onMessage(any(), any())).thenReturn(HandshakeAction.NOOP);\n\n MessageSerializationRegistry registry = mock(MessageSerializationRegistry.class);\n\n when(registry.createDeserializer(anyShort(), anyShort()))\n .thenReturn(new MessageDeserializer<>() {\n /** {@inheritDoc} */\n @Override public boolean readMessage(MessageReader reader) throws MessageMappingException {\n return true;\n }\n\n /** {@inheritDoc} */\n @Override public Class<NetworkMessage> klass() {\n return NetworkMessage.class;\n }\n\n /** {@inheritDoc} */\n @Override public NetworkMessage getMessage() {\n return mock(NetworkMessage.class);\n }\n });\n\n server = new NettyServer(4000, handshakeManager, sender -> {}, (socketAddress, message) -> {}, registry);\n\n server.start().get(3, TimeUnit.SECONDS);\n\n CompletableFuture<Channel> connectFut = NettyUtils.toChannelCompletableFuture(\n new Bootstrap()\n .channel(NioSocketChannel.class)\n .group(new NioEventLoopGroup())\n .handler(new ChannelInitializer<>() {\n /** {@inheritDoc} */\n @Override protected void initChannel(Channel ch) throws Exception {\n // No-op.\n }\n })\n .connect(server.address())\n );\n\n Channel channel = connectFut.get(3, TimeUnit.SECONDS);\n\n ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer();\n\n // One message only.\n for (int i = 0; i < (NetworkMessage.MSG_TYPE_SIZE_BYTES + 1); i++)\n buffer.writeByte(1);\n\n channel.writeAndFlush(buffer).get(3, TimeUnit.SECONDS);\n\n channel.close().get(3, TimeUnit.SECONDS);\n\n InOrder order = Mockito.inOrder(handshakeManager);\n\n order.verify(handshakeManager, timeout()).init(any());\n order.verify(handshakeManager, timeout()).handshakeFuture();\n order.verify(handshakeManager, timeout()).onConnectionOpen(any());\n order.verify(handshakeManager, timeout()).onMessage(any(), any());\n }", "@Test\n\tpublic void testServerManyClientsRegisterAllGetInnerWrite() throws Exception {\n\t\tKeyValueServer server = new KeyValueServer();\n\t\tArrayList<String> files = populateServer(server);\n\t\t//Set up fake clients\n\t\tKeyValueClient[] clients = new KeyValueClient[N_REPLICAS];\n\t\tString contentToWrite = \"testServerManyClientsRegisterAllGetInnerWrite.\" + System.currentTimeMillis() + \".\";\n\t\tfor (int i = 0; i < N_REPLICAS; i++) {\n\t\t\tclients[i] = mock(KeyValueClient.class);\n\t\t\tfor (String p : files)\n\t\t\t\texpect(clients[i].innerWriteKey(eq(p.toString()), eq(contentToWrite + p.toString()), anyLong())).andReturn(true);\n\t\t\tclients[i].commitTransaction(anyLong());\n\t\t\texpectLastCall().anyTimes();\n\t\t\tclients[i].abortTransaction(anyLong());\n\t\t\texpectLastCall().anyTimes();\n\n\t\t\treplay(clients[i]);\n\t\t}\n\t\tfor (int i = 0; i < N_REPLICAS; i++) {\n\t\t\tserver.registerClient(\"fake hostname\", 9000 + i, clients[i]);\n\t\t}\n\t\tfor (String p : files)\n\t\t\tserver.set(p.toString(), contentToWrite + p.toString());\n\t\tfor (int i = 0; i < N_REPLICAS; i++) {\n\t\t\tserver.cacheDisconnect(\"fake hostname\", 9000 + i);\n\t\t}\n\t\tfor (KeyValueClient client : clients)\n\t\t\tverify(client);\n\n\t\t//Last, check that the server has all of the right files.\n\t\tKeyValueClient fake = mock(KeyValueClient.class);\n\t\tHashMap<String, String> endFiles = server.registerClient(\"fake\", 9, fake);\n\t\tfor (Map.Entry<String, String> e : endFiles.entrySet()) {\n\t\t\tString expected = contentToWrite + e.getKey();\n\t\t\tif (!e.getValue().equals(expected))\n\t\t\t\tfail(\"Writes were not saved on the server, expected file content \" + expected + \" but got \" + e.getValue());\n\t\t}\n\t}" ]
[ "0.6579374", "0.656045", "0.6482443", "0.6480549", "0.64232945", "0.63405615", "0.60850537", "0.60143936", "0.5932795", "0.5903259", "0.58989906", "0.58067214", "0.5782291", "0.57764745", "0.5770268", "0.57698303", "0.5749797", "0.57451075", "0.57042414", "0.5702283", "0.5690522", "0.56691164", "0.56375986", "0.56340855", "0.5627446", "0.5626993", "0.5625963", "0.5621247", "0.55760205", "0.55654716", "0.55599207", "0.5556462", "0.5545471", "0.55454504", "0.5531372", "0.5522093", "0.55129564", "0.5511379", "0.5500313", "0.54796636", "0.5465845", "0.5464246", "0.5453279", "0.5447656", "0.54430753", "0.5437156", "0.54262906", "0.5412616", "0.54084945", "0.540103", "0.53964686", "0.53963864", "0.53833926", "0.53812885", "0.53785336", "0.53759634", "0.537061", "0.53655505", "0.5364299", "0.53636986", "0.5363117", "0.5357211", "0.53558004", "0.535381", "0.53499985", "0.53484523", "0.5343724", "0.5342565", "0.5327532", "0.53271973", "0.5319643", "0.5316445", "0.53159314", "0.5299405", "0.52872616", "0.52777666", "0.527715", "0.5264801", "0.5261026", "0.5260666", "0.5259412", "0.5258589", "0.5256337", "0.5250437", "0.52476954", "0.5246685", "0.52402955", "0.5234315", "0.52339584", "0.52300376", "0.5223415", "0.5211635", "0.52107304", "0.52102286", "0.5204754", "0.5204433", "0.5200504", "0.5196043", "0.51947576", "0.51922166" ]
0.7317194
0
Random string generation test.
@Test public void testUtil() { String random = Util.getInstance().getRandomString(15); assertEquals(15, random.length()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testRandomStrings() throws Exception {\n checkRandomData(random(), a, 200 * RANDOM_MULTIPLIER);\n }", "private String getRandomName(){\n return rndString.nextString();\n }", "private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.append(alphaNum.charAt(num));\n }\n return sbRan.toString();\n }", "public static String buildTestString(int length, Random random) {\n char[] chars = new char[length];\n for (int i = 0; i < length; i++) {\n chars[i] = (char) random.nextInt();\n }\n return new String(chars);\n }", "private String generateRandomString(int length) {\n\n StringBuilder stringBuilder = new StringBuilder(length);\n int index = -1;\n while (stringBuilder.length() < length) {\n index = mRandom.nextInt(TEST_CHAR_SET_AS_STRING.length());\n stringBuilder.append(TEST_CHAR_SET_AS_STRING.charAt(index));\n }\n return stringBuilder.toString();\n }", "public static String getRandomString() {\n return RandomStringUtils.random(20, true, false);\n }", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "public static String rndString() {\r\n char[] c = RBytes.rndCharArray();\r\n return new String(c);\r\n\r\n }", "public static String randomeString() {\n\t\t\tString generatedString = RandomStringUtils.randomAlphabetic(8);\n\t\t\tSystem.out.println(generatedString);\n\t\t\treturn generatedString;\n\t\t\t\n\t\t}", "private String getRandomString() {\n\t\tStringBuilder salt = new StringBuilder();\n\t\tRandom rnd = new Random();\n\t\twhile (salt.length() <= 5) {\n\t\t\tint index = (int) (rnd.nextFloat() * SALTCHARS.length());\n\t\t\tsalt.append(SALTCHARS.charAt(index));\n\t\t}\n\t\tString saltStr = salt.toString();\n\t\treturn saltStr;\n\t}", "@Override\r\n\tpublic String randString(int n) {\n\t\tString base=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n\t\treturn randString(n, base);\r\n\t}", "public static String getRandomString() {\n \tif (random == null)\n \t\trandom = new Random();\n \treturn new BigInteger(1000, random).toString(32);\n }", "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }", "public String generate() {\r\n String result = RandomStringUtils.random(8,true,true);\r\n return result;\r\n }", "private static String generateRandomString(int size) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < size / 2; i++) sb.append((char) (64 + r.nextInt(26)));\n return sb.toString();\n }", "public String generateRandomString(){\n \n StringBuffer randStr = new StringBuffer();\n for(int i=0; i<RANDOM_STRING_LENGTH; i++){\n int number = getRandomNumber();\n char ch = CHAR_LIST.charAt(number);\n randStr.append(ch);\n }\n return randStr.toString();\n }", "@Test\n public void testGetShuffleString1() throws Exception {\n System.out.println(\"getShuffleString\");\n String appSaltKeyText = \"1234564IWCwFSOTf\";\n int expResult = 16;\n String result = ShuffleString.getShuffleString(appSaltKeyText);\n assertEquals(expResult, result.length());\n }", "protected String random(String value) {\n \t\treturn value + new Random().nextInt(100);\n \t}", "public static String stringGen(int seed) {\n String word = \"\"; // holds random string\r\n String letters = \"abdefghilmnoprstuwxy\"; // usable letters\r\n char letter; // holds current letter that is added to (string)word\r\n \r\n Random randomGen = new Random();\r\n \r\n for(int x = 0; x<50; x++){ // Create a random string of 50 characters\r\n int randomInt = randomGen.nextInt(20);\r\n letter = letters.charAt(randomInt);\r\n word = word + letter;\r\n }\r\n return word; // Finalized random string\r\n }", "private static String testGetRandomInstance(int iterations)\n {\n String output = \"\";\n for (int i = 0; i < iterations; i++) \n {\n output += \"Saying hello to the random greeter: \" \n + Greeter.getRandomInstance().sayHello() + \"\\n\";\n }\n return output;\n }", "@Override\r\n\tpublic String randString(int n, String base) {\n\t\tint bLength = base.length();\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tRandom r = new Random();\r\n\t\tint index;\r\n\t\tfor(int i=0; i<n; i++)\r\n\t\t{\r\n\t\t\tindex = r.nextInt(bLength);\r\n\t\t\tsb.append(base.charAt(index));\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "String getNewRandomTag() {\n\t\tbyte t[] = new byte[tagLength];\n\t\tfor (int i = 0; i < tagLength; i++) {\n\t\t\tt[i] = (byte) rand('a', 'z');\n\t\t}\n\t\treturn new String(t);\n\t}", "public static String randomStringGenerator(int len)\n {\n \t int lLimit = 97; \n \t int rLimit = 122; \n \t int targetStringLength =len;\n \t Random random = new Random();\n String generatedString = random.ints(lLimit, rLimit + 1)\n \t .limit(targetStringLength)\n \t .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)\n \t .toString();\n return generatedString;\n }", "private String generateRandomWord()\n {\t\n\tRandom randomNb = new Random(System.currentTimeMillis());\n\tchar [] word = new char[randomNb.nextInt(3)+5];\n\tfor(int i=0; i<word.length; i++)\n\t word[i] = letters[randomNb.nextInt(letters.length)];\n\treturn new String(word);\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\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}", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\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}", "public static String randomString() {\n\t\tint leftLimit = 97; // letter 'a'\n\t\tint rightLimit = 122; // letter 'z'\n\t\tint targetStringLength = 10;\n\t\tRandom random = new Random();\n\n\t\treturn random.ints(leftLimit, rightLimit + 1).limit(targetStringLength)\n\t\t\t\t.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append).toString();\n\t}", "public void testRandomStrings() throws Exception {\n final int numIters = atLeast(3);\n for (int i = 0; i < numIters; i++) {\n SynonymMap.Builder b = new SynonymMap.Builder(random().nextBoolean());\n final int numEntries = atLeast(10);\n for (int j = 0; j < numEntries; j++) {\n add(b, randomNonEmptyString(), randomNonEmptyString(), random().nextBoolean());\n }\n final SynonymMap map = b.build();\n final boolean ignoreCase = random().nextBoolean();\n\n final Analyzer analyzer =\n new Analyzer() {\n @Override\n protected TokenStreamComponents createComponents(String fieldName) {\n Tokenizer tokenizer = new MockTokenizer(MockTokenizer.SIMPLE, true);\n TokenStream stream = new SynonymGraphFilter(tokenizer, map, ignoreCase);\n return new TokenStreamComponents(tokenizer, new RemoveDuplicatesTokenFilter(stream));\n }\n };\n\n checkRandomData(random(), analyzer, 200);\n analyzer.close();\n }\n }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "private String creatNewText() {\n\t\tRandom rnd = new Random();\n\t\treturn \"Some NEW teXt U9\" + Integer.toString(rnd.nextInt(999999));\n\t}", "public static void testRandomString() {\n\r\n Set<String> set = new HashSet<>(1000000);\r\n String code = null;\r\n for (int i = 0; i < 100000; i++) {\r\n code = \"v\" + RandomStringUtils.random(5, \"0123456789abcdefghijklmnopqrstuvwxyz\");\r\n System.out.println(code);\r\n set.add(code);\r\n }\r\n System.out.println(set.size());\r\n }", "static String getRandomString(int n){\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index = (int)(alphabet.length() * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(alphabet.charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }", "public static String randomString() {\n\t\tfinal long value = RANDOMIZER.nextLong();\n\t\treturn String.valueOf(value < 0 ? value * -1 : value);\n\t}", "public String generate(final int count){\n return RandomStringUtils.random(count, true, true);\n }", "public static String rndLetterString() {\r\n int spLen = RBytes.rndInt(10, 20);\r\n char[] c = RBytes.rndCharArray('a', 'z');\r\n char[] C = RBytes.rndCharArray('A', 'Z');\r\n char[] d = RBytes.rndCharArray('0', '9');\r\n String special = \"\";\r\n for (int s = 0; s < spLen; s++) {\r\n special += \"!@#$%^&*()-_~`=+:;.,\";\r\n }\r\n String s1 = new String(c) + new String(d) + new String(C) + special;\r\n return shaffleString(s1);\r\n }", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "public static String getRandomString(int len){\n\n String pool =\"\";\n for(int i='0';i<='9';i++)\n pool+=(char)i;\n for(int i='A'; i<= 'Z'; i++){\n pool+=(char)i;\n }\n for(int i='a'; i<='z'; i++){\n pool+=(char)i;\n }\n char[] cs = new char[len];\n for(int i=0;i<len;i++){\n cs[i] = pool.charAt( (int)(Math.random()*(pool.length())));\n }\n return new String(cs);\n\n }", "private static String randomString(int length) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint index = randInt(0, ALPHA_NUMERIC_STRING.length() - 1);\n\t\t\tbuilder.append(ALPHA_NUMERIC_STRING.charAt(index));\n\t\t}\n\t\treturn builder.toString();\n\t}", "public static String getRandomString(int length)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric[Math.abs(bytes[i]%36)]);\r\n }\r\n return sb.toString();\r\n }", "@Test\n public void testGenerateString() {\n System.out.println(\"generateString\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.generateString();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@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}", "public static final String generate(int length) {\r\n\t\tif (length <= 0 || length > 100000) {\r\n\t\t\tSystem.out.println(\"Invalid length! We accept [0-100 000]!\");\r\n\t\t\treturn randomString;\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\t\trandomRange = rand.nextInt((NUMBERS - CAPITAL_LETTERS) + 1) + CAPITAL_LETTERS;\r\n\r\n\t\t\t\tif (randomRange == CAPITAL_LETTERS) {\r\n\t\t\t\t\trandomNumber = rand\r\n\t\t\t\t\t\t\t.nextInt((CAPITAL_LETTERS_MAX_ASCII_CHARACTER - CAPITAL_LETTERS_MIN_ASCII_CHARACTER) + 1)\r\n\t\t\t\t\t\t\t+ CAPITAL_LETTERS_MIN_ASCII_CHARACTER;\r\n\t\t\t\t} else if (randomRange == LOWERCASE_LETTERS) {\r\n\t\t\t\t\trandomNumber = rand.nextInt(\r\n\t\t\t\t\t\t\t(LOWERCASE_LETTERS_MAX_ASCII_CHARACTER - LOWERCASE_LETTERS_MIN_ASCII_CHARACTER) + 1)\r\n\t\t\t\t\t\t\t+ LOWERCASE_LETTERS_MIN_ASCII_CHARACTER;\r\n\t\t\t\t} else if (randomRange == NUMBERS) {\r\n\t\t\t\t\trandomNumber = rand.nextInt((NUMBERS_MAX_ASCII_CHARACTER - NUMBERS_MIN_ASCII_CHARACTER) + 1)\r\n\t\t\t\t\t\t\t+ NUMBERS_MIN_ASCII_CHARACTER;\r\n\t\t\t\t}\r\n\t\t\t\trandomString += (char) randomNumber;\r\n\t\t\t}\r\n\t\t\treturn randomString;\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic String rollString() {\r\n\t\treturn \"\"+Randomizer.getRandomNumber(possibleValues);\r\n\t}", "private static String createRandomString(int minLen, int maxLen, Random random) {\n int len = (minLen == maxLen) ? minLen : (random.nextInt(maxLen - minLen) + minLen);\n StringBuilder sb = new StringBuilder(len);\n while (sb.length() < len) {\n sb.append(CHARACTERS[random.nextInt(CHARACTERS.length)]);\n }\n return sb.toString();\n }", "public static String randomString(int lo, int hi){ \r\n int n = rand(lo, hi); \r\n byte b[] = new byte[n]; \r\n for (int i = 0; i < n; i++) \r\n b[i] = (byte)rand('a', 'z'); \r\n return new String(b, 0); \r\n\t}", "private String randomNonEmptyString() {\n while (true) {\n final String s = TestUtil.randomUnicodeString(random()).trim();\n if (s.length() != 0 && s.indexOf('\\u0000') == -1) {\n return s;\n }\n }\n }", "public static String randInt(){\n return String.valueOf(rand.nextInt(10));\n }", "protected static String generateString(int length) {\n String characters = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n Random rnd = new Random(System.nanoTime());\n char[] text = new char[length];\n for (int i = 0; i < length; i++) {\n text[i] = characters.charAt(rnd.nextInt(characters.length()));\n }\n return new String(text);\n }", "public String generateRandomEmail() {\n return generateLocalPart() + \"@test\" + getRandNumber() + \".com\";\n }", "public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "public String randomString() {\n return new BigInteger(130, random).toString(32);\n }", "public static String[] randStrings()\r\n\t{\n\t\t\r\n\t\t\t\tlong start = System.nanoTime();\r\n\t\t\t\tchallengeTwo;\r\n\t\t\t\tlong end = System.nanoTime();\r\n\t\t\t\tlong time = end - start;\r\n\t\t\t\t//Challenge 3 >75% Sorted Int Test\r\n\t}", "public String getRandomString(String template){\n reporter.info(\"Get random string for template: \"+ template);\n return RandomDataGenerator.getRandomField(template,RandomDataGenerator.DEFAULT_SEPARATOR);\n //return DataGenerator.getString(template);\n }", "public static void main(String[] args) {\n System.out.println(GetRandom.getRandomString(15, 5));\n }", "public String randomGenertateContent(){\n\t\tString []temp = {\"This\",\"Is\",\"Random\",\"Randomize\",\"Content\",\"Random\",\"Randomize\",\"Random\",\"Randomly\",\"Random Text\"};\n\t\tRandom random = new Random();\n\t\tint numOfWord = (int) (random.nextInt(20 - 1 + 1) + 1);\n\t\tString output = \"\";\n\t\tfor(int i=0;i<numOfWord;i++){\n\t\t\tint index = (int) (random.nextInt(temp.length - 2 + 1));\n\t\t\toutput+= temp[index] + \" \";\n\t\t}\n\t\treturn output;\n\t}", "public static String generateRandomString(int length) {\n String CHAR = \"ABCDEF\";\n String NUMBER = \"0123456789\";\n\n String DATA_FOR_RANDOM_STRING = CHAR + NUMBER;\n SecureRandom random = new SecureRandom();\n\n if (length < 1) throw new IllegalArgumentException();\n\n StringBuilder sb = new StringBuilder(length);\n\n for (int i = 0; i < length; i++) {\n // 0-62 (exclusive), random returns 0-61\n int rndCharAt = random.nextInt(DATA_FOR_RANDOM_STRING.length());\n char rndChar = DATA_FOR_RANDOM_STRING.charAt(rndCharAt);\n\n sb.append(rndChar);\n }\n\n return sb.toString();\n }", "public static String randomString() {\n return PodamUtil.manufacture(String.class);\n }", "public String getRandomCharecter(){\n\n\tif (!dataprepared){\n\t prepareData();\n\t}\n\t\n\tAssert.pre(table!=null,\"data must be prepared\");\n\n\treturn (String)table.get(r.nextInt(total));\n\n\t\n }", "public static String generateString(int count) {\r\n String ALPHA_NUMERIC_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\r\n StringBuilder builder = new StringBuilder();\r\n while (count-- != 0) {\r\n int character = (int) (Math.random() * ALPHA_NUMERIC_STRING.length());\r\n builder.append(ALPHA_NUMERIC_STRING.charAt(character));\r\n }\r\n return builder.toString();\r\n }", "private String createRandCode() {\n final String ALPHA_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n StringBuilder builder = new StringBuilder();\n int cnt = CODE_LEN;\n while (cnt-- != 0) {\n int charPos = (int) (Math.random()*ALPHA_STRING.length());\n builder.append(ALPHA_STRING.charAt(charPos));\n }\n Log.i(\"GameCode\", \"createRandCode: \" + builder.toString());\n return builder.toString();\n }", "private String generateRandomString(Random r, final int len) {\n byte[] bytes = new byte[len];\n for (int i = 0; i < len; i++) {\n bytes[i] = (byte)(r.nextInt(92) + 32);\n }\n return new String(bytes);\n }", "static public int getHobgoblinStr(){\n str = rand.nextInt(3) + 3;\n return str;\n }", "public static String getRandomString(int n) \r\n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\r\n + \"0123456789\"\r\n + \"abcdefghijklmnopqrstuvxyz\"; \r\n \r\n // create StringBuffer size of AlphaNumericString \r\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index \r\n = (int)(AlphaNumericString.length() \r\n * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(AlphaNumericString \r\n .charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }", "public static String rndString(int length) {\r\n char[] c = RBytes.rndCharArray(length);\r\n return new String(c);\r\n\r\n }", "@Test\n\tpublic void test() {\n\t\tString r1 = CGroup.createRandomId();\n\t\tassertTrue(r1.matches(\"[0-9]+\"));\n\t\t\n\t\tString r2 = CGroup.createRandomId();\n\t\tassertFalse(r1.equals(r2));\n\t}", "public synchronized static final String generateRandomString(int n) {\n\t\tchar[] chars = \"abcdefghijklmnopqrstuvwxyz1234567890\".toCharArray();\n\t\tSecureRandom random = new SecureRandom();\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsb.append(chars[random.nextInt(chars.length)]);\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String smsCode() {\n\t\t\tString random=new Random().nextInt(1000000)+\"\";\r\n\t\t\treturn random;\r\n\t\t}", "private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }", "public static String random(final int count) {\r\n\t\treturn org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(count);\r\n\t}", "private String createFakeName() {\n final int firstLowercaseLetterAscii = 97;\n final int lowercaseLetterRange = 25;\n\n // Maximum length random name = 20\n final int minNameLength = 4;\n int randomNameLength = (random.nextInt(17)) + minNameLength;\n\n // Algorithm to generate the random name\n StringBuilder randomName = new StringBuilder();\n for (int i = 0; i < randomNameLength; i++) {\n char randChar = (char) (random.nextInt(lowercaseLetterRange + 1) + firstLowercaseLetterAscii);\n randomName.append(randChar);\n }\n return randomName.toString();\n }", "public static String randomNumberString() {\n\r\n Random random = new Random();\r\n int i = random.nextInt(999999);\r\n\r\n\r\n return String.format(\"%06d\", i);\r\n }", "public static final String getRandomId() {\r\n return (\"\" + Math.random()).substring(2);\r\n }", "public static String getRandomString(int length, boolean easyReadOnly)\r\n {\r\n if (easyReadOnly)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric3[Math.abs(bytes[i]%m_alphanumeric3.length)]);\r\n }\r\n return sb.toString();\r\n }\r\n else\r\n return getRandomString(length); \r\n }", "public void generateRandomPassword() {\n\t\tString randomPassword = \"\";\n\t\tchar[] chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\".toCharArray();\n\t\tjava.util.Random random = new java.util.Random();\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t char c = chars[random.nextInt(chars.length)];\n\t\t randomPassword += c;\n\t\t}\n\t\tthis.password = randomPassword;\n\t}", "@Test\n public void testGetRandomString() {\n Chat rnd = mock(Chat.class);\n String[] valueArrayString = {\"1\", \"2\", \"3\", \"4\", \"5\"};\n when(rnd.getRandomString(valueArrayString)).thenReturn(\"1\");\n String valueString = \"1\";\n\n String result = rnd.getRandomString(valueArrayString);\n\n assertThat(valueString, is(result));\n\n }", "public static String rndString(String type) {\r\n char min = ' ';\r\n char max = ' ';\r\n if (type.trim().equals(LATIN_LARGE)) {\r\n min = 'A';\r\n max = 'Z';\r\n } else if (type.trim().equals(LATIN_SMALL)) {\r\n min = 'a';\r\n max = 'z';\r\n } else if (type.trim().equals(DIGITS)) {\r\n min = '0';\r\n max = '9';\r\n }\r\n char[] c = RBytes.rndCharArray(min, max);\r\n return new String(c);\r\n\r\n }", "public static String randomString(int length,boolean flag) {\n\t\tString alpha=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\t\tString num=\"0123456789\";\r\n\t\tchar[] characterSet;\r\n\t\tif(flag) // flag alpha is set both alphabets and numbers are considered.\r\n\t\tcharacterSet = (num+alpha).toCharArray();\r\n\t\telse // flag alpha is not set only numbers are considered.\r\n\t\tcharacterSet = (num).toCharArray();\r\n\t Random random = new SecureRandom();\r\n\t char[] result = new char[length];\r\n\t for (int i = 0; i < result.length; i++) {\r\n\t // picks a random index out of character set > random character\r\n\t int randomCharIndex = random.nextInt(characterSet.length);\r\n\t result[i] = characterSet[randomCharIndex]; //generates ramdomnumber\r\n\t }\r\n\t return new String(result);\r\n\t}", "private String RandomGoal() {\n\t\tList<String> list = Arrays.asList(\"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"t\", \"t\");\n\t\tRandom rand = new Random();\n\t\tString randomgoal = list.get(rand.nextInt(list.size()));\n\n\t\treturn randomgoal;\n\t}", "@Test\n public void test100True() {\n long start = System.currentTimeMillis();\n for (int i = 0; i < 100; i++) {\n RandomGUID myGUID = new RandomGUID(true);\n System.out.println(\"Seeding String=\" + myGUID.valueBeforeMD5);\n System.out.println(\"rawGUID=\" + myGUID.valueAfterMD5);\n System.out.println(\"RandomGUID=\" + myGUID.toString());\n }\n System.out.println(Ansi.ansi().eraseScreen().render(String.format(\"100 条@|blue 耗时 |@@|yellow %s |@@|blue 毫秒|@\", System.currentTimeMillis() - start)));\n }", "String selectRandomSecretWord();", "Randomizer getRandomizer();", "public String getRandom() {\n\t return word.get(new Random().nextInt(word.size()));}", "public static String getRandomString2(int length)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric2[Math.abs(bytes[i] % m_alphanumeric2.length)]);\r\n }\r\n return sb.toString();\r\n }", "@Test\r\n\tvoid testGetRandomLetterAShouldReturnTrue() {\r\n\t\tString[] alphabet = { \"e\", \"a\", \"i\", \"o\", \"n\", \"r\", \"t\", \"l\", \"s\", \"u\", \"d\", \"g\", \"b\", \"c\", \"m\", \"p\", \"f\", \"h\",\r\n\t\t\t\t\"v\", \"w\", \"y\", \"k\", \"j\", \"x\", \"q\", \"z\" };\r\n\t\tfor (int count = 0; count < 10000; count++) {\r\n\t\t\tRandomLetter a2z = new RandomLetter();\r\n\t\t\tif (!Arrays.asList(alphabet).contains(a2z.getRandomLetter())) {\r\n\t\t\t\tfail(\"returned a value that was not in the alphabet ---\" + a2z.getRandomLetter());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "protected String random(String array[]) {\n\t\tRandom generator = new Random();\n\t\tint randomIndex = generator.nextInt(array.length);\n\t\treturn array[randomIndex];\n\t}", "public String randomName() {\n return RandomStringUtils.randomAlphabetic( 10 );\n }", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "public static String generatePatientName(){\n\n\t\tString retName = \"\";\t// return this string\n\n\t\t// Seed random generator\n\t\tRandom generator = new Random();\n\n\t\tint length = getRandomBetween(5,6);\n\n\t\t// CVCCVC or VCCVCV\n\t\tif(getRandomBetween(1,2) < 2)\n\t\t{\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomVowel();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tif (length >= 5) { retName += getRandomVowel(); }\n\t\t\tif (length >= 6) { retName += getRandomConsonant(); }\n\t\t}\n\t\telse\n\t\t{\n\t\t\tretName += getRandomVowel();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomVowel();\n\t\t\tif (length >= 5) { retName += getRandomConsonant(); }\n\t\t\tif (length >= 6) { retName += getRandomVowel(); }\n\t\t}\n\n\t\treturn retName;\n\t}", "public static synchronized String getRandomPassword() {\n\t\t StringBuilder password = new StringBuilder();\n\t\t int j = 0;\n\t\t for (int i = 0; i < MINLENGTHOFPASSWORD; i++) {\n\t\t \t//System.out.println(\"J is \"+j);\n\t\t password.append(getRandomPasswordCharacters(j));\n\t\t j++;\n\t\t \n\t\t if (j == 4) {\n\t\t j = 0;\n\t\t }\n\t\t }\n\t\t return password.toString();\n\t\t}", "public static String generateRandomUsername() {\n final String randomFirst = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomSecond = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomThird = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n String userName = randomFirst + randomSecond + randomThird;\n\n userName = userName.substring(0, 10) + \"@ngetestmail.com\";\n\n return userName;\n }", "public String randomString(int Length, String s) {\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tStringBuilder sb = new StringBuilder(Length);\n\t\t\t\t\tfor (int i = 0; i < Length; i++) { sb.append(s.charAt(rand.nextInt(s.length()))); }\n\t\t\t\t\treturn sb.toString();\n\t\t\t\t}", "public String generateMP() {\n\t\t\tString characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*()-_=+[{]}\\\\|;:\\'\\\",<.>/?\";\n\t\t\tString pwd = RandomStringUtils.random(15, 0, 0, false, false, characters.toCharArray(), new SecureRandom());\n\t\t\treturn pwd;\n\t\t}", "public static String getRandomString(int length) {\n\t\tString ALPHABET = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tfinal SecureRandom RANDOM = new SecureRandom();\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < length; ++i) {\n\t\t\tsb.append(ALPHABET.charAt(RANDOM.nextInt(ALPHABET.length())));\n\t\t}\n\t\treturn sb.toString();\n\t}", "private void random() {\n\n\t}", "public void testRandomChainsWithLargeStrings() throws Throwable {\n int numIterations = TEST_NIGHTLY ? atLeast(20) : 3;\n Random random = random();\n for (int i = 0; i < numIterations; i++) {\n try (MockRandomAnalyzer a = new MockRandomAnalyzer(random.nextLong())) {\n if (VERBOSE) {\n System.out.println(\"Creating random analyzer:\" + a);\n }\n try {\n checkRandomData(\n random,\n a,\n 50 * RANDOM_MULTIPLIER,\n 80,\n false,\n false /* We already validate our own offsets... */);\n } catch (Throwable e) {\n System.err.println(\"Exception from random analyzer: \" + a);\n throw e;\n }\n }\n }\n }", "@Test\n public void testRandom() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.random(true);\n\n\n assertEquals(\"Random ei kysy sanaa\", \"sana\", kysymys);\n }", "static public String hobNameGen(){\n int i = rand.nextInt(8);\n String hName = name[i];\n return hName;\n }" ]
[ "0.8383381", "0.7732061", "0.75917435", "0.74023277", "0.73622197", "0.7331284", "0.72968405", "0.72623414", "0.72076964", "0.7167407", "0.71528214", "0.7151317", "0.714662", "0.7135636", "0.7106458", "0.7093249", "0.7091431", "0.70776623", "0.70616734", "0.6973347", "0.69561756", "0.69231594", "0.690181", "0.68940586", "0.687862", "0.6873143", "0.68713826", "0.6838167", "0.6818342", "0.68163157", "0.68053424", "0.67974067", "0.67681015", "0.67642224", "0.6760805", "0.6759341", "0.67497385", "0.6747013", "0.6739956", "0.67356604", "0.6714389", "0.6712403", "0.6708241", "0.6703207", "0.66927516", "0.6686581", "0.66773635", "0.66701865", "0.6668674", "0.666437", "0.6643702", "0.6621186", "0.6620813", "0.66150916", "0.66124296", "0.6611067", "0.6572777", "0.65710515", "0.65695554", "0.65660745", "0.6554863", "0.65545934", "0.6546568", "0.6543657", "0.65411764", "0.65407735", "0.65267473", "0.6520027", "0.65185595", "0.64924026", "0.6485942", "0.647473", "0.64739054", "0.64672035", "0.64377093", "0.6430777", "0.6419247", "0.64087856", "0.64020985", "0.6400272", "0.6385254", "0.63795847", "0.6375458", "0.63703465", "0.6352694", "0.63467324", "0.6330039", "0.6311222", "0.6310457", "0.6303667", "0.63022333", "0.62962", "0.62874186", "0.6280102", "0.6276371", "0.6271288", "0.62629837", "0.6238208", "0.62299", "0.6226693" ]
0.73320013
5
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testFlavourEqualsContract() { EqualsVerifier.forClass(PdfaFlavour.class).verify(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@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 public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.73466444", "0.73406184", "0.729062", "0.726788", "0.71800286", "0.7042927", "0.6993379", "0.68919605", "0.6815909", "0.6789467", "0.67293495", "0.669995", "0.66196585", "0.6619598", "0.6607875", "0.6548022", "0.6546288", "0.65354735", "0.6507837", "0.65073365", "0.6500771", "0.64706665", "0.6465005", "0.6453964", "0.64478153", "0.64446265", "0.64429784", "0.64367485", "0.64267385", "0.641902", "0.6412146", "0.6408076", "0.64031893", "0.6401307", "0.63895667", "0.63783014", "0.63768905", "0.63744295", "0.63613975", "0.63542306", "0.63431215", "0.6340898", "0.6338745", "0.6334409", "0.6330611", "0.63290757", "0.6301489", "0.63012385", "0.62998396", "0.6290829", "0.6275571", "0.62684804", "0.62635857", "0.6243497", "0.6242435", "0.62300074", "0.62234116", "0.62190074", "0.62112534", "0.619456", "0.61928326", "0.6179303", "0.6176325", "0.61707884", "0.6163839", "0.6131101", "0.6124352", "0.6123052", "0.6100901", "0.60844576", "0.60808194", "0.60442376", "0.6031445", "0.6028884", "0.6024146", "0.60160255", "0.6013665", "0.6012513", "0.60019886", "0.60005003", "0.6000479", "0.599556", "0.5990611", "0.5986598", "0.59837294", "0.59808624", "0.59797496", "0.59791636", "0.5975208", "0.59672743", "0.5960071", "0.59599566", "0.59511226", "0.59379685", "0.59379685", "0.59362596", "0.59337336", "0.59333533", "0.59333533", "0.59275454" ]
0.70608395
5
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testLevelEqualsContract() { EqualsVerifier.forClass(PdfaFlavour.Level.class).verify(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@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 public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.73466444", "0.73406184", "0.729062", "0.726788", "0.71800286", "0.70608395", "0.7042927", "0.6993379", "0.68919605", "0.6815909", "0.67293495", "0.669995", "0.66196585", "0.6619598", "0.6607875", "0.6548022", "0.6546288", "0.65354735", "0.6507837", "0.65073365", "0.6500771", "0.64706665", "0.6465005", "0.6453964", "0.64478153", "0.64446265", "0.64429784", "0.64367485", "0.64267385", "0.641902", "0.6412146", "0.6408076", "0.64031893", "0.6401307", "0.63895667", "0.63783014", "0.63768905", "0.63744295", "0.63613975", "0.63542306", "0.63431215", "0.6340898", "0.6338745", "0.6334409", "0.6330611", "0.63290757", "0.6301489", "0.63012385", "0.62998396", "0.6290829", "0.6275571", "0.62684804", "0.62635857", "0.6243497", "0.6242435", "0.62300074", "0.62234116", "0.62190074", "0.62112534", "0.619456", "0.61928326", "0.6179303", "0.6176325", "0.61707884", "0.6163839", "0.6131101", "0.6124352", "0.6123052", "0.6100901", "0.60844576", "0.60808194", "0.60442376", "0.6031445", "0.6028884", "0.6024146", "0.60160255", "0.6013665", "0.6012513", "0.60019886", "0.60005003", "0.6000479", "0.599556", "0.5990611", "0.5986598", "0.59837294", "0.59808624", "0.59797496", "0.59791636", "0.5975208", "0.59672743", "0.5960071", "0.59599566", "0.59511226", "0.59379685", "0.59379685", "0.59362596", "0.59337336", "0.59333533", "0.59333533", "0.59275454" ]
0.6789467
10
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testStandardEqualsContract() { EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@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 public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.73468", "0.7341382", "0.72907835", "0.7268406", "0.7179382", "0.7060953", "0.7043847", "0.6993722", "0.68918484", "0.6789825", "0.6728865", "0.6700531", "0.66191006", "0.66190445", "0.6607664", "0.6547432", "0.654594", "0.65366405", "0.65084064", "0.65076613", "0.65008724", "0.64708817", "0.64643294", "0.64532894", "0.6447495", "0.64446324", "0.6442899", "0.64376855", "0.6426251", "0.6418724", "0.64117086", "0.6409074", "0.6402661", "0.64005286", "0.63906574", "0.6379096", "0.6377143", "0.63738966", "0.63613135", "0.63550246", "0.63440347", "0.63404435", "0.6338164", "0.6334886", "0.6330366", "0.6328249", "0.63007736", "0.63007355", "0.629921", "0.62914056", "0.62762326", "0.626901", "0.6263423", "0.6242898", "0.6242655", "0.62303597", "0.62227535", "0.62185675", "0.6210611", "0.6195331", "0.619329", "0.6178529", "0.6176359", "0.6170986", "0.6164122", "0.6131762", "0.61242586", "0.6124216", "0.6100639", "0.6085116", "0.60806876", "0.6043823", "0.6032001", "0.60286033", "0.6024849", "0.60156727", "0.6013592", "0.6012205", "0.60024774", "0.60012436", "0.6000954", "0.5994393", "0.59896016", "0.5986357", "0.5983672", "0.59816176", "0.59800094", "0.59796166", "0.5974795", "0.5967626", "0.5960868", "0.5960643", "0.59519625", "0.59379715", "0.59379715", "0.59367853", "0.5934243", "0.5933905", "0.5933905", "0.5927725" ]
0.68162966
9
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testStandardSeriesEqualsContract() { EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@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\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.7346661", "0.7340574", "0.72916514", "0.7269818", "0.71807724", "0.70608944", "0.7043007", "0.699361", "0.6891562", "0.68169874", "0.67899483", "0.6731035", "0.6700458", "0.66214186", "0.66211647", "0.66086555", "0.65495837", "0.6547176", "0.6536473", "0.65083253", "0.6508026", "0.6502205", "0.6472296", "0.6466494", "0.64553565", "0.64482194", "0.64460826", "0.6443676", "0.64379907", "0.64276826", "0.64200467", "0.6413719", "0.640914", "0.64043874", "0.64023024", "0.6390138", "0.6378646", "0.63778204", "0.63759255", "0.63629484", "0.6354924", "0.634357", "0.63418746", "0.63396263", "0.63345116", "0.6332211", "0.6330231", "0.6302678", "0.6302434", "0.6301274", "0.6291151", "0.6276907", "0.6269536", "0.6264762", "0.6245442", "0.6243222", "0.6230783", "0.6224424", "0.6219734", "0.6212028", "0.6194725", "0.61938643", "0.6180526", "0.61764127", "0.61716455", "0.61321354", "0.6125892", "0.61240184", "0.61022234", "0.6085371", "0.6081771", "0.60452193", "0.6033122", "0.6029745", "0.60248655", "0.60177195", "0.60153925", "0.60133785", "0.6003436", "0.60014087", "0.60012066", "0.5998014", "0.59924084", "0.5988689", "0.59843767", "0.5982267", "0.5980737", "0.597927", "0.5977493", "0.5967071", "0.59609926", "0.59606165", "0.59527636", "0.5939514", "0.5939514", "0.59368384", "0.5934679", "0.5933983", "0.5933983", "0.5929292" ]
0.61650354
65
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testSpecificationEqualsContract() { EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@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 public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.73406184", "0.729062", "0.726788", "0.71800286", "0.70608395", "0.7042927", "0.6993379", "0.68919605", "0.6815909", "0.6789467", "0.67293495", "0.669995", "0.66196585", "0.6619598", "0.6607875", "0.6548022", "0.6546288", "0.65354735", "0.6507837", "0.65073365", "0.6500771", "0.64706665", "0.6465005", "0.6453964", "0.64478153", "0.64446265", "0.64429784", "0.64367485", "0.64267385", "0.641902", "0.6412146", "0.6408076", "0.64031893", "0.6401307", "0.63895667", "0.63783014", "0.63768905", "0.63744295", "0.63613975", "0.63542306", "0.63431215", "0.6340898", "0.6338745", "0.6334409", "0.6330611", "0.63290757", "0.6301489", "0.63012385", "0.62998396", "0.6290829", "0.6275571", "0.62684804", "0.62635857", "0.6243497", "0.6242435", "0.62300074", "0.62234116", "0.62190074", "0.62112534", "0.619456", "0.61928326", "0.6179303", "0.6176325", "0.61707884", "0.6163839", "0.6131101", "0.6124352", "0.6123052", "0.6100901", "0.60844576", "0.60808194", "0.60442376", "0.6031445", "0.6028884", "0.6024146", "0.60160255", "0.6013665", "0.6012513", "0.60019886", "0.60005003", "0.6000479", "0.599556", "0.5990611", "0.5986598", "0.59837294", "0.59808624", "0.59797496", "0.59791636", "0.5975208", "0.59672743", "0.5960071", "0.59599566", "0.59511226", "0.59379685", "0.59379685", "0.59362596", "0.59337336", "0.59333533", "0.59333533", "0.59275454" ]
0.73466444
0
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testFlavourToString() { for (PdfaFlavour flavour : PdfaFlavour.values()) { System.out.println(flavour.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@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 public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.73466444", "0.73406184", "0.729062", "0.726788", "0.71800286", "0.70608395", "0.7042927", "0.6993379", "0.68919605", "0.6815909", "0.6789467", "0.67293495", "0.669995", "0.66196585", "0.6619598", "0.6607875", "0.6548022", "0.6546288", "0.65354735", "0.6507837", "0.65073365", "0.6500771", "0.64706665", "0.6465005", "0.6453964", "0.64478153", "0.64446265", "0.64429784", "0.64367485", "0.64267385", "0.641902", "0.6412146", "0.6408076", "0.64031893", "0.6401307", "0.63895667", "0.63783014", "0.63768905", "0.63744295", "0.63613975", "0.63542306", "0.63431215", "0.6340898", "0.6338745", "0.6334409", "0.6330611", "0.63290757", "0.6301489", "0.63012385", "0.62998396", "0.6290829", "0.6275571", "0.62684804", "0.62635857", "0.6243497", "0.6242435", "0.62300074", "0.62234116", "0.62190074", "0.62112534", "0.619456", "0.61928326", "0.6179303", "0.6176325", "0.61707884", "0.6163839", "0.6131101", "0.6124352", "0.6123052", "0.6100901", "0.60844576", "0.60808194", "0.60442376", "0.6031445", "0.6028884", "0.6024146", "0.60160255", "0.6013665", "0.6012513", "0.60019886", "0.60005003", "0.6000479", "0.599556", "0.5990611", "0.5986598", "0.59837294", "0.59808624", "0.59797496", "0.59791636", "0.5975208", "0.59672743", "0.5960071", "0.59599566", "0.59511226", "0.59379685", "0.59379685", "0.59362596", "0.59337336", "0.59333533", "0.59333533", "0.59275454" ]
0.0
-1
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testLevelToString() { for (PdfaFlavour.Level level : PdfaFlavour.Level.values()) { System.out.println(level.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@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 public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.73468", "0.7341382", "0.72907835", "0.7268406", "0.7179382", "0.7060953", "0.7043847", "0.6993722", "0.68918484", "0.68162966", "0.6789825", "0.6728865", "0.6700531", "0.66191006", "0.66190445", "0.6607664", "0.6547432", "0.654594", "0.65366405", "0.65084064", "0.65076613", "0.65008724", "0.64708817", "0.64643294", "0.64532894", "0.6447495", "0.64446324", "0.6442899", "0.64376855", "0.6426251", "0.6418724", "0.64117086", "0.6409074", "0.6402661", "0.64005286", "0.63906574", "0.6379096", "0.6377143", "0.63738966", "0.63613135", "0.63550246", "0.63440347", "0.63404435", "0.6338164", "0.6334886", "0.6330366", "0.6328249", "0.63007736", "0.63007355", "0.629921", "0.62914056", "0.62762326", "0.626901", "0.6263423", "0.6242898", "0.6242655", "0.62303597", "0.62227535", "0.62185675", "0.6210611", "0.6195331", "0.619329", "0.6178529", "0.6176359", "0.6170986", "0.6164122", "0.6131762", "0.61242586", "0.6124216", "0.6100639", "0.6085116", "0.60806876", "0.6043823", "0.6032001", "0.60286033", "0.6024849", "0.60156727", "0.6013592", "0.6012205", "0.60024774", "0.60012436", "0.6000954", "0.5994393", "0.59896016", "0.5986357", "0.5983672", "0.59816176", "0.59800094", "0.59796166", "0.5974795", "0.5967626", "0.5960868", "0.5960643", "0.59519625", "0.59379715", "0.59379715", "0.59367853", "0.5934243", "0.5933905", "0.5933905", "0.5927725" ]
0.0
-1
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testStandardToString() { for (PdfaFlavour.IsoStandard standard : PdfaFlavour.IsoStandard.values()) { System.out.println(standard.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@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\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.7346661", "0.7340574", "0.72916514", "0.7269818", "0.71807724", "0.70608944", "0.7043007", "0.699361", "0.6891562", "0.68169874", "0.67899483", "0.6731035", "0.6700458", "0.66214186", "0.66211647", "0.66086555", "0.65495837", "0.6547176", "0.6536473", "0.65083253", "0.6508026", "0.6502205", "0.6472296", "0.6466494", "0.64553565", "0.64482194", "0.64460826", "0.6443676", "0.64379907", "0.64276826", "0.64200467", "0.6413719", "0.640914", "0.64043874", "0.64023024", "0.6390138", "0.6378646", "0.63778204", "0.63759255", "0.63629484", "0.6354924", "0.634357", "0.63418746", "0.63396263", "0.63345116", "0.6332211", "0.6330231", "0.6302678", "0.6302434", "0.6301274", "0.6291151", "0.6276907", "0.6269536", "0.6264762", "0.6245442", "0.6243222", "0.6230783", "0.6224424", "0.6219734", "0.6212028", "0.6194725", "0.61938643", "0.6180526", "0.61764127", "0.61716455", "0.61650354", "0.61321354", "0.6125892", "0.61240184", "0.61022234", "0.6085371", "0.6081771", "0.60452193", "0.6033122", "0.6029745", "0.60248655", "0.60177195", "0.60153925", "0.60133785", "0.6003436", "0.60014087", "0.60012066", "0.5998014", "0.59924084", "0.5988689", "0.59843767", "0.5982267", "0.5980737", "0.597927", "0.5977493", "0.5967071", "0.59609926", "0.59606165", "0.59527636", "0.5939514", "0.5939514", "0.59368384", "0.5934679", "0.5933983", "0.5933983", "0.5929292" ]
0.0
-1
Test the hash and equals contract for the class using EqualsVerifier
@Test public void testStandardSeriesToString() { for (PdfaFlavour.IsoStandardSeries series : PdfaFlavour.IsoStandardSeries.values()) { System.out.println(series.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEqualsAndHashCode() {\n }", "private Equals() {}", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Test\n public void testFlavourEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.class).verify();\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Test\n public void testStandardEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandard.class).verify();\n }", "@Test\n public void testLevelEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.Level.class).verify();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }", "@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Receta instance = new Receta();\n instance.setInstrucciones(\"inst1\");\n instance.setNombre(\"nom1\");\n int expResult = Objects.hash(\"nom1\",\"inst1\");\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Paciente instance = new Paciente();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testDifferentClassEquality() {\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }", "@Test\n public void testHashCode() {\n\n\tLoadCategories lobj = new LoadCategories();\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tint expResult = 0;\n\tint result = instance.hashCode();\n\tassertEquals(expResult, result);\n\tinstance.equals(lobj);\n }", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Reserva instance = new Reserva();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }", "@Test\n @Ignore\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Setting instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }", "@Test\n public void testEquals() {\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n Integrante instance = new Integrante();\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n Commissioner instance = new Commissioner();\n int expResult = 0;\n int result = instance.hashCode();\n assertEquals(expResult, result);\n }", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "public void testObjHashCode()\n {\n assertEquals( this.hashCode(), Util.objHashCode(this) );\n assertEquals( Util.objHashCode(null), Util.objHashCode(null) );\n }", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void equals() {\n Grade mathsCopy = new GradeBuilder(MATHS_GRADE).build();\n assertTrue(MATHS_GRADE.equals(mathsCopy));\n\n // same object -> returns true\n assertTrue(MATHS_GRADE.equals(MATHS_GRADE));\n\n // null -> returns false\n assertFalse(MATHS_GRADE.equals(null));\n\n // different type -> returns false\n assertFalse(MATHS_GRADE.equals(5));\n\n // different person -> returns false\n assertFalse(MATHS_GRADE.equals(SCIENCE_GRADE));\n\n // different subject name -> returns false\n Grade editedMaths = new GradeBuilder(MATHS_GRADE)\n .withSubject(VALID_SUBJECT_NAME_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different graded item -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGradedItem(VALID_GRADED_ITEM_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n\n // different grade -> returns false\n editedMaths = new GradeBuilder(MATHS_GRADE)\n .withGrade(VALID_GRADE_SCIENCE).build();\n assertFalse(MATHS_GRADE.equals(editedMaths));\n }", "@Test\n public void equals() {\n Beneficiary animalShelterCopy = new BeneficiaryBuilder(ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(animalShelterCopy));\n\n // same object -> returns true\n assertTrue(ANIMAL_SHELTER.equals(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.equals(null));\n\n // different type -> returns false\n assertFalse(ANIMAL_SHELTER.equals(5));\n\n // different beneficiary -> returns false\n assertFalse(ANIMAL_SHELTER.equals(BABES));\n\n // same name -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n\n // same phone and email -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(BABES)\n .withPhone(VALID_PHONE_ANIMAL_SHELTER).withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertTrue(ANIMAL_SHELTER.equals(editedAnimalShelter));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "@Test\r\n public void testHashCode() {\r\n System.out.println(\"hashCode\");\r\n RevisorParentesis instance = null;\r\n int expResult = 0;\r\n int result = instance.hashCode();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94),\n Long.valueOf(71),\n Order.getDefault(),\n \"8dc5a82a-6167-4538-8ded-4ce5f9a7634b\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2.hashCode(), subtenantpolicygrouplistoptions1.hashCode());\n int hashCode = subtenantpolicygrouplistoptions1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantpolicygrouplistoptions1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testHashCode_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n int result = fixture.hashCode();\n\n assertEquals(1305, result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@Test\n public void testStandardSeriesEqualsContract() {\n EqualsVerifier.forClass(PdfaFlavour.IsoStandardSeries.class).verify();\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void testEquals() {\n\tLoadCategoriesForm obj = new LoadCategoriesForm();\n\tobj.setLoadCategory(new LoadCategories());\n\tLoadCategoriesForm instance = new LoadCategoriesForm();\n\tinstance.setLoadCategory(new LoadCategories());\n\tboolean expResult = true;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n public void hashCode_equals() {\n assertEquals(defaultGuiSettings.hashCode(), defaultGuiSettings.hashCode());\n assertEquals(userGuiSettings.hashCode(), userGuiSettings.hashCode());\n\n // same values -> same hash code\n assertEquals(defaultGuiSettings.hashCode(), new GuiSettings().hashCode());\n assertEquals(userGuiSettings.hashCode(), new GuiSettings(700, 900, 200, 300).hashCode());\n }", "@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }", "@Test\n public void testHashCode() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n int expectedHashCode = 7;\n expectedHashCode = 37 * expectedHashCode + Objects.hashCode(\"coctail\");\n expectedHashCode = 37 * expectedHashCode + Arrays.deepHashCode(new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n \n assertEquals(expectedHashCode, c1.hashCode());\n }", "@Test\r\n\tpublic void test_singletonLink_compareByHashCode_reflectionAPI() throws Exception {\r\n\t\tObject ref1HashCode = Singleton.getInstance().hashCode();\r\n\t\t@SuppressWarnings(\"rawtypes\")\r\n\t\tClass clazz = Class.forName(\"com.bridgeLabz.designPattern.creationalDesignPattern.singleton.eagerInitialization.Singleton\");\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tConstructor<Singleton> ctor = clazz.getDeclaredConstructor();\r\n\t\tctor.setAccessible(true);\r\n\t\tint ref2HashCode = ctor.newInstance().hashCode();\r\n\r\n\t\tassertNotEquals(ref1HashCode, ref2HashCode);\r\n\r\n\t}", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override \n boolean equals(Object obj);", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "void verifyConsistent(ImmutableClassesGiraphConfiguration conf);", "Equality createEquality();", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testUsingHascode()\r\n {\n \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n /******** Get HashCode *****************/ \r\n //return hascode as a string the is an easy way of doing this\r\n // all u have to do is state the object preceeded with a dot hashcode \r\n //*** E.g object.hashcode() ***\r\n String num1 = Integer.toHexString(System.identityHashCode(try_scorers)) ; \r\n String num2 = Integer.toHexString(System.identityHashCode(try_scorers.updateTries(5)));\r\n \r\n //Different hashcodes mean that it isnt the same object\r\n Assert.assertNotEquals(num1,num2,\"Objects are same\");\r\n \r\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@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 public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@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 }" ]
[ "0.73466444", "0.73406184", "0.729062", "0.726788", "0.71800286", "0.70608395", "0.7042927", "0.6993379", "0.68919605", "0.6815909", "0.6789467", "0.67293495", "0.669995", "0.66196585", "0.6619598", "0.6607875", "0.6548022", "0.6546288", "0.65354735", "0.6507837", "0.65073365", "0.6500771", "0.64706665", "0.6465005", "0.6453964", "0.64478153", "0.64446265", "0.64429784", "0.64367485", "0.64267385", "0.641902", "0.6412146", "0.6408076", "0.64031893", "0.6401307", "0.63895667", "0.63783014", "0.63768905", "0.63744295", "0.63613975", "0.63542306", "0.63431215", "0.6340898", "0.6338745", "0.6334409", "0.6330611", "0.63290757", "0.6301489", "0.63012385", "0.62998396", "0.6290829", "0.6275571", "0.62684804", "0.62635857", "0.6243497", "0.6242435", "0.62300074", "0.62234116", "0.62190074", "0.62112534", "0.619456", "0.61928326", "0.6179303", "0.6176325", "0.61707884", "0.6163839", "0.6131101", "0.6124352", "0.6123052", "0.6100901", "0.60844576", "0.60808194", "0.60442376", "0.6031445", "0.6028884", "0.6024146", "0.60160255", "0.6013665", "0.6012513", "0.60019886", "0.60005003", "0.6000479", "0.599556", "0.5990611", "0.5986598", "0.59837294", "0.59808624", "0.59797496", "0.59791636", "0.5975208", "0.59672743", "0.5960071", "0.59599566", "0.59511226", "0.59379685", "0.59379685", "0.59362596", "0.59337336", "0.59333533", "0.59333533", "0.59275454" ]
0.0
-1
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Note that you cannot sell a stock before you buy one. Example 1: Input: [7,1,5,3,6,4] Output: 5 Explanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 61 = 5. Not 71 = 6, as selling price needs to be larger than buying price. Example 2: Input: [7,6,4,3,1] Output: 0 Explanation: In this case, no transaction is done, i.e. max profit = 0.
public static int maxProfit(int[] prices) { //no stock can be sold if (prices == null) { return 0; } int buyDay = 0; int maxProfit = 0; for (int day = 1; day < prices.length; day++) { //update maxProfit int currentProfit = prices[day] - prices[buyDay]; if (currentProfit > maxProfit) { maxProfit = currentProfit; } else if (currentProfit < 0) { //update buyDay buyDay = day; } } return maxProfit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int findMaxProfit(int [] prices){\n int max_profit = 0;\r\n for (int i = 0;i<prices.length-1;i++){\r\n if(prices [i] < prices [i+1]){\r\n max_profit = max_profit + (prices[i+1]-prices[i]);\r\n }\r\n }\r\n return max_profit;\r\n }", "public int maxProfit(int[] prices) {\n int N = prices.length;\n int res = 0; // min, buy and sell on the same day\n for (int i = 0; i < N; i++) {\n for (int j = i; j < N; j++) {\n res = Math.max(res, prices[j] - prices[i]);\n }\n }\n return res;\n }", "static int maxProfit(int[] prices)\n\t{\n\t\tint len = prices.length;\n\t\tint min = Integer.MAX_VALUE;\n\t\tint profit = 0;\n\t\tfor (int i = 0; i < len; i++)\n\t\t{\n\t\t\tmin = min > prices[i] ? prices[i] : min;\n\t\t\tprofit = prices[i] - min > profit ? prices[i] - min : profit; \n\t\t}\n\t\treturn profit;\n\t}", "private static int maxProfit(int[] prices) {\n\t\tint profit = 0;\n\t\tint buyPrice = prices[0]; //min price to buy the stock\n\t\tfor(int i=1; i< prices.length; i++) {\n\t\t\tbuyPrice = Math.min(buyPrice, prices[i]);\n\t\t\tprofit = Math.max(profit, (prices[i]-buyPrice));\n\t\t}\n\t\treturn profit;\n\t}", "public int maxProfit(int[] prices){\n int maxprofit = 0;\n for (int i=1;i<prices.length;i++){\n if(prices[i]>prices[i-1]){\n maxprofit += prices[i]-prices[i-1];\n }\n }\n return maxprofit;\n }", "public int maxProfit(int[] prices) {\n \n \n int highestProfit = 0;\n\n //1\n int lengthIndex = prices.length-1;\n int[] lowest = getLowestPricesInTerm(prices);\n int[] highest = getHighestPricesInTerm(Arrays.copyOfRange(prices,lowest[1],lengthIndex));\n highestProfit = Math.max(highestProfit, highest[0]-lowest[0]);\n int[] secondLow;\n int[] secondHigh;\n\n // need to consider \"index out of bounds\"\n //2\n if(lowest[1]+1<=highest[1]-1){\n secondLow = getLowestPricesInTerm(Arrays.copyOfRange(prices,lowest[1]+1,highest[1]-1));\n secondHigh = getLowestPricesInTerm(Arrays.copyOfRange(prices,secondLow[1],highest[1]-1));\n highestProfit = Math.max(highestProfit, secondHigh[0]-lowest[0] + highest[0]-secondLow[0]);\n }\n \n //3\n if(lowest[1]-1>0){\n secondLow = getLowestPricesInTerm(Arrays.copyOfRange(prices,0,lowest[1]-1));\n secondHigh = getLowestPricesInTerm(Arrays.copyOfRange(prices,secondLow[1],lowest[1]-1));\n highestProfit = Math.max(highestProfit, secondHigh[0]-secondLow[0] + highest[0]-lowest[0]);\n }\n \n //4\n if(highest[1]+1<lengthIndex){\n secondLow = getLowestPricesInTerm(Arrays.copyOfRange(prices,highest[1]+1,lengthIndex));\n secondHigh = getLowestPricesInTerm(Arrays.copyOfRange(prices,secondLow[1],lengthIndex));\n highestProfit = Math.max(highestProfit, secondHigh[0]-secondLow[0] + highest[0]-lowest[0]);\n }\n \n \n return highestProfit;\n\n }", "public int maxProfitII(int[] prices) {\n if (prices == null || prices.length == 0) return 0;\n int profit = 0;\n int buyInPrice = prices[0];\n int sellPrice = prices[0];\n for (int i : prices) {\n if (i > sellPrice) {\n profit += i - sellPrice;\n buyInPrice = i;\n sellPrice = i;\n }\n if (i < buyInPrice) {\n buyInPrice = i;\n sellPrice = i;\n }\n }\n return profit;\n }", "public int maxProfit(int[] prices) {\n if (prices.length == 0) {\n return 0;\n }\n int days = prices.length;\n \n int[] profit1 = new int[days]; // I must sell on day i\n int[] profit2 = new int[days]; // I must rest on day i\n \n profit1[0] = 0; // Buy and sell immediately\n profit2[0] = 0; // Just do nothing\n \n for (int i = 1; i < days; i++) { // Not implemented yet\n profit1[i] = Math.max(profit2[i - 1] + prices[i], -1);\n profit2[i] = Math.max(profit1[i - 1], profit2[i - 1]);\n }\n \n return -1;\n }", "public int maxProfit(int[] prices) {\n if(prices.length==0){\n return 0;\n }\n int max = 0;\n int valley = prices[0];\n int peak = prices[0];\n int i=0;\n while(i < prices.length-1){\n while(i<prices.length-1 && prices[i]>=prices[i+1])\n i++;\n valley = prices[i];\n while(i<prices.length-1 && prices[i]<=prices[i+1])\n i++;\n peak = prices[i];\n max += peak- valley;\n }\n return max;\n }", "public static int maximumProfit(int[] input){\n\t\tint maxTotalProfit = 0;\n\t\tList<Integer> firstBuySellProfits = new ArrayList<Integer>();\n\t\tint minPriceSoFar = Integer.MAX_VALUE;\n\t\tfor(int i = 0; i < input.length; i++){\n\t\t\tminPriceSoFar = Math.min(minPriceSoFar, input[i]);\n\t\t\tmaxTotalProfit = Math.max(maxTotalProfit, input[i] - minPriceSoFar);\n\t\t\tfirstBuySellProfits.add(maxTotalProfit);\n\t\t}\n\n\t\tint maxPriceSoFar = Integer.MIN_VALUE;\n\t\tfor(int i = input.length-1; i > 0; i--){\n\t\t\tmaxPriceSoFar = Math.max(maxPriceSoFar, input[i]);\n\t\t\tmaxTotalProfit = Math.max(maxTotalProfit, maxPriceSoFar - input[i] + firstBuySellProfits.get(i - 1));\n\t\t}\n\t\treturn maxTotalProfit;\n\t}", "public static int maxProfit2(int[] prices) {\n if (prices == null) {\n return 0;\n }\n\n int currentProfit = 0;\n int maxProfit = 0;\n for (int day = 1; day < prices.length; day++) {\n //update maxProfit\n int delta = prices[day] - prices[day - 1];\n currentProfit = Math.max(0, currentProfit + delta);\n maxProfit = Math.max(currentProfit, maxProfit);\n }\n return maxProfit;\n }", "public int maxProfitBF(int prices[]) {\n int maxprofit = 0;\n for (int i = 0; i < prices.length - 1; i++) {\n for (int j = i + 1; j < prices.length; j++) {\n int profit = prices[j] - prices[i];\n if (profit > maxprofit)\n maxprofit = profit;\n }\n }\n return maxprofit;\n }", "public int maxProfitOP(int prices[]) {\n int minprice = Integer.MAX_VALUE;\n int maxprofit = 0;\n for (int i = 0; i < prices.length; i++) {\n if (prices[i] < minprice)\n minprice = prices[i];\n else if (prices[i] - minprice > maxprofit)\n maxprofit = prices[i] - minprice;\n }\n return maxprofit;\n }", "public static int calculateMaximumProfit(int[] input) {\n int minPrice = Integer.MAX_VALUE;\n int maxPrice = Integer.MIN_VALUE;\n\n if (input == null || input.length <= 1) {\n return 0;\n }\n\n for (int currentPrice : input) {\n minPrice = getMinPrice(minPrice, currentPrice);\n maxPrice = getMaxPrice(maxPrice, currentPrice);\n }\n return maxPrice - minPrice;\n }", "public int maxProfit(int[] prices) {\n if (prices == null || prices.length == 0) return 0;\n int profit = 0;\n int cur = prices[0];\n for (int i : prices) {\n if (i > cur) profit = Math.max(profit, i - cur);\n else cur = i;\n }\n return profit;\n }", "public int maxProfit(int[] prices) {\n if(prices == null || prices.length == 0){\n return 0;\n }\n \n int buyPrice = prices[0];\n int max = 0;\n \n int len = prices.length;\n for(int i = 0; i < len; i++){\n if(prices[i] < buyPrice){\n buyPrice = prices[i];\n } else {\n int profit = prices[i] - buyPrice;\n max = profit > max ? profit : max;\n }\n }\n \n return max;\n }", "public int maxProfit(int[] prices) {\n if (prices == null || prices.length == 0) {\n return 0;\n }\n int res = 0, buy = Integer.MAX_VALUE;\n for (int price : prices) {\n buy = Math.min(buy, price);\n res = Math.max(res, price - buy);\n }\n return res;\n }", "public int maxProfit(int[] prices) {\n if (prices == null || prices.length == 0) return 0;\n\n int profit = 0;\n for (int i = 1; i < prices.length; i++) {\n if (prices[i] > prices[i-1]) {\n profit += (prices[i] - prices[i-1]);\n }\n }\n\n return profit;\n }", "public int maxProfit(int[] prices) {\n\t if(prices.length == 0){\n\t return 0;\n\t }\n\t int s0 = 0, s0prev = 0;\n\t int s1 = 0, s1prev=-prices[0];\n\t int s2 = 0, s2prev=Integer.MIN_VALUE;\n\t for(int p : prices){\n\t s0 = Math.max(s0prev,s2prev);\n\t s1 = Math.max(s1prev,s0prev-p);\n\t s2 = Math.max(s2prev,s1prev+p);\n\t s0prev=s0;\n\t s1prev=s1;\n\t s2prev=s2;\n\t }\n\t return Math.max(s0,s2);\n\t}", "public int maxProfit(int[] prices) {\n\t\tif( prices.length == 0 ) return 0;\n\t\tint profit = 0;\n\t\tfor( int i = 0; i < prices.length - 1; ++i )\n\t\t{\n\t\t\tif( prices[i] < prices[i+1] )\n\t\t\t\tprofit += prices[i+1] - prices[i];\n\t\t}\n\t\treturn profit;\n\t}", "public int maxProfit(int[] prices) {\n\n if(prices.length==0) return 0;\n\n int[] dp = new int[3];\n\n dp[0] = -prices[0];\n\n dp[1] = Integer.MIN_VALUE;\n\n dp[2] = 0;\n\n for(int i=1; i<prices.length; i++){\n\n int hold = Math.max(dp[0], dp[2]- prices[i]);\n\n int coolDown = dp[0] + prices[i];\n\n int notHold = Math.max(dp[2], dp[1]);\n\n dp[0] = hold;\n\n dp[1] = coolDown;\n\n dp[2] = notHold;\n\n\n }\n\n return Math.max(Math.max(dp[0],dp[1]),dp[2]);\n\n }", "public int maxProfit(int[] prices) {\n // IMPORTANT: Please reset any member data you declared, as\n // the same Solution instance will be reused for each test case.\n int profit = 0, previous = Integer.MAX_VALUE;\n \n for (int index = 0; index < prices.length; index++) {\n if(prices[index] > previous) {\n profit += prices[index] - previous;\n }\n previous = prices[index];\n }\n \n return profit;\n }", "public static long stockmax(List<Integer> prices) {\n\t\t// Write your code here\n\t\tlong profit=0L;\n\t\tlong maxSoFar=0L;\n\t\t for (int i = prices.size() - 1; i > -1 ; i--) {\n\t if (prices.get(i) >= maxSoFar) {\n\t maxSoFar = prices.get(i);\n\t }\n\t profit += maxSoFar - prices.get(i);\n\t }\n\t return profit;\n\t}", "public int maxProfit(int[] prices) {\n if(prices.length==0) return 0;\n int T0=0;\n int T1=-(int)1e8;\n for(int val:prices){\n T0=Math.max(T0,T1 + val);\n T1=Math.max(T1,0 - val);\n }\n return T0;\n }", "@EpiTest(testDataFile = \"buy_and_sell_stock.tsv\")\n public static double computeMaxProfit(List<Double> prices) {\n\t Double min_price = Double.MAX_VALUE;\n\t double max_profit = 0;\n\t \n\t for(Double price : prices) {\n\t\t if(price< min_price) {\n\t\t\t min_price = price;\n\t\t }else {\n\t\t\t max_profit = Math.max(max_profit, price - min_price);\n\t\t }\n\t }\n return max_profit;\n }", "private static int maxProfit2(int[] prices) {\n\t\tint profit = 0;\n\t\t\n\t\tint[] leftProfit = new int[prices.length];\n\t\tleftProfit[0] = 0;\n\t\tint leftBuyPrice = prices[0];\n\t\tfor(int i=1; i< prices.length; i++) {\n\t\t\tleftBuyPrice = Math.min(prices[i], leftBuyPrice);\n\t\t\tleftProfit[i] = Math.max(leftProfit[i-1], (prices[i]-leftBuyPrice));\n\t\t}\n\t\t\n\t\tint[] rightProfit = new int[prices.length];\n\t\trightProfit[prices.length-1] = 0;\n\t\tint rightSellPrice = prices[prices.length-1];\n\t\tfor(int i=prices.length-2; i>=0; i--) {\n\t\t\trightSellPrice = Math.max(prices[i], rightSellPrice);\n\t\t\trightProfit[i] = Math.max(rightProfit[i+1], (rightSellPrice-prices[i]));\n\t\t}\n\t\t\n\t\tfor(int i=0; i<prices.length; i++) {\n\t\t\tprofit = Math.max(profit, leftProfit[i]+rightProfit[i]);\n\t\t}\n\t\treturn profit;\n\t}", "public int maxProfit(int[] prices){\n\t\tif(prices.length == 0){\n\t\t\treturn 0;\n\t\t}\n\n\t\tint maxPro = 0;\n\n\t\tfor(int i = 1; i < prices.length; i++){\n\t\t\tmaxPro += Math.max(0, prices[i] - prices[i-1]);\n\t\t}\n\t\treturn maxPro;\n\t}", "static int findMaxProfit(int numOfPredictedDays, int[] predictedSharePrices) {\n int max = 0;\n for(int i = 0; i< numOfPredictedDays -1; i++)\n {\n for (int j = i+1; j< numOfPredictedDays;j++)\n {\n int temp = predictedSharePrices[j] - predictedSharePrices[i];\n if(temp > max)\n {\n max = temp;\n }\n }\n }\n return max;\n }", "public int maxProfit(int[] prices) {\n if (prices == null || prices.length < 2)\n return 0;\n\n int min = prices[0];\n int maxDiff = 0;\n for (int i = 1; i < prices.length; i++) {\n if ((prices[i] - min) > maxDiff) {\n maxDiff = prices[i] - min;\n } else if (prices[i] < min) {\n min = prices[i];\n }\n }\n\n return maxDiff;\n }", "public static int maxProfit(int[] a) {\n int minSofar = a[0];\n int maxProfit = 0;\n int profit = 0;\n\n for (int i = 0; i < a.length - 1; i++) {\n minSofar = Math.min(minSofar, a[i]);\n profit = a[i] - minSofar;\n maxProfit = Math.max(maxProfit, profit);\n\n }\n return maxProfit;\n\n\n }", "public static int maxProfit(int[] prices) {\n if (prices.length < 2) {\n return 0;\n }\n\n int[] leftProfit = new int[prices.length], rightProfit = new int[prices.length];\n\n int low = prices[0], high = prices[prices.length - 1], maxProfit = 0;\n\n for (int j = prices.length - 2; j >=0; j--) {\n high = Math.max(high, prices[j]);\n rightProfit[j] = Math.max(high - prices[j], rightProfit[j + 1]);\n }\n\n for (int i = 1; i < prices.length; i++) {\n low = Math.min(low, prices[i]);\n leftProfit[i] = Math.max(prices[i] - low, leftProfit[i - 1]);\n }\n\n for (int i = 1; i < prices.length - 2; i++) {\n maxProfit = Math.max(maxProfit, leftProfit[i] + rightProfit[i + 1]);\n }\n\n return Math.max(maxProfit, Math.max(leftProfit[leftProfit.length - 1], rightProfit[0]));\n }", "public int maxProfit_improved_1(int[] prices) {\n if (prices == null || prices.length == 0) return 0;\n\n int profit = 0;\n for (int i = 1; i < prices.length; i++) {\n profit += Math.max(prices[i] - prices[i-1], 0);\n }\n\n return profit;\n }", "public int maxProfit2(int[] prices) {\n // input validation\n if (prices == null || prices.length <= 1) {\n return 0;\n }\n\n // record the min up util now\n int min = Integer.MAX_VALUE;\n int res = 0;\n for (int i : prices) {\n min = Math.min(min, i);\n res = Math.max(res, i - min);\n }\n return res;\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 int maxProfit(int[] prices, int fee) {\n\n int[] hold = new int[prices.length];\n int[] unhold = new int[prices.length];\n hold[0] = -prices[0];\n \n \n for (int i=1; i< prices.length; i++){\n hold[i] = Math.max(unhold[i-1] - prices[i], hold[i-1]);\n unhold[i] = Math.max(unhold[i-1], hold[i-1] + prices[i]- fee);\n }\n return unhold[prices.length-1];\n \n }", "private static int buyLowSellHigh(int[] prices) {\n int minPrice = Integer.MAX_VALUE;\n int maxProfit = Integer.MIN_VALUE;\n\n for (int v : prices) {\n if (minPrice == Integer.MAX_VALUE) {\n // update min price for the first time\n minPrice = v;\n } else if (v > minPrice) {\n // calculate profit since the stock price is > minPrice\n int profit = v - minPrice;\n maxProfit = Math.max(maxProfit, profit);\n } else {\n // either v is equal to or smaller than minPrice, then update it\n minPrice = v;\n }\n }\n System.out.printf(\"minPrice: %d\\n\", minPrice);\n return maxProfit;\n }", "public List<Interval> findMaximumProfit(int[] prices){\n\n if(prices == null || prices.length ==0){\n return Collections.EMPTY_LIST;\n }\n int i=0;\n int n = prices.length;\n ArrayList<Interval> solutions = new ArrayList<>();\n while(i<n-1){\n while(i<n-1 && prices[i]>=prices[i+1]){\n i++;\n }\n if(i== n-1){\n return Collections.EMPTY_LIST;\n }\n Interval interval = new Interval();\n interval.buy = i;\n i++;\n while(i<=n-1 && prices[i]>=prices[i-1]){\n i++;\n }\n interval.sell = i-1;\n solutions.add(interval);\n }\n return solutions;\n }", "public static int maxProfit(final List<Integer> a) {\n if(a == null || a.size() == 0)\n return 0;\n int profit = 0;\n \n int minElement = Integer.MAX_VALUE;\n for(int i = 0; i < a.size(); i++){\n profit = Math.max(profit, a.get(i) - minElement);\n minElement = Math.min(minElement, a.get(i));\n }\n return profit;\n \n }", "public int maxProfit(int k, int[] prices) {\n if(prices.length==0) return 0;\n if(k>(prices.length>>>1)){\n int T0=0;\n int T1=-(int)1e8;\n for(int val:prices){\n T0=Math.max(T0,T1 + val);\n T1=Math.max(T1,T0 - val);\n }\n return T0;\n }\n int Ti0[]=new int[k+1];\n int Ti1[]=new int[k+1];\n Arrays.fill(Ti1,(int)-1e8);\n for(int val:prices){\n for(int K=k;K>0;K--){\n Ti0[K]=Math.max(Ti0[K],Ti1[K]+val);\n Ti1[K]=Math.max(Ti1[K],Ti0[K-1] - val);\n }\n }\n return Ti0[k];\n }", "public int max(int[] prices){\n int sum = 0;\n for(int i=1;i<prices.length;i++){\n if((prices[i]-prices[i-1])>0){\n sum += (prices[i]-prices[i-1]);\n }\n }\n return sum;\n }", "public static int getMaxProfit(int[] values) {\n\t\t// We are allowed to compute only one transaction. So we will find min\n\t\t// and max value and will return the differrence.\n\t\tif (values == null || values.length <= 1)\n\t\t\treturn 0;\n\t\tint min = values[0];\n\t\tint profit = 0;\n\t\tfor (int i = 1; i < values.length; i++) {\n\t\t\tprofit = Math.max(profit, values[i] - min);\n\t\t\tmin = Math.min(min, values[i]);\n\t\t}\n\t\treturn profit;\n\t}", "public int maxProfit3(int[] prices) {\n // input validation\n if (prices == null || prices.length == 0) {\n return 0;\n }\n\n // calculate the result\n int sum = 0;\n int res = 0;\n for (int i = 0; i < prices.length; i++) {\n int diff = prices[i + 1] - prices[i]; // get the diff\n sum = Math.max(0, sum + diff); // local\n res = Math.max(res, sum); // global\n }\n return res;\n }", "public static void main(String[] args) {\n\t\tint prices[] = {7,1,5,5,5,5,5,4};\r\n\t\tSystem.out.println(maxProfitOneTrade(prices));\r\n\t\t\r\n\t\tint prices1[] = {1,3,2,5};\r\n\t\tSystem.out.println(maxProfitOneTrade(prices1));\r\n\t\t\r\n\t\tint prices2[] = {7,6,4,3,1};\r\n\t\tSystem.out.println(maxProfitOneTrade(prices2));\r\n\t\t\r\n\t\tint prices3[] = {0,0,0,0,1};\r\n\t\tSystem.out.println(maxProfitOneTrade(prices3));\r\n\t}", "public int maxProfit(int[] prices, int fee) {\n int dp0 = 0;\n int dp1 = Integer.MIN_VALUE;\n for (int i = 0; i < prices.length; i++) {\n dp0 = Math.max(dp0, dp1 + prices[i]);\n dp1 = Math.max(dp1, dp0 - prices[i] - fee);\n }\n return dp0;\n }", "public int maxProfit(final List<Integer> A) {\n \n int max = 0;\n \n for(int i=1;i<A.size();i++){\n max += A.get(i) > A.get(i-1) ? A.get(i) - A.get(i-1) : 0; \n }\n return max;\n }", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n // Create an array to store solutions of subproblems. table[i]\n // stores the profit for jobs till arr[i] (including arr[i])\n int *table = new int[n];\n table[0] = arr[0].profit;\n\n // Fill entries in M[] using recursive property\n for (int i=1; i<n; i++)\n {\n // Find profit including the current job\n int inclProf = arr[i].profit;\n int l = latestNonConflict(arr, i);\n if (l != -1)\n inclProf += table[l];\n\n // Store maximum of including and excluding\n table[i] = max(inclProf, table[i-1]);\n }\n\n // Store result and free dynamic memory allocated for table[]\n int result = table[n-1];\n delete[] table;\n\n return result;\n }", "public int maxProfit(int k, int[] prices) {\n int n = prices.length;\n // validate input 1\n if (k <= 0 || n == 0) return 0;\n\n // validate input 2 : if k is large enough, the question will be the same as question II.\n if (k >= n / 2) {\n int result = 0;\n for (int i = 1; i < n; ++i) {\n if (prices[i] - prices[i - 1] > 0) {\n result += prices[i] - prices[i - 1];\n }\n }\n return result;\n }\n int[][][] dp = new int[prices.length + 1][k + 1][2];\n for (int i = 0; i < dp.length; i++) {\n dp[i][0][1] = Integer.MIN_VALUE;\n }\n for (int i = 0; i < dp[0].length; i++) {\n dp[0][i][1] = Integer.MIN_VALUE;\n }\n for (int i = 1; i < dp.length; i++) {\n for (int j = 1; j < dp[0].length; j++) {\n dp[i][j][0] = Math.max(dp[i - 1][j][1] + prices[i - 1], dp[i - 1][j][0]);\n dp[i][j][1] = Math.max(dp[i - 1][j - 1][0] - prices[i - 1], dp[i - 1][j][1]);\n }\n }\n return dp[dp.length - 1][k][0];\n }", "private static long profit(long[] a) {\n\t\tlong b=0,bought=0,profit=0;\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t if(!sell[i])\n\t\t {\n\t\t\t bought+=a[i];\n\t\t\t b++;\n\t\t }\t\n\t\t else\n\t\t {\n\t\t\tprofit+=a[i]*b-bought;\n\t\t\tbought=0;\n\t\t\tb=0;\n\t\t }\n\t\t\n\t\t}\n\t\treturn profit;\n\t\t\n\t}", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n return findMaxProfitRec(arr, n);\n }", "public static void main(String args[] ) throws Exception {\n int[] stockPricesYesterday = new int[] {10, 7, 5, 8, 11, 9};\n //{10, 6, 18, 7, 5, 8, 11, 9}\n System.out.println(findMaxProfit(stockPricesYesterday));\n\n }", "public static double max(double[] prices) {\n\t\tdouble biggest = 0;\n\n\t\tfor (int i = 0; i < prices.length; i++) {\n\t\t\tif (prices[i] > biggest) {\n\t\t\t\tbiggest = prices[i];\n\t\t\t}\n\t\t}\n\n\t\treturn biggest\n\t}", "public static void main(String[] args) {\n int k = 10 ;\n int[] prices = {1, 2, 3, 4, 5} ;\n\n Solution solution = new Solution();\n int i = solution.maxProfit(k, prices);\n\n System.out.println(\"the work is: \" + i);\n }", "public static void findBestDaysToTrade(int[] values) {\n\n int highestDiff = 0;\n int dayToBuy = -1, dayToSell = -1;\n\n int curSmallInx = 0;\n int curSmallValue = values[0];\n\n for (int inx = 1; inx < values.length; inx++) {\n int curValue = values[inx];\n\n // If we find smaller index, record it & continue\n if (curValue < curSmallValue) {\n curSmallValue = curValue;\n curSmallInx = inx;\n continue;\n }\n\n // If we find a greater difference value, then record it\n if ((curValue-curSmallValue) > highestDiff) {\n highestDiff = curSmallValue = curValue;\n dayToBuy = curSmallInx;\n dayToSell = inx;\n }\n }\n\n System.out.println (\"dayToBuy: \" + (dayToBuy+1) + \", dayToSell: \" + (dayToSell+1) + \", margin: \" + highestDiff);\n }", "public static void main(String... args) {\n int[] a = {7, 5, 13, 2, 3, 8};\n System.out.println(maxProfit(a));\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate int[] helper(int buyId, int[] price) {\r\n\t\tint maxProfit = 0;\r\n\t\tint sellDay = -1;\r\n\t\tfor (int i = buyId + 1; i < price.length; i++) {\r\n\t\t\tint currentProfit = price[i] - price[buyId];\r\n\t\t\tif (currentProfit >= 0 && currentProfit >= maxProfit) {\r\n\t\t\t\tmaxProfit = currentProfit;\r\n\t\t\t\tsellDay = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn new int[] { maxProfit, sellDay };\r\n\t}", "int findMaxProfitRec(Job arr[], int n)\n {\n // Base case\n if (n == 1) return arr[n-1].profit;\n\n // Find profit when current job is inclueded\n int inclProf = arr[n-1].profit;\n int i = latestNonConflict(arr, n);\n if (i != -1)\n inclProf += findMaxProfitRec(arr, i+1);\n\n // Find profit when current job is excluded\n int exclProf = findMaxProfitRec(arr, n-1);\n\n return max(inclProf, exclProf);\n }", "Price getHighestPricedTrade(Collection<Trade> trades);", "static void displayMaxProfitableStock(ForeighStockHolding array[])\r\n\t{\n\t\tForeighStockHolding temp = array[0];\r\n\t\t\r\n\t\t//traversing the array to find the max profitable stock\r\n\t\tfor(int i=1; i<array.length; i++)\r\n\t\t{\r\n\t\t\tif((temp.valueInDollars()-temp.costInDollars()) < (array[i].valueInDollars()-array[i].costInDollars()))\r\n\t\t\t{\r\n\t\t\t\ttemp = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//printing the maximum profitable stock\r\n\t\tSystem.out.println(\"Maximum Profitable Stock :\");\r\n\t\tSystem.out.println(\"Company Name : \"+temp.companyName);\r\n\t\tSystem.out.println(\"Purchase Share Price : \"+temp.purchaseSharePrice);\r\n\t\tSystem.out.println(\"Current Share Price : \"+temp.currentSharePrice);\r\n\t\tSystem.out.println(\"Number of Shares : \"+temp.numberOfShares);\r\n\t\tSystem.out.println(\"Conversion Rate : \"+temp.conversionRate);\r\n\t\tSystem.out.println();\r\n\t}", "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 }", "private int[] getHighestPricesInTerm(int[] prices){\n int highest = -1;\n int index = -1;\n for(int i=0;i<prices.length;i++){\n if(prices[i]>highest){\n highest = prices[i];\n index = i;\n }\n }\n return new int[]{highest,index};\n }", "public long findMax(long[] incomes) {\n long current_max_index = 0;\n long current_max = incomes[0];\n for (long income : incomes)\n if (current_max < income)\n current_max = income;\n return current_max;\n }", "public static void main(String[] args) {\n\t\tint []prices = {1, 2, 3, 0, 2,20};\n\t\tSystem.out.println(maxProfit(prices));\n\t}", "public static int mostMoney(int[][] a) { \n double[] totals = new double[3]; \n double rowTotal = 0.0;\n double rowTotal1 = 0.0;\n double rowTotal2 = 0.0;\n \n \n for(int i = 0; i<4; i++){\n rowTotal += a[0][i];\n totals[0] = rowTotal;}\n \n for(int j = 0; j<4; j++){\n rowTotal1 += a[1][j];\n totals[1] = rowTotal1;}\n \n for(int k = 0; k<4; k++){\n rowTotal2 += a[0][k];\n totals[2] = rowTotal2;}\n \n int indexOfBest=0; //used to find index of best year\n double best = totals[0];\n for(int i =0; i < 3; i++) {\n if(totals[i] >= best){\n best = totals[i];\n indexOfBest = i;}\n \n } return indexOfBest;\n }", "public static void main(String[] args) {\n\t\tint arr [] = {1,2};\n\t\tint result = maxProfit(arr);\n\t\tSystem.out.println(result);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint[] arr = { 2, 3, 5, 1, 4 };\n\t\tint[][] dp = new int[arr.length][arr.length];\n\n\t\tSystem.out.println(MaxProfit(arr, 0, arr.length - 1, 1, dp));\n\t\tSystem.out.println(MaxProfitBU(arr));\n\n\t}", "private static Pair<Double, Integer> findMaxEntry(double[] array) {\n int index = 0;\n double max = array[0];\n for (int i = 1; i < array.length; i++) {\n if ( array[i] > max ) {\n max = array[i];\n index = i;\n }\n }\n return new Pair<Double, Integer>(max, index);\n }", "private static int maxMoney(int[] coins,int coinsCount,int startIndex){\n int maxScore = 0;\n if(coinsCount==1) maxScore = coins[startIndex];\n else{\n maxScore = Math.max(coins[startIndex]+sum(coins,coinsCount-1, startIndex+1)-maxMoney(coins,coinsCount-1, startIndex+1),\n coins[coinsCount+startIndex-1]+sum(coins,coinsCount-1,startIndex)-maxMoney(coins,coinsCount-1,startIndex));\n }return maxScore;\n }", "public static void main(String[] args) {\n\t\tint[] prices = {200,80,100,3,5};\n\t\tSystem.out.println(maxProfit(prices));\n\n\t}", "public static float maxStockProfit(List<Float> values) {\n\t\tif (values.size() < 2) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tfloat profit = 0.0F, min = values.get(0);\n\t\tfor (int i = 1; i<values.size(); i++) {\n\t\t\tprofit = Math.max(profit, values.get(i) - min);\n\t\t\tmin = Math.min(min, values.get(i));\n\t\t}\n\t\treturn profit;\n\t}", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "static double getMax(double[] array) {\n\t\tif (array.length < 0) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Arrays start from index 0\");\n\t\t}\n\t\tdouble max = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (max < array[i]) {\n\t\t\t\tmax = array[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public static void cutRod() {\n\t\tint[] price = {1,5,8,9,13};\n\t\tint N = price.length;\n\t\tint[] val = new int[N+1];\n\t\tval[0] = 0;\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tfor(int j=0; j<i; j++) {\n\t\t\t\tmax = Math.max(max, price[j]+val[i-j-1]);\n\t\t\t}\n\t\t\tval[i] = max;\n\t\t}\n\t\tSystem.out.println(\"max val \"+val[N]);\n\t}", "public static int getMax(int[] inputArray){ \n int maxValue = inputArray[0]; \n for(int i=1;i < inputArray.length;i++){ \n if(inputArray[i] > maxValue){ \n maxValue = inputArray[i]; \n } \n } \n return maxValue; \n }", "static RodCuttingRevenue findCuttingWaysToGetMaximumRevenue(int[] prices, int priceToCut) {\n int len = prices.length;\n int[] optimalCuts = new int[len+1];\n int[] revenue = new int[len+1];\n for(int i=1; i<=len; i++) {\n int max = prices[i-1];\n optimalCuts[i] = i;\n for(int j=0;j<i; j++) {\n int price = prices[j] + revenue[i-j-1] - priceToCut;\n if(max<price) {\n max = price;\n optimalCuts[i] = j+1;\n }\n }\n revenue[i] = max;\n }\n return new RodCuttingRevenue(revenue[len], optimalCuts);\n }", "public int _maxProfitAssignment(int[] difficulty, int[] profit, int[] worker) {\n Integer [] indexes = new Integer [difficulty.length];\n for (int idx = 0; idx < indexes.length; idx ++) indexes [idx] = idx;\n\n Arrays.sort(indexes, (a, b) -> difficulty [a] != difficulty [b] ?\n difficulty [a] - difficulty [b] :\n (profit [b] - profit [a]));\n // maxprofit is not working until we sort difficulty properly.\n\n int [] maxProfit = new int [profit.length];\n maxProfit [0] = profit [indexes [0]];\n\n for (int idx = 1; idx < indexes.length; idx ++)\n maxProfit [idx] = Math.max(maxProfit [idx - 1], profit [indexes [idx]]);\n\n int ans = 0;\n for (int val : worker) {\n int idx = binarySearch(indexes, difficulty, val);\n if (idx >= 0) ans += maxProfit [idx];\n }\n return ans;\n }", "public static double getMax(double[] arr) \n { \n double max = arr[0]; \n for(int i=1;i<arr.length;i++) \n { \n if(arr[i]>max) \n max = arr[i]; \n } \n return max; \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 }", "public Book mostExpensive() {\n //create variable that stores the book thats most expensive\n Book mostExpensive = bookList.get(0);//most expensive book is set as the first in the array\n for (Book book : bookList) {\n if(book.getPrice() > mostExpensive.getPrice()){\n mostExpensive = book;\n }\n } return mostExpensive;//returns only one (theFIRST) most expensive in the array if tehre are several with the same price\n }", "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 static void highestPrice(DeluxePizza todaysPizza[])\n\t\t{\n\t\t\tboolean empty = true;\n\t\t\tfor(DeluxePizza x:todaysPizza)\n\t\t\t{\n\t\t\t\tif(x != null)\n\t\t\t\t\tempty = false;\n\t\t\t}\n\t\t\tif(!empty){\n\t\t\tdouble expensive = 0;\n\t\t\tint index = 0;\n\t\t\tfor(int i = 0; i <= todaysPizza.length - 1; ++i)\n\t\t\t{\n\t\t\t\tif(todaysPizza[i] == null)\n\t\t\t\t{\n\t\t\t\t\texpensive += 0;\n\t\t\t\t}\n\t\t\t\telse if(todaysPizza[i].calcCost() > expensive)\n\t\t\t\t{\n\t\t\t\t\texpensive = todaysPizza[i].calcCost();\n\t\t\t\t\tindex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"The most expensive pizza is pizza # \" + (index + 1) + \" at $\" + expensive);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You haven't made any pizzas yet!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}", "private 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}", "public static int maxProfitCutting(int[] d, int len, Map<Integer, Integer> cache) {\n\t\tif (len == 1) {\n\t\t\treturn d[0];\n\t\t}\n\t\tif (len < 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (cache.containsKey(len)) {\n\t\t\treturn cache.get(len);\n\t\t}\n\t\tint profit = d[0];\n\t\tfor (int i = 1; i < d.length; i++) {\n\t\t\tprofit = Math.max(profit, d[i] + maxProfitCutting(d, len - i - 1, cache));\n\t\t}\n\t\tcache.put(len, profit);\n\t\treturn profit;\n\t}", "public int _maxProfitAssignmentBest(int[] difficulty, int[] profit, int[] worker) {\n // value index reverse array\n int [] dp = new int [100001];\n\n // nice strategy to use in multi-array approach\n // using difficulty as index, profit as value.\n // (difficulty array sorted by default, effort saved)\n for (int idx = 0; idx < difficulty.length; idx ++) {\n // overwrite profit values and keep the max one. (in case of conflict)\n dp [difficulty [idx]] = Math.max (dp [difficulty [idx]], profit [idx]);\n }\n\n // maximize profits stored linearly\n for (int idx = 1; idx < dp.length; idx ++)\n dp [idx] = Math.max (dp [idx - 1], dp [idx]);\n\n // build ans\n int ans = 0;\n for (int w : worker)\n ans += dp [w];\n\n return ans;\n }", "public int _maxProfitAssignmentBetter(int[] difficulty, int[] profit, int[] worker) {\n int n = difficulty.length;\n int [][] dp = new int [n][];\n\n for (int i = 0; i < n; i ++)\n dp [i] = new int[] { difficulty[i], profit[i] };\n\n Arrays.sort(dp, (a, b) -> (a [0] != b [0]) ? (a [0] - b [0]) : -(a [1] - b [1]));\n\n int[] xs = new int[n];\n for (int i = 0; i < n; i ++) xs [i] = dp [i][0];\n for (int i = 1; i < n; i ++) dp[i][1] = Math.max(dp [i][1], dp [i - 1][1]);\n\n int ret = 0;\n for(int w : worker){\n int ind = Arrays.binarySearch(xs, w);\n if (ind < 0) ind = -ind - 2;\n if (ind >= 0)\n ret += dp[ind][1];\n }\n return ret;\n }", "public int solve(String infile) {\r\n\r\n\t\ttry {\r\n\t\t\treadData(infile);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//A temporary object array of bids\r\n\t\tBids[] numBids = populateBids();\r\n\t\t//A temporary integer array to hold the maximum value\r\n\t\tint[] storeMaxRev = new int[numBids.length];\r\n\t\t//A temporary variable for the maximum revenue that will be updated in the main loop.\r\n\t\tint maxRev = 0;\r\n\t\t\r\n\t\t//Invokes the comparator method defined earlier\r\n\t\tLotComparator compareFinishTimes = new LotComparator();\r\n\t\tArrays.sort(numBids,compareFinishTimes);\r\n\t\t\r\n\t\t\r\n\t\t//Edge case check if the number of bids is less than 0\r\n\t\tif(numBids.length <= 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t//Choose the first bid in the object array.\r\n\t\tstoreMaxRev[0] = numBids[0].priceOfLot;\r\n\t\t\r\n\t\t//From the second element of the object array, iterate through the array and store the price\r\n\t\t//of the element that is larger than the previous element\r\n\t\tfor(int i = 1; i < numBids.length; i++) {\r\n\t\t\tstoreMaxRev[i] = Math.max(numBids[i].priceOfLot, storeMaxRev[i - 1]);\r\n\t\t\t\r\n\t\t\t//Iterating backwards from the second last element relative to i, check if the current element is compatible.\r\n\t\t\t//A compatible bid is when the ending lot number is less than the starting lot number of the next bid.\r\n\t\t\t//If it is an compatible bid, add the price of the current bid to the previous bid and take the maximum price out of the two.\r\n\t\t\tfor(int j = i - 1; j >= 0; j--) {\r\n\t\t\t\tif(numBids[j].endLot < numBids[i].beginningLot) {\r\n\t\t\t\t\tstoreMaxRev[i] = Math.max(storeMaxRev[i], numBids[i].priceOfLot + storeMaxRev[j]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Once all of the bids in numBid object array is processed, we get an integer array that will contain the maximum revenue.\r\n\t\t//This loop iterates through storeMaxRev and selects the largest integer which is then set to the variable maxRev and returned as the answer\r\n\t\tfor(int priceIdx = 0; priceIdx < storeMaxRev.length; priceIdx++) {\r\n\t\t\tif(maxRev < storeMaxRev[priceIdx]) {\r\n\t\t\t\tmaxRev = storeMaxRev[priceIdx];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn maxRev;\r\n\t}", "public static TempResult max(int allowedWeight, Set<Item> items) {\n\t\tint[] values=new int[items.size()];\n\t\tint[] weights=new int[items.size()];\n\t\t\n\n\t\tArrayList<Item> items2=new ArrayList<Item>(items);\n\t\tfor (int i=0; i<items2.size(); i++) {\n\t\t\tvalues[i]=items2.get(i).value;\n\t\t\tweights[i]=items2.get(i).weight;\n\t\t}\n\t\t\n int[][] totalValue = new int[values.length+1][allowedWeight+1];\n boolean[][] includedorNot = new boolean[values.length+1][allowedWeight+1];\n \n //We introduce item one by one to the system.\n //For each introduced item, we consider the maximal profit\n //for weight=[0:allowedWeight]\n for (int i=0; i<values.length; i++) {\n \t//introduce item i into the system.\n \tint val=values[i];\n \tint weight=weights[i];\n \t\n \tint itemIndex=i+1;\n \t\n \tfor (int w=1; w<=allowedWeight; w++) {\n \t\t\n \t\t//Zero copy of ith item; i-1 is calculated already\n \t\tint profit1=totalValue[itemIndex-1][w];\n \t\t\n \t\t//one copy of ith item.\n \t\tint profit2=Integer.MIN_VALUE;\n \t\tif (w-weight>=0) {\n \t\t\t//for a particular targeted weight, add item i does not overflow the targeted weight.\n \t\t\tprofit2=totalValue[itemIndex-1][w-weight]+val;\n \t\t}\n \t\t\n \t\tif (profit1>profit2) {\n \t\t\tincludedorNot[itemIndex][w]=false;\n \t\t\ttotalValue[itemIndex][w]=profit1;\n \t\t} else {\n \t\t\tincludedorNot[itemIndex][w]=true;\n \t\t\ttotalValue[itemIndex][w]=profit2;\n \t\t}\n \t}\n }\n\t\t\n \n TempResult result=new TempResult(0, 0);\n result.value=totalValue[values.length][allowedWeight];\n result.items=new LinkedList<>();\n int w=allowedWeight;\n for (int itemIndex=values.length; itemIndex>0; itemIndex--) {\n \tif (includedorNot[itemIndex][w]) {\n \t\tresult.items.add(items2.get(itemIndex-1));\n \t\tw=w-weights[itemIndex-1];\n \t} \n }\n \n return result;\n \n\t}", "public int maxProduct(int[] nums) {\n int max_so_far=1;\n int min_so_far=1;\n int prev_max_so_far=1;\n int maxProd=Integer.MIN_VALUE;\n\n for(int i=0;i<nums.length;i++){\n max_so_far=Math.max(nums[i],Math.max(max_so_far*nums[i],min_so_far*nums[i]));\n System.out.println(max_so_far);\n min_so_far=Math.min(nums[i],Math.min(prev_max_so_far*nums[i],min_so_far*nums[i]));\n System.out.println(min_so_far);\n prev_max_so_far= max_so_far;\n maxProd=Math.max(maxProd,max_so_far);\n }\n\n return maxProd;\n }", "private static int max(int[] array) {\n int result = array[0];\n for (int x : array)\n result = Math.max(x, result);\n return result;\n }", "public static int maxValue(int [] array){\n int hold = array[0];\n for(int i = 1; i < array.length; i++){\n if(array[i] > hold){\n hold = array[i];\n }\n }\n return hold;\n }", "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 }", "public static int solution(int[] arr) {\n int[] dp = new int[arr.length];\n dp[0] = arr[0];\n int max = Integer.MIN_VALUE;\n \n for(int i = 1; i < arr.length; i++){\n if(dp[i - 1] > 0) dp[i] = arr[i] + dp[i - 1];\n else dp[i] = arr[i];\n max = Math.max(max, dp[i]);\n }\n \n return max;\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 static double max(double[] array) {\n\t\tif (array.length==0) return Double.NEGATIVE_INFINITY;\n\t\tdouble re = array[0];\n\t\tfor (int i=1; i<array.length; i++)\n\t\t\tre = Math.max(re, array[i]);\n\t\treturn re;\n\t}", "public int findMax(int[] arr) {\n return 0;\n }", "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 int solution(int[] a) {\n int max = 0;\n int min = Integer.MIN_VALUE;\n for (int i=0;i<a.length;i++) {\n if (i == 0) {\n min = a[i];\n } else if (a[i] > min) {\n max = Math.max(a[i] - min, max);\n } else if (a[i] < min) {\n min = a[i];\n }\n }\n return max;\n }", "public static void main(String[] args) {\n\t\tint myArr[]= {1,2,3,4,5};\n\t\tmaxProfit(myArr);\n\t\t\n\t}", "public static int findMax(int[] a) {\r\n int max = a[0];\r\n\r\n //10th error , n = 1\r\n for (int n = 1; n < a.length; n++) {\r\n if (a[n] > max) {\r\n max = a[n];\r\n }\r\n }\r\n return max;\r\n\r\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 }" ]
[ "0.8272641", "0.8215362", "0.82104623", "0.8192952", "0.8142581", "0.8086687", "0.80636317", "0.8061291", "0.8025296", "0.7977906", "0.7967717", "0.796542", "0.79432464", "0.7943229", "0.792799", "0.7920447", "0.7913432", "0.78777975", "0.78724855", "0.78681403", "0.7865859", "0.7853273", "0.7800416", "0.77881277", "0.77697015", "0.7718757", "0.7710835", "0.76640725", "0.7643336", "0.75732636", "0.7560717", "0.7534527", "0.7490356", "0.745325", "0.74092555", "0.73966086", "0.7340976", "0.73181134", "0.73175144", "0.7284404", "0.7283147", "0.7265703", "0.72435623", "0.72363096", "0.7093584", "0.70637345", "0.7062384", "0.70536005", "0.70095646", "0.68872666", "0.6864189", "0.6722119", "0.67109805", "0.66560924", "0.6655603", "0.6641347", "0.662559", "0.65953606", "0.6539035", "0.64988434", "0.6472307", "0.6410447", "0.6390576", "0.6349378", "0.6348693", "0.6305526", "0.62849593", "0.6273078", "0.62528646", "0.62374973", "0.62181824", "0.61883724", "0.61799127", "0.6176718", "0.61745816", "0.6156971", "0.6145771", "0.61456025", "0.6133258", "0.60974973", "0.608978", "0.6082042", "0.6072321", "0.606194", "0.60581714", "0.6046673", "0.6030909", "0.6017624", "0.60121936", "0.60115093", "0.59893703", "0.5973443", "0.5964638", "0.59319574", "0.5929112", "0.5925389", "0.5909082", "0.58966166", "0.588771", "0.5882209" ]
0.81593084
4
no stock can be sold
public static int maxProfit2(int[] prices) { if (prices == null) { return 0; } int currentProfit = 0; int maxProfit = 0; for (int day = 1; day < prices.length; day++) { //update maxProfit int delta = prices[day] - prices[day - 1]; currentProfit = Math.max(0, currentProfit + delta); maxProfit = Math.max(currentProfit, maxProfit); } return maxProfit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}", "@Test\n public void checkStockWithoutProduction () {\n\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock);\n\n }", "private void setStock(int stock) throws StockNegativoException {\n if (stock < 0)\n throw new StockNegativoException(\"El stock no puede ser negativo.\");\n this.stock = stock;\n }", "private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }", "@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}", "@Override\n\tpublic Stock getStock() {\n\t\treturn null;\n\t}", "@Override\n\tpublic double getStockPrice(String stockName) {\n\t\treturn 0;\n\t}", "public void checkLowStock()\n {\n for(Product product: stock)\n {\n if(product.getQuantity() < 10)\n {\n System.out.println(product.getID() + \": \" +\n product.name + \" is low on stock, only \" + \n product.getQuantity() + \" in stock\");\n }\n }\n }", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "private void defaultStocksShouldNotBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public boolean inStock() {\n return inStock;\n }", "@Test\n public void verifyNoOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 2);\n \tbasket.getProducts().put(product2, 1);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 8 items = 4.3 ==> \", (calculator.calculatePrice(basket) - 4.3) < 0.0001);\n }", "private boolean validInventory(int min, int max, int stock) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (stock < min || stock > max) {\r\n isTrue = false;\r\n alertDisplay(4);\r\n }\r\n\r\n return isTrue;\r\n }", "public StockException() {\r\n\t\tsuper();\r\n\t}", "private void copyStock(OwnedStock stock){\n\t\t//If quantity == 0, then \n\t\tif(stock.getQuantityOfShares() > 0){\n\t\t\tsetQuantityOfShares(stock.getQuantityOfShares());\n\t\t\tsetPrinciple(stock.getPrinciple());\n\t\t\tsetTotalValue(stock.getTotalValue());\n\t\t\tsetNet(stock.getNet());\n\t\t}\n\t\telse{\n\t\t\tprinciple = new BigDecimal(0);\n\t\t\ttotalValue = new BigDecimal(0);\n\t\t\tnet = new BigDecimal(0);\n\t\t}\n\t}", "public void resetAmountSold() { amountSold = 0; }", "public GiftCardProductQuery onlyXLeftInStock() {\n startField(\"only_x_left_in_stock\");\n\n return this;\n }", "public List<AbstractProduct> getoutOfStock() {\n return outOfStock;\n }", "@Test(expected = InsufficientStockException.class)\n\tpublic void testInventoryCheckOnAddingItemsToShoppingCart() throws InsufficientStockException {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\tBigDecimal orderQuantity = TestProductInventory.iphoneInventory.getAvailableStock().add(new BigDecimal(1));\n\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), orderQuantity);\n\n\t}", "public boolean aUnPrix() {\n return false;\n }", "@Test \r\n\tpublic void testSacarProductoDelPedidoSinStock(){\n\t\tventaAD.agregarProductoSinStock(pre1, 1);\r\n\t\tventaAD.sacarProductosDelLosPedidosSinStock(pre1, 1);\r\n\t\tassertEquals(ventaAD.getProductosSinStock().size(), 0);\r\n\t\t\r\n\t}", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "public DefaultOwnedStock(String symbol){\n\t\tsuper(symbol);\n\t\tprinciple = new BigDecimal(0);\n\t\ttotalValue = new BigDecimal(0);\n\t\tnet = new BigDecimal(0);\n\t}", "public void sell() {\n for (Company x : _market.getCompanies()) {\n if (x.getRisk() > _confidence || x.numLeft() < 3 || x.getRisk() < _confidence - 15){\n if (_stocks.get(x) == 1) {\n _stocks.remove(x);\n } else {\n _stocks.put(x, _stocks.get(x) - 1);\n }\n _money += x.getPrice();\n x.gain();\n break;\n } else {\n _happy = true;\n }\n }\n }", "public float getQuantityAvailableForSale () {\n return (float) 0.0;\n }", "@Test\r\n\tpublic void testMakePurchase_not_enough_money() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"A\"));\r\n\t}", "@Override\n\tpublic List<Article> getStock() {\n\t\treturn null;\n\t}", "public void setStock(int stock) {\n this.stock = stock;\n }", "public void setStock(int stock) {\n this.stock = stock;\n }", "static Stock getStock(String symbol) { \n\t\tString sym = symbol.toUpperCase();\n\t\tdouble price = 0.0;\n\t\tint volume = 0;\n\t\tdouble pe = 0.0;\n\t\tdouble eps = 0.0;\n\t\tdouble week52low = 0.0;\n\t\tdouble week52high = 0.0;\n\t\tdouble daylow = 0.0;\n\t\tdouble dayhigh = 0.0;\n\t\tdouble movingav50day = 0.0;\n\t\tdouble marketcap = 0.0;\n\t\n\t\ttry { \n\t\t\t\n\t\t\t// Retrieve CSV File\n\t\t\tURL yahoo = new URL(\"http://finance.yahoo.com/d/quotes.csv?s=\"+ symbol + \"&f=l1vr2ejkghm3j3\");\n\t\t\tURLConnection connection = yahoo.openConnection(); \n\t\t\tInputStreamReader is = new InputStreamReader(connection.getInputStream());\n\t\t\tBufferedReader br = new BufferedReader(is); \n\t\t\t\n\t\t\t// Parse CSV Into Array\n\t\t\tString line = br.readLine(); \n\t\t\tString[] stockinfo = line.split(\",\"); \n\t\t\t\n\t\t\t// Check Our Data\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[0])) { \n\t\t\t\tprice = 0.00; \n\t\t\t} else { \n\t\t\t\tprice = Double.parseDouble(stockinfo[0]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[1])) { \n\t\t\t\tvolume = 0; \n\t\t\t} else { \n\t\t\t\tvolume = Integer.parseInt(stockinfo[1]); \n\t\t\t} \n\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[2])) { \n\t\t\t\tpe = 0; \n\t\t\t} else { \n\t\t\t\tpe = Double.parseDouble(stockinfo[2]); \n\t\t\t}\n \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[3])) { \n\t\t\t\teps = 0; \n\t\t\t} else { \n\t\t\t\teps = Double.parseDouble(stockinfo[3]); \n\t\t\t}\n\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[4])) { \n\t\t\t\tweek52low = 0; \n\t\t\t} else { \n\t\t\t\tweek52low = Double.parseDouble(stockinfo[4]); \n\t\t\t}\n\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[5])) { \n\t\t\t\tweek52high = 0; \n\t\t\t} else { \n\t\t\t\tweek52high = Double.parseDouble(stockinfo[5]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[6])) { \n\t\t\t\tdaylow = 0; \n\t\t\t} else { \n\t\t\t\tdaylow = Double.parseDouble(stockinfo[6]); \n\t\t\t}\n\t\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[7])) { \n\t\t\t\tdayhigh = 0; \n\t\t\t} else { \n\t\t\t\tdayhigh = Double.parseDouble(stockinfo[7]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A - N/A\", stockinfo[8])) { \n\t\t\t\tmovingav50day = 0; \n\t\t\t} else { \n\t\t\t\tmovingav50day = Double.parseDouble(stockinfo[8]); \n\t\t\t}\n\t\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[9])) { \n\t\t\t\tmarketcap = 0; \n\t\t\t} else { \n\t\t\t\tmarketcap = Double.parseDouble(stockinfo[9]); \n\t\t\t} \n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tLogger log = Logger.getLogger(StockHelper.class.getName()); \n\t\t\tlog.log(Level.SEVERE, e.toString(), e);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn new Stock(sym, price, volume, pe, eps, week52low, week52high, daylow, dayhigh, movingav50day, marketcap);\n\t\t\n\t}", "@Override\n\tpublic int getStock() {\n\t\treturn 2;\n\t}", "Stock()\n {\n super();\n }", "@Test\n\tvoid cannotPurchase() {\n\t\ttestCrew.setMoney(0);\n\t\titemList.get(0).purchase(testCrew);\n\t\tassertEquals(testCrew.getMoney(), 0);\n\t\tassertTrue(testCrew.getMedicalItems().isEmpty());\n\t}", "public Stock() {\n // initialize _stock array in max size\n _stock = new FoodItem[MAX_STOCK_SIZE];\n // set _noOfItem to 0 - no items yet\n _noOfItems = 0;\n }", "protected StockPrice() {\n\t\t// just for serializers\n\t}", "public void setStock(Integer stock) {\n this.stock = stock;\n }", "public void setStock(String stock) {\n this.stock = stock;\n }", "public void setStock(String stock) {\n this.stock = stock;\n }", "public boolean stockSale(String symbol, int quantity) {\n\t\tDouble price = APIController.getStockPrice(symbol);\n\t\tif(price < 0) return false; //There was some error / wrong symbol entered\n\t\tStock s = getStock(symbol);\n\t\tif(getStockQuant(s) < quantity) return false; //Do not own this quantity of stocks\n\n\t\tthis.cash += price * quantity;\n\t\t\n\t\ts.update(-quantity);\n\t\treturn true;\n\t\t\n\t}", "private void botBuy(Stock stock, int numShares){\n player.getShares().set(game.getIndex(stock), player.getShares().get(game.getIndex(stock)) + numShares);\n player.setFunds(-numShares*(stock.getSharePrice()+3));\n System.out.println(\"purchase made\"); //rem\n }", "@Override\r\n public void dispenseProduct() {\r\n System.out.println(\"Insufficient funds!\");\r\n\r\n }", "public void setStock(int stock) {\n\t\tthis.stock = stock;\n\t}", "public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}", "private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}", "@Test\r\n\tpublic void testMakePurchase_empty_slot() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"D\"));\r\n\t}", "public boolean hasIllegalGoods() {\n return cargoHold.hasIllegalGoods();\n }", "public boolean validateStock(Stock stock) {\n\t\treturn !stock.getDate().isEmpty() || !stock.getStock().isEmpty() || validateDate(stock.getDate())\n\t\t\t\t|| !checkForDuplicates(new StockId(stock.getStock(), stock.getDate()));\n\t}", "@Test(expected = InsufficientInventoryException.class)\n\tpublic void testTypeBackOrderWhenOutOfStock() {\n\t\tassertInventoryWithAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_FOR_BACK_ORDER);\n\t}", "public void sell(String n,int shares, Stock s){\n for (PersonStocks x :myStocks) {\n if(n.equals(x.getName())) {\n x.addShares(0-shares);\n money+= (s.getPrice()*shares);\n }\n }\n for (int i = 0; i < myStocks.size(); i++) {\n if (myStocks.get(i).getNumShares()<=0){\n myStocks.remove(i);//if they now have 0 and now removes it from person stocks\n }\n }\n\n }", "public DefaultOwnedStock(Stock stock) {\n\t\tsuper(stock);\n\t\tif(stock instanceof OwnedStock){\n\t\t\tcopyStock((OwnedStock) stock);\n\t\t}\n\t\telse{\n\t\t\tprinciple = new BigDecimal(0);\n\t\t\ttotalValue = new BigDecimal(0);\n\t\t\tnet = new BigDecimal(0);\n\t\t}\n\t}", "public void setStock_num(Integer stock_num) {\n this.stock_num = stock_num;\n }", "void buyStock(String portfolio, String stock, Integer count, Date date)\r\n throws IllegalArgumentException;", "public void buyStock(String symbol, int quantity) throws BalanceException, StockNotExistsException, IllegalQuantityException\r\n\t{\r\n\t\tint maxQuantity; \r\n\t\tint tQuantity;\r\n\t\tif(quantity < -1)\r\n\t\t{\r\n\t\t\tthrow new IllegalQuantityException();\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0; i < portfolioSize; i++)\r\n\t\t{\r\n\t\t\tif(this.stockStatus != null && this.stockStatus[i].getSymbol().equalsIgnoreCase(symbol))\r\n\t\t\t{\r\n\t\t\t\tmaxQuantity = (int)(balance / stockStatus[i].getAsk());\r\n\t\t\t\ttQuantity = quantity;\r\n\t\t\t\tif (quantity == -1)\r\n\t\t\t\t{\r\n\t\t\t\t\ttQuantity = maxQuantity;\r\n\t\t\t\t}\r\n\t\t\t\telse if (quantity > maxQuantity){\r\n\t\t\t\t\tthrow new BalanceException();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tupdateBalance(-tQuantity * stockStatus[i].getAsk());\r\n\t\t\t\tstockStatus[i].setStockQuantity(stockStatus[i].getStockQuantity()+tQuantity);\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new StockNotExistsException(symbol);\r\n\t}", "@Test\n public void playerWithoutProduction (){\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(true,player.getInventory().getDoublons()==0);\n\n }", "public boolean isSold() {\n return sold;\n }", "public double getMinimumStock () {\r\n\t\treturn minimumStock;\r\n\t}", "public void sellProduct(){\n if(quantity > 0)\n this.quantity -= 1;\n else\n throw new IllegalArgumentException(\"Cannot sell \"+ this.model +\" with no inventory\");\n\n }", "@Override\n public void onCheckStocksRaised() {\n if (coffeeStock <= 0) {\n coffeeButton.setEnabled(false);\n }\n if (espressoStock <= 0) {\n espressoButton.setEnabled(false);\n }\n if (teaStock <= 0) {\n teaButton.setEnabled(false);\n }\n if (soupStock <= 0) {\n soupButton.setEnabled(false);\n }\n if (icedTeaStock <= 0) {\n icedTeaButton.setEnabled(false);\n }\n if (syrupStock <= 0) {\n optionSugar.setEnabled(false);\n }\n if (vanillaStock <= 0) {\n optionIceCream.setEnabled(false);\n }\n if (milkStock <= 0) {\n optionMilk.setEnabled(false);\n }\n if (breadStock <= 0) {\n optionBread.setEnabled(false);\n }\n if (sugarStock <= 4) {\n sugarSlider.setMaximum(sugarStock);\n }\n }", "public void resetSaleAndCostTracking() {\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the beanBag object at the current position is \"isSold\" bool is true.\r\n if (((BeanBag) stockList.get(i)).isSold()) {\r\n // Remove beanBag object at that position from the \"stockList\".\r\n stockList.remove(i);\r\n }\r\n }\r\n }", "private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }", "public void addStock(Stock stock) throws StockAlreadyExistsException, PortfolioFullException {\r\n\t\tboolean doesStockExists = false;\r\n\r\n\t\tfor (int i = 0; i < portfolioSize; i++){\r\n\t\t\tif (stockStatus[i].getSymbol().equals(stock.getSymbol())){\r\n\t\t\t\tdoesStockExists = true;\r\n\t\t\t} \r\n\t\t}\r\n\r\n\t\tif (portfolioSize >= MAX_PORTFOLIO_SIZE){\r\n\t\t\tthrow new PortfolioFullException();\r\n\t\t}\r\n\t\telse if (doesStockExists == true){\r\n\t\t\tthrow new StockAlreadyExistsException(stock.getSymbol());\r\n\t\t}\r\n\t\telse{\r\n\t\t\tstockStatus[portfolioSize] = new StockStatus(stock.getSymbol(), stock.getAsk(),stock.getBid(), stock.getDate(), ALGO_RECOMMENDATION.DO_NOTHING, 0);\r\n\t\t\tthis.portfolioSize++;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic MvtStock AjouterEnStock(MvtStock mvtStock) {\n\t\tif (mvtStock.getTypeMvt() == 0) {\r\n\t\t\tthrow new RuntimeException(\"Veillez cocher l'operation à faire\");\r\n\t\t}\r\n\t\treturn mv.save(mvtStock);\r\n\t}", "private String getStock() {\n\t\treturn stock;\n\t}", "public Integer getStock() {\n return stock;\n }", "@Test\n public void checkFuelEmpty() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(0);\n assertFalse(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n \n \n \n }", "public int getStock() {\n return stock;\n }", "@Test(expected = InsufficientInventoryException.class)\n\tpublic void testTypePreOrderWhenOutOfStock() {\n\t\tassertInventoryWithAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_FOR_PRE_ORDER);\n\t}", "@Override\r\n\tpublic double getGrossPrice() {\n\t\treturn 0;\r\n\t}", "public int getStock() {\n\t\treturn stock;\n\t}", "public boolean getStockState() {\n\t\treturn inStock;\n\t}", "public Stock() {\n }", "public TbStock() {\r\n\t\tsuper();\r\n\t}", "public StockManager()\n {\n stock = new ArrayList<>();\n }", "public StockExchange()\n {\n stocks = new ArrayList<Stock>();\n }", "private Collection<ProductAmountTO> removeUnavailableProducts(\n\t\t\tCollection<ProductAmountTO> requiredProductAmounts,\n\t\t\tHashtable<Store, Collection<StockItem>> storeStockItems) {\n\t\t\n\t\tCollection<ProductAmountTO> foundProductAmounts = new ArrayList<ProductAmountTO>();\n\t\t\n\t\tIterator<ProductAmountTO> requiredProductAmountsIterator = requiredProductAmounts.iterator();\n\t\twhile(requiredProductAmountsIterator.hasNext()) {\n\t\t\tProductAmountTO currentProductAmountTO = requiredProductAmountsIterator.next();\n\t\t\t\n\t\t\tIterator<Collection<StockItem>> storeStockItemCollectionsIterator = storeStockItems.values().iterator();\n\t\t\twhile(storeStockItemCollectionsIterator.hasNext()) { //iterate over stock of stores\n\t\t\t\tCollection<StockItem> currentStockItemCollection = storeStockItemCollectionsIterator.next();\n\t\t\t\t\n\t\t\t\tStockItem stockItem =\n\t\t\t\t\tsearchForProductOffered(currentStockItemCollection, currentProductAmountTO);\n\t\t\t\tif (stockItem != null && currentStockItemCollection.contains(stockItem)) {\n\t\t\t\t\tfoundProductAmounts.add(currentProductAmountTO);\n\t\t\t\t} else {\n\t\t\t\t\t//TODO: remove debug:\n//\t\t\t\t\tSystem.out.println(\"KK: NOT found\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//no need to search for the same product at other stores: found --> available\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn foundProductAmounts;\n\t}", "public void setMinimumStock (double minimumStock) {\r\n\t\tthis.minimumStock = minimumStock;\r\n\t}", "private BigDecimal getStock(Producto producto, Bodega bodega, Date fechaDesde, Date fechaHasta)\r\n/* 48: */ {\r\n/* 49:74 */ BigDecimal stock = BigDecimal.ZERO;\r\n/* 50:75 */ for (InventarioProducto inventarioProducto : this.servicioInventarioProducto.obtenerMovimientos(producto.getIdOrganizacion(), producto, bodega, fechaDesde, fechaHasta)) {\r\n/* 51:77 */ if (inventarioProducto.getOperacion() == 1) {\r\n/* 52:78 */ stock = stock.add(inventarioProducto.getCantidad());\r\n/* 53:79 */ } else if (inventarioProducto.getOperacion() == -1) {\r\n/* 54:80 */ stock = stock.subtract(inventarioProducto.getCantidad());\r\n/* 55: */ }\r\n/* 56: */ }\r\n/* 57:83 */ return stock;\r\n/* 58: */ }", "public void setLowStock(boolean lowStock)\r\n\t{\r\n\t\tthis.lowStock = lowStock;\r\n\t\tif(this.lowStock)\r\n\t\t{\r\n\t\t\tnotifyObserver();\r\n\t\t}\r\n\t}", "public List<AbstractProduct> getItemsOutOfStock() {\n return this.itemsOutOfStock;\n }", "public boolean stockPurchase(String symbol, int quantity) {\n\t\tDouble price = APIController.getStockPrice(symbol);\n\t\tif(price < 0) return false; //There was some error / wrong symbol entered\n\t\tif(price * quantity > cash) return false; //Cannot afford this quantity of stocks \n\n\t\tthis.cash -= price * quantity;\n\t\t\n\t\t//if stockList does not contain this stock\n\t\tif(!checkStock(symbol)) {\n\t\t\tstockList.add(new Stock(symbol, quantity, price));\n\t\t}\n\t\telse { //Else just get the stock and update teh quantity\n\t\t\tStock s = getStock(symbol);\n\t\t\ts.update(quantity);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@Override\n\tpublic int compareTo(BuyOrder order) {\n\t\treturn 0;\n\t}", "public void sellStock(String symbol, int quantity)\r\n\t\t\tthrows StockNotExistsException, IllegalQuantityException, BalanceException {\r\n\t\tboolean sellStock = false;\r\n\t\tint stockSymbolIndex = 0;\r\n\r\n\t\t// the quantity is invalid\r\n\t\tif (quantity == 0 || quantity < -1) {\r\n\t\t\tthrow new IllegalQuantityException();\r\n\t\t}\r\n\r\n\t\t// find stock's index to sell\r\n\t\tfor (int i = 0; i < portfolioSize; i++) {\r\n\t\t\tif(symbol.equals(this.stockStatus[i].getSymbol())) {\r\n\t\t\t\tsellStock = true;\r\n\t\t\t\tstockSymbolIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// the symbol dosen't exists at stocks's array\r\n\t\tif (sellStock == false) {\r\n\t\t\tthrow new StockNotExistsException(symbol);\r\n\t\t}\r\n\t\t// sell all quantity\r\n\t\tif (quantity == -1\r\n\t\t\t\t|| quantity == stockStatus[stockSymbolIndex].stockQuantity) {\r\n\t\t\tquantity = this.stockStatus[stockSymbolIndex].stockQuantity;\r\n\t\t}\r\n\t\t// the client asks to sell more stock than he have\r\n\t\tif (stockStatus[stockSymbolIndex].stockQuantity < quantity) {\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"you ask to sell more stock then to actually have, all the quantity sell\");\r\n\t\t\tquantity = this.stockStatus[stockSymbolIndex].stockQuantity;\r\n\t\t}\r\n\t\t// Regular sale\r\n\t\tupdateBalance(quantity * this.stockStatus[stockSymbolIndex].bid);\r\n\t\tthis.stockStatus[stockSymbolIndex].stockQuantity -= quantity;\r\n\t}", "boolean hasExchangeprice();", "public int getStock(){\n\t\treturn Stock; // Return the product's stock\n\t}", "DefaultOwnedStock(){\n\t\tsuper(\"\");\n\t\tprinciple = new BigDecimal(0);\n\t\ttotalValue = new BigDecimal(0);\n\t\tnet = new BigDecimal(0);\n\t}", "private void checkoutNotEmptyBag() {\n\t\tSystem.out.println(\"Checking out \" + bag.getSize() + \" items.\");\n\t\tbag.print();\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tdouble salesPrice = bag.salesPrice();\n\t\tSystem.out.println(\"*Sales total: $\" + df.format(salesPrice));\n\t\tdouble salesTax = bag.salesTax();\n\t\tSystem.out.println(\"*Sales tax: $\" + df.format(salesTax));\n\t\tdouble totalPrice = salesPrice + salesTax;\n\t\tSystem.out.println(\"*Total amount paid: $\" + df.format(totalPrice));\n\t\tbag = new ShoppingBag(); // Empty bag after checking out.\n\t}", "public String getUnSold() {\n\t\treturn unSold;\n\t}", "boolean hasQuantity();", "public String getStock() {\n return stock;\n }", "public String getStock() {\n return stock;\n }", "public StockNotInitializedException(String stockSymbol) {\r\n super();\r\n this.stockSymbol = stockSymbol;\r\n }", "@Test(expected = DontSellYourselfShortException.class)\n public void dontSellYourselfShort() {\n knownUsers.login(seller.userName(), seller.password());\n knownUsers.annointSeller(seller.userName());\n\n Auction testAuction = new Auction(seller, item, startingPrice, startTime, endTime);\n testAuction.onStart();\n\n Bid firstBid = new Bid(seller, startingPrice, startTime.plusMinutes(2));\n\n testAuction.submitBid(firstBid);\n }", "public void removeStock(String symbol) throws StockNotExistsException,\r\n\t\t\tIllegalQuantityException, BalanceException {\r\n\t\tboolean stockIsExisist = false;\r\n\t\tint StockSymbolIndex = 0;\r\n\r\n\t\t// find the index of symbol\r\n\t\tfor (int i = 0; i < portfolioSize; i++) {\r\n\t\t\tif(symbol.equals(this.stockStatus[i].getSymbol())) {\r\n\t\t\t\tstockIsExisist = true;\r\n\t\t\t\tStockSymbolIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if stock symbol dosen't exists\r\n\t\tif (stockIsExisist == false) {\r\n\t\t\tthrow new StockNotExistsException(symbol);\r\n\t\t}\r\n\t\t// if stock index is the last\r\n\t\tif (StockSymbolIndex == MAX_PORTFOLIO_SIZE - 1) {\r\n\t\t\tsellStock(symbol, stockStatus[StockSymbolIndex].getStockQuantity());\r\n\t\t\tportfolioSize--;\r\n\t\t}\r\n\r\n\t\tif (stockIsExisist == true) {\r\n\t\t\tsellStock (symbol, this.stockStatus[StockSymbolIndex].getStockQuantity());\r\n\t\t\tthis.stockStatus[StockSymbolIndex] = stockStatus[portfolioSize-1];\r\n\t\t\tthis.stockStatus[StockSymbolIndex] = stockStatus[portfolioSize-1];\r\n\t\t\tthis.portfolioSize--;\r\n\t\t}\r\n\t}", "private void commitSell(Stock stock, int numShares){\n if(numShares <= player.getShares().get(game.getIndex(stock))){\n out.println(\"Selling \" + numShares + \" \" + stock.getName() + \" shares for £\" + stock.getSharePrice() + \" each.\");\n out.println(\"Funds after transaction: £\" + (player.getFunds()+numShares*stock.getSharePrice()));\n out.println(\"\\r\\nConfirm sale? (Y/N)\");\n String sConfirmInput = in.nextLine();\n if(sConfirmInput.toUpperCase().equals(\"Y\")){\n player.getShares().set(game.getIndex(stock), player.getShares().get(game.getIndex(stock)) - numShares);\n player.setFunds(numShares*stock.getSharePrice());\n player.deductTradesLeft();\n out.println(\"Sale complete.\");\n display();\n command();\n }else if (sConfirmInput.toUpperCase().equals(\"N\")){\n out.println(\"Sale cancelled.\");\n getTradeParam(0);\n }\n }else{\n out.println(\"You do not own that many shares in this stock\");\n getTradeParam(0);\n }\n }", "private void checkSold(JComponent parent) {\n if (itemSelected.isSold()) {\n auctionItemList.removeItem(itemSelected);\n userItemList.removeItem(itemSelected);\n playSound();\n JOptionPane.showMessageDialog(parent, \"Congratulations on your purchase!\");\n updateJList();\n scrollPane.setViewportView(list);\n updateLabels();\n } else {\n JOptionPane.showMessageDialog(parent, \"Bid placed on \" + itemSelected.getItemName() + \"!\");\n currentBidLabel.setText(\"Current bid: $\" + itemSelected.getCurrentBid());\n }\n }", "@Override\n\t\t\tpublic double getPrice() {\n\t\t\t\treturn 0;\n\t\t\t}", "public void setUnSold(String unSold) {\n\t\tthis.unSold = unSold;\n\t}", "public synchronized void get(T stock) throws InterruptedException {\n\t\twhile (store.isEmpty()) {\n\t\t\tLOG.info(\"No products available\");\n\t\t\twait();\n\t\t}\n\t\tstore.remove(stock);\n\t\tLOG.info(\"Product bought\" + store.size());\n\t\tnotify();\n\t}", "public Boolean isBigTrade() {\n\t\treturn null;\r\n\t}" ]
[ "0.69800764", "0.69082546", "0.6901365", "0.66933167", "0.65442044", "0.64275414", "0.64046335", "0.6350914", "0.63073546", "0.6253246", "0.6227452", "0.6195858", "0.61614627", "0.61182433", "0.6090654", "0.6085126", "0.6082111", "0.6076471", "0.6073827", "0.6019636", "0.60191506", "0.599257", "0.5991168", "0.59632826", "0.59610426", "0.5951634", "0.5938322", "0.5936821", "0.5934828", "0.593446", "0.593446", "0.59325016", "0.5925844", "0.58986175", "0.5879321", "0.58776236", "0.5874747", "0.58692926", "0.5842269", "0.5842269", "0.5841849", "0.58416337", "0.58371997", "0.583707", "0.5828197", "0.5793972", "0.5791981", "0.57881856", "0.5785776", "0.57849336", "0.578011", "0.57778454", "0.5772992", "0.5771764", "0.5763061", "0.57604015", "0.5753213", "0.5749254", "0.5742649", "0.5728706", "0.5726921", "0.5725919", "0.5704119", "0.56967217", "0.56913173", "0.56796026", "0.56736225", "0.56732297", "0.56712955", "0.56703615", "0.56694895", "0.56584424", "0.5653886", "0.5653686", "0.56504345", "0.56437033", "0.5642681", "0.56424016", "0.5640013", "0.5638333", "0.56347954", "0.5633714", "0.5617036", "0.56073695", "0.56062317", "0.5597945", "0.55977845", "0.5590015", "0.5586877", "0.55851555", "0.5584195", "0.5584195", "0.5583589", "0.5583436", "0.55818546", "0.55801105", "0.55772567", "0.55684996", "0.55676436", "0.5563016", "0.5549967" ]
0.0
-1
panggil nama dan jabatan
private void setContent(){ nama.setText(Prefs.getString(PrefsClass.NAMA, "")); // txt_msg_nama.setText(Prefs.getString(PrefsClass.NAMA,"")); //set foto di header navbar Utils.LoadImage(MainActivity.this, pb, Prefs.getString(PrefsClass.FOTO,""),foto); addItemSpinner(); setActionBarTitle(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\n\t\treturn namaBulan;\n\t}", "public static void alamatPerusahaan() {\r\n System.out.println(\"Karyawan bekerja di Perusahaan \" + Employee.perusahaan + \" yang beralamat di Jalan Astangkuri Jakarta\");\r\n }", "Karyawan(String n)\n {\n this.nama = n;\n }", "public void testNamaPNSYangSkepnyaDiterbitkanOlehPresiden(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getNamaPNSYangSkepnyaDiterbitkanOlehPresiden(); \n\n\t\tshowData(data,\"nip\",\"nama\",\"tanggal_lahir\",\"tanggal_berhenti\",\"pangkat\",\"masa_kerja\",\"penerbit\");\n\t}", "static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }", "public String getNamaKlinik() {\n return namaKlinik;\r\n }", "public String getNama() {\r\n return nama;\r\n }", "public java.lang.CharSequence getNamaHari() {\n return nama_hari;\n }", "public java.lang.CharSequence getNamaHari() {\n return nama_hari;\n }", "public static void jawaban1() {\n int cari;\r\n boolean ditemukan = true;\r\n int a=0;\r\n\r\n //membentuk array yang berisi data\r\n int[] angka = new int[]{74, 98, 72, 74, 72, 90, 81, 72};\r\n \r\n //mengeluarkan array\r\n for (int i = 0; i < angka.length; i++) {\r\n System.out.print(angka [i]+\"\\t\");\r\n\r\n \r\n }\r\n\r\n\r\n //meminta user memasukkan angka yang hendak dicari\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.println(\"\\nMasukkan angka yang ingin anda cari dibawah sini\");\r\n cari = keyboard.nextInt();\r\n\r\n //proses pencarian atau pencocokan data pada array\r\n for (int i = 0; i < angka.length; i++) {\r\n if (cari == angka[i]) {\r\n ditemukan = true;\r\n \r\n System.out.println(\"Angka yang anda masukkan ada didalam data ini\");\r\n \r\n break;\r\n }\r\n\r\n }\r\n //proses hitung data\r\n if (ditemukan == true) {\r\n \r\n for (int i = 0; i < angka.length; i++) {\r\n if (angka[i]== cari){\r\n a++;\r\n }\r\n \r\n }\r\n\r\n }\r\n \r\n System.out.println(\"Selamat data anda dengan angka \"+cari+ \" ditemukan sebanyak \"+a);\r\n }", "public void testNamaPnsYangPensiunTahunIni(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getNamaPnsYangPensiunTahunIni(); \n\n\t\tshowData_YangpensiunTahunini(data,\"nip\",\"nama\",\"tmtpensiun\");\n\t}", "public String cekPengulangan(String kata) throws IOException{\n String hasil=\"\";\n if(cekUlangSemu(kata)){\n return kata+\" kata ulang semu \";\n }\n if(kata.contains(\"-\")){\n String[] pecah = kata.split(\"-\");\n String depan = pecah[0];\n String belakang = pecah[1];\n ArrayList<String> depanList = new ArrayList<String>();\n ArrayList<String> belakangList = new ArrayList<String>();\n if(!depan.equals(\"\")){\n depanList.addAll(morpParser.cekBerimbuhan(depan, 0));\n }\n if(!belakang.equals(\"\")){\n belakangList.addAll(morpParser.cekBerimbuhan(belakang, 0));\n }\n for(int i = 0; i < depanList.size(); i++){\n for(int j = 0; j < belakangList.size(); j++){\n if(depanList.get(i).equals(belakangList.get(j))){\n return depan+\" kata ulang penuh \";\n }\n }\n }\n if(depan.equals(belakang)){\n return depan+\" kata ulang penuh \";\n }\n char[] isiCharDepan = depan.toCharArray();\n char[] isiCharBelakang = belakang.toCharArray();\n boolean[] sama = new boolean[isiCharDepan.length];\n int jumlahSama=0;\n int jumlahBeda=0;\n for(int i =0;i<sama.length;i++){\n if(isiCharDepan[i]==isiCharBelakang[i]){\n sama[i]=true;\n jumlahSama++;\n }\n else{\n sama[i]=false;\n jumlahBeda++;\n }\n }\n \n if(jumlahBeda<jumlahSama && isiCharDepan.length==isiCharBelakang.length){\n return depan+\" kata ulang berubah bunyi \";\n }\n \n \n }\n else{\n if(kata.charAt(0)==kata.charAt(2)&&kata.charAt(1)=='e'){\n if((kata.charAt(0)=='j'||kata.charAt(0)=='t')&&!kata.endsWith(\"an\")){\n return kata.substring(2)+\" kata ulang sebagian \";\n }\n else if(kata.endsWith(\"an\")){\n return kata.substring(2,kata.length()-2)+\" kata ulang sebagian \";\n }\n \n }\n }\n return hasil;\n }", "public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }", "@Override\r\n\tpublic Map<String, Object> namaProdi(Integer id_univ, Integer id_fakultas, Integer id_prodi) {\n\t\treturn fakultas.namaProdi(id_univ, id_fakultas, id_prodi);\r\n\t}", "static void cetak_data(String nama, int usia) {\n int tahun_sekarang = 2020, tahun_lahir = tahun_sekarang - usia;\r\n System.out.println(\"---------\\nNama Saya : \" + nama + \"\\nUsia Saya : \" + usia + \"\\nTahun Lahir : \" + tahun_lahir);\r\n }", "public java.lang.CharSequence getNamaKelas() {\n return nama_kelas;\n }", "public void testTampilkanJumlahSKPP_PNSberdasarkanKodePangkat(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSKPP_PNSberdasarkanKodePangkat(); \n\n\t\tshowData(data,\"kode_pangkat\",\"jumlah_pns\");\n\t}", "public void setNama(String nama) {\r\n this.nama = nama;\r\n }", "public void tampilBuku() {\n System.out.println(\"ID : \" + this.id);\n System.out.println(\"Judul : \" + this.judul);\n System.out.println(\"Tahun Terbit: \" + this.tahun);\n }", "public void summary(int tambahanProyek) {\r\n System.out.println(this.nama + \" usia \" + this.usia + \" tahun bekerja di Perusahaan \" + Employee.perusahaan);\r\n System.out.println(\"Memiliki total gaji \" + (Employee.pendapatan + Employee.lembur + tambahanProyek));\r\n }", "public void printTagihanTamu() {\n for (Tagihan t: daftarTagihan.values()) {\n System.out.println(\"Tamu:\"+t.tamu.nama);\n System.out.println(\"Tagihan:\"+t.hitungSemuaTagihan());\n }\n }", "public java.lang.CharSequence getNamaKelas() {\n return nama_kelas;\n }", "@Override\r\n\tpublic Map<String, Object> namaFakultas(Integer id_univ, Integer id_fakultas) {\n\t\treturn fakultas.namaFakultas(id_univ, id_fakultas);\r\n\t}", "public static void tambahDepan() {\n String NAMA;\n String ALAMAT;\n int UMUR;\n char JEKEL;\n String HOBI[] = new String[3];\n float IPK;\n Scanner masukan = new Scanner(System.in);\n int bacaTombol = 0;\n System.out.println(\"\\nTAMBAH DEPAN : \");\n System.out.print(\"Silakan masukkan nama anda : \");\n NAMA = masukan.nextLine();\n System.out.print(\"Silakan masukkan alamat anda: \");\n ALAMAT = masukan.nextLine();\n System.out.print(\"Silakan masukkan umur anda : \");\n UMUR = masukan.nextInt();\n System.out.print(\"Silakan masukkan Jenis Kelamin anda : \");\n\n try {\n bacaTombol = System.in.read();\n } catch (java.io.IOException e) {\n }\n\n JEKEL = (char) bacaTombol;\n System.out.println(\"Silakan masukkan hobi (maks 3) : \");\n System.out.print(\"hobi ke-0 : \");\n HOBI[0] = masukan.next();\n System.out.print(\"hobi ke-1 : \");\n HOBI[1] = masukan.next();\n System.out.print(\"hobike- 2 : \");\n HOBI[2] = masukan.next();\n System.out.print(\"Silakan masukkan IPK anda : \");\n IPK = masukan.nextFloat();\n\n // -- -- -- -- -- --bagian menciptakan & mengisi simpul baru--------------\n simpul baru;\n baru = new simpul();\n baru.nama = NAMA;\n baru.alamat = ALAMAT;\n baru.umur = UMUR;\n baru.jekel = JEKEL;\n baru.hobi[0] = HOBI[0];\n baru.hobi[1] = HOBI[1];\n baru.hobi[2] = HOBI[2];\n baru.ipk = IPK;\n\n //-- -- -- --bagian mencangkokkan simpul baru ke dalam simpul lama--- ----- --\n if (awal == null) // jika senarai masih kosong\n {\n awal = baru;\n akhir = baru;\n baru.kiri = null;\n baru.kanan = null;\n } else // jika senarai tidak kosong\n {\n baru.kanan = awal;\n awal.kiri = baru;\n awal = baru;\n awal.kiri = null;\n }\n }", "public void setNamaKlinik(String namaKlinik) {\n this.namaKlinik = namaKlinik;\r\n }", "public static void tambahBelakang() {\n String NAMA;\n String ALAMAT;\n int UMUR;\n char JEKEL;\n String HOBI[] = new String[3];\n float IPK;\n Scanner masukan = new Scanner(System.in);\n int bacaTombol = 0;\n System.out.println(\"\\nTAMBAH BELAKANG : \");\n System.out.print(\"Silakan masukkan nama anda : \");\n NAMA = masukan.nextLine();\n System.out.print(\"Silakan masukkan alamat anda: \");\n ALAMAT = masukan.nextLine();\n System.out.print(\"Silakan masukkan umur anda : \");\n UMUR = masukan.nextInt();\n System.out.print(\"Silakan masukkan Jenis Kelamin anda : \");\n\n try {\n bacaTombol = System.in.read();\n } catch (java.io.IOException e) {\n }\n\n JEKEL = (char) bacaTombol;\n System.out.println(\"Silakan masukkan hobi (maks 3) : \");\n System.out.print(\"hobi ke-0 : \");\n HOBI[0] = masukan.next();\n System.out.print(\"hobi ke-1 : \");\n HOBI[1] = masukan.next();\n System.out.print(\"hobike- 2 : \");\n HOBI[2] = masukan.next();\n System.out.print(\"Silakan masukkan IPK anda : \");\n IPK = masukan.nextFloat();\n\n //------------bagian menciptakan & mengisi simpul baru--------------\n simpul baru;\n baru = new simpul();\n baru.nama = NAMA;\n baru.alamat = ALAMAT;\n baru.umur = UMUR;\n baru.jekel = JEKEL;\n baru.hobi[0] = HOBI[0];\n baru.hobi[1] = HOBI[1];\n baru.hobi[2] = HOBI[2];\n baru.ipk = IPK;\n\n //--------bagian mencangkokkan simpul baru ke dalam simpul lama---------\n if (awal == null)// jika senarai kosong\n {\n awal = baru;\n akhir = baru;\n baru.kiri = null;\n baru.kanan = null;\n } else // jika senarai tidak kosong\n {\n baru.kiri = akhir;\n akhir.kanan = baru;\n akhir = baru;\n akhir.kanan = null;\n }\n }", "public frmPengembalian() {\n initComponents();\n model = new DefaultTableModel();\n \n //memberi nama header pada tabel\n tblKembali.setModel(model);\n model.addColumn(\"NAMA\");\n model.addColumn(\"ALAMAT\");\n model.addColumn(\"NO. HP\");\n model.addColumn(\"NAMA KAMERA\");\n model.addColumn(\"KODE KAMERA\");\n model.addColumn(\"TANGGAL DISEWAKAN\");\n model.addColumn(\"TANGGAL DIKEMBALIKAN\");\n model.addColumn(\"TERLAMBAT\");\n\n \n //fungsi ambil data\n getDataKategori();\n }", "public String getAlamat_pelanggan(){\r\n \r\n return alamat_pelanggan;\r\n }", "void setNama(String nama) {\r\n\tthis.nama = nama;\r\n }", "public Pasien(String nama, String alamat, String tempatLahir, int tanggalLahir, int bulanLahir, int tahunLahir, String NIK) {\r\n this.nama = nama;\r\n this.alamat = alamat;\r\n this.tempatLahir = tempatLahir;\r\n this.NIK = NIK;\r\n this.tanggalLahir = tanggalLahir;\r\n this.bulanLahir = bulanLahir;\r\n this.tahunLahir = tahunLahir;\r\n }", "public void simpanDataProduk(){\n loadDataProduk();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"INSERT INTO barang(kode_barang, nama_barang, merk_barang, jumlah_stok, harga)\"\n + \"VALUES('\"+ kode_barang +\"','\"+ nama_barang +\"','\"+ merk_barang +\"','\"+ jumlah_stok +\"','\"+ harga +\"')\";\n PreparedStatement p = (PreparedStatement) koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataProduk();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }", "private void autonumber(){\n //txtkode.setVisible(false);\n txtkode.setText(\"\");\n\n try{\n sql = \"select * from tblpembayaran order by kode_pembayaran desc\";\n Statement st = (Statement) conek.getConnection().createStatement();\n rs = st.executeQuery(sql);\n if (rs.next()) {\n String kode = rs.getString(\"kode_pembayaran\").substring(1);\n String AN = \"\" + (Integer.parseInt(kode) + 1);\n String Nol = \"\";\n\n if(AN.length()==1)\n {Nol = \"00\";}\n else if(AN.length()==2)\n {Nol = \"0\";}\n else if(AN.length()==3)\n {Nol = \"\";}\n\n txtkode.setText(\"B\" + Nol + AN);\n } else {\n txtkode.setText(\"B001\");\n //kodepembayaran = \"B\" + Nol + AN;\n }\n }catch(Exception e){\n JOptionPane.showMessageDialog(rootPane,\"DATABASE BELUM NYALA!\");\n }\n }", "private void TampilData(){\n try{ //\n String sql = \"SELECT * FROM buku\"; // memanggil dari php dengan tabel buku\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n rss = stt.executeQuery(sql); \n while (rss.next()){ \n Object[] o = new Object [3]; // membuat array 3 dimensi dengan nama object\n \n o[0] = rss.getString(\"judul\"); // yang pertama dengan ketentuan judul\n o[1] = rss.getString(\"penulis\"); // yang kedua dengan ketentuan penulis\n o[2] = rss.getInt(\"harga\"); // yang ketiga dengan ketentuan harga\n model.addRow(o); // memasukkan baris dengan mengkonekan di tabel model\n } \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }", "public static void mengurutkanDataBubble_TeknikTukarNilai(){\n \t\tint N = hitungJumlahSimpul();\n \t\tsimpul A=null;\n \t\tsimpul B=null;\n \t\tsimpul berhenti = akhir.kanan;\n\n \t\tSystem.out.println (\"Banyaknya simpul = \" + hitungJumlahSimpul());\n\n \t\tfor (int i=1; i<= hitungJumlahSimpul()-1; i++){\n \t\t\tA = awal;\n \t\t\tB = awal.kanan;\n \t\t\tint nomor = 1;\n\n \t\t\twhile (B != berhenti){\n\t\t\t\tif (A.nama.compareTo(B.nama)>0){\n \t\t\t\t//tukarkan elemen dari simpul A dan elemen dari simpul B\n \t\t\t\ttukarNilai(A,B);\n \t\t\t}\n\n \t\t\tA = A.kanan;\n \t\t\tB = B.kanan;\n \t\t\tnomor++;\n \t\t\t}\n \t\t\tberhenti = A;\n \t\t}\n \t\tSystem.out.println(\"===PROSES PENGURUTAN BUBBLE SELESAI======\");\n \t}", "@RequestMapping(value = \"/pegawai/tambah\", method = RequestMethod.POST)\n\tprivate String tambahPegawai(@ModelAttribute PegawaiModel pegawai, Model model) {\n\t\tProvinsiModel provinsi = pegawai.getInstansi().getProvinsi();\n\t\tString nip = \"\";\n\t\tnip = nip + provinsi.getId();\n\t\tint instansiLine = provinsi.getInstansiProvinsi().indexOf(pegawai.getInstansi()) + 1;\n\t\t\n\t\tif(instansiLine < 10) { \n\t\t\tnip = nip + \"0\"+ instansiLine;\n\t\t}else { \n\t\t\tnip = nip + instansiLine; \n\t\t\t}\n\t\t\n\t\tString formatTanggal = pegawai.getTanggal_lahir().toString();\n\t\tString formatDateBaru = formatTanggal.substring(8) + formatTanggal.substring(5, 7) + formatTanggal.substring(2, 4);\n\t\tnip = nip + formatDateBaru;\n\t\tnip+=pegawai.getTahun_masuk();//menambahkan tahun masuk untuk membuat nip\n\t\t\n\t\t//menambahkan urutan masuk untuk membuat nip\n\t\tInstansiModel instansi = pegawai.getInstansi();\n\t\tint nomorDepan=1;\n\t\tfor(PegawaiModel comparePegawai: instansi.getListPegawaiInstansi()) {\n\t\t\tif(nip.equals(comparePegawai.getNip().substring(0, 14))) {\n\t\t\t\tnomorDepan = nomorDepan + 1;\n\t\t\t}\n\t\t}\n\t\tif(nomorDepan < 10) {\n\t\t\tnip = nip + \"0\"+nomorDepan;\n\t\t}else {\n\t\t\tnip = nip + nomorDepan;\n\t\t}\n\t\t\n\t\tpegawai.setNip(nip);\n\t\tpegawaiService.addPegawai(pegawai);\n\t\tmodel.addAttribute(\"pegawai\", pegawai);\n\t\treturn \"dataBertambah\";\n\t}", "@Override\n\tpublic int hitungPemasukan() {\n\t\treturn getHarga() * getPenjualan();\n\t}", "public String toString(){\r\n\t\treturn \"KORISNIK:\"+korisnik+\" PORUKA:\"+poruka;\r\n\t}", "public void simpanDataKategori(){\n loadDataKategori();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksiDB.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"INSERT INTO tbl_kembali(nm_kategori, ala_kategori, no_kategori, kame_kategori, kd_kategori, sewa_kategori, kembali_kategori, lambat_kategori)\" + \"VALUES('\"+ nmKategori +\"','\"+ alaKategori +\"','\"+ noKategori +\"','\"+ kameKategori +\"','\"+ kdKategori +\"','\"+ sewaKategori +\"','\"+ lamKategori +\"','\"+ lambatKategori +\"')\";\n PreparedStatement p = (PreparedStatement) koneksiDB.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataKategori();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }", "public void dataSelect(){\n //deklarasi variabel\n int i = tblKembali.getSelectedRow();\n \n //uji adakah data di tabel?\n if(i == -1){\n //tidak ada yang terpilih atau dipilih.\n return;\n }\n txtNama.setText(\"\"+model.getValueAt(i,0));\n txtAlamat.setText(\"\"+model.getValueAt(i,1));\n txtNo.setText(\"\"+model.getValueAt(i,2));\n txtKamera.setText(\"\"+model.getValueAt(i,3));\n txtKode.setText(\"\"+model.getValueAt(i,4));\n txtdisewa.setText(\"\"+model.getValueAt(i,5));\n txtLama.setText(\"\"+model.getValueAt(i,6));\n txtLambat.setText(\"\"+model.getValueAt(i,7));\n \n }", "public static void Latihan() {\n Model.Garis();\n System.out.println(Model.subTitel[0]);\n Model.Garis();\n\n System.out.print(Model.subTitel[1]);\n Model.nilaiTebakan = Model.inputUser.nextInt();\n\n System.out.println(Model.subTitel[2] + Model.nilaiTebakan);\n\n // Operasi Logika\n Model.statusTebakan = (Model.nilaiTebakan == Model.nilaiBenar);\n System.out.println(Model.subTitel[3] + Model.hasilTebakan(Model.TrueFalse) + \"\\n\\n\");\n }", "public dataPegawai() {\n initComponents();\n koneksiDatabase();\n tampilGolongan();\n tampilDepartemen();\n tampilJabatan();\n Baru();\n }", "public String toString(){\r\n\treturn \"KORISNIK:\"+korisnik+\" PORUKA:\"+poruka;\r\n\t}", "public static void tambahTengah() {\n Scanner masukan = new Scanner(System.in);\n System.out.println(\"\\nTentukan Lokasi Penambahan Data\");\n int LOKASI = masukan.nextInt();\n masukan.nextLine();\n\n int jumlahSimpulYangAda = hitungJumlahSimpul();\n if (LOKASI == 1) {\n System.out.println(\"Lakukan penambahan di depan\");\n } else if (LOKASI > jumlahSimpulYangAda) {\n System.out.println(\"Lakukan penambahan di belakang\");\n } else {\n\n //------------bagian entri data dari keyboard--------------\n String NAMA;\n String ALAMAT;\n int UMUR;\n char JEKEL;\n String HOBI[] = new String[3];\n float IPK;\n int bacaTombol = 0;\n System.out.println(\"\\nTAMBAH TENGAH : \");\n System.out.print(\"Silakan masukkan nama anda : \");\n NAMA = masukan.nextLine();\n System.out.print(\"Silakan masukkan alamat anda: \");\n ALAMAT = masukan.nextLine();\n System.out.print(\"Silakan masukkan umur anda : \");\n UMUR = masukan.nextInt();\n System.out.print(\"Silakan masukkan Jenis Kelamin anda : \");\n\n try {\n bacaTombol = System.in.read();\n } catch (java.io.IOException e) {\n }\n\n JEKEL = (char) bacaTombol;\n System.out.println(\"Silakan masukkan hobi (maks 3) : \");\n System.out.print(\"hobi ke-0 : \");\n HOBI[0] = masukan.next();\n System.out.print(\"hobi ke-1 : \");\n HOBI[1] = masukan.next();\n System.out.print(\"hobike- 2 : \");\n HOBI[2] = masukan.next();\n System.out.print(\"Silakan masukkan IPK anda : \");\n IPK = masukan.nextFloat();\n\n //-- -- -- -- -- --bagian menemukan posisi yang dikehendaki-----------\n simpul bantu;\n bantu = awal;\n int i = 1;\n while ((i < LOKASI)\n && (bantu != akhir)) {\n bantu = bantu.kanan;\n i++;\n }\n\n // -- -- -- -- -- --bagian menciptakan & mengisi simpul baru-----------\n simpul baru = new simpul();\n baru.nama = NAMA;\n baru.alamat = ALAMAT;\n baru.umur = UMUR;\n baru.jekel = JEKEL;\n baru.hobi[0] = HOBI[0];\n baru.hobi[1] = HOBI[1];\n baru.hobi[2] = HOBI[2];\n baru.ipk = IPK;\n\n //-- -- --bagian mencangkokkan simpul baru ke dalam linkedlist lama------\n baru.kiri = bantu.kiri;\n baru.kiri.kanan = baru;\n baru.kanan = bantu;\n bantu.kiri = baru;\n }\n }", "public void simpanDataBuku(){\n String sql = (\"INSERT INTO buku (judulBuku, pengarang, penerbit, tahun, stok)\" \n + \"VALUES ('\"+getJudulBuku()+\"', '\"+getPengarang()+\"', '\"+getPenerbit()+\"'\"\n + \", '\"+getTahun()+\"', '\"+getStok()+\"')\");\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }", "public void tabelpembayaran(){\n DefaultTableModel tbl = new DefaultTableModel();\n //tbl.addColumn(\"Kode\");\n tbl.addColumn(\"TGL Audit\");\n tbl.addColumn(\"TGL Pembayaran\");\n tbl.addColumn(\"Status\");\n tbl.addColumn(\"Grup\");\n tbl.addColumn(\"Aktivitas\");\n tbl.addColumn(\"JML Anggota\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Gaji PerHA\");\n tbl.addColumn(\"Gaji Anggota\");\n tbl.addColumn(\"Total\");\n tblpembayaran.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblpembayaran\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"tanggal_audit\"),\n res.getString(\"tanggal_pembayaran\"), \n res.getString(\"status_pembayaran\"),\n res.getString(\"nama_grup\"),\n res.getString(\"nama_aktivitas\"),\n res.getInt(\"jumlah_anggota\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"gaji_peranggota\"),\n res.getInt(\"total\")\n });\n tblpembayaran.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n \n }", "private void ulangiEnkripsi() {\n this.tfieldP.setText(\"P\");\n this.tfieldQ.setText(\"Q\");\n this.tfieldN.setText(\"N\");\n this.tfieldTN.setText(\"TN\");\n this.tfieldE.setText(\"E\");\n this.tfieldD.setText(\"D\");\n this.tfieldLokasidannamafilehasilenkripsi.setText(\"Lokasi & Nama File Hasil Enkripsi\");\n this.tfieldLokasidannamafileenkripsi.setText(\"Lokasi & Nama File\");\n this.fileAsli = null;\n this.pbEnkripsi.setValue(0);\n this.enkripsi.setP(null);\n this.enkripsi.setQ(null);\n this.enkripsi.setN(null);\n this.enkripsi.setTn(null);\n this.enkripsi.setE(null);\n this.enkripsi.setD(null);\n }", "public tabelAnggota() {\n initComponents();\n \n //membuat tablemodel\n model = new DefaultTableModel();\n //menambah tablemodel ke tabel\n jTable1.setModel(model);\n \n model.addColumn(\"ID Anggota\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Alamat\");\n model.addColumn(\"No HP\");\n model.addColumn(\"Tanggal Lahir\");\n model.addColumn(\"Tanggal Bergabung\");\n \n loadData();\n enaButtonSimpan();\n }", "String getNama(){\n return this.nama;\n }", "public ArrayList<RealmCobaModels> setSemuaDataNama() {\n // mendapatkan data realm berbentuk realmresults\n RealmResults<RealmCobaModels> realmCobaModels = realm.where(RealmCobaModels.class).findAll();\n // mendeklarasi arraylist\n ArrayList<RealmCobaModels> arrayListModels = new ArrayList<>();\n\n // validasi\n if (realmCobaModels.size() > 0) { // jika realmresult lebih dari 0\n // membuat looping data\n for (int i = 0; i < realmCobaModels.size(); i++) {\n RealmCobaModels rcm1 = new RealmCobaModels();\n rcm1.setId(realmCobaModels.get(i).getId());\n rcm1.setNama(realmCobaModels.get(i).getNama());\n rcm1.setUmur(realmCobaModels.get(i).getUmur());\n arrayListModels.add(rcm1); // memasukkan ke array list\n }\n\n // tampil log\n Log.e(TAG, arrayListModels.toString());\n } else { // jika realmresult tidak lebih dari 0, maka kosong!\n // tampil log\n Log.e(TAG, \"Tidak Ada Data!\");\n }\n\n return arrayListModels;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Tạp Chí: \"+\" Tựa đề: \"+ tuaDe+\", Số Trang: \"+soTrang+\", Nhà xuất bản: \"+nxb+\", Số Bài Viết: \"+soBaiViet;\n\t}", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "public void loadDataProduk(){\n kode_barang = txtKodeBarang.getText();\n nama_barang = txtNamaBarang.getText();\n merk_barang = txtMerkBarang.getText();\n jumlah_stok = Integer.parseInt(txtJumlahStok.getText());\n harga = Integer.parseInt(txtHarga.getText());\n \n }", "private void TambahData(String judul,String penulis,String harga){\n try{ // memanipulasi kesalahan\n String sql = \"INSERT INTO buku VALUES(NULL,'\"+judul+\"','\"+penulis+\"',\"+harga+\")\"; // menambahkan data dengan mengkonekan dari php\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n stt.executeUpdate(sql); \n model.addRow(new Object[]{judul,penulis,harga}); // datanya akan tertambah dibaris baru di tabel model\n \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }", "public void deskripsi() {\r\n System.out.println(this.nama + \" bekerja di Perusahaan \" + Employee.perusahaan + \" dengan usia \" + this.usia + \" tahun\");\r\n }", "public void jumlahanggota(){\n try{\n java.sql.Statement statement = (java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res = statement.executeQuery(\"select count(nama) from tblpegawai where grup='\"+txtgrup.getSelectedItem()+\"'\");\n \n while(res.next()){\n String jumlah = res.getString(\"count(nama)\"); \n txtanggota.setText(jumlah);\n //jmlanggota = Integer.valueOf(txtanggota.getText());\n }\n res.last();\n }catch (Exception e){\n } \n }", "public int getTanggalLahir() {\r\n return tanggalLahir;\r\n }", "public laporan(String username, String nama) {\n initComponents();\n user=username;\n koneksi DB = new koneksi();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n jLabel8.setText(nama);\n name=nama;\n }", "public void tampil_tb_mahasiswa(){\n Object []baris = {\"No Bp\",\"Nama\",\"Tempat Lahir\",\"Tanggal Lhair\",\"Jurusan\",\"Tanggal Masuk\"};\n tabmode = new DefaultTableModel(null, baris);\n //tb_mahasiswa.setModel(tabmode);\n try {\n Connection con = new koneksi().getConnection();\n String sql = \"select * from tb_mahasiswa order by no_bp asc\";\n java.sql.Statement stat = con.createStatement();\n java.sql.ResultSet hasil = stat.executeQuery(sql);\n while (hasil.next()){\n String no_bp = hasil.getString(\"no_bp\");\n String nama = hasil.getString(\"nama\");\n String tempat_lahir = hasil.getString(\"tempat_lahir\");\n String tanggal_lahir = hasil.getString(\"tanggal_lahir\");\n String jurusan = hasil.getString(\"jurusan\"); \n String tanggal_masuk = hasil.getString(\"tanggal_masuk\");\n String[] data = {no_bp, nama, tempat_lahir, tanggal_lahir, jurusan, tanggal_masuk};\n tabmode.addRow(data);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\",\"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "java.lang.String getNume();", "java.lang.String getNume();", "public void jumlahgajianggota(){\n \n jmlha = Integer.valueOf(txtha.getText());\n jmlharga = Integer.valueOf(txtharga.getText());\n jmlanggota = Integer.valueOf(txtanggota.getText());\n \n if (jmlanggota == 0){\n txtgajianggota.setText(\"0\");\n }else{\n jmltotal = jmlharga * jmlha;\n hasil = jmltotal / jmlanggota;\n txtgajianggota.setText(Integer.toString(hasil)); \n }\n\n \n }", "void setNama(String nama){\n this.nama = nama;\n }", "@Override\r\n\tpublic String showKode() {\n\t\treturn getPenerbit() + \" \" + firsText(getJudul()) + \" \" + lastText(getPengarang());\r\n\t}", "public void rubahDataProduk(){\n loadDataProduk();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"UPDATE barang SET nama_barang = '\"+ nama_barang +\"',\"\n + \"merk_barang = '\"+ merk_barang +\"',\"\n + \"jumlah_stok = '\"+ jumlah_stok +\"',\"\n + \"harga = '\"+ harga +\"'\" \n + \"WHERE kode_barang = '\" + kode_barang +\"'\";\n PreparedStatement p = (PreparedStatement) koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataProduk();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }", "private void tampilkan_dataT() {\n \n DefaultTableModel tabelmapel = new DefaultTableModel();\n tabelmapel.addColumn(\"Tanggal\");\n tabelmapel.addColumn(\"Berat\");\n tabelmapel.addColumn(\"Kategori\");\n tabelmapel.addColumn(\"Harga\");\n \n try {\n connection = Koneksi.connection();\n String sql = \"select a.tgl_bayar, b.berat, b.kategori, b.total_bayar from transaksi a, data_transaksi b where a.no_nota=b.no_nota AND a.status_bayar='Lunas' AND MONTH(tgl_bayar) = '\"+date1.getSelectedItem()+\"' And YEAR(tgl_bayar) = '\"+c_tahun.getSelectedItem()+\"'\";\n java.sql.Statement stmt = connection.createStatement();\n java.sql.ResultSet rslt = stmt.executeQuery(sql);\n while (rslt.next()) {\n Object[] o =new Object[4];\n o[0] = rslt.getDate(\"tgl_bayar\");\n o[1] = rslt.getString(\"berat\");\n o[2] = rslt.getString(\"kategori\");\n o[3] = rslt.getString(\"total_bayar\");\n tabelmapel.addRow(o);\n }\n tabel_LK.setModel(tabelmapel);\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Gagal memuat data\");\n }\n \n }", "@Override\r\n\tpublic Map<String, Object> namaUniv(Integer id_univ) {\n\t\treturn fakultas.namaUniv(id_univ);\r\n\t}", "public String info(){\r\n String info =\"\";\r\n info += \"id karyawan : \" + this.idkaryawan + \"\\n\";\r\n info += \"Nama karyawan : \" + this.namakaryawan + \"\\n\";\r\n return info;\r\n }", "String getDataNascimento();", "private static PohonAVL seimbangkanKembaliKiri (PohonAVL p) {\n\t// Write your codes in here\n //...\n // Write your codes in here\n if(tinggi(p.kiri) <= (tinggi(p.kanan)+1)) return p;\n else{\n PohonAVL ki = p.kiri;\n PohonAVL ka = p.kanan;\n PohonAVL kiki = ki.kiri;\n PohonAVL kika = ki.kanan;\n if(tinggi(kiki) > tinggi(ka))\n return sisipkanTinggiSeimbang(0, p)\n }\n }", "public void hapusDataProduk(){\n loadDataProduk(); \n \n //Beri peringatan sebelum melakukan penghapusan data\n int pesan = JOptionPane.showConfirmDialog(null, \"HAPUS DATA\"+ kode_barang +\"?\",\"KONFIRMASI\", JOptionPane.OK_CANCEL_OPTION);\n \n //jika pengguna memilih OK lanjutkan proses hapus data\n if(pesan == JOptionPane.OK_OPTION){\n //uji koneksi\n try{\n //buka koneksi ke database\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah hapus data\n String sql = \"DELETE FROM barang WHERE kode_barang='\"+ kode_barang +\"'\";\n PreparedStatement p =(PreparedStatement)koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //fungsi ambil data\n getDataProduk();\n \n //fungsi reset data\n reset();\n JOptionPane.showMessageDialog(null, \"DATA BARANG BERHASIL DIHAPUS\");\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }\n \n }", "public void hapusDataKategori(){\n loadDataKategori(); \n \n //Beri peringatan sebelum melakukan penghapusan data\n int pesan = JOptionPane.showConfirmDialog(null, \"HAPUS DATA\"+ nmKategori +\"?\",\"KONFIRMASI\", JOptionPane.OK_CANCEL_OPTION);\n \n //jika pengguna memilih OK lanjutkan proses hapus data\n if(pesan == JOptionPane.OK_OPTION){\n //uji koneksi\n try{\n //buka koneksi ke database\n Statement stat = (Statement) koneksiDB.getKoneksi().createStatement();\n \n //perintah hapus data\n String sql = \"DELETE FROM tbl_kembali WHERE nm_kategori='\"+ nmKategori +\"'\";\n PreparedStatement p =(PreparedStatement)koneksiDB.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //fungsi ambil data\n getDataKategori();\n \n //fungsi reset data\n reset();\n JOptionPane.showMessageDialog(null, \"BERHASIL DIHAPUS\");\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }\n }", "public void addPesanan(JSONObject json) {\n int index = 0;\n boolean found = false;\n for(int i = 0; i < pesanan.size(); i++) {\n JSONObject jsonLineItem = (JSONObject) pesanan.get(i);\n \n if(jsonLineItem.get(\"id_menu\") == json.get(\"id_menu\")) {\n found = true;\n index = i;\n break;\n }\n }\n \n if(found) {\n // tambahkan jumlah menu apabila menu sudah dipesan\n JSONObject jsonCurrentPesanan = (JSONObject) pesanan.get(index);\n int jumlah = (int) jsonCurrentPesanan.get(\"jumlah\");\n int subtotal = (int) json.get(\"subtotal\") + (int) jsonCurrentPesanan.get(\"subtotal\");\n jumlah++;\n jsonCurrentPesanan.put(\"jumlah\", jumlah);\n jsonCurrentPesanan.put(\"subtotal\", subtotal);\n pesanan.set(index, jsonCurrentPesanan); \n } else {\n // jika menu belum ada di pesanan maka tambahkan ke pesanan \n this.pesanan.add(json);\n }\n \n this.total += (int) json.get(\"subtotal\");\n label_total.setText(Integer.toString(this.total));\n \n this.renderPesanan();\n }", "@Override\n public String toString() {\n \treturn \"내 이름은\" + name + \", \" + \"내 학번은\" + number + \", \" + \"나는 \" + gender + \"자야\";\n }", "public void perbaruiDataKategori(){\n loadDataKategori();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksiDB.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"UPDATE tbl_kembali SET nm_kategori = '\"+ nmKategori +\"',\"\n + \"ala_kategori = '\"+ alaKategori +\"',\"\n + \"no_kategori = '\"+ noKategori +\"',\"\n + \"kame_kategori = '\"+ kameKategori +\"',\"\n + \"kd_kategori = '\"+ kdKategori +\"',\"\n + \"sewa_kategori = '\"+ sewaKategori +\"',\"\n + \"kembali_kategori = '\"+ lamKategori +\"'\"\n + \"WHERE lambat_kategori = '\" + lambatKategori +\"'\";\n PreparedStatement p = (PreparedStatement) koneksiDB.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataKategori();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }", "public void dodajZmijuPocetak() {\n\t\tthis.zmija.add(new Cvor(1,4));\n\t\tthis.zmija.add(new Cvor(1,3));\n\t\tthis.zmija.add(new Cvor(1,2));\n\t\t\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\tthis.tabla[i][j] = 'O';\n\t\t\n\t\tfor (int k = 1; k < this.zmija.size(); k++) {\n\t\t\ti = this.zmija.get(k).i;\n\t\t\tj = this.zmija.get(k).j;\n\t\t\tthis.tabla[i][j] = 'o';\n\t\t}\t\n\t}", "public void tambahkanTamu(String Nama, String noTelp, String customerType, int jumlahKamar, int jenisKamar, String DataAnda, boolean checkIn, String noKamar) {\r\n tamu.add(new Tamu(Nama, noTelp, customerType, jumlahKamar, jenisKamar, DataAnda, checkIn, noKamar));\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Báo: \"+\"\\t\"+\", Số Trang: \"+soTrang+\", Nhà xuất bản: \"+nxb;\n\t}", "private void TampilData() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"NO\");\n model.addColumn(\"ID\");\n model.addColumn(\"NAME\");\n model.addColumn(\"USERNAME\");\n tabelakses.setModel(model);\n\n //menampilkan data database kedalam tabel\n try {\n int i=1;\n java.sql.Connection conn = new DBConnection().connect();\n java.sql.Statement stat = conn.createStatement();\n ResultSet data = stat.executeQuery(\"SELECT * FROM p_login order by Id asc\");\n while (data.next()) {\n model.addRow(new Object[]{\n (\"\" + i++),\n data.getString(\"Id\"),\n data.getString(\"Name\"),\n data.getString(\"Username\")\n });\n tabelakses.setModel(model);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR:\" + e);\n }\n }", "public tambahtoko() {\n initComponents();\n tampilkan();\n form_awal();\n }", "private void btnSimpanActionPerformed(java.awt.event.ActionEvent evt) {\n if (txtAlamat.getText().equals(\"\") || txtEmail.getText().equals(\"\") || txtHp.getText().equals(\"\") || txtNama.getText().equals(\"\") || !validate(txtEmail.getText()) || txtPasar.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(this, \"Isi data dengan benar!\");\n return;\n }\n \n SimpleDateFormat formatDate = new SimpleDateFormat(\"yyyyMMdd\");\n\n if (pelanggan.getPgn_id().equals(\"\")) {\n pelanggan.setPgn_id(controlpelanggan.getLastID());\n }\n\n pelanggan.setPgn_nama(txtNama.getText());\n pelanggan.setPgn_no_hp(txtHp.getText());\n pelanggan.setPgn_email(txtEmail.getText());\n pelanggan.setPgn_alamat(txtAlamat.getText());\n pelanggan.setPgn_jumlah_transaksi(0);\n pelanggan.setPgn_nama_pasar(txtPasar.getText());\n pelanggan.setPgn_nama_toko(txtToko.getText());\n pelanggan.setPgn_total_hutang(0);\n pelanggan.setPgn_uang_transaksi(0);\n\n \n if(controlpelanggan.simpanPelanggan(pelanggan)){\n JOptionPane.showMessageDialog(this, \"Berhasil menambah ...\");\n }else{\n JOptionPane.showMessageDialog(this, \"Gagal menambah ...\");\n }\n \n\n addData();\n clear();\n }", "public void tampilharga(){\n try{\n Statement statement = (Statement)conek.GetConnection().createStatement();\n ResultSet res = statement.executeQuery(\"select * from tblaktivitas where compart='\"+ txtcompart.getSelectedItem() +\"' AND nama_grup= '\"+txtgrup.getSelectedItem()+\"'\"); \n \n while(res.next()){\n String price = res.getString(\"harga\");\n String aktivitas = res.getString(\"pekerjaan\");\n String hektar = res.getString(\"ha\");\n txtharga.setText(price);\n txtaktivitas.setText(aktivitas); \n txtha.setText(hektar);\n }\n res.close();\n }catch (Exception e){\n System.out.println(e.getMessage());\n }\n jmlharga = Integer.valueOf(txtharga.getText());\n jmlha = Integer.valueOf(txtha.getText());\n }", "public final String dataTauluMerkkiJonoksi() {\r\n String data = \"\";\r\n\r\n for (int i = 0; i < this.riviAsteikko.length; i++) {\r\n for (int j = 0; j < this.sarakeAsteikko.length; j++) {\r\n if (this.dataTaulukko[i][j] < 10) {\r\n data = data + \" \" + dataTaulukko[i][j];\r\n } else if (this.dataTaulukko[i][j] >= 10\r\n && this.dataTaulukko[i][j] < 100) {\r\n data = data + \" \" + this.dataTaulukko[i][j];\r\n } else {\r\n data = data + \" \" + this.dataTaulukko[i][j];\r\n }\r\n }\r\n data = data + System.lineSeparator();\r\n }\r\n return data;\r\n }", "public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }", "public void showData_Duda(JSONArray arrayData, String fNip, String fNama, String Ftjis, String ftjanak) {\n\t\t//System.out.println(arrayData);\n\t\tSystem.out.println(\"+--------------------------------------------------------------------------------------+\");\n\t\tSystem.out.println(\"| NIP | Nama |Tunjangan Istri| Tunjangan Anak |\");\n\t\tSystem.out.println(\"+--------------------------------------------------------------------------------------+\");\n\t\tString space;\n\t\tint tamp;\n\n\t\tfor (int i = 0; i < arrayData.length(); i++) {\n\t\t\tJSONObject obj = arrayData.getJSONObject(i);\t\n\n\t\t\tspace=(String) obj.get(fNip);\n\t\t\tSystem.out.print(\"| \"+space);\n\n\t\t\tspace=(String) obj.get(fNama);\n\t\t\tspace = space.trim();\n\t\t\tSystem.out.print(\" | \"+space);\n\t\t\tfor (int j = 0; j <27-(space.length()); j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\n\t\t\ttamp =(int) obj.get(Ftjis);\n\t\t\tspace =space.valueOf(tamp);\n\t\t\tSystem.out.print(\" | \"+ space);\n\t\t\tfor (int j = 0; j <8-(space.length()); j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\ttamp =(int) obj.get(ftjanak);\n\t\t\tspace =space.valueOf(tamp);\n\t\t\tSystem.out.print(\"| \"+space);\n\t\t\tfor (int j = 0; j <8-(space.length()); j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\n\t\t\tSystem.out.println(\" |\");\n\t\t\tSystem.out.println(\"+--------------------------------------------------------------------------------------+\");\n\t\t}\n\t}", "public boolean hasNamaKelas() {\n return fieldSetFlags()[9];\n }", "private void naolopkhachhangtrvaotextfield() {\n\t\t\n\t\tint row=table.getSelectedRow();\n\t\ttry {\n\t\t\ttxtmakhhm.setText(table.getValueAt(row, 0).toString());\n\t\t\tjava.util.Date date=new SimpleDateFormat(\"yyyy-MM-dd\").parse((String) table.getValueAt(row, 5).toString());\n\t\t\tjdcNgaytra.setDate(date);\n\t\t\t\n\t\t\ttxtTinhtrang.setText(table.getValueAt(row, 6).toString());\n\t\t\tif(txtTinhtrang.getText().equalsIgnoreCase(\"\"))\n\t\t\t\ttxtTinhtrang.setText(\"\");\n\t\t\t\n\t\t\ttxtGhichu.setText(table.getValueAt(row, 7).toString());\n\t\t\tif(txtGhichu.getText().equalsIgnoreCase(\"\"))\n\t\t\t\ttxtGhichu.setText(\"\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\t//JOptionPane.showMessageDialog(this,\"bạn cần chọn dòng cần sửa !\");\n\t\t\treturn ;\n\t\t}\n\t}", "public boolean hapusdata (String nama){\n return data.delete(nama_table, kolom1+\"=\\\"\"+nama+\"\\\"\",null)>0;\n }", "public transaksi() {\n initComponents();\n judul();\n tampildata();\n judulbarang();\n tampilbarang();\n reset();\n autokode();\n total();\n lkembali.setText(\"Rp. 0\");\n bcek.requestFocus();\n ltgl.setText(hari); \n bhapus.setVisible(false);\n bedit.setVisible(false);\n bbeli.setVisible(true);\n breset.setVisible(true);\n }", "public Vector addJumMhsYgSudahHeregistrasi(Vector vListInfoKelas) {\n\n \t/*\n \t * unreusable cuma adhock fix\n \t */\n \tif(vListInfoKelas!=null && vListInfoKelas.size()>0) {\n \t\t/*\n\t\t\t * tambah jumlah mhs perkelas ke dalam brs;\n\t\t\t */\n\t\t\tListIterator li = vListInfoKelas.listIterator();\n \t\ttry {\n \t\t\tContext initContext = new InitialContext();\n \t\t\tContext envContext = (Context)initContext.lookup(\"java:/comp/env\");\n \t\t\tds = (DataSource)envContext.lookup(\"jdbc\"+beans.setting.Constants.getDbschema());\n \t\t\tcon = ds.getConnection();\n \t\t\tstmt = con.prepareStatement(\"select NPMHS from DAFTAR_ULANG where THSMS=? and NPMHS=?\");\n \t\t\twhile(li.hasNext()) {\n \t\t\t\tString brs = (String)li.next();\n \t\t\t\t//System.out.println(\"brs=\"+brs);\n \t\t\t\tStringTokenizer st = new StringTokenizer(brs,\"$\");\n \t\t\tString kodeGabungan=st.nextToken();\n \t\t\tString idkmk1=st.nextToken();\n \t\t\tString idkur1=st.nextToken();\n \t\t\tString kdkmk1=st.nextToken();\n \t\t\tString nakmk1=st.nextToken();\n \t\t\tString thsms1=st.nextToken();\n \t\t\tString kdpst1=st.nextToken();\n \t\t\tString shift1=st.nextToken();\n \t\t\tString norutKlsPll1=st.nextToken();\n \t\t\tString initNpmInput1=st.nextToken();\n \t\t\tString latestNpmUpdate1=st.nextToken();\n \t\t\tString latesStatusInfo1=st.nextToken();\n \t\t\tString currAvailStatus1=st.nextToken();\n \t\t\tString locked1=st.nextToken();\n \t\t\tString npmdos1=st.nextToken();\n \t\t\tString nodos1=st.nextToken();\n \t\t\tString npmasdos1=st.nextToken();\n \t\t\tString noasdos1=st.nextToken();\n \t\t\tString canceled1=st.nextToken();\n \t\t\tString kodeKelas1=st.nextToken();\n \t\t\tString kodeRuang1=st.nextToken();\n \t\t\tString kodeGedung1=st.nextToken();\n \t\t\tString kodeKampus1=st.nextToken();\n \t\t\tString tknHrTime1=st.nextToken();\n \t\t\tString nmdos1=st.nextToken();\n \t\t\tString nmasdos1=st.nextToken();\n \t\t\tString enrolled1=st.nextToken();\n \t\t\tString maxEnrolled1=st.nextToken();\n \t\t\tString minEnrolled1=st.nextToken();\n \t\t\tString subKeterKdkmk1=st.nextToken();\n \t\t\tString initReqTime1=st.nextToken();\n \t\t\tString tknNpmApr1=st.nextToken();\n \t\t\tString tknAprTime1=st.nextToken();\n \t\t\tString targetTtmhs1=st.nextToken();\n \t\t\tString passed1=st.nextToken();\n \t\t\t\tString rejected1=st.nextToken();\n \t\t\t\tString konsen1=st.nextToken();\n \t\t\t\tString nmpst1=st.nextToken();\n \t\t\t\tString listNpm=st.nextToken();\n \t\t\t\tStringTokenizer st1 = new StringTokenizer(listNpm,\",\");\n \t\t\t\tString listNpmHer = null;\n \t\t\t\twhile(st1.hasMoreTokens()) {\n \t\t\t\t\tString npm = st1.nextToken();\n \t\t\t\t\tstmt.setString(1,thsms1);\n \t\t\t\t\tstmt.setString(2,npm);\n \t\t\t\t\trs = stmt.executeQuery();\n \t\t\t\t\t\n \t\t\t\t\tif(rs.next()) {\n \t\t\t\t\t\tif(listNpmHer==null) {\n \t\t\t\t\t\t\tlistNpmHer = \"\";\n \t\t\t\t\t\t}\n \t\t\t\t\t\tlistNpmHer = listNpmHer+\",\"+npm;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif(listNpmHer==null) {\n \t\t\t\t\tlistNpmHer = \"null\";\n \t\t\t\t}\n \t\t\t\tli.set(brs+\"$\"+listNpmHer);\n \t\t\t\t//System.out.println(\"listNpmHer=\"+listNpmHer);\n \t\t\t\t//System.out.println(thsms1+\"$\"+kdpst1+\"$\"+kdkmk1);\n \t\t\t\t//System.out.println(brs+\"$\"+i);\n \t\t\t}\n \t\t\t\n \t\t}\n \t\tcatch (NamingException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tcatch (SQLException ex) {\n \t\t\tex.printStackTrace();\n \t\t} \n \t\tfinally {\n \t\t\tif (rs!=null) try { rs.close(); } catch (Exception ignore){}\n \t\t\tif (stmt!=null) try { stmt.close(); } catch (Exception ignore){}\n \t\t\tif (con!=null) try { con.close();} catch (Exception ignore){}\n \t\t}\n \t}\n \treturn vListInfoKelas;\n }", "public void setNamaHari(java.lang.CharSequence value) {\n this.nama_hari = value;\n }", "public Value.Builder setNamaHari(java.lang.CharSequence value) {\n validate(fields()[10], value);\n this.nama_hari = value;\n fieldSetFlags()[10] = true;\n return this;\n }", "private void tampilkan() {\n //To change body of generated methods, choose Tools | Templates.\n DefaultTableModel tabelpegawai = new DefaultTableModel();\n tabelpegawai.addColumn(\"NAMA\");\n tabelpegawai.addColumn(\"ALAMAT\");\n tabelpegawai.addColumn(\"HP\");\n tabelpegawai.addColumn(\"BBM\");\n tabelpegawai.addColumn(\"SITUS\");\n \n \n try {\n conek getCnn = new conek();\n con= null;\n con= (com.mysql.jdbc.Connection) getCnn.getConnection();\n String sql = \"select * from toko \";\n Statement stat = con.createStatement();\n ResultSet res=stat.executeQuery(sql);\n while (res.next()){\n tabelpegawai.addRow(new Object[]{res.getString(1),res.getString(2),res.getString(3),res.getString(4),res.getString(5)});\n }\n jTable1.setModel(tabelpegawai);\n } catch(Exception e){}\n }", "public static List<Kontak> getKontakData() {\n // Mendeklarasikan varibel ArrayList berjenis Kontak\n ArrayList<Kontak> listKontak = new ArrayList<>();\n // Melakukan perulangan sebanyak jumlah data(10 kali)\n for (int i = 0; i < nama.length; i++) {\n // Membuat objek Kontak\n Kontak kontak = new Kontak();\n // Mengisi data setiap atribut menggunakan setter()\n kontak.setFoto(foto[i]);\n kontak.setNama(nama[i]);\n kontak.setNoTelepon(noTelepon[i]);\n kontak.setEmail(email[i]);\n\n // Menambahkan objek kontak ke dalam ArrayList Kontak\n listKontak.add(kontak);\n }\n // Mengembalikan nilai ArrayList Kontak\n return listKontak;\n }", "public void testTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(); \n\n\t\tshowData_skpp(data,\"penerbit\",\"jumlah_surat\");\n\t}", "public void setNamaKelas(java.lang.CharSequence value) {\n this.nama_kelas = value;\n }", "public void summary() {\r\n System.out.println(this.nama + \" usia \" + this.usia + \" tahun bekerja di Perusahaan \" + Employee.perusahaan);\r\n System.out.println(\"Memiliki total gaji \" + (Employee.pendapatan + Employee.lembur));\r\n }", "public void tampilKarakterA(){\r\n System.out.println(\"Saya mempunyai kaki empat \");\r\n }", "public void Get() { ob = ti.Get(currentrowi, \"persoana\"); ID = ti.ID; CNP = ob[0]; Nume = ob[1]; Prenume = ob[2]; }", "public String getnom ()\n {\n return nom_et;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn getAdi()+\" \"+plakaNo;\r\n\t}", "public void tabelaktivitas() {\n DefaultTableModel tbl= new DefaultTableModel();\n tbl.addColumn(\"Group\");\n tbl.addColumn(\"Compart\");\n tbl.addColumn(\"Activity\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Harga\");\n tbl.addColumn(\"Total\");\n tblaktivitas.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblaktivitas\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"nama_grup\"),\n res.getString(\"compart\"),\n res.getString(\"pekerjaan\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"total\")\n });\n tblaktivitas.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n }" ]
[ "0.6974227", "0.6887414", "0.68542874", "0.6747913", "0.67458516", "0.6713167", "0.6682792", "0.66731346", "0.663455", "0.6633325", "0.6629656", "0.6598963", "0.659884", "0.6593148", "0.6576023", "0.65583324", "0.65515304", "0.6535686", "0.65314513", "0.6523747", "0.6474066", "0.6459063", "0.640517", "0.6399358", "0.63768387", "0.63763505", "0.6370829", "0.63659924", "0.6363297", "0.6353002", "0.63429505", "0.6308937", "0.6287425", "0.6269505", "0.6269298", "0.6262459", "0.6259064", "0.6249895", "0.6247442", "0.62366897", "0.6234359", "0.6225774", "0.6221835", "0.6219429", "0.62108094", "0.6186741", "0.61831063", "0.61705935", "0.61703914", "0.6167327", "0.6156437", "0.6156088", "0.6133989", "0.6132624", "0.61174625", "0.61061484", "0.60987985", "0.6092123", "0.60819703", "0.60819703", "0.60819244", "0.60698605", "0.6065551", "0.60622996", "0.60556334", "0.60512996", "0.6046435", "0.60461783", "0.60383874", "0.6020156", "0.6019722", "0.6015038", "0.6009841", "0.6007835", "0.59833133", "0.5972212", "0.5958587", "0.5957025", "0.5949107", "0.59443516", "0.59423494", "0.59410745", "0.5932041", "0.59278417", "0.5925312", "0.59234565", "0.59212995", "0.59155506", "0.5913136", "0.5909566", "0.59063137", "0.58929867", "0.5889759", "0.588931", "0.5888831", "0.58863485", "0.58721155", "0.5865099", "0.5863611", "0.5860472", "0.58550113" ]
0.0
-1
KProgressHUD hud = new KProgressHUD(this); Utils.showProgressBar(hud, null, null, false);
private void showBadge(String id){ AndroidNetworking.post(Server.getURL_BadgeIndicator) .addBodyParameter("id_so", id) .build() .getAsOkHttpResponseAndObject(BadgeModel.class, new OkHttpResponseAndParsedRequestListener<BadgeModel>() { @Override public void onResponse(Response okHttpResponse, BadgeModel response) { if (okHttpResponse.isSuccessful()){ // hud.dismiss(); String b1,b2,b3,b4; b1 = response.getData().getSuratMasuk(); b2 = response.getData().getSuratDisposisi(); b3 = response.getData().getNotaDinas(); b4 = response.getData().getNotaDisposisi(); int total,i1,i2,i3,i4; i1 = Integer.parseInt(b1); i2 = Integer.parseInt(b2); i3 = Integer.parseInt(b3); i4 = Integer.parseInt(b4); total = i1+i2+i3+i4; if (i1 > 99){ b1 = "99+"; } if (i2 > 99){ b2 = "99+"; } if (i3 > 99){ b3 = "99+"; } if (i4 > 99){ b4 = "99+"; } if (!b1.equals("0")){ txtB1.setText(b1); badge_surat.setVisibility(View.VISIBLE); }else{ badge_surat.setVisibility(View.GONE); } if (!b2.equals("0")){ txtB2.setText(b2); badge_sd.setVisibility(View.VISIBLE); }else{ badge_sd.setVisibility(View.GONE); } if (!b3.equals("0")){ txtB3.setText(b3); badge_nota.setVisibility(View.VISIBLE); }else { badge_nota.setVisibility(View.GONE); } if (!b4.equals("0")){ txtB4.setText(b4); badge_nd.setVisibility(View.VISIBLE); }else { badge_nd.setVisibility(View.GONE); } // if (total > 0){ // ShortcutBadger.applyCount(MainActivity.this, total); // Intent intent = new Intent(Intent.ACTION_MAIN); // intent.addCategory(Intent.CATEGORY_HOME); // ResolveInfo resolveInfo = getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); // String currentPackage = resolveInfo.activityInfo.packageName; // } } } @Override public void onError(ANError anError) { // hud.dismiss(); badge_surat.setVisibility(View.GONE); badge_sd.setVisibility(View.GONE); badge_nota.setVisibility(View.GONE); badge_nd.setVisibility(View.GONE); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "void onShowProgress();", "@Override\n public void showProgress() {\n\n }", "private void showProgressIndicator() {\n setProgressBarIndeterminateVisibility(true);\n setProgressBarIndeterminate(true);\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(DangKyActivity.this);\n pDialog.setMessage(\"Vui lòng đợi trong giây lát...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "void showProgress();", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n if (null != hud)\n hud.showHUD();\n }", "private void showSpinerProgress() {\n dialog.setMessage(\"Loading\");\n//\n// dialog.setButton(ProgressDialog.BUTTON_POSITIVE, \"YES\", new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n//\n// }\n// });\n\n //thiet lap k the huy - co the huy\n dialog.setCancelable(false);\n\n //show dialog\n dialog.show();\n Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n dialog.dismiss();\n }\n }, 20000000);\n }", "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "public void showProgress2(){\n// if (mHandler==null){\n// mHandler = new Handler(Looper.getMainLooper());\n// }\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n loadingDialog = new Dialog(BaseActivity.this);\n loadingDialog.setTitle(\"Loading data..\");\n loadingDialog.setContentView(R.layout.loading);\n loadingDialog.show();\n\n }\n });\n// mHandler.post(new Runnable() {\n// @Override\n// public void run() {\n// loadingDialog = new Dialog(BaseActivity.this);\n// loadingDialog.setTitle(\"Loading data..\");\n// loadingDialog.setContentView(R.layout.loading);\n// loadingDialog.show();\n//\n// }\n// });\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n progress = new ProgressDialog(activity);\n progress.setMessage(\"please wait.. \");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.setIndeterminate(true);\n progress.setCancelable(false);\n progress.show();\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n showProgressDialog(R.string.please_wait);\n //showDialog(progress_bar_type);\n }", "protected void showLoading()\n {\n progressBar = new ProgressDialog(this);\n progressBar.setTitle(\"Loading\");\n progressBar.setMessage(\"Wait while loading...\");\n progressBar.setCancelable(false); // disable dismiss by tapping outside of the dialog\n progressBar.show();\n }", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "@Override\n protected void onPreExecute() {\n mProgressBar.setVisibility(View.VISIBLE);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n /* mProgress.setMessage(\"Please Wait\");\n mProgress.setCancelable(false);\n mProgress.show();*/\n String msg = \"Please Wait....\";\n cd.showProgressDialog(msg);\n }", "@Override\r\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(MainActivity.this, \"Error\", Toast.LENGTH_SHORT).show();\r\n hideProgress();\r\n }", "void showModalProgress();", "private void ini_Progressbar()\r\n\t{\r\n\r\n\t\tfloat ref = UiSizes.that.getWindowHeight() / 13;\r\n\t\tCB_RectF CB_LogoRec = new CB_RectF(this.getHalfWidth() - (ref * 2.5f), this.getHeight() - ((ref * 5) / 4.11f) - ref, ref * 5,\r\n\t\t\t\t(ref * 5) / 4.11f);\r\n\r\n\t\t// CB_Logo = new Image(CB_LogoRec, \"CB_Logo\");\r\n\t\t// CB_Logo.setDrawable(new SpriteDrawable(atlas.createSprite(\"cachebox-logo\")));\r\n\t\t// this.addChild(CB_Logo);\r\n\r\n\t\tString VersionString = Global.getVersionString();\r\n\t\tTextBounds bounds = Fonts.getNormal().getMultiLineBounds(VersionString + Global.br + Global.br + Global.splashMsg);\r\n\t\tdescTextView = new Label(0, CB_LogoRec.getY() - ref - bounds.height, this.getWidth(), bounds.height + 10, \"DescLabel\");\r\n\t\t// HAlignment.CENTER funktioniert (hier) (noch) nicht, es kommt rechtsbündig raus\r\n\t\tdescTextView.setWrappedText(VersionString + Global.br + Global.br + Global.splashMsg);\r\n\t\tdescTextView.setHAlignment(HAlignment.CENTER);\r\n\t\tthis.addChild(descTextView);\r\n\r\n\t\tDrawable ProgressBack = new NinePatchDrawable(atlas.createPatch(\"btn-normal\"));\r\n\t\tDrawable ProgressFill = new NinePatchDrawable(atlas.createPatch(\"progress\"));\r\n\r\n\t\tfloat ProgressHeight = Math.max(ProgressBack.getBottomHeight() + ProgressBack.getTopHeight(), ref / 1.5f);\r\n\r\n\t\tprogress = new ProgressBar(new CB_RectF(0, 0, this.getWidth(), ProgressHeight), \"Splash.ProgressBar\");\r\n\r\n\t\tprogress.setBackground(ProgressBack);\r\n\t\tprogress.setProgressFill(ProgressFill);\r\n\t\tthis.addChild(progress);\r\n\r\n\t\tfloat logoCalcRef = ref * 1.5f;\r\n\r\n\t\tCB_RectF rec_Mapsforge_Logo = new CB_RectF(200, 50, logoCalcRef, logoCalcRef / 1.142f);\r\n\t\tCB_RectF rec_FX2_Logo = new CB_RectF(rec_Mapsforge_Logo);\r\n\t\tfloat w = logoCalcRef * 2.892655367231638f;\r\n\t\tCB_RectF rec_LibGdx_Logo = new CB_RectF(this.getHalfWidth() - (w / 2), 50, w, w);\r\n\r\n\t\trec_FX2_Logo.setX(400);\r\n\r\n\t\tLasifant = new LasifantAnimation(rec_LibGdx_Logo, \"LibGdx_Logo\");\r\n\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-1\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-2\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-3\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-4\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-5\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-6\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-7\"));\r\n\t\tLasifant.addLastFrame(atlas.createSprite(\"logo-8\"));\r\n\r\n\t\tLasifant.play();\r\n\r\n\t\tthis.addChild(Lasifant);\r\n\r\n\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n progressBar.setVisibility(View.VISIBLE);\n\n // updating progress bar value\n progressBar.setProgress(progress[0]);\n\n // updating percentage value\n txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t \n\t progressDialog= new Dialog(ListKotaActivity.this);\n\t progressDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n\t progressDialog.setContentView(R.layout.progress);\n\t progressDialog.setCancelable(false);\n\t progressDialog.show();\t \n\t }", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n progress = new ProgressDialog(activity);\n progress.setMessage(\"registering..... \");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.setIndeterminate(true);\n progress.setCancelable(false);\n progress.show();\n\n }", "public void showProgressDialog() {\r\n progressDialog.setMessage(getResources().getString(R.string.text_loading));\r\n progressDialog.setCancelable(false);\r\n progressDialog.show();\r\n }", "void showProgressDialog();", "void showProgressDialog();", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//progreso.setVisibility(View.VISIBLE);\n\t\t\tsetProgressBarIndeterminateVisibility(true);\n\t\t}", "void showMainLoadingWheel();", "private void startProgressBar() {\n\t b_buscar.setVisibility(View.GONE);\n\t // wi_progreso.setVisibility(View.VISIBLE);\n\t ly_progreso.setVisibility(View.VISIBLE);\n\t}", "@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }", "@Override\n protected void onPreExecute() {\n pDialog = new ProgressDialog(getActivity());\n pDialog.setMessage(\"Please wait...\");\n pDialog.setCancelable(false);\n pDialog.setIndeterminate(false);\n pDialog.setMax(100);\n pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n pDialog.show();\n// progressBar.setVisibility(View.VISIBLE);\n// progressBar.setProgress(0);\n super.onPreExecute();\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(RegisterActivity.this);\n pDialog.setMessage(\"Signing Up.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showProgressDialog()\n {\n if (showProgressDialog && !getStatus().equals(AsyncTask.Status.FINISHED)) {\n //show the dialog if valid activity. If the OS is lollipop or higher then set the theme.\n //dialog = ProgressDialog.show(activity, \"In progress..\", message, true);\n if (Build.VERSION.SDK_INT >= 21) {\n dialog = new ProgressDialog(activity, R.style.progressoAlertDialogStyle);\n dialog.setTitle(\"In progress..\");\n dialog.setMessage(message);\n dialog.setIndeterminate(true);\n dialog.show();\n }\n else {\n dialog = ProgressDialog.show(activity, \"In progress..\", message, true);\n }\n\n dialog.setCancelable(false);\n } \n }", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n mMainActivity.showProgressBar();\n }", "public void showLoading() {\n }", "public void showProgressDialog() {\n try {\n if (progressDialog == null) {\n try {\n progressDialog = new ProgressDialog(self);\n progressDialog.show();\n progressDialog.setCancelable(false);\n } catch (Exception e) {\n progressDialog = new ProgressDialog(self.getParent());\n progressDialog.show();\n progressDialog.setCancelable(false);\n e.printStackTrace();\n }\n } else {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }\n } catch (Exception e) {\n progressDialog = new ProgressDialog(self);\n progressDialog.show();\n progressDialog.setCancelable(false);\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "public void loadingGet(final View v){\n int max = 100;\n progressBar = new ProgressDialog(v.getContext());\n progressBar.setCancelable(false);\n progressBar.setMessage(\"In Progress ...\");\n progressBar.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressBar.setMax(max);\n for (int i = 0; i <= max; i++) {\n progressBar.setProgress(i);\n if (i == max ){\n progressBar.dismiss();\n }\n progressBar.show();\n }\n // Create a Handler instance on the main thread\n final Handler handler = new Handler();\n\n // Create and start a new Thread\n new Thread(new Runnable() {\n public void run() {\n try{\n getRemittanceOIC();\n Thread.sleep(10000);\n }\n catch (Exception e) { } // Just catch the InterruptedException\n\n handler.post(new Runnable() {\n public void run() {\n progressBar.dismiss();\n final AlertDialog.Builder builder =\n new AlertDialog.Builder(Remittancetooic.this);\n builder.setTitle(\"Information confirmation\")\n .setMessage(\"Data has been successfully updated, thank you.\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n recreate();\n dialog.dismiss();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n // Create the AlertDialog object and show it\n builder.create();\n builder.setCancelable(false);\n builder.show();\n }\n });\n }\n }).start();\n }", "public void startProgressBar(View v) {\r\n\t\tshowDialog(1);\r\n\t\tnew Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (setValues()) {\r\n\t\t\t\t\t\tdismissDialog(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdismissDialog(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tSystem.out.println(\"Found an exception: \" + e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}).start();\r\n\t}", "@Override\n\t\t \tprotected void onPreExecute() {\n\t\t try {\n\t\t\t \tpd=new ProgressDialog(Styles_Dialog.this);\n\t\t\t \tpd.setMessage(\"Loading\");\n\t\t\t \tpd.show();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \t\n\t\t \t}", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging In.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\n protected void onPreExecute() {\n\n\n dialog = new ProgressDialog(MainArea.this);\n dialog.setTitle(\"Loading Results\");\n dialog.setMessage(\"Please Wait Results Are Loading For You....\");\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n super.onPreExecute();\n }", "public static void updateProgressBar() {\r\n mHandler.postDelayed(mUpdateTime, 100);\r\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(AddReviewActivity.this);\n pDialog.setMessage(\"Adding Review...Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "public void initProgressLoader() {\n progressDialog = new ProgressDialog(this);\n progressDialog.setIndeterminate(true);\n progressDialog.setCancelable(false);\n }", "@Override\n \t\tprotected void onPreExecute() \n \t\t{\n \t\t\t//Create a new progress dialog\n \t\t\tprogressDialog = new ProgressDialog(MainActivity.this);\n \t\t\t//Set the progress dialog to display a horizontal progress bar \n \t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n \t\t\t//Set the dialog title to 'Loading...'\n \t\t\tprogressDialog.setTitle(\"Loading Game...\");\n \t\t\t//Set the dialog message to 'Loading application View, please wait...'\n \t\t\tprogressDialog.setMessage(\"Please wait...\");\n \t\t\t//This dialog can't be canceled by pressing the back key\n \t\t\tprogressDialog.setCancelable(false);\n \t\t\t//This dialog isn't indeterminate\n \t\t\tprogressDialog.setIndeterminate(false);\n \t\t\t//The maximum number of items is 100\n \t\t\tprogressDialog.setMax(100);\n \t\t\t//Set the current progress to zero\n \t\t\tprogressDialog.setProgress(0);\n \t\t\t//Display the progress dialog\n \t\t\tprogressDialog.show();\n \t\t}", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t //this method will be running on UI thread\n\t mProgressBar.setVisibility(View.VISIBLE);\n\t }", "public void showProgress(){\n loadMainActivity.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.INVISIBLE);\n }", "public void onShutter()\n {\n mProgressContainer.setVisibility(View.VISIBLE);\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tprogressBar.setVisibility(View.VISIBLE);\n\n\t\t\t// updating progress bar value\n\t\t\tprogressBar.setProgress(progress[0]);\n\n\t\t\t// updating percentage value\n\t\t\ttxtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n\t\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tprogressBar.setVisibility(View.VISIBLE);\n\t\ttv.setVisibility(View.VISIBLE);\n\t\tsuper.onPreExecute();\n\t}", "public void showProgressDialog() {\n showProgressDialog(null);\n }", "private void buildProgressBar() {\r\n try {\r\n if (pBarVisible == true) {\r\n progressBar = new ViewJProgressBar(srcImage.getImageName(), \"Regularized Isotropic Diffusion ...\",\r\n 0, 100, true, this, this);\r\n int xScreen = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n int yScreen = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n progressBar.setLocation(xScreen / 2, yScreen / 2);\r\n progressBar.setVisible(true);\r\n }\r\n }\r\n catch (NullPointerException npe) {\r\n if (Preferences.debugLevel(Preferences.DEBUG_ALGORITHM)) {\r\n Preferences.debug(\r\n \"AlgorithmRegularizedIsotropicDiffusion: NullPointerException found while building progress bar.\");\r\n\r\n }\r\n } // end buildProgressBar()\r\n }", "@Override\n public void onClick(View view) {\n progressStatus = 0;\n\n // Start the lengthy operation in a background thread\n new Thread(new Runnable() {\n @Override\n public void run() {\n while (progressStatus < 100) {\n // Update the progress status\n progressStatus += 1;\n }\n\n //Try to sleep the thread for 30 milliseconds\n try {\n Thread.sleep(30);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Update the progress bar\n handler.post(new Runnable() {\n @Override\n public void run() {\n pgb.setProgress(progressStatus);\n }\n });\n }\n }).start();// Start the operation\n }", "@Override\n protected void onPreExecute() {\n mProgressbar.setVisibility(View.VISIBLE);\n }", "public void showProgressDialog() {\n if (mProgressDialog == null) {\n mProgressDialog = new ProgressDialog(this);\n mProgressDialog.setCancelable(false);\n mProgressDialog.setCanceledOnTouchOutside(false);\n mProgressDialog.setMessage(getString(R.string.msg_loading));\n mProgressDialog.setIndeterminate(true);\n }\n mProgressDialog.show();\n }", "@Override\n\tprotected void onPreExecute() {\n\t\t\n\t\t pDialog = new ProgressDialog(context);\n\t\t\ttry{\n\t\t\t\tthis.pDialog.setMessage(\"Please wait ...\");\n\t\t this.pDialog.setIndeterminateDrawable(context.getResources().getDrawable(R.drawable.red_progress));\n\t\t this.pDialog.setIndeterminate(false);\n\t\t this.pDialog.setCancelable(false);\n\t\t this.pDialog.show();\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n imageProvider.setUploading_status((float) progress[0]);\n // updating progress bar value\n if(progressBar != null) {\n if(progress[0] >= 100 && imageProvider.getUploaded()) {\n progressBar.setVisibility(View.INVISIBLE);\n }\n progressBar.setProgress(progress[0]);\n }\n if(progress[0] >= 100 && haze!= null && imageProvider.getUploaded()){\n haze.setAlpha(0f);\n }\n if(progress[0] >= 100 && refreshImageButton!=null && !imageProvider.getUploaded()){\n refreshImageButton.setVisibility(View.INVISIBLE);\n }\n // updating percentage value\n //txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progress.setVisibility(ProgressBar.VISIBLE);\n }", "@Override\n\t\t\tprotected void onPreExecute() {\n\t \t\tprogressBar = new ProgressDialog(SiQuoiaLeaderboardActivity.this);\n\t\t\t\tprogressBar.setIndeterminate(true);\n\t\t\t\tprogressBar.setCancelable(false);\n\t\t\t\tprogressBar.setMessage(\"Getting Leaderboard.\");\n\t\t\t\tprogressBar.show();\t\t\t\n\t\t\t}", "@Override\r\n\t protected void onPreExecute() {\n\t super.onPreExecute();\r\n\t progressDialog = new ProgressDialog(UDMap.this);\r\n\t progressDialog.setMessage(\"Loading the best way...\");\r\n\t progressDialog.setIndeterminate(true);\r\n\t progressDialog.show();\r\n\t }", "public void onPreExecute() {\n progressDialog.show();\n }", "@Override\r\n\tprotected void onProgressUpdate(String... s) {\r\n\t\tactivity.addToGUI(s[0]);\r\n\t}", "@Override\n\tpublic void onProgressUpdate() {\n\n\t}", "@Override\n\t\tpublic void onShutter() {\n\t\t\tmProgressContainer.setVisibility(View.VISIBLE);\n\t\t}", "public interface DevLoadingViewManager {\n\n void showMessage(final String message);\n\n void updateProgress(\n final @Nullable String status, final @Nullable Integer done, final @Nullable Integer total);\n\n void hide();\n}", "protected void createProgressDialog() {\r\t\tif (pd == null) {\r\t\t\tpd = new ProgressDialog(this);\r\t\t\tpd.setCanceledOnTouchOutside(false);\r\t\t\tpd.getWindow().setGravity(Gravity.CENTER);\r\t\t\tpd.setOnCancelListener(new DialogInterface.OnCancelListener() {\r\t\t\t\t@Override\r\t\t\t\tpublic void onCancel(DialogInterface dialogInterface) {\r\t\t\t\t\tonPdCancel();\r\t\t\t\t}\r\t\t\t});\r\t\t}\r\t}", "public void showProgressDialog() {\n pd = new ProgressDialog(this);\n pd.setMessage(\"Renting film...\");\n pd.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//\t\t\tmProgress.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t progressDialog = new AutoTuningInitDialog(mChannelActivity, R.style.dialog);\n\t\t\tprogressDialog.show();\t\t\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tprogressDialog = new ProgressDialog(context);\n\t\t\t\t\t\t\tprogressDialog.setCancelable(true);\n\t\t\t\t\t\t\tprogressDialog.setMessage(context.getString(R.string.initialising_runtime));\n\t\t\t\t\t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t\t\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\t\t\t\t\tprogressDialog.show();\n\t\t\t\t\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n /*mProgress.setMessage(\"Please Wait\");\n mProgress.show();\n mProgress.setCancelable(false);*/\n }", "@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(AddFoodAdvActivity.this);\n dialog.setMessage(\"Please Wait...!\");\n dialog.show();\n super.onPreExecute();\n }", "private void showProgressDialog() {\n if (progressDialog == null) {\n progressDialog = new ProgressDialog(getContext());\n }\n\n progressDialog.setTitle(R.string.dialog_title);\n progressDialog.setMessage(getResources().getString(R.string.dialog_message));\n progressDialog.setCancelable(false);\n progressDialog.show();\n }", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "private void showDialog(){\n progress = new ProgressDialog(this);\n progress.setTitle(getString(R.string.progress_dialog_loading));\n progress.setMessage(getString(R.string.progress_dialog_authenticating_with_firebase));\n progress.setCancelable(false);\n progress.show();\n }", "@Override\n public void showProgressSync() {\n }", "public void showCustomLoadingDialog() {\n\n //..show gif\n viewDialog.showDialog();\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n //...here i'm waiting 5 seconds before hiding the custom dialog\n //...you can do whenever you want or whenever your work is done\n viewDialog.hideDialog();\n }\n }, 1000);\n }", "@Override\n protected void onPreExecute() {\n\n super.onPreExecute();\n // Show progress overlay (with animation):\n// AndroidUtils.animateView(progressOverlay, View.VISIBLE, 0.4f, 200);\n\n }", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "@Override\r\n \tprotected void onPreExecute() {\n \t\tsuper.onPreExecute();\r\n \t\tpdia = new ProgressDialog(Regmember.this);\r\n \t\tpdia.setCanceledOnTouchOutside(false);\r\n pdia.setMessage(\"Dhiraj rakh..........\");\r\n pdia.show(); \r\n \t}", "@Override\n\t\t/*\n\t\t * UI线程执行\n\t\t */\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t// 取出发布进度的值\n\t\t\tint value = values[0];\n\t\t\t// 设置给Button\n\t\t\tbtn.setText(\"\" + value);\n\t\t\tpb.setProgress(value);\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(MainActivity.this);\n pDialog.setMessage(\"Getting Trees...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "private void progressBarLoading() {\n new Thread(new Runnable() {\n public void run() {\n while (progressStatus < 100) {\n progressStatus += 1;\n handler.post(new Runnable() {\n public void run() {\n progressBar.setProgress(progressStatus);\n }\n });\n try {\n Thread.sleep(30);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n if (progressStatus == 100) {\n //intent for go next page\n MainActivityGo = new Intent(getApplicationContext(),MainActivity.class);\n startActivity(MainActivityGo);\n }\n }\n }).start();\n }", "@Override\n protected void onPreExecute(){\n super.onPreExecute();\n count++;\n //pg = new progressDialog(MainActivity.this);\n //pg.show();\n }", "@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(context);\n dialog.setTitle(\"Loading Contents\");\n dialog.setMessage(\"Doing something interesting ...\");\n dialog.setIndeterminate(true);\n dialog.setCancelable(false);\n dialog.show();\n }", "@Override\n protected void onPreExecute() {\n pDialog = new ProgressDialog(homeActivity);\n pDialog.setMessage(\"Retrieving Details... \");\n // pDialog.setMax(16);\n pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\n pDialog.setCancelable(false);\n pDialog.show();\n\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n setContentView(R.layout.progressbar);\n rectangleProgressBar=(ProgressBar)findViewById(R.id.rectangleprobar);\n CircleProgressBar=(ProgressBar)findViewById(R.id.circleProgressBar);\n mButton=(Button)findViewById(R.id.probutton);\n \n rectangleProgressBar.setIndeterminate(false); \n CircleProgressBar.setIndeterminate(false); \n \n mButton.setOnClickListener(new Button.OnClickListener()\n {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t rectangleProgressBar.setVisibility(View.VISIBLE); \n\t\t\t\t CircleProgressBar.setVisibility(View.VISIBLE); \n\t \n\t rectangleProgressBar.setMax(100); \n\t rectangleProgressBar.setProgress(0); \n\t CircleProgressBar.setProgress(0); \n\t \n\t //创建一个线程,每秒步长为增加,到100%时停止 \n\t Thread mThread = new Thread(new Runnable() { \n\t \n\t\t\t\t\t\tpublic void run() { \n\t \n\t for(int i=0 ; i < 20; i++){ \n\t try{ \n\t \tcount = (i + 1) * 5 ; \n\t Thread.sleep(1000); \n\t if(i == 19){ \n\t Message msg = new Message(); \n\t msg.what = STOP; \n\t mHandler.sendMessage(msg); \n\t break; \n\t }else{ \n\t Message msg = new Message(); \n\t msg.what = NEXT; \n\t mHandler.sendMessage(msg); \n\t } \n\t }catch (Exception e) { \n\t e.printStackTrace(); \n\t } \n\t } \n\t \n\t } \n\t }); \n\t mThread.start(); \n\t \n\t }});\n \n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n // Showing progress dialog\n pDialog = new ProgressDialog(thisContext);\n pDialog.setMessage(\"Please wait...\");\n pDialog.setCancelable(true);\n pDialog.show();\n\n }", "protected void onPreExecute() {\n fabProgressCircle.show();\n\n\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n mprogress = new ProgressDialog(LoginActivity.this);\n mprogress.setTitle(\"Checking/Downloading Update.\");\n mProgress.setMessage(\"Please Wait\");\n mprogress.setCancelable(false);\n mprogress.setIndeterminate(false);\n mprogress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n mprogress.setMax(100);\n mprogress.show();\n\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n runOnUiThread(()->{\n pDialog = new ProgressDialog(ImageClassificationActivity.this);\n pDialog.setMessage(\"Initializing\");\n pDialog.setIndeterminate(false);\n pDialog.setMax(100);\n pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n pDialog.setCancelable(true);\n pDialog.setOnCancelListener(this);\n pDialog.show();\n });\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\ttry {\n\t\t\t\tdialog.setIndeterminate(false);\n\t\t\t\tdialog.setMax(100);\n\t\t\t\tdialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t\tdialog.setCancelable(false);\n\t\t\t\tdialog.show();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "@Override\n public void onClick(View v) {\n mProgressBar.setVisibility(View.VISIBLE);\n getJokeFromTask();\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "@Override\n protected void onPreExecute() {\n String msg = \"Please Wait....\";\n cd.showProgressDialog(msg);\n\n }" ]
[ "0.7268342", "0.7070909", "0.6995952", "0.69808227", "0.69315237", "0.6925672", "0.6881039", "0.67488503", "0.6665944", "0.66590893", "0.6651918", "0.65978426", "0.65978426", "0.65897524", "0.65714484", "0.65558094", "0.6553093", "0.6546426", "0.65144914", "0.65047914", "0.64922076", "0.64911246", "0.64864975", "0.64860564", "0.64798725", "0.64688873", "0.6463486", "0.6463486", "0.64590186", "0.64559907", "0.6440477", "0.6436238", "0.6434388", "0.6418428", "0.64102924", "0.6406513", "0.64058346", "0.63868743", "0.6373908", "0.63641495", "0.634826", "0.6347769", "0.6341386", "0.6318506", "0.6311326", "0.6293144", "0.628524", "0.6277501", "0.6271125", "0.6267212", "0.6267155", "0.62655544", "0.62608516", "0.62602705", "0.6259718", "0.62487936", "0.6242617", "0.62398326", "0.6238031", "0.62314534", "0.623118", "0.6228022", "0.622725", "0.62271506", "0.6226907", "0.6223219", "0.62211126", "0.6206913", "0.62059265", "0.62056994", "0.61959195", "0.6184304", "0.61758214", "0.6174881", "0.6172227", "0.6168171", "0.6164781", "0.6149045", "0.61457306", "0.61346173", "0.61307454", "0.612872", "0.61268145", "0.61231375", "0.61172915", "0.61169595", "0.6115431", "0.61119616", "0.6109258", "0.6103856", "0.609567", "0.60919416", "0.60736156", "0.6068276", "0.60676897", "0.606619", "0.6065603", "0.60565764", "0.60546935", "0.60546935", "0.60540795" ]
0.0
-1
Menu options to set and cancel the alarm.
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // When the user clicks START ALARM, set the alarm. case R.id.start_action: alarm.setAlarm(this); return true; // When the user clicks CANCEL ALARM, cancel the alarm. case R.id.cancel_action: alarm.cancelAlarm(this); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAlarm (int alarm) { this.alarm = alarm; }", "public void scheduleOptions() {\n System.out.println(\"Would you like to (1) Add an Event, (2) Remove an Event, (3) Exit this menu\");\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setTitle(R.string.default_notify)\n .setSingleChoiceItems(R.array.notify_minutes_array, mTimer,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n mTimer = which;\n }\n })\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n SharedPreferences settings = getSharedPreferences(PREFER, Context.MODE_PRIVATE);\n int oldTimer = settings.getInt(PREFER_TIME_INTERVAL, 0);\n if (mTimer != oldTimer) {\n settings.edit().putInt(PREFER_TIME_INTERVAL, mTimer).apply();\n cancelAlarm();\n if (mTimer != 0) setAlarm(mTimer);\n }\n }\n })\n .setNegativeButton(R.string.cancel, null);\n dialog.show();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "private void cancelAppointment()\n {\n new AlertDialog.Builder(mCtx)\n .setTitle(mCtx.getResources().getString(R.string.cancel_heading))\n .setMessage(mCtx.getResources().getString(R.string.cancle_alert))\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int which)\n {\n\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int which)\n {\n\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "public void setAlarm(int time, String name){\n\t}", "public void setAlarmClock() {\n\n }", "private void setAlarm(Alarm alarm, int flags) {\n // this set alarm based on TimePicker so we need to set Calendar like the\n // trigger time\n // get instant of Calendar\n Calendar myCalendar = Calendar.getInstance();\n Calendar calendar = (Calendar) myCalendar.clone();\n // set current hour for calendar\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour_x());\n // set current minute\n calendar.set(Calendar.MINUTE, alarm.getMinute_x());\n // set current second for calendar\n calendar.set(Calendar.SECOND, 0);\n // plus one day if the time set less than the the Calendar current time\n if (calendar.compareTo(myCalendar) <= 0) {\n calendar.add(Calendar.DATE, 1);\n }\n // get id of alarm and set for PendingIntent to multiply multiple PendingIntent for cancel\n // time, this also put into PendingIntent to compare with the cancel Alarm's id=\n int alarmId = (int) alarm.getId();\n // make intent to broadCast\n Intent intent = new Intent(AlarmsetActivity.this, AlarmReceiver.class);\n // put intent type to check which intent trigger add or cancel\n intent.putExtra(\"intentType\", Constants.ADD_INTENT);\n // put id to intent\n intent.putExtra(\"PendingId\", alarmId);\n // this pendingIntent include alarm id to manage\n PendingIntent alarmIntent = PendingIntent.getBroadcast(AlarmsetActivity.this, alarmId,\n intent, flags);\n // create alarm manager ALARM_SERVICE\n AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // Set alarm, at the trigger time \"calandar.getTimeInMillis\" this pendingIntent will be\n // sent to AlarmReceiver and then sent to alarm service to play music\n // this \"AlarmManager.INTERVAL_DAY\" mean this will set one new alarm at the trigger time\n // setInExactRepeating this may set alarm again and again also this may be not\n // trigger at the right time( at the first second start) but this will save the battery.\n // \"AlarmManager.RTC_WAKEUP\" allow this app wake device from idle time and the time\n // based on device time\n\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, alarmIntent);\n\n }", "@Override\n public void onClick(View view) {\n calendar.set(Calendar.HOUR_OF_DAY, tp.getHour());\n calendar.set(Calendar.MINUTE, tp.getMinute());\n\n //get int value of timepicker selected time\n int hour = tp.getHour();\n int minute = tp.getMinute();\n\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n if (hour > 12) {\n hour_string = String.valueOf(hour - 12);\n }\n\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n //update status box method\n alarm_text(\"Alarm set for \" + hour_string + \":\" + minute_string);\n //put extra string in my_intent\n //tells clock \"set alarm\" button pressed\n my_intent.putExtra(\"extra\", \"alarm on\");\n //create pending intent that delays intent until user selects time\n pending_intent = PendingIntent.getBroadcast(AlarmClock.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n //set alarm manager\n am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n }", "public void viewAlarm() {\n\t\tfinal Dialog dialog = new Dialog(this);\n\t\tdialog.setContentView(R.layout.date_time_picker);\n\t\tdialog.setTitle(\"Set Reminder\");\n\t\tButton saveDate = (Button)dialog.findViewById(R.id.btnSave);\n\t\tsaveDate.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\tsetAlarm(dialog);\n\t\t\t}\n\t\t});\n\t\tdialog.show();\n\t}", "public static void cancelAlarmElapsed() {\n if (alarmManagerElapsed!= null) {\n alarmManagerElapsed.cancel(alarmIntentElapsed);\n }\n }", "public void setAlarm() {\n\t\tid.toAlarm();\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_start_alarm, menu);\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_Save) {\n setalarm();\n return true;\n }\n else if (id == R.id.action_Cancel) {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View v) {\n calendar.set(Calendar.HOUR_OF_DAY, alarm_timepicker.getHour());\n calendar.set(Calendar.MINUTE, alarm_timepicker.getMinute());\n\n // getting the int values of the hour and minute\n int hour = alarm_timepicker.getHour();\n int minute = alarm_timepicker.getMinute();\n\n //converting the int values to strings\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n // 10:4 -> 10:04\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n // method that changes the update text Textbox\n set_alarm_text(\"Alarm set to: \" + hour_string + \":\" + minute_string);\n\n\n // put in extra string into my_intent\n // tells the clock that you pressed the \"alarm on\" button\n my_intent.putExtra(\"extra\", \"alarm on\");\n\n //put in an extra long value into my intent\n //tells the clock that you want a certain value from the\n // dropdown menu/spinners\n my_intent.putExtra(\"alarm_choice\", choose_alarm_sound);\n\n // create a pending intent that delays the intent\n // until the specified calendar time\n pending_intent = PendingIntent.getBroadcast(MainActivity.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //set the alarm manager\n alarm_manager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n\n }", "OnOffSwitch alarmSwitch();", "public void cancelAlarm(Context context, Alarm alarm) {\n // instantiate the system alarm service manager\n alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // instantiate an intent for the AlarmReciever\n Intent intent = new Intent(context, AlarmReceiver.class);\n intent.putExtra(\"alarmId\", alarm.getId());\n // check if the alarm is recurring, if it is each days alarm is canceled by multiplying\n // the id by 10 and adding the integer representation of each day\n if (alarm.isRecurring()) {\n for (Integer day : alarm.getDays()) {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId()).intValueExact() * 10 + day, intent, 0);\n // cancel the scheduled alarm for the intent\n alarmMgr.cancel(alarmIntent);\n }\n // if it isn't recurring, just cancel the one alarm\n } else {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId()).intValueExact() * 10, intent, 0);\n // cancel the scheduled alarm for the intent\n alarmMgr.cancel(alarmIntent);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_alarm_ring, menu);\n return true;\n }", "@Override\n public void onClick(View view) {\n alarm_text(\"Alarm Dismissed\");\n //cancel the alarm\n am.cancel(pending_intent);\n\n //put extra string into my_intent\n //tells clock \"dismiss alarm\" button pressed\n my_intent.putExtra(\"extra\", \"alarm off\");\n\n //stop alarm audio\n sendBroadcast(my_intent);\n }", "private void alarm(String[] command) {\n\t\t// If no arguments set default 5 seconds alarm.\n\t\tif (command.length == 1) {\n\t\t\tAlfred.setAlarmClock(new AlarmClock(5));\n\t\t\t// If one argument.\n\t\t} else if (command.length == 2) {\n\t\t\t// If argument is in the format of 4 digits.\n\t\t\tif (command[1].toLowerCase().matches(\"\\\\d{4}\")) {\n\t\t\t\tif (Integer.parseInt(command[1]) < 2400) {\n\t\t\t\t\tAlfred.setAlarmClock(new AlarmClock(command[1]));\n\t\t\t\t} else\n\t\t\t\t\tSystem.out.println(\"Time must be between 0000 and 2359.\");\n\t\t\t} else if (command[1].toLowerCase().matches(\"^[0-9]\\\\d*$\")) {\n\t\t\t\tAlfred.setAlarmClock(new AlarmClock(Integer\n\t\t\t\t\t\t.parseInt(command[1])));\n\t\t\t}\n\t\t}\n\t\t// If two arguments.\n\t\telse if (command.length == 3) {\n\t\t\tif (command[1].toLowerCase().matches(\"^[0-9]\\\\d*$\")\n\t\t\t\t\t|| command[2].toLowerCase().matches(\"^[0-9]\\\\d*$\")) {\n\t\t\t\t// Alarm set with minutes, seconds arguments.\n\t\t\t\tAlfred.setAlarmClock(new AlarmClock(Integer\n\t\t\t\t\t\t.parseInt(command[1]), Integer.parseInt(command[2])));\n\t\t\t}\n\n\t\t\t// If three arguments.\n\t\t\telse if (command.length == 4) {\n\t\t\t\tif (command[1].toLowerCase().matches(\"^[0-9]\\\\d*$\")\n\t\t\t\t\t\t&& command[2].toLowerCase().matches(\"^[0-9]\\\\d*$\")\n\t\t\t\t\t\t&& command[3].toLowerCase().matches(\"^[0-9]\\\\d*$\")) {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Three arguments currently not supported.\");\n\t\t\t\t\t// Alarm set with hours, minutes, seconds arguments.\n\n\t\t\t\t\t// This crashes with java.lang.NumberFormatException: radix\n\t\t\t\t\t// 1\n\t\t\t\t\t// less than Character.MIN_RADIX.\n\n\t\t\t\t\t// Alfred.setAlarmClock(new AlarmClock(Integer\n\t\t\t\t\t// .parseInt(command[1]), Integer.parseInt(command[2],\n\t\t\t\t\t// Integer.parseInt(command[3]))));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else\n\t\t\tSystem.out.println(\"Too many arguments.\");\n\t}", "void alarm(String text);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_alarm_triggered, menu);\n return true;\n }", "public void cancel() {\n\t\tif(hasStarted) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"An alarm has not been started\");\n\t\t}\n\t}", "public void setCancel(javafx.event.ActionEvent actionEvent) {\n backToMenu(actionEvent);\n }", "public void cancelAlarm() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n try {\n manager.cancel(pendingIntent);\n } catch (Exception e){\n Log.d(TAG, e.getMessage());\n }\n// Toast.makeText(this, \"Alarm Canceled\", Toast.LENGTH_SHORT).show();\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 String cancel()\n {\n if (!\"list\".equals(from))\n {\n return \"mainMenu\";\n }\n return \"cancel\";\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Test\n case R.id.action_test:\n testSunriseAlarm();\n return true;\n // Kill\n case R.id.action_kill_light:\n killLight();\n return true;\n // Moonlight\n case R.id.action_moonlight:\n enableMoonlightMode();\n return true;\n // Settings\n case R.id.action_settings:\n viewSettings();\n return true;\n }\n\n // Don't consume the event\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {\n getActivity().getMenuInflater().inflate(R.menu.list_context_menu, menu);\n\n // Use the current item to create a custom view for the header.\n final AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;\n final AlarmValue alarm = mAdapter.getItem(info.position);\n\n // Construct the Calendar to compute the time.\n final Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n cal.set(Calendar.MINUTE, alarm.getMinutes());\n String format = android.text.format.DateFormat.is24HourFormat(getActivity()) ? M24 : M12;\n final String time = cal == null ? \"\" : (String) DateFormat.format(format, cal);\n\n // Inflate the custom view and set each TextView's text.\n final View v = getActivity().getLayoutInflater().inflate(R.layout.list_context_menu, null);\n TextView textView = (TextView) v.findViewById(R.id.list_context_menu_header_time);\n textView.setText(time);\n textView = (TextView) v.findViewById(R.id.list_context_menu_header_label);\n textView.setText(alarm.getLabel());\n\n // Set the custom view on the menu.\n menu.setHeaderView(v);\n // Change the text based on the state of the alarm.\n if (alarm.isEnabled()) {\n menu.findItem(R.id.enable_alarm).setTitle(R.string.disable_alarm);\n }\n }", "public void setAlarm(Context context, Alarm alarm) {\n // instantiate the system alarm service manager\n alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // instantiate an intent for the AlarmReciever\n Intent intent = new Intent(context, AlarmReceiver.class);\n // pass the alarm id as an extra to be extracted in the receivier\n intent.putExtra(\"alarmID\", alarm.getId());\n // check if the alarm is on\n if (alarm.isOn()) {\n // if so check if it is recurring\n if (alarm.isRecurring()) {\n // for each day stipulated in the alarm, schedule an new alarm, each alarm id will\n // be multiplied with 10 and then an integer representation of each day will be\n // added i.e. alarm id = 10 and days a Sun = 1, Mon = 2... Sat = 7 therefore\n // sun alarm id = 101, Mon alarm id = 102... Sat alarm id = 107.\n for (Integer day : alarm.getDays()) {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact() + day, intent, 0);\n // instantiate a calander object\n Calendar calendar = Calendar.getInstance();\n // set to the current system time\n calendar.setTimeInMillis(System.currentTimeMillis());\n // set the calender day to day i.e. sun = 1, mon = 2 etc...\n calendar.set(Calendar.DAY_OF_WEEK, day);\n // set the calendar hour to alarm hour\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n // as per hour, set to alarm minutes\n calendar.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n // set seconds to 0 alarm activates close to 0th second of minute\n calendar.set(Calendar.SECOND, 0);\n // as alarm is recurring schedule the alarm to repeat every 7 day from set time\n // specified by alarm set calendar object\n alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY * 7, alarmIntent);\n }\n } else {\n // if the alarm is not recurring\n // uniquely identify the intent for each day and ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact(), intent, 0);\n // get a calendar object\n Calendar calNow = Calendar.getInstance();\n // set the time to current system time\n calNow.setTimeInMillis(System.currentTimeMillis());\n // get a second instance of calendar\n Calendar calSet = (Calendar) calNow.clone();\n // set the time of the calendar object to the alarm specified time\n calSet.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calSet.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n calSet.set(Calendar.SECOND, 0);\n // check if the alarm specified time is set to before the current time\n if (calSet.compareTo(calNow) <= 0) {\n //Today Set time passed, count to tomorrow\n calSet.add(Calendar.DATE, 1);\n }\n // set the alarm to activate at once at the calendar specified time\n alarmMgr.setExact(AlarmManager.RTC_WAKEUP,\n calSet.getTimeInMillis(), alarmIntent);\n }\n }\n }", "private void disableAlarm() {\r\n\t\tsetStyle(null);\r\n\t\tmediaPlayer.stop();\r\n\t}", "public clearAlarm_args(clearAlarm_args other) {\n if (other.isSetAlarmQueryForm()) {\n this.alarmQueryForm = new TAlarmQueryForm(other.alarmQueryForm);\n }\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n getMenuInflater().inflate(R.menu.reminders, menu);\n return true;\n }", "public static void cancelAlarmPendingIntents(Context context) {\n List<Alarm> alarms = Alarm.getAlarms();\n\n if (alarms == null) {\n return;\n }\n\n for (Alarm alarm : alarms) {\n if (!alarm.isActive()) {\n continue;\n }\n\n AlarmManager alarmManager =\n (AlarmManager) context.getSystemService(context.ALARM_SERVICE);\n\n PendingIntent pendingIntent = createPendingIntent(context, alarm);\n alarmManager.cancel(pendingIntent);\n }\n }", "public void cancelReminderApp(Context context) {\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, DailyReminderApp.class);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, ID_APP, intent, 0);\n pendingIntent.cancel();\n if (alarmManager != null) {\n alarmManager.cancel(pendingIntent);\n }\n }", "@Override\n public void menuCanceled(MenuEvent e) {\n\n }", "@Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n cancelAppointment(staffid);\n }", "public void setPollEntry(String date,String alarmTime){\n \t\tsetPollEntry(date,alarmTime,String.valueOf(POLL_ABORT),true,POLL_ABORT,POLL_ABORT,POLL_ABORT);\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_alarm, menu);\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id){\n case R.id.action_save:\n ahour = timer.getCurrentHour();\n amin = timer.getCurrentMinute();\n if ( ahour < 10) {\n shour = \"0\" + String.valueOf(ahour);\n } else {\n shour = String.valueOf(ahour);\n }\n if (amin < 10) {\n smin = \"0\" + String.valueOf(amin);\n } else {\n smin = String.valueOf(amin);\n }\n stime = shour + \":\" + smin;\n am = new MyAlarmManager(getApplicationContext());\n\n if (shour == null || smin ==null) {\n Toast.makeText(\n this,\n \"Please enter timer\",\n Toast.LENGTH_LONG\n ).show();\n } else {\n ContentValues values = new ContentValues();\n values.put(MyContract.Alarms.COLUMN_TIME, stime);\n\n\n // updated\n\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().update(\n uri,\n values,\n selection,\n selectionArgs\n );\n\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n\n break;\n case R.id.action_delete:\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n alertDialog.setTitle(\"アラーム削除\");\n alertDialog.setMessage(\"このアラームを削除してもいいですか?\");\n\n alertDialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n am = new MyAlarmManager(getApplicationContext());\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().delete(\n uri,\n selection,\n selectionArgs\n );\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n }).show();\n\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_settings) {\n return true;\n } else if(id == R.id.action_new) {\n newAlarm();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.punch_clock, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(\"Settings\");\r\n\t\tmenu.add(\"Restart\");\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_alarm_activity, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n\n\n Button groupbutton = (Button) findViewById(R.id.group);\n Button homebutton = (Button) findViewById(R.id.home);\n Button historybutton = (Button) findViewById(R.id.historybutton);\n Button alarmbutton = (Button) findViewById(R.id.alarmbutton);\n\n\n\n homebutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent myintent = new Intent(MainActivity.this, groupActivity.class);\n startActivity(myintent);\n }\n });\n\n historybutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent myintent = new Intent(MainActivity.this, Historyactivity.class);\n startActivity(myintent);\n }\n });\n\n alarmbutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent myintent = new Intent(MainActivity.this, Finalalarm.class);\n startActivity(myintent);\n }\n });\n\n return true;\n\n\n }", "@Override\n\tpublic void menuCanceled(MenuEvent e) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\n\t\t\t}", "public void doCancel_options(RunData data, Context context)\n\t{\n\t\t// access the portlet element id to find our state\n\t\tString peid = ((JetspeedRunData)data).getJs_peid();\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(peid);\n\n\t\t// cancel the options\n\t\tcancelOptions();\n\n\t\t// we are done with customization... back to the main (MODE_LIST) mode\n\t\tstate.setAttribute(STATE_MODE, MODE_LIST);\n\n\t}", "void activateAlarmThenStop(){\n\t Runnable soundAlarmTask = new SoundAlarmTask();\n\t ScheduledFuture<?> soundAlarmFuture = fScheduler.schedule(\n\t soundAlarmTask, startTime, TimeUnit.SECONDS\n\t );\n\t Runnable stopAlarm = new StopAlarmTask(soundAlarmFuture);\n\t fScheduler.schedule(stopAlarm, 3601, TimeUnit.SECONDS);\n\t \n\t System.out.println(\"methodStartTime: \" + startTime);\n\t \n\t //commented out below 2 lines, b/c I don't want this to stop!\n\t //Runnable stopAlarm = new StopAlarmTask(soundAlarmFuture);\n\t //fScheduler.schedule(stopAlarm, fShutdownAfter, TimeUnit.SECONDS);\n\t }", "public void setNextAlarm(){\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\ttoastMessage(\"Setup cancelled\");\n\t\t\t\tdialog.cancel();\n\t\t\t}", "@Override\n\tpublic void menuCanceled(MenuEvent e) {\n\n\t}", "public static void setAlarm(Context context) {\n Intent i = new Intent(context, AlarmManagerHandler.class);\n\n //helps in creating intent that must be fired at some later time\n PendingIntent pi = PendingIntent.getService(context, 0, i, 0);\n\n //schedule a repeating alarm; they are inexact\n AlarmManager mgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n mgr.setRepeating(\n AlarmManager.ELAPSED_REALTIME, //type of time(UTC, elapsed) & wake mobile or not\n SystemClock.elapsedRealtime() + PERIOD, //trigger at Milliseconds; time at which alarm should go off\n PERIOD, //interval in Milliseconds between subsequent repeat of alarm\n pi //action to perform when alarm goes off pending intent\n );\n }", "public void setAction(com.vmware.converter.AlarmAction action) {\r\n this.action = action;\r\n }", "@Override\n\tpublic void cancelCalendar(CalendarEdit edit) {\n\t\t\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu_save_cancel, menu);\n\t\treturn true;\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (btnRevealAlarmFrame.getText().equals(\"Alarm\")) {\n\t\t\t\t\tpanel_setAlarm.setVisible(true);\n\t\t\t\t\tbtnRevealAlarmFrame.setText(\"Set Alarm\");\n\t\t\t\t} else if (btnRevealAlarmFrame.getText().equals(\"Set Alarm\")){\n\t\t\t\t\tpanel_setAlarm.setVisible(false);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tclockLogic.setAlarm(Integer.parseInt(txtAlarmHour.getText()), Integer.parseInt(txtAlarmMinute.getText()));\n\t\t\t\t\t\tbtnRevealAlarmFrame.setText(\"Remove Alarm\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString alarmHourCorrection = \"\";\n\t\t\t\t\t\tString alarmMinuteCorrection = \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Integer.parseInt(txtAlarmHour.getText()) < 10 && txtAlarmHour.getText().charAt(0) != '0') {\n\t\t\t\t\t\t\talarmHourCorrection = \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Integer.parseInt(txtAlarmMinute.getText()) < 10 && \n\t\t\t\t\t\t\t txtAlarmMinute.getText().equals(\"00\") != true && \n\t\t\t\t\t\t\t\t txtAlarmMinute.getText().charAt(0) != '0') {\n\t\t\t\t\t\t\talarmMinuteCorrection = \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlblAlarmLabel.setText(alarmHourCorrection + txtAlarmHour.getText() + \" : \" + alarmMinuteCorrection + txtAlarmMinute.getText());\n\t\t\t\t\t\tlblAlarmLabel.setVisible(true);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tbtnRevealAlarmFrame.setText(\"Alarm\");\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tbtnRevealAlarmFrame.setText(\"Alarm\");\n\t\t\t\t\tclockLogic.clearAlarm();\n\t\t\t\t\tactivateAlarm(false);\n\t\t\t\t\tlblAlarmLabel.setVisible(false);\n\t\t\t\t}\n\t\t\t}", "Alarm createAlarm();", "private void setAlarm(final int fromHours, final int fromMinutes, final int toHours, final int toMinutes, final boolean enableVibration, final boolean muteMedia, final boolean lockVolume,\n\t\t\tfinal boolean unmuteOnCall, final boolean disableNotificationLight, final int brightness, final boolean[] wdays, final boolean newAlarm, final int updateAlarmId) {\n\n\t\tint alarmId;\n\t\tAlarm alarm = new Alarm(fromHours * 60 + fromMinutes, toHours * 60 + toMinutes, enableVibration, muteMedia, lockVolume, unmuteOnCall, disableNotificationLight, brightness, wdays);\n\t\talarm_data.add(alarm);\n\n\t\tAlarm[] alarmArray = new Alarm[alarm_data.size()];\n\n\t\talarmList.setAdapter(new AlarmAdapter(getActivity(), R.layout.alarm_list_item, alarm_data.toArray(alarmArray)));\n\n\t\tif (newAlarm) {\n\t\t\talarmId = settings.getInt(Constants.SCHEDULER_MAX_ALARM_ID, 0) + 2;\n\t\t\tdbAdapter.createAlarm(alarmId, alarm);\n\n\t\t\teditor.putInt(Constants.SCHEDULER_MAX_ALARM_ID, alarmId);\n\t\t\teditor.commit();\n\n\t\t} else {\n\n\t\t\talarmId = updateAlarmId;\n\t\t\tdbAdapter.updateAlarm(alarmId, alarm);\n\t\t}\n\n\t\talarmIDs.add(alarmId);\n\n\t\tTools.setAlarm(getActivity(), dbAdapter, alarm, alarmId);\n\n\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\t\t\talert_dialog.dismiss();\r\n\t\t\t\t\t\tet_select_time.setText(\"Set Time\");\r\n\t\t\t\t\t\tselect_time = \"\";\r\n\r\n\t\t\t\t\t}", "@Override\n public void onMenuAction(Alarm alarm, MenuItem item, int position) {\n switch (item.getItemId()) {\n\n case R.id.delete:\n // when user click edit remove alarm\n alarmAdapter.removeAlarm(position);\n // refresh\n alarmAdapter.notifyDataSetChanged();\n // get alarm id to delete alarm in database\n int alarmId = (int) alarm.getId();\n // delete alarm from database\n dataBaseManager.delete(alarmId);\n // cancel pendingIntent\n deleteCancel(alarm);\n break;\n }\n\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\ttimeSet.performClick();\n\t\t\t\tif(ifFO.equals(\"Time_On\")){\n\t\t\t\t\tAppConstants.open.getTime();\n\t\t\t\t}else{\n\t\t\t\t\tAppConstants.close.getTime();\n\t\t\t\t}\n\t\t\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n Timer timing = new Timer();\n timing.schedule(new TimerTask() {\n\n @Override\n public void run() {\n closeOptionsMenu();\n }\n }, 5000);\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\r\npublic void menuCanceled(MenuEvent arg0) {\n\t\r\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_timer, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_timer, menu);\n return true;\n }", "@Override\n protected void startCreatingAlarm() {\n mSelectedAlarm = null;\n AlarmUtils.showTimeEditDialog(getChildFragmentManager(),\n null, AlarmClockFragmentPreL.this, DateFormat.is24HourFormat(getActivity()));\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.event_settings, menu);\r\n return true;\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n String b = customtime.getText().toString().trim();\n \n Toast.makeText(RadioUi.this, b +getString(R.string.closeradio), Toast.LENGTH_SHORT).show();\n sleeptime = b;\n // time=0;\n time = Integer.parseInt(b)*100000;\n // TinyDB tb = new TinyDB(getApplicationContext());\n\t\t\t\t// tb.putString(\"sleep_time\", sleeptime);\n\t\t\t\t \n\t\t\t\t alarm();\n\t\t\t\t \n }", "public final void setAlarm(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal alarm)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Alarm.toString(), alarm);\n\t}", "@Override\n public void onClick(View v) {\n aManager.cancel(pIntent);\n Toast.makeText(getApplicationContext(), \"Cancel\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void teleopInit() {\n\t\tchooser.getSelected().cancel();\t\t\n\t}", "public void cancelAlarm(Context context) {\n if (alarmMgr!= null) {\n alarmMgr.cancel(alarmIntent);\n }\n\n // Disable {@code SampleBootReceiver} so that it doesn't automatically restart the\n // alarm when the device is rebooted.\n ComponentName receiver = new ComponentName(context, WiFiDirectBroadcastReceiver.class);\n PackageManager pm = context.getPackageManager();\n\n pm.setComponentEnabledSetting(receiver,\n PackageManager.COMPONENT_ENABLED_STATE_DISABLED,\n PackageManager.DONT_KILL_APP);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_reminders, menu);\n return true;\n }", "public void setAlarmOn(boolean flag)\n {\n this.setProperty(GUILoggerSeverityProperty.ALARM, flag);\n }", "private void editAlarm(Alarm affectedAlarm) {\n \t\t//TODO: Launch AddAlarmActivity with this alarm as base so the user can edit it.\n \t}", "public void SetAlarm(Context context)\n {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, 7);\n calendar.set(Calendar.MINUTE,20);\n Log.i(\"Set calendar\", \"for time: \" + calendar.toString());\n\n //Intent i = new Intent(context, AlarmService.class);\n Intent i = new Intent(context, Alarm.class);\n boolean alarmRunning = (PendingIntent.getBroadcast(context, 0, i, PendingIntent.FLAG_NO_CREATE) !=null);\n if (!alarmRunning) {\n //PendingIntent pi = PendingIntent.getService(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n PendingIntent pi = PendingIntent.getService(context, 0, i, 0);\n\n\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, i, 0);\n AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);\n am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);\n //am.cancel(pi);\n }\n\n //PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0 );\n\n\n //am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),AlarmManager.INTERVAL_DAY, pi);\n\n }", "public void option() {\n ReusableActionsPageObjects.clickOnElement(driver, options, logger, \"user options.\");\n }", "@Override\r\n public void onClick(View v) {\n Alarm alarm = new Alarm(getContext(), userId);\r\n alarm.setAlarmWithNewPracticeTimes();\r\n }", "public void setAlarm(AlarmTime alarm){\r\n\t\t//write to XML file\r\n\t\txmanager.write(alarm);\r\n\t\talarmList.add(alarm);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_event_setting, menu);\n return true;\n }", "@Override\n @IcalProperty(pindex = PropertyInfoIndex.VALARM,\n jname = \"alarm\",\n adderName = \"alarm\",\n eventProperty = true,\n todoProperty = true)\n public void setAlarms(final Set<BwAlarm> val) {\n alarms = val;\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.putExtra(Constants.SNOOZED_ALARM,alarm);\n setResult(Constants.SNOOZED_ALARM_RESULT_CODE,intent);\n\n mediaPlayer.stop();\n if(vibrator != null) {\n vibrator.cancel();\n }\n\n finish();\n }", "@Override\n public void onEnabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }", "@Override\n public void onDisabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.action_interval:\n\t\t\tLayoutInflater inflater = this.getLayoutInflater();\n\t\t\tfinal View dialogView = inflater.inflate(\n\t\t\t\t\tR.layout.dialog_refresh_interval, null);\n\t\t\tbuilder.setTitle(R.string.dialog_set_interval);\n\t\t\tbuilder.setView(dialogView);\n\t\t\tbuilder.setPositiveButton(R.string.ok,\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tEditText editText = (EditText) dialogView\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.editText_dialog_refresh_interval);\n\t\t\t\t\t\t\tdouble intervalDouble = Double.parseDouble(editText\n\t\t\t\t\t\t\t\t\t.getText().toString());\n\t\t\t\t\t\t\tinterval = (int) intervalDouble;\n\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = connectionSettings\n\t\t\t\t\t\t\t\t\t.edit();\n\t\t\t\t\t\t\teditor.putInt(AdminTools.INTERVAL, interval);\n\t\t\t\t\t\t\teditor.commit();\n\n\t\t\t\t\t\t\tsendMessageToService(\n\t\t\t\t\t\t\t\t\tConnectionService.SET_INTERVAL, interval);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tbuilder.setNegativeButton(R.string.cancel,\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tbuilder.show();\n\n\t\t\tEditText editText = (EditText) dialogView\n\t\t\t\t\t.findViewById(R.id.editText_dialog_refresh_interval);\n\t\t\teditText.addTextChangedListener(new IntervalTextWatcher());\n\t\t\teditText.setText(\"\"\n\t\t\t\t\t+ connectionSettings.getInt(AdminTools.INTERVAL, 2000));\n\n\t\t\tbreak;\n\t\tcase R.id.action_generate_agent_key:\n\n\t\t\tbuilder.setMessage(getString(R.string.generate_agent_dialog));\n\t\t\tbuilder.setPositiveButton(R.string.ok, new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tif (serviceMessenger != null) {\n\t\t\t\t\t\tMessage m = Message.obtain(null,\n\t\t\t\t\t\t\t\tConnectionService.GENERATE_KEY);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tserviceMessenger.send(m);\n\t\t\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t\t\te.printStackTrace();\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\tbuilder.setNegativeButton(R.string.cancel, new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuilder.show();\n\t\t\tbreak;\n\t\tcase android.R.id.home:\n\t\t\t// This ID represents the Home or Up button. In the case of this\n\t\t\t// activity, the Up button is shown. Use NavUtils to allow users\n\t\t\t// to navigate up one level in the application structure. For\n\t\t\t// more details, see the Navigation pattern on Android Design:\n\t\t\t//\n\t\t\t// http://developer.android.com/design/patterns/navigation.html#up-vs-back\n\t\t\t//\n\t\t\tNavUtils.navigateUpFromSameTask(this);\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "public Alarm() {\n\n\t\tMachine.timer().setInterruptHandler(new Runnable() {\n\t\t\tpublic void run() { timerInterrupt(); }\n\t\t});\n\t}", "@Override\n public void onClick(View v) {\n if(v.getId() == R.id.alarmCheck){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n cal = Calendar.getInstance();\n // Get the time for the alarm at the index\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n // Get the hour and minute from the string and set them to int\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set the alarm time\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // State pattern used here\n state = new CreateState();\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // add 24 hours\n cal.setTimeInMillis(cal.getTimeInMillis() + 86400000);\n // set the reciever\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Overwrite the correct intent at the index\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // Handle the alarm\n // State pattern used here\n state.handle(manager, pending, cal, false);\n // Turn off ringtone\n sendBroadcast(myIntent);\n\n }\n // If snoozed then stop the media player and set the timer/calendar to 10 minutes\n else if(v.getId() == R.id.snooze){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n // initialize AlarmManager\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // set the state\n // State pattern used here\n state = new SnoozeState();\n cal = Calendar.getInstance();\n // Get the time the alarm was set\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set calendar to time initially set\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // Create a new intent for alarm receiver\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n // Add extras for RingtoneService\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent wiht the BroadcastReceiver\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Set the new intent in the list\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // handle the snooze state\n // State pattern used here\n state.handle(manager, pending, cal, false);\n //send a toast to the user letting them know it will snooze for 10 minutes\n Toast t = Toast.makeText(getApplicationContext(), \"Alarm Snoozed for 10 minutes\",\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.FILL_HORIZONTAL, 10, 1500);\n t.show();\n // Stop the current ringtone\n sendBroadcast(myIntent);\n }\n }", "void outOfTime() {\r\n\r\n disableOptionButtons();\r\n }", "private void checkAlarm() {\n\t\tif(this.alarmHour==this.currHour && this.alarmMin==Integer.valueOf(this.currMin)) {\n\t\t\ttimer.cancel();\n\t\t\tSystem.out.println(this.alarmMsg+\"\\nThe time is \"+this.currHour+\":\"+this.currMin);\n\t\t\tString time;\n\t\t\tif(String.valueOf(alarmHour).length()==1) {\n\t\t\t\ttime= \"0\"+alarmHour+\":\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttime=alarmHour+\":\";\n\t\t\t}\n\t\t\tif(String.valueOf(alarmMin).length()==1) {\n\t\t\t\ttime+=\"0\"+alarmMin;\n\t\t\t}else {\n\t\t\t\ttime+=alarmMin;\n\t\t\t}\n\t\t\tJOptionPane.showMessageDialog(null, alarmMsg + \" - \"+ time+\"\\n\"+\"The time is \"+ time);\n\t\t}\n\t}", "public void menuCanceled(MenuEvent evt) {\n }", "@Override\n public void onClick(View v) {\n SunriseScheduler.rescheduleSunriseAlarm(Main.this, true);\n }", "public void setAlarms()\n\t{\n\t\tSharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\t\tAlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\t\t\n\t\tSet<String> set;\n\t\tset=sp.getStringSet(\"lowattnotifs\", null);\n\t\tif(set!=null)\n\t\t{\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, 19);\n\t\t\tcal.set(Calendar.MINUTE, 0);\n\t\t\tcal.set(Calendar.SECOND, 0);\n\t\t\t\n\t\t\tIntent attintent = new Intent(this, Monitor.class);\n\t\t\tattintent.putExtra(\"attordate\", 0);\n\t\t\tPendingIntent attpintent = PendingIntent.getService(this, 0, attintent, 0);\n\t\t\t\n\t\t\talarm.cancel(attpintent);\t\t//cancel all alarms for attendance reminders\n\t\t\t\n\t\t\t//check if set contains these days\n\t\t\tfor(int i=0; i<7; i++)\n\t\t\t{\n\t\t\t\tif(set.contains(String.valueOf(i)))\n\t\t\t\t{\n\t\t\t\t\tcal.set(Calendar.DAY_OF_WEEK, i);\n\t\t\t\t\talarm.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), attpintent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Set for day: \"+i, Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t\t\tif (which == 0) {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode, \"using\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode,\n\t\t\t\t\t\t\t\t\t\t\"non-activity\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\t\t\t\tAlarmListSetMemberActivity.this,\n\t\t\t\t\t\t\t\t\tAlarmListSetActivity.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\t\t\t\tfinish();\n\n\t\t\t\t\t\t\tsetDismiss(conditionUpdate);\n\n\t\t\t\t\t\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(0, MENU_CLEAR_ID, 0, \"CLEAR\");\r\n menu.add(0, MENU_QIET_ID, 0, \"QUIET\");\r\n\r\n return super.onCreateOptionsMenu(menu);\r\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tif (which == 0) {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode, \"using\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode,\n\t\t\t\t\t\t\t\t\t\t\"non-activity\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\t\t\t\tAlarmListSetMemberActivity.this,\n\t\t\t\t\t\t\t\t\tAlarmListSetActivity.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\tsetDismiss(conditionUpdate);\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tif (which == 0) {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode, \"using\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode,\n\t\t\t\t\t\t\t\t\t\t\"non-activity\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\t\t\t\tAlarmListSetMemberActivity.this,\n\t\t\t\t\t\t\t\t\tAlarmListSetActivity.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\tsetDismiss(conditionUpdate);\n\t\t\t\t\t\t}", "public interactOption()\n\t{\n\t\tsuper();\n\t\toptionType = \"interact with the\";\n\t\toptionFocus = \"nothing\";\n\t\toptionText = optionType + \" \" + optionFocus;\n\t}", "protected void addClockMenu() {\n \t\t((InputMethodManager) this.getContext().getSystemService(\n \t\t\t\tContext.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(\n \t\t\t\tthis.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n \t\tfinal ClockView mClockView = new ClockView(this.getContext());\n \t\tmClockView.setClockModel(this.mNoteItemModel.getClockModel());\n \t\tDialog mAlertDialog = new AlertDialog.Builder(this.getContext())\n \t\t\t\t.setTitle(R.string.clock_dialog_select_time)\n \t\t\t\t.setView(mClockView)\n \t\t\t\t.setPositiveButton(R.string.clock_dialog_ok,\n \t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n \n \t\t\t\t\t\t\t@Override\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n \t\t\t\t\t\t\t\t\tint which) {\n \t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n \t\t\t\t\t\t\t\tNoteEditView.this.addClockFunction();\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t})\n \t\t\t\t.setNegativeButton(R.string.clock_dialog_cancel, null).create();\n \t\tmAlertDialog.show();\n \t}" ]
[ "0.6534718", "0.65002936", "0.6304249", "0.62145215", "0.5936722", "0.5806598", "0.5730943", "0.57122594", "0.57016784", "0.56895036", "0.5680456", "0.56556594", "0.5648832", "0.56356144", "0.5597366", "0.55736387", "0.5567222", "0.55305314", "0.5517667", "0.55157334", "0.549406", "0.54939735", "0.5478565", "0.5453659", "0.5444075", "0.54416955", "0.5435699", "0.54029423", "0.5401789", "0.5400548", "0.5395809", "0.53943956", "0.53932965", "0.53842336", "0.5374465", "0.5369693", "0.53632206", "0.5362397", "0.5357353", "0.5353023", "0.5351395", "0.53506374", "0.5343907", "0.5335293", "0.5316858", "0.5301569", "0.5301156", "0.5298128", "0.5286359", "0.52832127", "0.5279841", "0.52797866", "0.5268635", "0.5268512", "0.5261977", "0.5258317", "0.52497524", "0.5247846", "0.5230321", "0.5214521", "0.52140266", "0.52140266", "0.52119875", "0.5209762", "0.5201241", "0.519931", "0.519931", "0.5194309", "0.5193182", "0.51924783", "0.5189151", "0.5188911", "0.51860654", "0.51749134", "0.5170917", "0.51703364", "0.5168415", "0.5162827", "0.51593715", "0.5156505", "0.51562524", "0.51548344", "0.51535326", "0.51408756", "0.5138626", "0.5137155", "0.5136019", "0.5134873", "0.51332766", "0.5118628", "0.5113909", "0.51129895", "0.5095022", "0.5089687", "0.50868595", "0.5086327", "0.5085177", "0.5085177", "0.50752354", "0.5064488" ]
0.62387335
3
The prime factors of 13195 are 5, 7, 13 and 29
public static void main(String[] args) { long n = new Long("13195"); System.out.println(new LargestPrimeFactor().solve(n)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n int product = 1;\n int[] factors = new int[max]; //The position in the array represents the actual factor, the number at that position is the number of occurrences of that factor\n\n for (int i = 2; i < max + 1; i++) { //Checking divisibility by numbers 2-20 inclusive.\n int temp = i;\n for (int j = 2; j < max; j++) { //Checking to see if the number can be represented with current factors in the factors array\n int numOfFactor = factors[j]; //Don't want to change the actual value in the array so we make a copy\n\n while (temp % j == 0 && temp >= j) { //While j, the current factor in the array, is a factor of i and i is smaller than j then divide by j and increment its occurrence in the factors array\n if (numOfFactor > 0) //If j is in the array of factors \"use it\" and decrement the counter for it\n numOfFactor--;\n else //otherwise if the factor doesn't exist in the array add it by incrementing value at the position\n factors[j]++;\n temp /= j; //No matter what, if temp had a factor, it gets smaller\n }\n if (temp < j)\n break; //Don't bother checking the rest of the array since larger numbers can't go into a smaller one...\n }\n }\n\n for (int i = 2; i < max; i++) { //Find the product of all the factors\n if (factors[i] > 0) {\n for (int j = factors[i]; j > 0; j--) { //If there are factors at position j, multiply them!\n product *= i;\n }\n }\n }\n System.out.println(product);\n\n }", "public static void main(String[] args) {\n BigDecimal i;\n BigDecimal factor = new BigDecimal(\"600851475143\");\n \t\t\t\t\t\t\t\t\t\t\t\n /* Start factoring from 2\n * Increase the divisor by 1 -- brute force!!\n * \n */\n\t\t\t\tfor(i= new BigDecimal(\"2\");i.compareTo(factor) <= 0;i=i.add(BigDecimal.ONE)){\n\t\t\t\t\t\n\t\t\t\t\t/* divide the factor by incremental value of i, if the remainder is 0, \n\t\t\t\t\t * the dividend is divisible by the value of divisor\n\t\t\t\t\t */\n\t\t\t\t\tif(factor.remainder(i).intValue()==0) {\n\t\t\t\t\t\t\n System.out.println(\"Factors: \" + i);\n \n /* update the value of factor to the new dividend\n * \n */\n factor = factor.divide(i);\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\t\n }\n\t\t\t\t\n\t\t}", "public static void main(String[] args) {\n\t\tint[] prime= new int[1229]; //only need primes up to 10000\n\t\tint n=1;\n\t\tint index=0;\n\t\tint test=0;\n\t\tfor (int i=2; (i-n)<=1229; i++) {\n\t\t\tfor (int j=2; j<=Math.sqrt(i); j++) {\n\t\t\t\tint k=i%j;\n\t\t\t\tif (k==0) {\n\t\t\t\t\tn++;\n\t\t\t\t\ttest++;\n\t\t\t\t\tj=(int)Math.sqrt(i);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (test==0) {\n\t\t\t\tprime[index]=i;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\ttest=0;\n\t\t}\n\t\t\n\t\t//use primes to find prime factorization and sum of divisors\n\t\tint [] divides= new int[1229]; //Number of times each prime divides a number\n\t\tint [] sumOfDivisors= new int[10000]; //Sum of divisors for i at index i\n\t\tint total=0;\n\t\tint sum=1;\n\t\tindex=1;\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tint d=i;\n\t\t\tfor (int j=0; j<1229; j++) { //find prime factorization for i\n\t\t\t\twhile (d%prime[j]==0 && d>1) {\n\t\t\t\t\td=d/prime[j];\n\t\t\t\t\tdivides[j]++;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tfor (int j=0; j<1229; j++) { //use Number theory formula for sum of divisors\n\t\t\t\tsum*=(Math.pow(prime[j], divides[j]+1)-1)/(prime[j]-1);\n\t\t\t}\n\t\t\tif (sum-i<i) { //only check if sum of divisors of i is less than i\n\t\t\t\tif (sumOfDivisors[sum-i-1]==i) { //check if amicable pair\n\t\t\t\t\ttotal=total+i+sum-i; //add both to total (only happens once)\n\t\t\t\t}\n\t\t\t}\n\t\t\tArrays.fill(divides,0); //reset divisors array\n\t\t\tsumOfDivisors[index]=sum-i; //store number of divisors\n\t\t\tsum=1;\n\t\t\tindex++;\n\t\t}\n\t\tSystem.out.print(\"The sum of all amicable numbers less than 10000 is: \");\n\t\tSystem.out.println(total);\n long endTime = System.currentTimeMillis();\n System.out.println(\"It took \" + (endTime - startTime) + \" milliseconds.\");\n\n\t}", "public static void main (String[] args)\n {\n int[] f = {3,3,1}; \n \n //System.out.println(nCPr(f,3));\n System.out.println(nCPr(f,3));\n \n System.exit(0);\n \n /*\n long t = System.currentTimeMillis();\n System.out.println(primes0(Long.MAX_VALUE)); \n System.out.println((System.currentTimeMillis() - t) /1);\n \n t = System.currentTimeMillis();\n System.out.println(primes(Long.MAX_VALUE,null)); \n System.out.println((System.currentTimeMillis() - t) /1);*/\n \n br.com.hkp.classes.math.numberstheory.QuickSieve sv = \n new br.com.hkp.classes.math.numberstheory.QuickSieve(50000000);\n \n System.out.println(\">>>\"+primeFactors(89999999));\n \n \n \n Iterator<Integer> it = sv.getList().iterator();\n \n double soma = 0;\n \n while (it.hasNext())\n \n {\n long n = it.next();\n if (n > 6000)\n break;\n else\n soma += 32000000 / it.next();\n }\n \n System.out.println(soma);\n \n //System.exit(0);\n \n \n System.out.println(\" Fatorando...\");\n long pow = (long)Math.pow(50000000, 2);\n \n System.out.println(\" pow = \" +pow);\n \n for (int i = 0; i <= 300; i++)\n {\n long random = (long)(pow * Math.random());//715256374182293l;\n System.out.println(\" random = \" + random);\n long t = System.currentTimeMillis();\n System.out.print(\"Primes : \"+primeFactors(random,sv.getList())); \n long time = System.currentTimeMillis() - t;\n System.out.println(\" > \"+ time + \" milseg\");\n \n t = System.currentTimeMillis();\n System.out.print(\"Primes0 : \"+primeFactors(random)); \n long time0 = System.currentTimeMillis() - t;\n System.out.println(\" > \"+ time0 + \" milseg\");\n \n \n System.out.println(\" ratio = \" + ((time != 0) ? time0/time : \"N/A\"));\n }\n //System.out.println(primes(14552145213l)); \n //System.out.println((7l*7l*73l*127l*337l*92737l*649657l) == Long.MAX_VALUE); \n //System.out.println(5l*23l*53301701l*1504703107l); \n //System.out.println((7l*7l*73l*127l*337l*92737l*649657l)); \n System.exit(0);\n //System.out.println(frac(5.97));\n int[] v = {3,2,0};\n System.out.println(nPr(v,3));\n \n System.exit(0);\n\n double pi = 5.97;\n //System.out.println(frac(pi));\n double fracPi = frac (pi);\n double fracMinusPi = frac (-pi);\n double i = integ(pi);\n //System.out.printf (\"%f %f %f %.14f%n\", pi, fracPi, fracMinusPi,i);\n System.out.println ( fracPi);\n\n BigDecimal bdPi = new BigDecimal (\"\" +5.97);\n BigDecimal bdFracPi = frac (bdPi);\n BigDecimal bdFracMinusPi = frac (bdFracPi.negate());\n\n //System.out.printf (\"%f %f %f%n\", bdPi, bdFracPi, bdFracMinusPi);\n System.out.println(bdFracPi);\n }", "ArrayList<BigInteger> factorize(BigInteger num) {\n ArrayList<BigInteger> result = calcPrimeFactors(num);\n return result;\n }", "void initPrimesEratosthenes()\n\t{\n\t\tfinal double logMaxFactor = Math.log(maxFactor);\n\t\tfinal int maxPrimeIndex = (int) ((maxFactor) / (logMaxFactor - 1.1)) + 4;\n\t\tprimesInv = new double [maxPrimeIndex]; //the 6542 primesInv up to 65536=2^16, then sentinel 65535 at end\n\t\tprimes = new int [maxPrimeIndex]; //the 6542 primesInv up to 65536=2^16, then sentinel 65535 at end\n\t\tint primeIndex = 0;\n\t\tfinal boolean [] noPrimes = new boolean [maxFactor+1];\n\t\tfor (int i = 2; i <= Math.sqrt(maxFactor); i++) {\n\t\t\tif (!noPrimes[i]) {\n\t\t\t\tprimes[primeIndex] = i;\n\t\t\t\tprimesInv[primeIndex++] = 1.0 / i;\n\t\t\t}\n\t\t\tfor (int j = i * i; j <= maxFactor; j += i) {\n\t\t\t\tnoPrimes[j] = true;\n\t\t\t}\n\t\t}\n\t\tfor (int i = (int) (Math.sqrt(maxFactor)+1); i <= maxFactor; i++) {\n\t\t\tif (!noPrimes[i]) {\n\t\t\t\tprimes[primeIndex] = i;\n\t\t\t\tprimesInv[primeIndex++] = 1.0 / i;\n\t\t\t}\n\t\t}\n\t\tfor (int i=primeIndex; i < primes.length; i++) {\n\t\t\tprimes[i] = Integer.MAX_VALUE;\n\t\t}\n\n\t\tSystem.out.println(\"Prime table built max factor '\" + maxFactor + \"' bytes used : \" + primeIndex * 12);\n\t}", "private static ArrayList<Integer> findPrimeFactors(long unFactoredNumber, int factorArray)\n\t{\n\t\tArrayList<Integer> arrayPrimes = generatePrimes((int)Math.sqrt(unFactoredNumber) * factorArray );\n\t\tArrayList<Integer> arrayPrimeFactors = new ArrayList<Integer>();\n\t\t\n\t\tlong currentNumber = unFactoredNumber; \n\t\t\n\t\t// currentNumber is divisible by a prime, currentNumber becomes result of division and \n\t\t// \n\t\t\n\t\tfor (int indexArrayPrimes = 0; indexArrayPrimes < arrayPrimes.size(); indexArrayPrimes++)\n\t\t{\n\t\t\tif (currentNumber % arrayPrimes.get(indexArrayPrimes) == 0)\n\t\t\t{\n\t\t\t\tarrayPrimeFactors.add(arrayPrimes.get(indexArrayPrimes));\n\t\t\t\tcurrentNumber = currentNumber / arrayPrimes.get(indexArrayPrimes);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Make sure the biggest have been found\n\t\tif (currentNumber > 1)\n\t\t{\n\t\t\tarrayPrimeFactors = findPrimeFactors(unFactoredNumber, (factorArray + 1));\n\t\t}\n\t\t\n\t\t\n\t\treturn arrayPrimeFactors;\n\t}", "public static void main(String[] args) {\n\t\tlong input = 600851475143L;\n\t\tList<Long> primeFactors = new ArrayList<Long>();\n\t\tfor (long i = 2; i < Math.sqrt(input); i++) {\n\t\t\tif (input % i == 0) {\n\t\t\t\tif (isPrime(i)) {\n\t\t\t\t\tprimeFactors.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(primeFactors);\n\n\t}", "public List<Long> calculatePrimeFactorsOf(long l) {\n\t\t//Initialize list for factors\n\t\tList<Long> factors = new ArrayList<Long>();\n\t\t//Iterate from the first possible prime factor (2) to the number we're testing\n\t\tfor (Long i = 2l; i <= l; i++) {\n\t\t\twhile (l % i == 0) {\n\t\t\t\t//Only prime numbers will get added to the factors list because the the lesser values have already been tested\n\t\t\t\t//If no prior values are factors of i, then i is prime.\n\t\t\t\tfactors.add(i);\n\t\t\t\tl = l/i;\n\t\t\t}\n\t\t}\n\t\treturn factors;\n\t}", "private BigInteger[] factor(BigInteger i) {\n return null;\r\n }", "static void pregenFact() \n\t{ \n\t\tfact[0] = fact[1] = 1; \n\t\tfor (int i = 1; i <= 1000000; ++i) \n\t\t{ \n\t\t\tfact[i] = (int) ((long) fact[i - 1] * i % mod); \n\t\t} \n\t}", "public List<Long> calculatePrimeFactorsOf(long l) {\n\n\t\tList<Long> primeFactors = new ArrayList<>();\n\t\tfor (long i = 2; i < l; i++) {\n\t\t\tif ((l % i == 0) && (isPrime(i))) {\n\t\t\t\tlong result = l;\n\t\t\t\twhile (result % i == 0) {\n\t\t\t\t\tprimeFactors.add(i);\n\t\t\t\t\tresult /= i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (l <= 2) // Catch the case where the number is 2 or 1\n\t\t\tprimeFactors.add(l);\n\t\treturn primeFactors;\n\t}", "public List<Long> calculatePrimeFactorsOf(long l) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tList<Long> primeList = new ArrayList<Long>();\n\t\t//List<Long> divisorList = new ArrayList<Long>();\n\t\tfor(long i = 2; i <= l; i++) {\n\t\t\twhile(l % i == 0) {\n\t\t\t\tprimeList.add(i);\n\t\t\t\tl = l / i; \n\t\t\t}\n\t\t}\n\n\t\treturn primeList;\n\t}", "public static HashSet<Integer> primeFactors(int number) {\n\t\t int n = number;\n\t\t HashSet<Integer> primeFactors = new HashSet<Integer>();\n\t\t for (int i = 2; i <= n; i++) {\n\t\t\t while (n % i == 0) {\n\t\t\t \n\t\t\t\t primeFactors.add(i);\n\t\t\t\t n /= i;\n\t\t\t }\n\t\t }\n\t\t return primeFactors;\n\t }", "private static List<Integer> getNumFactors(int num) {\n\t\tList<Integer> factors = new ArrayList<>();\n\t\tfor(int i = 2 ; i <= num/2; i++) {\n\t\t\tif (num % i == 0) {\n\t\t\t\tfactors.add(i);\n\t\t\t}\n\t\t}\n\t\treturn factors;\n\t}", "public static void main(String[] args) {\n\r\n\t\tlong ln= 6008514751431L;\r\n\t\tint max=0;\r\n\t\tfor (int i=2; i<= ln;i++)\r\n\t\t\twhile (ln % i == 0)\r\n\t\t\t{\r\n\t\t\t\tif(i>max)\r\n\t\t\t\tmax=i;\r\n\t\t\t\tln/=i;\r\n\t\t\t}\t\r\n\t\tSystem.out.println(\"the greatest prime factor of the given number is :\"+max);\r\n\t\t}", "public List<Integer> findPrimeFactors(long number) {\n long start = System.nanoTime();\n\n List<Integer> primeFactors = new ArrayList<>();\n long n = number;\n\n for (int d=2; d < n; d++) {\n while (n % d == 0) {\n primeFactors.add(d);\n n /= d;\n }\n }\n\n assert n <= Integer.MAX_VALUE;\n primeFactors.add((int) n);\n\n String duration = String.format(\"%.2f\", (System.nanoTime() - start) / 1000000.0);\n LOG.debug(\"Found prime factors for [{}] in [{}ms]: {}\", new Object[]{number, duration, primeFactors});\n return primeFactors;\n }", "public static void test(){\n int[] a = {3,6,9, 12,81,72};\n int n = 648;\n boolean flag = areFactors(n, a);\n if(flag == true){\n System.out.println(n +\" is divisible by all elements of array.\");\n }\n else{\n System.out.println(n + \" fails the test.\");\n }\n }", "private long largestPrimeFactor(long number)\n\t{\n\t\tfor(int i = 2; i<=number; i++)\n\t\t{\n\t\t\tif(number % i == 0 && number > i)\n\t\t\t{\n\t\t\t\twhile(number % i == 0)\n\t\t\t\t{\n\t\t\t\t\tnumber = number / i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i >= number)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn 0;\n\t}", "public static void run(){\n //--- --- --- --- --- ---\n //first find the facter of the num\n //second check if the second is a factor of it\n\n System.out.print (\"Please Enter the Base: \");\n int f = Input.input.nextInt ();\n System.out.print (\"Please Enter the Potential Factor: \");\n int p = Input.input.nextInt ();\n\n ArrayList<Integer> primeFactors = new ArrayList<Integer> ();\n while (f % 2 == 0) {\n primeFactors.add ( 2 );\n f /= 2;\n }\n // n must be odd at this point. So we can\n // skip one element (Note i = i +2)\n for (int i = 3; i <= Math.sqrt(f); i += 2) {\n // While i divides n, print i and divide n\n while (f % i == 0) {\n primeFactors.add ( i );\n f /= i;\n }\n }\n // This condition is to handle the case whien\n // n is a prime number greater than 2\n if (f > 2)\n primeFactors.add ( f );\n\n System.out.println ( primeFactors);\n }", "public List<Integer> findPrimeFactorsUsingOptimizedAlgorithm(long number) {\n long start = System.nanoTime();\n\n List<Integer> primeFactors = new ArrayList<>();\n long n = number;\n\n if (n % 2 == 0) {\n while (n % 2 == 0) {\n primeFactors.add(2);\n n /= 2;\n }\n }\n\n for (int d=3; d*d <= n; d+=2) {\n while (n % d == 0) {\n primeFactors.add(d);\n n /= d;\n }\n }\n\n if (n > 1) {\n assert n <= Integer.MAX_VALUE;\n primeFactors.add((int) n);\n }\n\n String duration = String.format(\"%.2f\", (System.nanoTime() - start) / 1000000.0);\n LOG.debug(\"Found prime factors for [{}] using optimized algorithm in [{}ms]: {}\", new Object[]{number, duration, primeFactors});\n return primeFactors;\n }", "public static void main(String[] args) {\n\n\t\tlong n = 600851475143L;\n\t\n\t\tlong largestPrimeFactor = 2;\n\t\t\n\t\twhile(n%2==0)\n\t\t\tn = n/2;\n\t\t\n\t\tfor(long i=3;i<=(long) Math.sqrt(n);i=i+2) {\n\t\t\twhile(n%i == 0) {\n\t\t\t\tn = n/i;\n\t\t\t\tlargestPrimeFactor = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(n > 2) {\n\t\t\tlargestPrimeFactor = n;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Largest prime factor = \" + largestPrimeFactor);\n\t}", "public static int nDivisors(int number) {\n int[] primesExponents = new int[NR_PRIMES];\n// System.out.println(\"Number \" + number + \" =\");\n //find exponents of prime factorization\n // n = p1^a * p2^b * p3^c * ...\n for (int n = 0; n < primes.length; n++) {\n while (number % primes[n] == 0) {\n primesExponents[n]++;\n number /= primes[n];\n }\n if (number < primes[n])\n break;\n }\n //find nr of divisors\n // (a+1)*(b+1)*(c+1)*...\n int nrDivisors = 1;\n for (int primesExponent : primesExponents) {\n if (primesExponent != 0) {\n //test\n// System.out.println(primes[i] + \" ^ \" + primesExponents[i]);\n nrDivisors *= (primesExponent + 1);\n }\n }\n return nrDivisors;\n }", "public static void highlyDivisibleTriangularNumber(){\n\n int position = 1;\n long triangleNumber;\n Long[] factors;\n do{\n position ++;\n triangleNumber = getTriangleNumber(position);\n factors = getFactors(triangleNumber); \n }while(factors.length <= 500);\n\n System.out.println(triangleNumber);\n}", "public static void main(String[] args) {\n\t\tfloat f1 = 5.4f;\r\n\t\tfloat f2 = 5.5f;\r\n\t\tSystem.out.println(Math.round(f1));\r\n\t\tSystem.out.println(Math.round(f2));\r\n\t\tSystem.out.println(Math.random());\r\n\t\tSystem.out.println( (int)(Math.random()*10));\r\n\t\tSystem.out.println(Math.sqrt(64));\r\n\t\tSystem.out.println(Math.pow(2, 10));\r\n\t\tSystem.out.println(Math.PI);\r\n\t\tSystem.out.println(Math.E);\r\n\t\tint n = Integer.MAX_VALUE;\r\n\t\tSystem.out.println( Math.pow((1+1d/n), n));// 1f 不行\r\n\t\tint count = 0;\r\n\t\tfor(int i = 2; i <= 100; i++) {\r\n\t\t\tboolean prime = false;\r\n\t\t\tint c =0;\r\n\t\t\tfor(int j = i; j>=1; j--) {\r\n\t\t\t\tif((i%j) == 0)\r\n\t\t\t\t\tc ++;\r\n\t\t\t\tif (c > 2 )\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif (j == 1) {\r\n\t\t\t\t\tprime = true;\r\n\t\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (prime == true )\r\n\t\t\t\tcount++;\r\n\t\t\telse\r\n\t\t\t\tcontinue;\r\n\t\t}\r\n\t\tSystem.out.println(\"prime count is : \"+ count);\r\n\t\t\r\n\t\tcountPrime(100);\r\n\t}", "public static void main(String[] args) throws IOException {\n int target = 974;\n ArrayList<Integer> factors = new ArrayList<>();\n\n\n for (int i = 1; i <= target; i++) {\n if (target % i == 0) {\n factors.add(i);\n }\n }\n\n int total = 0;\n for (int factor : factors) {\n total += factor;\n }\n\n\n\n System.out.println(\"Result: \" + total);\n System.out.println(\"Done!\");\n }", "public static List<Collect.Pair<Integer, Integer>> getPrimeFactors(final int n){\n if(isPrime(n)) return Arrays.asList(new Collect.Pair<>(n, 1));\n List<Collect.Pair<Integer, Integer>> ret = new ArrayList<>();\n int cur = 0;\n int rem = n;\n while(rem != 1){\n if(cur == getPrimeFactorsCache.size()){\n if(getPrimeFactorsCache.size() == 0) getPrimeFactorsCache.add(2);\n else getPrimeFactorsCache.add(getNextHigherPrime(getPrimeFactorsCache.get(getPrimeFactorsCache.size()-1)));\n }\n int cp = getPrimeFactorsCache.get(cur);\n if(cp * cp > n) break;\n int count = 0;\n while(rem % cp == 0){\n rem = rem/cp;\n count++;\n }\n if(count >= 1) ret.add(new Collect.Pair<>(cp, count));\n cur++;\n }\n if(rem != 1) ret.add(new Collect.Pair<>(rem, 1));\n return ret;\n }", "public static List<Integer> calculateFor(int n) {\n\t\tArrayList<Integer> factors = new ArrayList<Integer>();\n\t\tint candidate = 2;\n\t\twhile (n > 1) {\n\t\t\twhile (n % candidate == 0) {\n\t\t\t\tfactors.add(candidate);\n\t\t\t\tn /= candidate;\n\t\t\t}\n\t\t\tcandidate++;\n\t\t}\n\t\tif (n > 1) {\n\t\t\tfactors.add(n);\n\t\t}\n\t\treturn factors;\n\t}", "public static void main(String args[]) {\n\t\tBigDecimal start = new BigDecimal(\"2658455991569831744654692615953842176\");\n//\t\tBigDecimal start = new BigDecimal(\"8128\");\n//\t\tBigDecimal dd = start.divide(next, 0);\n//\t\tSystem.out.println(dd);\n\t\t\n\t\tList<BigDecimal> fs = new PerfectNumber().factor2(start, 10, null);\n\t\tBigDecimal multiply = new BigDecimal(1);\n\t\tBigDecimal sum = new BigDecimal(0);\n\t\tfor (BigDecimal d : fs) {\n\t\t\tSystem.out.println(d);\n\t\t\tmultiply = multiply.multiply(d);\n\t\t\tsum = sum.add(d);\n\t\t}\n\t\tSystem.out.println(\"sum = \" + sum);\n\t\tSystem.out.println(\"multiply = \" + multiply);\n\t}", "public static void primeFactors(int num,int prime)\n\t{\n\t\tfor(int i=2;i<num;i++) \n\t\t{\n\t\t\tif(num%i==0) \n\t\t\t{\n\t\t\t\tprime=1;\n\t\t\t\tfor(int j=2;j<i/2;j++) \n\t\t\t\t{\n\t\t\t\t\tif(i%j==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tprime=0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(prime==1) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n long number = 6857;\n long i = 2;\n while ((number / i != 1) || (number % i != 0)) {\n if (number % i == 0) {\n number = number / i;\n } else {\n i++;\n }\n }\n System.out.println(i);\n\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n \n boolean[] isNotPrime = new boolean[(N - 1 - 1) / 2 + 1];\n List<Integer> list = new ArrayList<Integer>();\n HashSet<Integer> primes = new HashSet<Integer>();\n \n list.add(2);\n primes.add(2);\n long sum = 0;\n for (int i = 1; i < isNotPrime.length; i++) {\n if (isNotPrime[i]) {\n continue;\n }\n list.add(2 * i + 1);\n primes.add(2 * i + 1);\n long nextIndex = (((long) 2 * i + 1) * (2 * i + 1) - 1) / 2;\n if (nextIndex >= isNotPrime.length) {\n continue;\n }\n for (int j = ((2 * i + 1) * (2 * i + 1) - 1) / 2; j < isNotPrime.length; j += 2 * i + 1) {\n isNotPrime[j] = true;\n }\n }\n int index = 0;\n while (index < list.size()) {\n int curPrime = list.get(index);\n index++;\n if (curPrime < 10) {\n continue;\n }\n int base = 1;\n while (curPrime / base > 9) {\n base *= 10;\n }\n int leftTruncate = curPrime;\n int rightTruncate = curPrime;\n boolean isValid = true;\n while (base != 1) {\n leftTruncate = leftTruncate - leftTruncate / base * base;\n rightTruncate = rightTruncate / 10;\n base /= 10;\n if (primes.contains(leftTruncate) == false || primes.contains(rightTruncate) == false) {\n isValid = false;\n break;\n }\n }\n if (isValid) {\n sum += curPrime;\n }\n }\n System.out.println(sum);\n scanner.close();\n }", "private static Map<Integer, Integer> primeFactorization(int n) {\n \tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n \t\n \tfor (int i = 2; i <= n; ++i) {\n \t\tint exponent = 0;\n \t\t\n \t\twhile (n % i == 0) {\n \t\t\t++exponent;\n \t\t\tn /= i;\n \t\t}\n \t\t\n \t\tif (exponent > 0)\n \t\t\tmap.put(i, exponent);\n \t}\n \t\n \treturn map;\n }", "public static boolean[] getPrimes(int max) {\r\n\t\t//declare array \r\n\t\tboolean[] result = new boolean[max + 1];\r\n\t\t//initialize the array all but elements at index 0 and 1\r\n\t\tfor(int i = 2; i < result.length; i++)\r\n\t\t\tresult[i] = true;\r\n\t\t\t\r\n\t\tfinal double LIMIT = Math.sqrt(max);\r\n\t\t//loop till the sqrt\r\n\t\tfor(int i = 2; i <= LIMIT; i++) {\r\n\t\t\t//if index is true i.e. thinking its a prime and then u find factors then make it false.\r\n\t\t\tif(result[i]) {\r\n\t\t\t\t// cross out all multiples;\r\n\t\t\t\tint index = 2 * i;\r\n\t\t\t\twhile(index < result.length){\r\n\t\t\t\t\tresult[index] = false;\r\n\t\t\t\t\t index += i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static void calculatePrimeNumbers(){\n int NUM = 5000000;\n\n boolean[] flags = new boolean[NUM + 1];\n\n int count = 0;\n\n for(int i = 2; i <= NUM; i++) {\n primeNumberFlagOperation(flags, i);\n }\n\n for(int i = 2; i <= NUM; i++) {\n if(flags[i]) {\n\n // remove all multiples of prime: i\n for(int k = i + i; k <= NUM; k += i) {\n flags[k] = false;\n }\n\n count++;\n }\n }\n }", "static BigInteger fact(int n)\n {\n BigInteger res = BigInteger.ONE;\n for (int i = 2; i <= n; i++)\n res = res.multiply(BigInteger.valueOf(i));\n return res;\n }", "public static boolean isPrime(BigInteger n) {\n\t\tglobalLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\tprimeLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\t// Use some other function if n is sufficiently small (n<=10^10)\n\t\tif (n.compareTo(BigInteger.valueOf(10000000000l)) <= 0) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is small enough to be checked normally.\");\n\t\t\treturn isPrime(n.longValue());\n\t\t} else if (!n.testBit(0)) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is even so it is composite.\");\n\t\t\treturn false;\n\t\t}\n\t\tprimeLog.log(\n\t\t\t\t\"The number \" + n.toString() + \"is too large and will be checked with Rabin Miller primality test.\");\n\n\t\t// Find values to the equation n=2^s*m where s is as large as possible\n\t\tint s = 0;\n\t\t// Find out how many times we can divide (n-1) by 2\n\t\tBigInteger nMinusOne = n.subtract(BigInteger.ONE);\n\t\twhile (!nMinusOne.testBit(s)) {\n\t\t\ts++;\n\t\t}\n\t\t// Find k by calculating n>>s\n\t\tBigInteger m = nMinusOne.shiftRight(s);\n\t\tprimeLog.log(n.toString() + \" - 1 = 2^\" + s + \" * \" + m.toString());\n\n\t\tint prime = 0;\n\t\tint composite = 0;\n\n\t\t// Check to see if n is prime using base a\n\t\tlong maxValue = n.bitLength() > 63 ? Long.MAX_VALUE : n.longValue();\n\t\tfor (int i = 0; i < PRIMALITY_CHECK_ITERATIONS; i++) {\n\t\t\tprimeLog.stepIn(\"Trial \" + i);\n\t\t\tBigInteger a = BigInteger.valueOf(randomLong(2, maxValue - 2));\n\t\t\tprimeLog.log(\"Checking if n is prime using a=\" + a.toString() + \".\");\n\t\t\t// First iteration is a^m % n\n\t\t\tBigInteger res = a.modPow(m, n);\n\t\t\tprimeLog.log(\"a^m % n = \" + res.toString());\n\t\t\t// On first iteration if |a^m mod n| = 1 then say it is prime\n\t\t\tif (res.equals(BigInteger.ONE) || res.equals(nMinusOne)) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\tprimeLog.stepOut();\n\t\t\t\tprime++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tboolean flag = false;\n\t\t\tfor (int j = 1; !flag && j < s; j++) {\n\t\t\t\tres = res.modPow(BigInteger.valueOf(2), n);\n\t\t\t\tprimeLog.log(\"a^(2^\" + j + \" * m) % n = \" + res.toString());\n\t\t\t\tif (res.equals(BigInteger.ONE)) {\n\t\t\t\t\t// If a^[(2^j)*m] % n = 1 then we say is is composite\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\t\tcomposite++;\n\t\t\t\t\tflag = true;\n\t\t\t\t} else if (res.equals(nMinusOne)) {\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\t\t// If a^[(2^j)*m] % n = -1 then we say is is prime\n\t\t\t\t\tprime++;\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!flag) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\tcomposite++;\n\t\t\t}\n\t\t\tprimeLog.stepOut();\n\t\t}\n\t\tprimeLog.log(\"Out of \" + (prime + composite) + \" trials, \" + prime + \" trials claimed n was prime.\");\n\t\tprimeLog.log(\"n is prime: \" + (prime > composite));\n\t\tglobalLog.appendToCurrent(\": \" + (prime > composite));\n\t\tglobalLog.stepOut();\n\t\tprimeLog.appendToCurrent(\": \" + (prime > composite));\n\t\treturn prime > composite;\n\t}", "private void initializeFactorials() {\n //Lets fill up to 33!\n factorials = new double[33];\n factorials[0] = 1.0;\n factorials[1] = 1.0;\n factorials[2] = 2.0;\n factorials[3] = 6.0;\n factorials[4] = 24.0;\n factorials[5] = 120.0;\n factorials[6] = 720.0;\n factorials[7] = 5040.0;\n factorials[8] = 40320.0;\n factorials[9] = 362880.0;\n factorials[10] = 3628800.0;\n factorials[11] = 39916800.0;\n factorials[12] = 479001600.0;\n factorials[13] = 6227020800.0;\n factorials[14] = 87178291200.0;\n factorials[15] = 1307674368000.0;\n factorials[16] = 20922789888000.0;\n factorials[17] = 355687428096000.0;\n factorials[18] = 6402373705728000.0;\n factorials[19] = 121645100408832000.0;\n factorials[20] = 2432902008176640000.0;\n factorials[21] = 51090942171709440000.0;\n factorials[22] = 1124000727777607680000.0;\n factorials[23] = 25852016738884976640000.0;\n factorials[24] = 620448401733239439360000.0;\n factorials[25] = 15511210043330985984000000.0;\n factorials[26] = 403291461126605635584000000.0;\n factorials[27] = 10888869450418352160768000000.0;\n factorials[28] = 304888344611713860501504000000.0;\n factorials[29] = 8841761993739701954543616000000.0;\n factorials[30] = 265252859812191058636308480000000.0;\n factorials[31] = 8222838654177922817725562880000000.0;\n factorials[32] = 263130836933693530167218012160000000.0;\n\n }", "private static int countFactors(int number) {\n // number of factors\n int factors = 0;\n\n // count factors\n for (int counter = 1; counter <= Math.sqrt(number); counter++) {\n if (Math.sqrt(number) <= TARGET_FACTORS / HALF) {\n break;\n }\n if (number % counter == 0) {\n factors++;\n }\n }\n\n return factors * MULTIPLIER_TWO;\n }", "@Test\n public void testCalculateNumberOfDivisors() {\n System.out.println(\"calculateNumberOfDivisors\");\n int value = 10; \n List<Integer> primelist = Arrays.asList(2, 3, 5, 7);\n int expResult = 4; //1, 2, 5, 10\n int result = NumberUtil.calculateNumberOfDivisors(value, primelist);\n assertEquals(expResult, result);\n }", "@Test\n public void nthFactorialTwenty() throws Exception {\n assertEquals(2432902008176640000L,Factorial.nthFactorial(20));\n }", "static void primeNumberSeries(){\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cnt = sc.nextInt();\n\t\tint sum = 0;\n\t\tint result_cnt =0;\n\t\tint[] nums = new int[cnt];\n\t\t\n\t\tfor(int i=0; i<cnt; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(nums.length);\n\t\tfor(int z =0; z<nums.length; z++) {\n\t\t\tfor(int x = z + 1; x<nums.length; x++) {\n\t\t\t\tfor(int c = x + 1; c<nums.length; c++) {\n\t\t\t\t\tsum = nums[z]+nums[x]+nums[c];\n\t\t\t\t\tif(isPrime(sum)) {\n\t\t\t\t\t\tresult_cnt++;\n//\t\t\t\t\t\tSystem.out.println(\"소수는 : \" + sum);\n\t\t\t\t\t}\n//\t\t\t\t\tSystem.out.print(nums[z]);\n//\t\t\t\t\tSystem.out.print(nums[x]);\n//\t\t\t\t\tSystem.out.println(nums[c]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"result_cnt : \" + result_cnt);\n\t\t\n\t\t\n\t\t/*\n\t\tint aa = sc.nextInt(); //7\n\t\tint cnt = 0;\n\t\tfor(int j=1; j<=aa; j++) { //소수판별\n\t\t\tif(aa % j ==0) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"cnt :\" + cnt);\n\t\tif(cnt ==2) {\n\t\t\t\tSystem.out.println(aa+\"는 소수\");\n\t\t}\n\t\t*/\n\t\t\n\t\t\n\t\t\n\t}", "public static Set<Integer> getPrimeDivisors(int n){\n return Stream.concat(getPrimeFactors(n).stream().map(p -> p.first), Stream.of(1)).collect(Collectors.toSet());\n }", "public static void main(String[] args) {\n\t\tfor(int i=1; i<=100;i++){\n\t\t\tSystem.out.println(\"Factors of a Number\"+i+\" are: \");\n\t\t\tfor(int j=1;j<=i;j++){\n\t\t\t\tif(i%j==0){\n\t\t\t\t\tSystem.out.println(j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic long solve(Long num, boolean printResults) {\n\t\tArrayList<Long> factors = new ArrayList<Long>();\n\n\t\twhile (num > 1) {\n\t\t\tfor (long i = 3; i <= num; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tfactors.add(i);\n\t\t\t\t\tnum /= i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong big = factors.get(factors.size() - 1);\n\t\tif (printResults)\n\t\t\tSystem.out.println(big + \" is the biggest prime factor of 6,008,514,751,43l\");\n\t\treturn big;\n\t}", "public static void main(String[] args) {\n List<Integer> pr = new ArrayList<>();\n out:\n for (int p = 2; p <= 100; p++) {\n for (int q : pr) {\n if (p % q == 0) {\n continue out;\n }\n }\n pr.add(p);\n }\n Set<List<Integer>> s = new HashSet<>();\n for (int a = 2; a <= 100; a++) {\n List<Integer> l = new ArrayList<>();\n for (int p : pr) {\n int e = 0;\n for (int c = a; c % p == 0; c /= p) {\n e++;\n }\n l.add(e);\n }\n for (int b = 2; b <= 100; b++) {\n List<Integer> m = new ArrayList<>();\n for (int e : l) {\n m.add(b * e);\n }\n s.add(m);\n }\n }\n System.out.println(s.size());\n }", "public abstract int getNFactor();", "public static int numFactors(int num) {\r\n\t\tassert num >= 2 : \"failed precondition. num must be >= 2. num: \" + num;\r\n\t\tint result = 0;\r\n\t\tfinal double SQRT = Math.sqrt(num);\r\n\t\tfor(int i = 1; i < SQRT; i++) {\r\n\t\t\tif(num % i == 0) {\r\n\t\t\t\tresult += 2;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(num % SQRT == 0)\r\n\t\t\tresult++;\r\n\t\treturn result;\r\n\t}", "public void PrimeFacor(int numberToFactorize) {\n\n System.out.println(\"Prime factors of \" + numberToFactorize + \" are ::\");\n\n for (int i = 2; i < numberToFactorize; i++) {\n\n while (numberToFactorize % i == 0) {\n System.out.println(i + \" \");\n numberToFactorize = numberToFactorize / i;\n\n }\n }\n if (numberToFactorize > 2) {\n System.out.println(numberToFactorize);\n }\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = 1, lcm = 1;\n int temp = a;\n int temp2 = b;\n // int fact = 1;\n if (a > b) {\n\n for (int i = a; i < a * b;i+=a) {\n if ( i % b == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n } else {\n for (int i = b; i < a * b; i+=b) {\n if ( i%a == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n\n }\n gcd = (a * b) / lcm;\n System.out.println(gcd);\n System.out.println(lcm);\n }", "public static void factors(int number) {\n System.out.println(\"The factors of the numbers\" + number + \" are: \");\r\n // creating a for loop to go through the numbers to find its factors (dividing the number by each number until it is divisible by itself)\r\n for (int i = 1; i <= number; i++) {\r\n double answer = number / i;\r\n\r\n // if there are no reaminders print out the factors- if there is a remainder it is not a factor\r\n if (number % i == 0) {\r\n System.out.println((int) answer);\r\n }\r\n\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\t\tlong n = 600851475143L;\n\t\tArrayList<Integer> list = Primitives.primesUpTo((int)Math.sqrt(n));\n\t\tArrayList<Integer> list2 = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < list.size(); i++)\n\t\t{\n\t\t\tif(n % list.get(i) == 0)\n\t\t\t{\n\t\t\t\tlist2.add(list.get(i));\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(list2.get(list2.size() - 1));\n\t}", "private int d(final int n) {\r\n Set<Long> set = new Factors(n).getProperDivisors();\r\n long sum = 0;\r\n for (long i : set) {\r\n sum += i;\r\n }\r\n return (int) sum;\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tlong num = 600851475143L;\n\t\t\n\t\tList<Integer> primes = BasicPrimeFinder.getPrimes((int) Math.sqrt(num));\n\t\t\n\t\tfor(int i = primes.size() - 1; i > -1; i--) {\n\t\t\t\n\t\t\tif(num % primes.get(i) == 0) {\n\t\t\t\tSystem.out.println(primes.get(i));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "public int hashCode(){\n \n long code;\n\n // Values in linear combination with two\n // prime numbers.\n\n code = ((21599*(long)value)+(20507*(long)n.value));\n code = code%(long)prime;\n return (int)code;\n }", "public static void main(String[] args) {\nint N,i,fac=1;\nScanner fn=new Scanner(System.in);\nN =fn.nextInt();\nif(N<=20) {\n\tfor(i=N;i>=1;i--) {\n\t\tfac=fac*i;\n\t}\n}\nSystem.out.println(fac);\n\t}", "private int findDividingFactor(List<EventProducer> groupOfEP) {\n\t\tint dividingFactor = 0;\n\n\t\t// Try the first 10000 integer\n\t\tfor (int i = 1; i <= 10000; i++) {\n\t\t\tif (Math.pow(i, maxHierarchyDepth) > groupOfEP.size()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdividingFactor++;\n\t\t}\n\n\t\t// If we only found 1 as solution try to see if with the value 2, we\n\t\t// can find a working solution with a smaller hierarchy depth (which\n\t\t// means we will not necessarily reach the wanted maxdepth for this\n\t\t// group\n\t\tif (dividingFactor == 1) {\n\t\t\t// Try the first 10000 integer\n\t\t\tfor (int i = maxHierarchyDepth; i > 1; i--) {\n\t\t\t\tif (Math.pow(2, i) < groupOfEP.size()) {\n\t\t\t\t\tdividingFactor = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dividingFactor;\n\t}", "private static void factorsAndMultiplesDemo() throws CALExecutorException {\r\n \r\n // Make a list of the Integers 1..100 as vertices\r\n final List<Integer> ints = new ArrayList<Integer>();\r\n for (int i = 1; i <= 100; i++) {\r\n ints.add(Integer.valueOf(i));\r\n }\r\n \r\n // Construct a graph based on the vertices, and an edge a->b if b is a factor of a.\r\n final ImmutableDirectedGraph<Integer> factorsGraph = ImmutableDirectedGraph\r\n .makePredicateGraph(\r\n ints,\r\n new Predicate<Pair<Integer, Integer>>() {\r\n public boolean apply(Pair<Integer, Integer> value) {\r\n return value.fst().intValue() % value.snd().intValue() == 0;\r\n }},\r\n executionContext);\r\n \r\n System.out.println(factorsGraph);\r\n \r\n // Reversing the graph, we now have a graph with edges a->b for each pair (a,b) where b is a multiple of a.\r\n final ImmutableDirectedGraph<Integer> multiplesGraph = factorsGraph.reverse();\r\n \r\n System.out.println(multiplesGraph);\r\n \r\n // We filter the multiplesGraph to contain only vertices that are perfect squares\r\n final ImmutableDirectedGraph<Integer> squaresGraph = multiplesGraph.filter(new Predicate<Integer>() {\r\n public boolean apply(Integer vertex) {\r\n // a perfect square has an odd number of factors\r\n try {\r\n return factorsGraph.getNeighbours(vertex).size() % 2 == 1;\r\n } catch (CALExecutorException e) {\r\n throw new IllegalStateException(e);\r\n }\r\n }});\r\n \r\n System.out.println(squaresGraph);\r\n }", "private static int lpf(int i) {\n\t\tint j = i-1;\n\t\twhile(j>=2) {\n\t\t\tif (i%j == 0 && checkifprime(j)) {\n\t\t\t\treturn j;\n\t\t\t}\n\t\t\tj--;\n\t\t}\n\t\treturn 2;\n\t}", "static boolean isPrime(long num) {\n\t\tif(num==1)\n\t\t\treturn false;\n\t\tif(num==2 || num==3)\n\t\t\treturn true;\n\t\t\n\t\tif(num%2==0 || num%3==0)\n\t\t\treturn false;\n\t\t\n\t\tfor(int value=5; value*value<=num; value+=6)\n\t\t\tif(num%value==0 || num%(value+2)==0)\n\t\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "static int yeusOptimized(){\n for(int x=9;x>=0;--x){\tint a=x*100001; //Setting up palindrome. 100001 * 9 = 900009\n for(int y=9;y>=0;--y){\tint b=a+y*10010; //Setting up the inner numbers so 10010*9. 90090 + 900009 = 990099\n for(int z=9;z>=0;--z){\tint n=b+z*1100; //Final inner numbers 9900+990099 = 999999 Palindrome\n for(int i=990;i>99;i-=11){ //Since we start with the largest palindrome, we just need to make sure it is a factor of two 3 digit numbers.\n if(n%i==0){//If there is a remainder, i isn't a factor.\n int t=n/i; //t is the palindrome divided by the factor to get the other factor\n if(t<1000)return n; //make sure that other factor was also a 3 digit number (only one check since we're starting from the maximum possible values)\n }}}}} //And return the palindrome\n return 0;}", "private static int findSpecialPrimesSum() {\n // holds whether a prime number has invalid digits\n boolean invalidDigits;\n // holds whether a number is prime or not\n boolean[] notPrime = new boolean[UPPER_BOUND];\n // number of special primes found\n int numOfSpecialPrimes = 0;\n // sum of the special primes\n int sum = 0;\n // temp variable for a number\n int tempNum;\n\n // set all non prime numbers to true\n for (int index = SMALLEST_PRIME; index < notPrime.length; index++) {\n for (int counter = index * SMALLEST_PRIME; counter < notPrime.length; counter += index) {\n notPrime[counter] = true;\n }\n }\n\n // loop through all possible values\n for (int num = DIV_10; num < notPrime.length; num++) {\n // only run if the number is prime\n if (notPrime[num] == false) {\n // check if the number ends with a 3 or 7\n if (END_DIGITS[num % DIV_10] == true) {\n tempNum = num;\n // strip the number until we get the first digit\n invalidDigits = false;\n while (tempNum >= DIV_10) {\n // check if the prime has even digits that are not 2\n if ((tempNum % DIV_10) % SMALLEST_PRIME == 0 && tempNum % DIV_10 != SMALLEST_PRIME) {\n invalidDigits = true;\n break;\n }\n tempNum /= DIV_10;\n }\n // check if the prime has invalid digits\n if (invalidDigits == true) {\n continue;\n }\n // check if the number starts with 2,3,5,7\n if (START_DIGITS[tempNum] == true) {\n // check if the number is left and right truncatable\n if (leftTruncatablePrime(num, notPrime) == true\n && rightTruncatablePrime(num, notPrime) == true) {\n numOfSpecialPrimes++;\n sum += num;\n }\n }\n }\n }\n // if all 11 primes are found, exit loop\n if (numOfSpecialPrimes == NUM_OF_PRIMES) {\n break;\n }\n }\n\n return sum;\n }", "public int getPrime() {\n for (int i = m + 1; i < Integer.MAX_VALUE; i++) {\n int f = 0;\n for (int j = 2; j <= (int) sqrt(i); j++)\n if (i % j == 0) f++;\n if (f == 0) return i;\n }\n return MAXPRIME;\n }", "public int countPrimes(int n) {\n\t\tint count = 0;\n\t\tif (n <= 2)\n\t\t\treturn count;\n\t\telse\n\t\t\tcount += 1;\n\n\t\tfor (int i = 3; i < n; i += 2) {\n\t\t\tint divCount = 0;\n\t\t\tfor (int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif (i % j == 0) {\n\t\t\t\t\tdivCount++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (divCount == 0)\n\t\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "publci int countPrime(int n){\n boolean[] notPrime = new boolean[n];\n for (int i = 2; i * i <= n; i++){\n if(!notPrime[i]){\n for (int j = i; j * i < n; j++)\n notPrime[j * i] = true;\n }\n }\n}", "private boolean isPrime(int candidate) {\r\n\t\t\tboolean isPrime = true;\r\n\r\n\t\t\t// numbers <= 1 or even are not prime\r\n\t\t\tif ((candidate <= 1))\r\n\t\t\t\tisPrime = false;\r\n\t\t\t// 2 or 3 are prime\r\n\t\t\telse if ((candidate == 2) || (candidate == 3))\r\n\t\t\t\tisPrime = true;\r\n\t\t\t// even numbers are not prime\r\n\t\t\telse if ((candidate % 2) == 0)\r\n\t\t\t\tisPrime = false;\r\n\t\t\t// an odd integer >= 5 is prime if not evenly divisible\r\n\t\t\t// by every odd integer up to its square root\r\n\t\t\t// Source: Carrano.\r\n\t\t\telse {\r\n\t\t\t\tfor (int i = 3; i <= Math.sqrt(candidate) + 1; i += 2)\r\n\t\t\t\t\tif (candidate % i == 0) {\r\n\t\t\t\t\t\tisPrime = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn isPrime;\r\n\t\t}", "@Test\n\tpublic void generateRandomFactorIsBetweenExpectedLimits() {\n\t\t\n\t\t//when a good sample of randomly generated factors is generated\n\t\tList<Integer> randomFactors = IntStream.range(0, 1000).map(i -> randomGeneratorServiceImpl.generateRandomFactor()).boxed().collect(Collectors.toList());\n\t\t\n\t\t//then all of them should be between 11 and 100 because we want a middle-complexity calculation\n\t\tassertThat(randomFactors).containsOnlyElementsOf(IntStream.range(11, 100).boxed().collect(Collectors.toList()));\n\t}", "public static boolean areFactors(int n, int[] a){\n for(int i=0; i<a.length; i++){\n if(n % a[i] != 0) return false;\n }\n return true;\n }", "public int countPrimes(int n) {\n if (n < 2) {\n return 0;\n }\n Set<Integer> set = new HashSet<>();\n for (int i = 2; i < n; i++) {\n boolean flag = true;\n for (int key : set) {\n if (i % key == 0) {\n flag = false;\n break;\n }\n }\n if (flag) {\n set.add(i);\n }\n }\n return set.size();\n }", "public void solve() throws IOException {\r\n int T = nextInt();\r\n for (int t = 1; t <= T; t++) {\r\n int N = nextInt();\r\n int J = nextInt();\r\n \r\n out.format(\"Case #%d:%n\", t);\r\n \r\n boolean[] bitmask = new boolean[N - 2];\r\n int count = 0;\r\n while (count < J) {\r\n BigInteger[] factors = new BigInteger[9];\r\n boolean success = true;\r\n for (int base = 2; base <= 10; base++) {\r\n BigInteger value = BigInteger.ONE;\r\n BigInteger biBase = BigInteger.valueOf(base);\r\n \r\n for (int i = 0; i < N - 2; i++) {\r\n if (bitmask[i]) {\r\n value = value.add(biBase.pow(i + 1));\r\n }\r\n }\r\n value = value.add(biBase.pow(N - 1));\r\n \r\n if (value.isProbablePrime(10)) {\r\n success = false;\r\n break;\r\n } else {\r\n // Pollard rho\r\n BigInteger x = BigInteger.valueOf(2);\r\n BigInteger y = BigInteger.valueOf(2);\r\n BigInteger d = BigInteger.ONE;\r\n while (d.compareTo(BigInteger.ONE) == 0) {\r\n x = x.pow(2).add(BigInteger.ONE).mod(value);\r\n y = y.pow(2).add(BigInteger.ONE).mod(value)\r\n .pow(2).add(BigInteger.ONE).mod(value);\r\n d = x.subtract(y).gcd(value);\r\n }\r\n if (d.compareTo(value) != 0) {\r\n factors[base - 2] = d;\r\n } else {\r\n success = false;\r\n break;\r\n }\r\n }\r\n }\r\n if (success) {\r\n count++;\r\n StringBuilder sb = new StringBuilder(\"1\");\r\n for (int i = N - 3; i >= 0; i--) {\r\n if (bitmask[i]) {\r\n sb.append(1);\r\n } else {\r\n sb.append(0);\r\n }\r\n }\r\n sb.append(1);\r\n \r\n System.out.println(sb.toString() + \" \" + count);\r\n out.print(sb.toString());\r\n for (int i = 0; i < 9; i++) {\r\n out.print(\" \");\r\n out.print(factors[i].toString());\r\n }\r\n out.println();\r\n }\r\n \r\n // Increment bitmask\r\n for (int i = 0; i < N - 2; i++) {\r\n if (!bitmask[i]) {\r\n bitmask[i] = true;\r\n break;\r\n } else {\r\n bitmask[i] = false;\r\n }\r\n }\r\n }\r\n }\r\n }", "private static void primeCalc(int UI)\n\t{\n\t\tSystem.out.print(\"The Prime Numbers are: \");\n\t\tSystem.out.println();\n\t\t\n\t\tint P = 0;\n \n\t\twhile (++P <= UI) \n\t\t{\n\n \tint P2 = (int) Math.ceil(Math.sqrt(P));\n\n boolean Decision = false;\n\n while (P2 > 1) \n\t\t\t{\n\n \tif ((P != P2) && (P % P2 == 0)) \n\t\t\t\t{\n \tDecision = false;\n break;\n }\n\t\t\t\telse if (!Decision) \n\t\t\t\t{\n \tDecision = true;\n }\n\n --P2;\n\t\t\t}\n\n if (Decision) \n\t\t\t{\n \tSystem.out.println(P);\n \n }\n\n\t\n\t\t}\n\n\n\t}", "public static BigInteger generatePrimeNumber(BigInteger primeDivisor) {\n boolean foundPrime;\n BigInteger primeNumber;\n do {\n Random random = new Random();\n do {\n primeNumber = new BigInteger(352, random);\n } while (primeNumber.compareTo(BigInteger.ONE) <= 0);\n primeNumber = primeNumber.multiply(primeDivisor);\n primeNumber = primeNumber.add(BigInteger.ONE);\n foundPrime = checkIfPassesMillerRabin(primeNumber, 60);\n } while (!foundPrime);\n\n return primeNumber;\n }", "private synchronized void verifyNumbersPrime() {\n\t\tint primeIndex = 1;\n\t\tfor (int j = NUMBER_TWO; j <= Integer.MAX_VALUE && primeIndex < primes.length; j++) {\n\t\t\tif(isPrime(j)) {\n\t\t\t\tprimes[primeIndex++] = j;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n System.out.println(primeNumbers(1000000));\n\n }", "private static int[] findAllPrimes(int numberOfPrimes)\n\t{\n\t\tif (numberOfPrimes < 0)\n\t\t{\n\t\t\treturn new int[0];\n\t\t}\n\t\t\n\t\tint[] primes = new int[numberOfPrimes];\n\t\tint count = 0;\n\t\tint number = 2;\n\t\t\n\t\twhile (count < numberOfPrimes) \n\t\t{\n\t\t\tif ((number > 2) && ((number % 2) == 0))\n\t\t\t{\n\t\t\t\tnumber++;\n\t\t\t}\n\t\t\t\n\t\t\tboolean isPrime = true;\n\t\t\t\n\t\t\tfor (int index = 0; (index < count) && (primes[index] <= Math.sqrt(number)); index++) \n\t\t\t{\n\t\t\t\tif (number % primes[index] == 0) \n\t\t\t\t{\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (isPrime) \n\t\t\t{\n\t\t\t\tprimes[count] = number;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tnumber++;\n\t\t}\n\t\t\n\t\treturn primes;\n\t}", "public void findPrimeNumbers(){\n boolean [] numbers = new boolean[this.n +1];\n\n Arrays.fill(numbers,true);\n\n numbers[0]= numbers[1]=false;\n\n for (int i = P; i< numbers.length; i++) {\n if(numbers[i]) {\n for (int j = P; i*j < numbers.length; j++) {\n numbers[i*j]=false;\n }\n }\n }\n\n for (int i = 0; i < numbers.length; i++){\n if(numbers[i] == true){\n this.primeNumbers.add(i);\n }\n }\n\n }", "static boolean isPrime(long n)\n {\n // Corner cases\n if (n <= 1)\n return false;\n if (n <= 3)\n return true;\n \n // This is checked so that we can skip\n // middle five numbers in below loop\n if (n % 2 == 0 || n % 3 == 0)\n return false;\n \n for (int i = 5; i * i <= n; i = i + 6)\n if (n % i == 0 || n % (i + 2) == 0)\n return false;\n \n return true;\n }", "public static void factorize(int number) { \n\t\t\n int counter;\n boolean isStar = false;\n\t\tif( number < 2 ){\n\t\t\tSystem.out.println(\"No prime factors\");\n\t\t}\n\t\telse{\n\t\t\twhile(number % 2 == 0){\n if( isStar ) System.out.print(\" * \");\n\t\t\t\tSystem.out.print(\"2\");\n isStar = true; \n\t\t\t\tnumber = number / 2;\t\n\t\t }\n\t\t\t\n\t\t for(counter = 3; counter <= number; counter += 2){\n\t\t\t while(number % counter == 0){\n if( isStar ) System.out.print(\" * \");\n\t\t\t\t System.out.print(counter);\n isStar = true; \n\t\t\t\t number = number / counter;\t\t\t\t\n\t\t\t }\t\t\t\t\n\t\t }System.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter a number to get prime numbers below that number\");\nint givenum = sc.nextInt();\nint i,number,count;\nfor(number=1;number<=givenum;number++)\n{\n\tcount=0;\n\tfor(i=2;i<=number/2;i++)\n\t{\n\t\tif(number%i==0)\n\t\t{\n\t\t\tcount++;\n\t\t\tbreak;\n\t\t}\n\t}\nif(count==0 && number !=1)\n{\n\tSystem.out.println(number);\n}\n}\n\t}", "private static int fact(int n) {\n\t\tint prod = 1;\n\t\tfor (int i = 1; i <= n; prod *= i++)\n\t\t\t;\n\t\treturn prod;\n\t}", "public static void findPrime (int n){\n\t\tboolean [] isPrime = new boolean[n];\n\t\tisPrime[0] = false;\n\t\tisPrime[1] = true;\n\t\t\n\t\tfor(int i = 2; i< n; i++){\n\t\t\tisPrime[i]= true;\n\t\t}\n\t\tint limit = (int)Math.sqrt(n);\n\t\tfor(int i = 2; i<= limit; i++){\n\t\t\tif(isPrime[i])\n\t\t\t{\n\t\t\t\tfor(int j= i * i ; j < n; j+= i){\n\t\t\t\t\tisPrime[j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0; i< n; i++){\n\t\t\tif(isPrime[i])\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t Scanner sc=new Scanner(System.in);\n\n\t\tint a = 336;\n\t\tint c;\n\t\tint d=sc.nextInt();\n\t\tint b = 224;\n\t\t//int a = 336;\n\n\t\tint lcm=0;\n\t\t\n\t\tfor(int i=b;i<=a*b;i++){\n\t\t\tif(i%a==0 && i%b==0){\n\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//System.out.println(lcm);\n\t\t\n\t}", "public int factoring(int N) {\n\tfor (int i = N-1; i >= 1; i--)\n\t\tif (N % i == 0)\n\t\t\treturn i;\n\treturn 1;\n}", "static long getIdealNumber (long low,long high) {\n\n int exp3_Max= exp(3,high);\n int exp5_Max= exp(5,high);\n\n System.out.printf(\"Max exp3 (3^exp3_max) = %d , Max exp5(5^exp5_Max) = %d\" , exp3_Max , exp5_Max );\n System.out.println(\" \");\n\n\n int idealCounter=0;\n\n long n3=1L;\n\n\n for (int i=0;i<=exp3_Max;i++) {\n\n long n5=1l;\n \n for (int j=0;j<=exp5_Max;j++) {\n\n long num = n3*n5;\n System.out.printf(\"3^%d * 5^%d = %d%n\", i, j, num);\n\n if (num>high) {\n break ;\n }\n if (num>=low) {\n System.out.println(\"---> \" + num);\n idealCounter++;\n }\n n5*=5;\n\n }\n n3*=3;\n }\n\n return idealCounter;\n\n\n\n }", "@Override\n public String run() {\n long sum = 0;\n int limit = 2000000;\n for (int num = 2; num < limit; num++){\n if(isPrime(num)){\n sum += num;\n }\n }\n return Long.toString(sum);\n }", "public static void main(String[] args) {\n\t\tboolean Prime = true;\n\t\tint n=20;\n\t\tfor (int i=1;i<n;i++) {\n\t\t\tif (n%i==0) {\n\t\t\t\tSystem.out.println(\"Factor Number is \" +i);\n\t\t\t\t//Prime=false;\n\t\t\t\t//break;\n\t\t\t}\n\t\t}\n\t\n\t\n\n\t}", "static void pregenInverse() \n\t{ \n\t\tinvfact[0] = invfact[1] = 1; \n\n\t\t// calculates the modInverse of \n\t\t// the last factorial \n\t\tinvfact[1000000] = modInverse(fact[1000000], mod); \n\n\t\t// precalculates the modInverse of \n\t\t// all factorials by formulae \n\t\tfor (int i = 999999; i > 1; --i) \n\t\t{ \n\t\t\tinvfact[i] = (int) (((long) invfact[i + 1] \n\t\t\t\t\t* (long) (i + 1)) % mod); \n\t\t} \n\t}", "private static CopyOnWriteArrayList<Integer> getAllFactors (int numberUnderTest, CopyOnWriteArrayList<Integer> allFactors) {\n for (int i = 2; i <= numberUnderTest; i++) {\n if (numberUnderTest % i == 0) {\n allFactors.add(i);\n }\n }\n return allFactors;\n }", "public static void Factorization(int number)\n\t{\n\t\t for(int i = 2; i< number; i++)\n\t\t {\n\t while(number%i == 0) \n\t {\n\t System.out.print(i+\" \");\n\t number = number/i;\n\t\t\n\t }\n\t \n\t }\n \n if(2<=number)\n {\n System.out.println(number);\n }\n \n }", "public static BigInteger factoria(double value){\n BigInteger f = new BigInteger(\"1\");\n for (int i =1;i<=value;i++){\n f = f.multiply(BigInteger.valueOf(i));\n }\n return f; \n }", "private static long primeNumCount() {\n \n List<Integer> numbersList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);\n \n return numbersList.stream()\n .filter(Prime::isPrimeInFunctionalApproach2)\n .count();\n }", "public static void main(String[] args) {\n\t\tint i=1,j;\r\nString prime=\"\";\r\nfor( i=1;i<=100;i++){\r\n\tint c=0;\r\n\tfor( j=i;j>=i;j--){\r\n\t\tif(i%j==0){\r\n\t\t\tc=c+1;\r\n\t\t}\r\n\t}\r\n\tif(c==2){\r\n\t\tprime=prime+i+\"\";\r\n\t}\r\n}\r\nSystem.out.println(\"Enter the prime numbers are:\");\r\nSystem.out.println(\"prime\");\r\n\t}", "public int calculateNthPrime(int k) {\n\t\t// TODO Write an implementation for this method declaration \n\t\tint i =1;\n\t\tint testnum = 2;\n\t\tboolean isPrime = true; \n\t\tif(k == 0) {\n\t\t\tthrow new IllegalArgumentException(\"number cannot be 0 or 1\");\n\t\t}\n\t\twhile(i < k+1) {\n\t\t\tfor(int j = 2; j < testnum; j++) {\n\t\t\t\t\n\t\t\t\tif(testnum % j == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrime == true) {\n\t\t\t\t//System.out.println(\"test num\" + \" \" + testnum);\n\t\t\t\ttestnum++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if(isPrime == false) {\n\t\t\t\t//System.out.println(\"composite\" + \" \" + testnum);\n\t\t\t\ttestnum++;\n\t\t\t\tisPrime = true;\n\t\t\t}\n\t\t}\n\t\ti--;\n\t\ttestnum--;\n\t\t//System.out.println(i + \" \" + testnum);\n\n\t\treturn testnum;\n\t}", "public List<List<Integer>> getFactors(int n) {\n dfs(2, n);\n return ans;\n }", "public static void printPerfectNumbers(){\n\t\tfor(Long x:result){\n\t\t\tSystem.out.println(x);\n\t\t}\n\t}", "public static ArrayList primeFactors(int num, int num2)\n { \n //if the number is prime add it to the arrayList\n if(isPrime(num))\n {\n primeFactorsList.add(num); \n return primeFactorsList;\n } \n else if(num % num2 == 0)\n {\n primeFactors(num2, num2 -1); \n primeFactors(num / num2, (num / num2) - 1); \n }\n else\n {\n primeFactors(num, num2 - 1);\n }\n //return the arrayList to be printed\n return primeFactorsList;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\tint n = 15;\r\n\t\tint count=0;\r\n\t\t\r\n\t\tfor (int i =2;i<=n-1;i++)\r\n\t\t{\r\n\t\t\tif(n%i == 0)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(count==0)\r\n\t\t\t\r\n\t\t{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number is a prime number\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Number is not a prime number\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public int solution1(int N) {\n int numFactors = 0;\n for (int i = 1; i <= (double) Math.sqrt(N); i++) {\n if (N % i == 0) {\n if (i * i != N) {\n numFactors = numFactors + 2;\n } else if (i * i == N) {\n numFactors = numFactors + 1;\n }\n }\n }\n return numFactors;\n }" ]
[ "0.70558935", "0.70240706", "0.67843807", "0.671636", "0.6643987", "0.65063757", "0.6465586", "0.64267063", "0.64036095", "0.6376462", "0.63389987", "0.62393737", "0.6212035", "0.6186508", "0.616347", "0.6147016", "0.612831", "0.6098794", "0.6089193", "0.6082177", "0.60747313", "0.60512406", "0.6033878", "0.60266614", "0.59427035", "0.5942162", "0.5936425", "0.591208", "0.5862714", "0.58577234", "0.5856696", "0.5835009", "0.5832596", "0.58188206", "0.5817341", "0.57953095", "0.57906854", "0.5790234", "0.57823026", "0.57734895", "0.5754638", "0.57289493", "0.57088405", "0.56979", "0.5693649", "0.5674994", "0.5663834", "0.5660813", "0.56555325", "0.56515014", "0.56392395", "0.56378853", "0.5631045", "0.5613212", "0.56099033", "0.56087804", "0.5602871", "0.5600171", "0.55869", "0.55734545", "0.5568802", "0.55512154", "0.5544647", "0.5543332", "0.55359286", "0.5523368", "0.5522309", "0.5519461", "0.55186576", "0.55172086", "0.5515845", "0.55141914", "0.5508293", "0.5503509", "0.5494812", "0.548905", "0.5466856", "0.5457909", "0.5456346", "0.5454983", "0.54541546", "0.5453124", "0.545071", "0.5442459", "0.5442211", "0.5438388", "0.54351044", "0.54344875", "0.54322785", "0.5427845", "0.5421834", "0.5417212", "0.5416353", "0.5414649", "0.53984666", "0.53959453", "0.53874946", "0.53701186", "0.53669566", "0.53667736" ]
0.5897304
28
1.0 means not similar.
public byte[][] getBiArray() { return mbarrayBiValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "private float similarity(PetriNet pn1, PetriNet pn2, int internal) {\n\t\tNewPtsSet nps1 = computeSequenceSet(pn1);\n\t\tNewPtsSet nps2 = computeSequenceSet(pn2);\n\t\tdouble[][] seqM = computeSeqMatrix(nps1, nps2);\n\t\tdouble sim = computeSimilarityForTwoNet_Astar(seqM, nps1, nps2);\n\t\treturn (float) sim;\n\t}", "public double getRealSimilarity()\r\n {\r\n double result = (1 - this.similarity) * 100;\r\n BigDecimal big = new BigDecimal(result).setScale(2, RoundingMode.UP);\r\n return big.doubleValue();\r\n }", "@Override\n\tpublic float similarity(PetriNet pn1, PetriNet pn2) {\n\t\treturn similarity((PetriNet) pn1.clone(), (PetriNet) pn2.clone(), 1);\n\t}", "public float getSimilarity() {\n return similarity;\n }", "@Override\n public double similarity(SimComparator<OEMolBase> other, double minSim)\n { return similarity(other);\n }", "public double getSimilarity()\r\n {\r\n return similarity;\r\n }", "@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }", "@Override\n public int compare(Recognition lhs, Recognition rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "@Override\r\n\tpublic String getSimilarityExplained(String string1, String string2) {\r\n //todo this should explain the operation of a given comparison\r\n return null; //To change body of implemented methods use File | Settings | File Templates.\r\n }", "private boolean isApproximatelyEqualWeight(Node n, Node first) {\r\n\t\tDouble nwD = n.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n\t\tDouble fwD = first.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble fw = fwD==null ? 1.0 : fwD.doubleValue();\r\n\t\treturn fw*_alphaFactor <= nw;\r\n\t}", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "private boolean isApproximatelyEqual(Node n, Node first) {\r\n\t\tDouble nwD = n.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n\t\tDouble fwD = first.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble fw = fwD==null ? 1.0 : fwD.doubleValue();\r\n\t\treturn fw*_alphaFactor <= nw &&\r\n\t\t\t first.getNborsUnsynchronized().size()*_alphaFactor >= \r\n\t\t\t n.getNborsUnsynchronized().size();\r\n\t}", "public void testDifferentDotProducts() {\n List<ISpectrum> spectra = ClusteringTestUtilities.readISpectraFromResource();\n\n ISpectrum[] spectrums = (ISpectrum[]) spectra.toArray();\n\n int total = 0;\n int different = 0;\n ISimilarityChecker checker = new FrankEtAlDotProduct(0.5F, 15, true);\n ISimilarityChecker currentChecker = new FrankEtAlDotProductJohannes();\n\n Set<String> interestingIds = new HashSet<>();\n\n\n for (int i = 0; i < spectrums.length; i++) {\n ISpectrum psm1 = spectrums[i];\n for (int j = i + 1; j < spectrums.length; j++) {\n ISpectrum psm2 = spectrums[j];\n double dotOrg = checker.assessSimilarity(psm1, psm2);\n double dotNew = currentChecker.assessSimilarity(psm1, psm2);\n\n if (Math.abs(dotOrg - dotNew) > 0.00001) {\n different++;\n\n StringBuilder usedPeaksTester = new StringBuilder();\n\n // these are the really interesting cases\n dotOrg = checker.assessSimilarity(psm1, psm2);\n\n double noClosestPeak = dotNew;\n dotNew = currentChecker.assessSimilarity(psm1, psm2);\n String id2 = psm2.getId();\n String id1 = psm1.getId();\n interestingIds.add(id1);\n interestingIds.add(id2);\n\n // System.out.println(usedPeaksTester.toString());\n // System.out.printf(id2 + \":\" + id1 + \" \" + \"Old: %8.3f Newx: %8.3f New: %8.3f\\tDiff: %8.3f\\n\", dotOrg, noClosestPeak, dotNew, dotOrg - dotNew);\n }\n total++;\n\n }\n\n }\n\n List<String> sorted = new ArrayList<>(interestingIds);\n Collections.sort(sorted);\n // System.out.println(\"Interesting Ids\");\n for (String s : sorted) {\n // System.out.println(s);\n }\n\n\n TestCase.assertEquals(0, different);\n }", "@Override\r\n\tpublic float getUnNormalisedSimilarity(String string1, String string2) {\r\n //todo check this is valid before use mail [email protected] if problematic\r\n return getSimilarity(string1, string2);\r\n }", "float getMatch();", "@Test\n public void testExactness() {\n assertMetrics(\"exactness:1\", \"a b c\",\"a x b x x c\");\n assertMetrics(\"exactness:0.9\", \"a b c\",\"a x b:0.7 x x c\");\n assertMetrics(\"exactness:0.7\", \"a b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.775\", \"a!200 b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.65\", \"a b c!200\",\"a x b:0.6 x x c:0.5\");\n }", "@Test void compareToNaive() {\n\t\tfor (var type : new ImageType[]{ImageType.SB_U8, ImageType.SB_U16, ImageType.SB_F32, ImageType.SB_F64}) {\n\t\t\tvar src = (ImageGray)type.createImage(width, height);\n\t\t\tvar dst = (ImageGray)type.createImage(1, 1);\n\n\t\t\tGImageMiscOps.fillUniform(src, rand, 0, 100);\n\n\t\t\tdouble mean = GImageStatistics.mean(src);\n\t\t\tGeometricMeanFilter.filter(src, radiusX, radiusY, mean, dst);\n\n\t\t\tassertEquals(width, dst.width);\n\t\t\tassertEquals(height, dst.height);\n\n\t\t\tfor (int y = 0; y < dst.height; y++) {\n\t\t\t\tfor (int x = 0; x < dst.width; x++) {\n\t\t\t\t\tdouble found = GeneralizedImageOps.get(dst, x, y);\n\t\t\t\t\tassertEquals(naiveMean(src, x, y, radiusX, radiusY), found, 1.0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int getSimilarity() {\n return similarity;\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "@Test\n public void testSegmentationGreedyness() {\n assertMetrics(\"match:0.3717\",\"a b c\",\"a x b x x x x x x x x b c\");\n assertMetrics(\"match:0.4981\",\"a b c\",\"a x z x x x x x x x x b c\");\n }", "public static double similarity(TopicLabel l1,TopicLabel l2)\n\t{\n\t\tdouble sim = 0;\n\t\tint i = 0;\n\t\tfor(String w: l2.listWords)\n\t\t{\n\t\t\tif(l1.listWords.contains(w))\n\t\t\t{\n\t\t\t\tint j = l1.listWords.indexOf(w);\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/ l1.Pw_given_l.get(j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/Config.EPSELON);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sim;\n\t}", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public void setSimilarity(float value) {\n this.similarity = value;\n }", "public double getSimilarity(Pair<String, String> representations);", "@Override\n public int compare(Prediction lhs, Prediction rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }", "double computeSimilarity(double[] vector1, double[] vector2) {\n\n // We need doubles for these so the math is done correctly. Else we only\n // return 1 or 0.\n double nDifferences = 0.;\n double lengthOfVector = (double) vector1.length;\n\n for (int i = 0; i < vector1.length; i++) {\n if (vector1[i] != vector2[i]) {\n nDifferences ++;\n }\n } \n return (1. - (nDifferences/lengthOfVector));\n }", "public static double similarity(Color c1,Color c2){\n LOG.info(\"C1,\"+c1.toString()+\",C2:\"+c2.toString());\n //\n double r2_r1 = distance(c2.getRed(),c1.getRed());\n double g2_g1 = distance(c2.getGreen(),c1.getGreen());\n double b2_b1 = distance(c2.getBlue(),c1.getBlue());\n\n double distance = Math.sqrt(r2_r1+g2_g1+b2_b1);\n double avgRgb = Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2));\n double differ = distance/avgRgb;\n LOG.info(\"differ,\"+differ+\"distance:\"+distance+\",avgRgb:\"+avgRgb);\n return 1.00-differ;\n }", "public static double similarity(ColorHsv c1,ColorHsv c2){\n LOG.info(\"Ch1,\"+c1.toString()+\",Ch2:\"+c2.toString());\n //\n double avgHue = (c1.H + c2.H)/2;\n double distance = Math.abs(c1.H-avgHue);\n double differ = distance/avgHue;\n LOG.info(\"differ:\"+differ+\"distance:\"+distance+\",avgHue:\"+avgHue);\n return 1.00-differ;\n }", "public double matchingUpdate(String title) {\n\n double matching = 0.0;\n double num = 0.0;\n double denom = 0.0;\n\n ArrayList<Configuration> gameConf = MainModel.getInstance().getConfigurationsFromGame(title);\n\n for(Configuration conf : gameConf) {\n\n if(conf.getSelected()) {\n\n if (! conf.getVocalActions().isEmpty() && conf.getModel() == null) {\n denom++;\n }\n\n for (Link link : conf.getLinks()) {\n\n Log.d(\"MATCHING_UPDATE\", \"Link: \" + link.getEvent().getName());\n\n if (link.getAction() == null) {\n\n Log.d(\"MATCHING_UPDATE\", \"Dentro if di Link\");\n denom++;\n\n }\n else {\n\n Log.d(\"MATCHING_UPDATE\", \"Dentro else di Link\");\n num++;\n denom++;\n }\n }\n }\n }\n\n if(denom > 0.0) {\n matching = num / denom;\n\n }\n else {\n matching = 0.0;\n }\n\n Log.d(\"MATCHING_UPDATE\", title+\" num: \"+num+\" denom: \"+denom);\n return matching;\n\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "@Override\r\n\tpublic final float getSimilarity(final String string1, final String string2) {\r\n //split the strings into tokens for comparison\r\n final ArrayList<String> str1Tokens = this.tokeniser.tokenizeToArrayList(string1);\r\n final ArrayList<String> str2Tokens = this.tokeniser.tokenizeToArrayList(string2);\r\n \r\n if (str1Tokens.size() == 0){\r\n \treturn 0.0f;\r\n }\r\n\r\n float sumMatches = 0.0f;\r\n float maxFound;\r\n for (Object str1Token : str1Tokens) {\r\n maxFound = 0.0f;\r\n for (Object str2Token : str2Tokens) {\r\n final float found = this.internalStringMetric.getSimilarity((String) str1Token, (String) str2Token);\r\n if (found > maxFound) {\r\n maxFound = found;\r\n }\r\n }\r\n sumMatches += maxFound;\r\n }\r\n return sumMatches / str1Tokens.size();\r\n }", "@Test\n public void testInterestAccumulated() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getInterestAccumulated(), results.getInterestAccumulated(), 0.15);\n }", "public double similarity(REPOverlap rep2) {\r\n\t\tdouble p = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i=0;i<dist.length;i++) {\r\n\t\t\tp += Math.sqrt(dist[i]*rep2.dist[i]);\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "@Test\n public void testMatch() {\n assertMetrics(\"match:1\", \"a\",\"a\");\n assertMetrics(\"match:0.9339\",\"a\",\"a x\");\n assertMetrics(\"match:0\", \"a\",\"x\");\n assertMetrics(\"match:0.9243\",\"a\",\"x a\");\n assertMetrics(\"match:0.9025\",\"a\",\"x a x\");\n\n assertMetrics(\"match:1\", \"a b\",\"a b\");\n assertMetrics(\"match:0.9558\",\"a b\",\"a b x\");\n assertMetrics(\"match:0.9463\",\"a b\",\"x a b\");\n assertMetrics(\"match:0.1296\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x b\");\n assertMetrics(\"match:0.1288\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x x x x x x b\");\n\n assertMetrics(\"match:0.8647\",\"a b c\",\"x x a x b x x x x x x x x a b c x x x x x x x x c x x\");\n assertMetrics(\"match:0.861\", \"a b c\",\"x x a x b x x x x x x x x x x a b c x x x x x x c x x\");\n assertMetrics(\"match:0.4869\",\"a b c\",\"a b x x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.4853\",\"a b c\",\"x x a x b x x x x x x x x x x b a c x x x x x x c x x\");\n assertMetrics(\"match:0.3621\",\"a b c\",\"a x b x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3619\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3584\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x c\");\n assertMetrics(\"match:0.3474\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x b x x x b x b x\");\n assertMetrics(\"match:0.3421\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.305\" ,\"a b c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.2927\",\"a b!200 c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n }", "protected double nameSimilarity(String n1, String n2, boolean useWordNet)\n\t{\n\t\tif(n1.equals(n2))\n\t\t\treturn 1.0;\n\t\t\n\t\t//Split the source name into words\n\t\tString[] sW = n1.split(\" \");\n\t\tHashSet<String> sWords = new HashSet<String>();\n\t\tHashSet<String> sSyns = new HashSet<String>();\n\t\tfor(String w : sW)\n\t\t{\n\t\t\tsWords.add(w);\n\t\t\tsSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 2)\n\t\t\t\tsSyns.addAll(wn.getAllNounWordForms(w));\n\t\t}\n\t\t\n\t\t//Split the target name into words\n\t\tString[] tW = n2.split(\" \");\n\t\tHashSet<String> tWords = new HashSet<String>();\n\t\tHashSet<String> tSyns = new HashSet<String>();\t\t\n\t\tfor(String w : tW)\n\t\t{\n\t\t\ttWords.add(w);\n\t\t\ttSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 3)\n\t\t\t\ttSyns.addAll(wn.getAllWordForms(w));\n\t\t}\n\t\t\n\t\t//Compute the Jaccard word similarity between the properties\n\t\tdouble wordSim = Similarity.jaccard(sWords,tWords)*0.9;\n\t\t//and the String similarity\n\t\tdouble simString = ISub.stringSimilarity(n1,n2)*0.9;\n\t\t//Combine the two\n\t\tdouble sim = 1 - ((1-wordSim) * (1-simString));\n\t\tif(useWordNet)\n\t\t{\n\t\t\t//Check if the WordNet similarity\n\t\t\tdouble wordNetSim = Similarity.jaccard(sSyns,tSyns);\n\t\t\t//Is greater than the name similarity\n\t\t\tif(wordNetSim > sim)\n\t\t\t\t//And if so, return it\n\t\t\t\tsim = wordNetSim;\n\t\t}\n\t\treturn sim;\n\t}", "private float getPERScore(NameInfo name1Info, NameInfo name2Info) {\n\t\t// initials compared with full name\n\t\tString acroName1 = name1Info.getName();\n\t\tString acroName2 = name2Info.getName();\n\t\tif (acroName1.length() == acroName2.length()) { // similar names, perhaps with misspelling or apostrophe\n\t\t\tif (ed.score(acroName1, acroName2) <= 1.0f)\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\tString shortName = \"\";\n\t\tif (acroName1.length() > acroName2.length()){\n\t\t\tshortName = acroMan.findAcronym(acroName1);\n\t\t\tif (shortName.equalsIgnoreCase(acroName2))\n\t\t\t\treturn 1.0f;\n\t\t} else {\n\t\t\tshortName = acroMan.findAcronym(acroName2);\n\t\t\tif (shortName.equalsIgnoreCase(acroName1))\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\t\n\t\t// last name compared with full name\n\t\tString longName = \"\";\n\t\tshortName = \"\";\n\t\tif ((name1Info.getName()).length() >= (name2Info.getName()).length()) {\n\t\t\tlongName = name1Info.getName();\n\t\t\tshortName = name2Info.getName();\n\t\t} else {\n\t\t\tlongName = name2Info.getName();\n\t\t\tshortName = name1Info.getName();\n\t\t}\n\t\tString [] tokensLong = longName.split(\"\\\\s+\");\n\t\tfor (String word : tokensLong) {\n\t\t\tif (shortName.equalsIgnoreCase(word))\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\t\n\t\t// first and last names are too similar for NameParser to distinguish\n\t\tString Name1 = name1Info.getName(), Name2 = name2Info.getName();\n\t\tString [] tokens1 = (Name1.trim()).split(\"\\\\s+\");\n\t\tString [] tokens2 = (Name2.trim()).split(\"\\\\s+\");\n\t\tif (tokens1.length == tokens2.length && tokens1.length == 2) {\n\t\t\tString [] shortened = removeSameWords(Name1, Name2);\n\t\t\tString shortName1 = shortened[0], shortName2 = shortened[1];\n\t\t\tfloat preciseScore = (float)LSHUtils.dice(shortName1, shortName2);\n\t\t\tif (preciseScore < 0.5f)\n\t\t\t\treturn 0.0f;\n\t\t\telse\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\t\n\t\t// score using NameParser \n\t\tfloat maxScore = 0.0f;\n\t\tfloat maxExtraScore = 0.0f ;\n\t\tString name1Extra, name2Extra ;\n\t\tfloat perScore ;\n\n\t\tArrayList<String> candidate1 = name1Info.getCandidates();\n\t\tArrayList<String> candidate2 = name2Info.getCandidates();\n\t\tint n = candidate1.size();\n\t\tint m = candidate2.size();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString name1 = candidate1.get(i);\n\t\t\tname1Parser.parsing(name1);\n\n\t\t\tname1Extra = name1Parser.getExtraName() ;\n\t\t\tif(! name1Extra.isEmpty())\n\t\t\t\textraName1Parser.parsing(name1Extra) ;\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tString name2 = candidate2.get(j);\n\t\t\t\tname2Parser.parsing(name2);\n\n\t\t\t\tname2Extra = name2Parser.getExtraName() ;\n\t\t\t\tif(! name2Extra.isEmpty())\n\t\t\t\t\textraName2Parser.parsing(name2Extra) ;\n\n\t\t\t\tif (name1.equals(name2))\n\t\t\t\t\tperScore = 1.0f;\n\t\t\t\telse {\n\t\t\t\t\tperScore = name1Parser.compare(name2Parser);\n\t\t\t\t\tfloat extraPerScore ;\n\t\t\t\t\tif( name1Extra.isEmpty() || name2Extra.isEmpty() )\n\t\t\t\t\t\textraPerScore = (name1Extra.isEmpty() && name2Extra.isEmpty()) ? perScore : 0.9f ;\n\t\t\t\t\telse\n\t\t\t\t\t\textraPerScore = (name1Extra.equals(name2Extra)) ? 1.0f : extraName1Parser.compare(extraName2Parser) ;\n\n\t\t\t\t\tperScore = (perScore + extraPerScore) / 2.0f ;\n\t\t\t\t}\n\t\t\t\tif (perScore > maxScore)\n\t\t\t\t\tmaxScore = perScore;\n\n\t\t\t\tif( ! name1Extra.isEmpty() ) {\n\t\t\t\t\tperScore = extraName1Parser.compare(name2Parser) ;\n\t\t\t\t\tif (perScore > maxExtraScore)\n\t\t\t\t\t\tmaxExtraScore = perScore;\n\t\t\t\t}\n\t\t\t\tif( ! name2Extra.isEmpty() ) {\n\t\t\t\t\tperScore = name1Parser.compare(extraName2Parser) ;\n\t\t\t\t\tif (perScore > maxExtraScore)\n\t\t\t\t\t\tmaxExtraScore = perScore;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (maxExtraScore > maxScore) ? maxExtraScore : maxScore ;\n\t}", "@Test\n public final void testSimilarity() {\n System.out.println(\"similarity\");\n RatcliffObershelp instance = new RatcliffObershelp();\n\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"ring\" ==> 4, \"My s\" ==> 3, \"s\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(4 + 3 + 1) / (9 + 9)\n\t\t// = 16/18\n\t\t// = 0.888888\n assertEquals(\n 0.888888,\n instance.similarity(\"My string\", \"My tsring\"),\n 0.000001);\n\t\t\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"My \" ==> 3, \"tri\" ==> 3, \"g\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(3 + 3 + 1) / (9 + 9)\n\t\t// = 14/18\n\t\t// = 0.777778\n assertEquals(\n 0.777778,\n instance.similarity(\"My string\", \"My ntrisg\"),\n 0.000001);\n\n // test data from essay by Ilya Ilyankou\n // \"Comparison of Jaro-Winkler and Ratcliff/Obershelp algorithms\n // in spell check\"\n // https://ilyankou.files.wordpress.com/2015/06/ib-extended-essay.pdf\n // p13, expected result is 0.857\n assertEquals(\n 0.857,\n instance.similarity(\"MATEMATICA\", \"MATHEMATICS\"),\n 0.001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.7368421052631579\n assertEquals(\n 0.736842,\n instance.similarity(\"aleksander\", \"alexandre\"),\n 0.000001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.6666666666666666\n assertEquals(\n 0.666666,\n instance.similarity(\"pennsylvania\", \"pencilvaneya\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 14/18 = 0.7777777777777778‬\n assertEquals(\n 0.777778,\n instance.similarity(\"WIKIMEDIA\", \"WIKIMANIA\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 24/40 = 0.65\n assertEquals(\n 0.6,\n instance.similarity(\"GESTALT PATTERN MATCHING\", \"GESTALT PRACTICE\"),\n 0.000001);\n \n NullEmptyTests.testSimilarity(instance);\n }", "double sentenceSim(ParsedSentence ps){\n\t\t\n\t\tdouble rst = 0;//should always compare the short sentence to the longer, in order to maintain the same sim value for a pair!\n\t\tif(this.hasWords.size()*ps.hasWords.size()>0){\n\t\t\tSystem.out.println(\"~~Comparing sentences~~\");//\n\t\t\tfor(String tw:this.hasWords){\n\t\t\t\tdouble score = 0;\n\t\t\t\tfor(String pw:ps.hasWords){\n\t\t\t\t\ttry{\n\t\t\t\t\t\t//System.out.print(tw+\" 's sim with \"+pw+\" is: \");//\n\t\t\t\t\t\tdouble d = MainClass.simJCn.getSimilarity(tw,pw).getSimilarity();//synset vs pos\n\t\t\t\t\t\tif(d>1){//same words's similarity can go to E9+\n\t\t\t\t\t\t\td=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(d);//\n\t\t\t\t\t\tif(d>score){\n\t\t\t\t\t\t\tscore=d;\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\tSystem.out.println(\" word out of the dictionary passed.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trst+=score;\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}", "public long numSimilarities();", "@Test\n public void testSignificance() {\n assertMetrics(\"significance:1\", \"a\",\"a\");\n assertMetrics(\"significance:0\", \"a\",\"x\");\n assertMetrics(\"significance:0.3333\",\"a a a\",\"a\");\n assertMetrics(\"significance:1\", \"a\",\"a a a\");\n assertMetrics(\"significance:1\", \"a b c\",\"a b c\");\n assertMetrics(\"significance:1\", \"a b c\",\"x x a b x a x c x x a b x c c x\");\n\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a\");\n assertMetrics(\"significance:0.6667\",\"a b c\",\"a b\");\n\n assertMetrics(\"significance:1\", \"a b c%0.2\",\"a b c\"); // Best\n assertMetrics(\"significance:0.75\",\"a b c%0.2\",\"b c\"); // Middle\n assertMetrics(\"significance:0.5\", \"a b c%0.2\",\"a b\"); // Worst\n\n assertMetrics(\"significance:1\",\"a%0.3 b c%0.2\",\"a b c\"); // Best too\n\n assertMetrics(\"significance:1\", \"a b c%0.05\",\"a b c\"); // Best\n assertMetrics(\"significance:0.6\",\"a b c%0.05\",\"b c\"); // Worse\n assertMetrics(\"significance:0.4\",\"a b c%0.05\",\"b\"); // Worse\n assertMetrics(\"significance:0.2\",\"a b c%0.05\",\"c\"); // Worst\n assertMetrics(\"significance:0.8\",\"a b c%0.05\",\"a b\"); // Middle\n\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b c\"); // Best\n assertMetrics(\"significance:0.5\",\"a b c%0\",\"b c\"); // Worst\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b\"); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\"); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\");\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\");\n\n // The query also has other terms having a total significance of 0.3\n // so we add a significance parameter which is the sum of the significances of this query terms + 0.3\n assertMetrics(\"significance:0.25\", \"a\",\"a\",0.4f);\n assertMetrics(\"significance:0\", \"y\",\"a\",0.4f);\n assertMetrics(\"significance:0.1667\",\"a a a\",\"a\",0.6f);\n assertMetrics(\"significance:0.25\", \"a\",\"a a a\",0.4f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"a b c\",0.6f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"x x a b x a x c x x a b x c c x\",0.6f);\n\n assertMetrics(\"significance:0.1667\",\"a b c\",\"a\",0.6f);\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a b\",0.6f);\n\n assertMetrics(\"significance:0.5714\",\"a b c%0.2\",\"a b c\",0.7f); // Best\n assertMetrics(\"significance:0.4286\",\"a b c%0.2\",\"b c\",0.7f); // Middle\n assertMetrics(\"significance:0.2857\",\"a b c%0.2\",\"a b\",0.7f); // Worst\n\n assertMetrics(\"significance:0.6667\",\"a%0.3 b c%0.2\",\"a b c\",0.9f); // Better than best\n\n assertMetrics(\"significance:0.4545\",\"a b c%0.05\",\"a b c\",0.55f); // Best\n assertMetrics(\"significance:0.2727\",\"a b c%0.05\",\"b c\",0.55f); // Worse\n assertMetrics(\"significance:0.1818\",\"a b c%0.05\",\"b\",0.55f); // Worse\n assertMetrics(\"significance:0.0909\",\"a b c%0.05\",\"c\",0.55f); // Worst\n assertMetrics(\"significance:0.3636\",\"a b c%0.05\",\"a b\",0.55f); // Middle\n\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b c\",0.5f); // Best\n assertMetrics(\"significance:0.2\",\"a b c%0\",\"b c\",0.5f); // Worst\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b\",0.5f); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\",0.5f); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\",0.3f);\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\",0.3f);\n }", "boolean similarCard(Card c);", "private static int almostEqual(GroundTerm a, GroundTerm b) {\r\n\t\treturn StringUtils.getLevenshteinDistance(a.toString(), b.toString());\r\n\t}", "public static double similarity(Library a, Library b) {\n double numerator = commonPhotos(a, b).size();\n if (a.numPhotos() == 0 || b.numPhotos() == 0) { // check if both libraries have 0 photos\n return 0;\n } else if (a.numPhotos() > b.numPhotos()) { // checking to see which number to divide by\n return numerator / b.numPhotos();\n } else {\n return numerator / a.numPhotos();\n }\n }", "public float getTotalCorrectMatches() {\n\t\treturn totalCorrectMatches;\n\t}", "public void testCompareFloatStrings() {\n\t\tString one = 1.01 + \"\";\n\t\tString two = 1.02+\"\";\n\t\t//1.01 ist kleiner wie 1.02\n\t\tassertTrue(comp.compareFloat(one, two) < 0);\n\t\tassertTrue(comp.compareFloat(one, one) == 0);\n\t\tassertTrue(comp.compareFloat(two ,one) > 0);\n\t}", "public static double compareImage(BufferedImage myImage, BufferedImage otherImage) {\n\t\tif (otherImage.getWidth() != myImage.getWidth()) {\n\t\t\tLOG.info(\"图片宽度不一致\");\n\t\t\treturn 0; \n\t\t}\n\t\tif (otherImage.getHeight() != myImage.getHeight()) {\n\t\t\tLOG.info(\"图片高度不一致\");\n\t\t\treturn 0; \n\t\t}\n\t\tint width = myImage.getWidth();\n\t\tint height = myImage.getHeight();\n\t\tint numDiffPixels = 0;\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tif (myImage.getRGB(x, y) != otherImage.getRGB(x, y)) {\n\t\t\t\t\tnumDiffPixels++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdouble numberPixels = height * width;\n\t\tdouble samePixels = numberPixels - numDiffPixels;\n\t\tdouble samePercent = samePixels / numberPixels * 100;\n\t\tLOG.info(\"相似像素数量:\" + samePixels + \" 不相似像素数量:\" + numDiffPixels + \" 相似率:\" + String.format(\"%.1f\", samePercent) + \"%\");\n\t\treturn samePercent;\n\t}", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "public static double getResemblance(Vector<Long> v1, Vector<Long> v2) {\n int minSize = Math.min(v1.size(), v2.size());\n int count = 0;\n for (int i=0; i < minSize; i++) {\n if (v1.get(i) != -1 && (v1.get(i).equals(v2.get(i)))) {\n count++;\n } //else {\n //System.out.println(\"in position \"+i+\": \"+v1.get(i)+\" is different from \"+v2.get(i));\n //}\n }\n return count/(double) minSize;\n }", "private float calculateSimilarityScore(int numOfSuspiciousNodesInA, int numOfSuspiciousNodesInB) {\n\t\t// calculate the similarity score\n\t\treturn (float) (numOfSuspiciousNodesInA + numOfSuspiciousNodesInB) \n\t\t\t\t/ (programANodeList.size() + programBNodeList.size()) * 100;\n\t}", "float getSpecialProb();", "@Override\n public int compareTo(AutocompleteObject o) {\n return Double.compare(o.similarity, similarity);\n }", "public static double similarity(Library a, Library b) {\r\n double sizeA = a.getPhotos().size();\r\n double sizeB = b.getPhotos().size();\r\n\r\n if (sizeA == 0.0 || sizeB == 0.0) { // return 0.0 if either library is empty\r\n return 0.0;\r\n } else {\r\n int size = commonPhotos(a, b).size();\r\n if (sizeA < sizeB) { // return amount of common photos divided by the smaller library\r\n return size / sizeA;\r\n } else {\r\n return size / sizeB;\r\n }\r\n }\r\n\r\n }", "@Override\n public int compare(Slope s1, Slope s2){\n if(s2.deno * s1.nomi - s1.deno * s2.nomi < 0) return -1;\n else if(s2.deno * s1.nomi - s1.deno * s2.nomi > 0) return 1;\n else return 0;\n }", "public static float similarity(String str) {\n\t\t/*Set<Character> distinct = symbols(str);\n\t\tif (distinct.size() != str.length()) {\n\t\t\tstr = \"\";\n\t\t\tfor (Character ch : distinct) str += ch;\n\t\t}*/\n\t\tMap<Character, Float> bySymbol = new HashMap<Character, Float>(); \n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<str.length()-1; i++) {\n\t\t\tfor (int j=i+1; j<str.length(); j++) {\n\t\t\t\tchar ch1 = str.charAt(i);\n\t\t\t\tchar ch2 = str.charAt(j);\n\t\t\t\tString bigram = \"\"+ch1+ch2;\n\t\t\t\tFloat val = Ciphers.cosineSimilaritiesMap.get(bigram);\n\t\t\t\tif (val == null) val = 0f;\n\t\t\t\t//System.out.println(bigram+\": \" + val);\n\t\t\t\tsum += val;\n\t\t\t\t\n\t\t\t\tFloat val2 = bySymbol.get(ch1);\n\t\t\t\tif (val2 == null) val2 = 0f;\n\t\t\t\tval2 += val;\n\t\t\t\tbySymbol.put(ch1, val2);\n\t\t\t\t\n\t\t\t\tval2 = bySymbol.get(ch2);\n\t\t\t\tif (val2 == null) val2 = 0f;\n\t\t\t\tval2 += val;\n\t\t\t\tbySymbol.put(ch2, val2);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//for (Character ch : bySymbol.keySet()) System.out.println(\"Sum for symbol [\" + ch + \"]: \" + bySymbol.get(ch));\n\t\treturn sum;\n\t}", "public int compareTo(FontMatch match) {\n/* 710 */ return Double.compare(match.score, this.score);\n/* */ }", "@Test\n public void testAsinsBehaveSimilarly() {\n double tolerance = 0.00000001;\n double standardAsin1 = Math.asin(1);\n double j2meAsin1 = MathUtils.asin(1);\n Assert.assertTrue(\"Math.asin(1) = \" + standardAsin1\n + \", while MathUtils.asin(1) = \" + j2meAsin1,\n Math.abs(standardAsin1 - j2meAsin1) < tolerance);\n }", "public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "private boolean similarity(WindowData currentWindow, WindowData nextWindow) {\n double c_ori = currentWindow.getOrientation();\n double c_velo = currentWindow.getVelocity();\n double n_ori = nextWindow.getOrientation();\n double n_velo = nextWindow.getVelocity();\n\n // Check if the orientation and velocity are within threshold\n if ((Math.abs(c_ori - n_ori) < CoreService.orientationThreshold) &&\n (Math.abs(c_velo - n_velo) < CoreService.velocityThreshold)) {\n return true;\n }\n return false;\n }", "public SimilarityScore sim(int eq1, int eq2);", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_minWordP = (-988.56143);\n double double0 = naiveBayesMultinomialText0.getMinWordFrequency();\n assertEquals((-988.56143), double0, 0.01);\n }", "public boolean lessEqualP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) <= (yRatio.numerator * x.denominator));\n }\n }\n }", "public int getExact() { return exactMatches; }", "public static double equivalence(double one, double two) {\n return two/one;\n }", "static boolean areIdentical(Line l1, Line l2) {\n return areParallel(l1, l2) && (Math.abs(l1.c - l2.c) < EPS);\n }", "private int compareUniqueness(double val1, double val2) {\n return Integer.compare((int) (val1 * 10000d), (int) (val2 * 10000d));\n }", "private static boolean arePointsDifferent(double dLat0, double dLon0, double dLat1, double dLon1){\n\t\tif(fuzzyEquals(dLat0,dLat1,0.0000000000001) && fuzzyEquals(dLon0,dLon1,0.0000000000001)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean isEqual(FusableBooks record1, FusableBooks record2) {\n\t\treturn sim.calculate(record1.getBookName(), record2.getBookName()) == 1.0;\n\t}", "private double moyenne(Hashtable<Integer, Double> h){\n\t\tEnumeration<Integer> e = h.keys();\n\t\tdouble res = 0 ;\n\t\t// On somme l'ensemble des distances entre cette tables et les tables occuppées, on divise ensuite.\n\t\twhile(e.hasMoreElements()){ res += h.get(e.nextElement()) ; }\n\t\tres /= h.size() ;\n\t\treturn res ;\n\t}", "@Test\n public void showHandledPeaksForInterestingCases() {\n List<ISpectrum> spectra = ClusteringTestUtilities.readISpectraFromResource();\n\n ISpectrum[] spectrums = (ISpectrum[]) spectra.toArray();\n\n ISimilarityChecker checker = new FrankEtAlDotProductTester();\n ISimilarityChecker currentChecker = new FrankEtAlDotProduct(0.5F, 15, true);\n\n //noinspection UnnecessaryLocalVariable,UnusedDeclaration,UnusedAssignment\n Set<String> interestingIds = new HashSet<>();\n\n\n for (int i = 0; i < spectrums.length; i++) {\n ISpectrum psm1 = spectrums[i];\n String id1 = psm1.getId();\n if (!INTERESTING_ID_SET.contains(id1))\n continue; // not an interesting case\n\n for (int j = i + 1; j < spectrums.length; j++) {\n ISpectrum psm2 = spectrums[j];\n\n String id2 = psm2.getId();\n if (!INTERESTING_ID_SET.contains(id2))\n continue; // not an interesting case\n\n // System.out.println(\"Comparing \" + id1 + \" \" + id2);\n\n StringBuilder usedPeaksTester = new StringBuilder();\n\n //noinspection UnnecessaryLocalVariable,UnusedDeclaration,UnusedAssignment\n double dotOrg = checker.assessSimilarity(psm1, psm2);\n\n // System.out.println(\"Peaks compared original Frank Et Al (when the code is written)\");\n // print usage\n // System.out.println(usedPeaksTester.toString());\n\n usedPeaksTester.setLength(0); // clear debug output\n double dotNew = currentChecker.assessSimilarity(psm1, psm2);\n\n // print usage\n // System.out.println(\"Peaks compared current Frank Et Al \");\n // System.out.println(usedPeaksTester.toString());\n\n\n }\n\n }\n }", "public static void checkConsistency(){\n double[] aNormalW=new double[numberOfObjectives];\n double randomIndex=0;\n double sum=0;\n for (int row=0;row<numberOfObjectives;row++){\n for (int column=0;column<numberOfObjectives;column++){\n\n sum+=weights[column]*objectives[row][column];\n }\n df.setRoundingMode(RoundingMode.UP);\n aNormalW[row]= Double.valueOf(df.format(sum));\n sum=0;\n }\n double awtDividedByWt=0;\n for (int i=0;i<numberOfObjectives;i++){\n awtDividedByWt+=aNormalW[i]/weights[i];\n decimalFormat.setRoundingMode(RoundingMode.HALF_UP);\n Double.valueOf(decimalFormat.format(awtDividedByWt));\n }\n double reciprocalNumber=(double) 1/numberOfObjectives;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n Double.valueOf(decimalFormat.format(reciprocalNumber));\n double step3=reciprocalNumber*awtDividedByWt;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double numerator=Double.valueOf(decimalFormat.format(step3))-numberOfObjectives;\n double denominator=numberOfObjectives-1;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double ci=Double.valueOf(decimalFormat.format(numerator)) /denominator;\n decimalFormat.setRoundingMode(RoundingMode.CEILING);\n System.out.println(\"Consistency Index (CI)= \"+Double.valueOf(decimalFormat.format(ci)));\n System.out.println();\n double ciDividedByRI=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n // Double.valueOf(df.format(ciDividedByRI));\n if (ciDividedByRI<0.10){\n randomIndex=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n System.out.println(\"Random Index (RI)= \"+Double.valueOf(decimalFormat.format(randomIndex)));\n System.out.println(\"degree of consistency is satisfactory !!\");\n }else {\n System.out.println(\"the AHP may not yield meaningful results !!\");\n }\n System.out.println();\n }", "float getConfidence();", "@Test\n public void testRepeatedMatch() {\n assertMetrics(\"fieldCompleteness:1 queryCompleteness:0.6667 segments:1 earliness:1 gaps:1\",\n \"pizza hut pizza\",\"pizza hut\");\n }", "public boolean compareWeight(Weight w1, Weight w2){\n return Double.compare(w1.value*w1.unit.baseUnitConversion, w2.value*w2.unit.baseUnitConversion) == 0;\n }", "public double similarity(String word,String word2) {\n if(word.equals(word2))\n return 1.0;\n\n INDArray vector = Transforms.unitVec(getWordVectorMatrix(word));\n INDArray vector2 = Transforms.unitVec(getWordVectorMatrix(word2));\n if(vector == null || vector2 == null)\n return -1;\n return Nd4j.getBlasWrapper().dot(vector,vector2);\n }", "private static double mpSpeechHeaderSimilarityScore(MPVertex pCurrMPVertex, MP pMP2)\n\t{\n\t\tMPVertex tempMPVertex = new MPVertex(pMP2.getEmail(), getWordIndex());\n\t\tdouble similarityScore = pCurrMPVertex.subtract(tempMPVertex).vLength();\n\t\treturn similarityScore;\n\t}", "public BM25Similarity(){\n this.b = 0.75f;\n this.k = 1.2f;\n }", "public Double getTotalMatched(){\n return totalMatched;\n }", "int compareToFloat(floats f);", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "public boolean almostEqual(double a, double b);", "public double checkModel() {\n\treturn (Weights[2] * Unigram.checkModel() + \n\t\tWeights[1] * Bigram.checkModel() +\n\t\tWeights[0] * Trigram.checkModel());\n }", "@Test\n\tpublic void testStructureSimilarity1() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, false, true);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (7)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (17)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 3, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Philipp\", 7, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 13, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getStructureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (7)\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (10)\n\t\t// 01.01.15: (00:00) + (00:10) Philipp (10)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (17)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (1)\n\t\t// 31.12.15: (01:01) ++++++ (02:00) Tobias (2)\n\t\t// 31.12.15: (00:00) + (00:10) Philipp (10)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 10, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Philipp\", 10, \"01.01.2015 00:00:00\", \"01.01.2015 00:10:00\");\n\t\tloadData(\"Tobias\", 1, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 2, \"31.12.2015 01:01:00\", \"31.12.2015 02:00:00\");\n\t\tloadData(\"Philipp\", 10, \"31.12.2015 00:00:00\", \"31.12.2015 00:10:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(SUM(IDEAS)) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\t// assertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(3.2, r.getStructureDistance(), 0.0);\n\t\tassertEquals(3.2, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\t}", "boolean isNearMatch(double score);", "public void testInvariantWithNumberOfMusicians()\n\t{\n\t\t//featuresA.setDistanceWeight( true );\n\t\tfeaturesA.setRelative( true );\n\t\tfeaturesA.setValue( iMe, new PathFeature( new Path( \"/main/s1\"), piece ));\n\t\taddMusicianAtDistance( featuresA, \"/main/s2\", 1.0 );\n\t\tdouble weight = featuresA.getAverageValue();\n\t\tdouble expected = GroupNumericFeature.getWeightForSquaredDistance( 1.0 );\n\t\tassertEquals( \"Someone who is 1 away playing 1 ahead gives correct weight\",\n\t\t\t\t\texpected, weight, 0.001 );\n\t\taddMusicianAtDistance( featuresA, \"/main/s2\", 1.0 );\n\t\tdouble weightb = featuresA.getAverageValue();\n\t\tassertEquals( \"Another musician the same distance away playing the same section doesn't affect the result\", \n\t\t\t\texpected, weightb, 0.001 );\n\t\taddMusiciansAtDistance( featuresA, \"/main/s2\", 1.0, 20 );\n\t\tdouble weightc = featuresA.getAverageValue();\n\t\tassertEquals( \"Many musicians at unit distance give the same result\", \n\t\t\t\tweight, weightc, 0.0001 );\n\t\t\n\t}", "@Test\n public void epsilonEquals() {\n float[] a = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f, 6.0f}; \n assertTrue(Vec4f.epsilonEquals(a, 2, b, 3, 0.01f));\n assertTrue(! Vec4f.epsilonEquals(a, 0, b, 0, 0.01f));\n \n float[] a4 = new float[] {1.0f, 2.0f, 3.0f, 4.0f}; \n \n float[] b4 = new float[] {1.01f, 2.02f, 3.03f, 4.04f};\n float[] c4 = new float[] {2.0f, 2.0f, 3.0f, 4.0f};\n float[] d4 = new float[] {1.0f, 4.0f, 3.0f, 4.0f};\n float[] e4 = new float[] {1.0f, 2.0f, 6.0f, 4.0f};\n float[] f4 = new float[] {1.0f, 2.0f, 3.0f, 5.0f};\n assertTrue(Vec4f.epsilonEquals(a4,b4, 0.05f));\n assertTrue(!Vec4f.epsilonEquals(a4,b4, 0.02f));\n assertTrue(!Vec4f.epsilonEquals(a4,c4, 0.1f));\n assertTrue(!Vec4f.epsilonEquals(a4,d4, 0.1f));\n assertTrue(!Vec4f.epsilonEquals(a4,e4, 0.1f));\n assertTrue(!Vec4f.epsilonEquals(a4,f4, 0.1f));\n \n }", "@Override\n\tpublic Scores compare(File f1, File f2) {\n\t\treturn new Scores(1.0, \"AlwaysTrueComparisonStrategy:1\");\n\t}", "public static boolean roughlyEqual(double a, double b) {\n if (Double.isNaN(a)) {\n return Double.isNaN(b);\n }\n\n if (Double.isNaN(b)) {\n return false;\n }\n\n return Math.abs(a - b) < 0.01;\n }", "public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, b\n\tdouble[][] input = new double[][] { new double[] { 1, 1 },\n\t\tnew double[] { 1, 2 }, new double[] { 1, 1 - small / 10 },\n\t\tnew double[] { 1, 1 + small / 10 },\n\n\t\tnew double[] { 0, 1 }, new double[] { 0, 0 },\n\t\tnew double[] { 0, -1 }, new double[] { 0, small / 100 },\n\t\tnew double[] { 2100000001.0001, 2100000001.0003 }, };\n\n\t// Output: less, equals\n\tboolean[][] output = new boolean[][] { new boolean[] { false, true },\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true },\n\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true }, };\n\n\tfor (int i = 0; i < input.length; ++i) {\n\t boolean l = StandardFloatingPointComparator.getDouble().less(\n\t\t input[i][0], input[i][1]);\n\t boolean e = StandardFloatingPointComparator.getDouble().equals(\n\t\t input[i][0], input[i][1]);\n\n\t boolean ne = StandardFloatingPointComparator.getDouble().notEquals(\n\t\t input[i][0], input[i][1]);\n\t boolean le = StandardFloatingPointComparator.getDouble()\n\t\t .lessOrEquals(input[i][0], input[i][1]);\n\t boolean g = StandardFloatingPointComparator.getDouble().greater(\n\t\t input[i][0], input[i][1]);\n\t boolean ge = StandardFloatingPointComparator.getDouble()\n\t\t .greaterOrEquals(input[i][0], input[i][1]);\n\n\t boolean less = output[i][0];\n\t boolean equals = output[i][1];\n\n\t boolean notEquals = !equals;\n\t boolean lessOrEquals = less || equals;\n\t boolean greater = !lessOrEquals;\n\t boolean greaterOrEquals = !less;\n\n\t assertFalse(l != less);\n\t assertFalse(g != greater);\n\t assertFalse(e != equals);\n\t assertFalse(ne != notEquals);\n\t assertFalse(le != lessOrEquals);\n\t assertFalse(ge != greaterOrEquals);\n\t}\n }", "public double compare_by_content(String content, String _content)\n\t{\n\t\t/**\n\t\t * To be implemented\n\t\t * \n\t\t * */\n\t\treturn 0.0;\n\t}", "public float getConfidence();", "private float distanceMoyenne(DMatchVector bestMatches){\n\n float DM=0.0f;\n for(int i=0;i<bestMatches.size();i++){\n\n DM+=bestMatches.get(i).distance();\n }\n\n DM=DM/bestMatches.size();\n return DM;\n\n }", "@Override\r\n\tpublic int compareTo(Double another) {\n\t\treturn 0;\r\n\t}", "int getLikelihoodValue();", "public double compare_by_screenname(String name, String _name)\n\t{\n\t\t\n\t\tJaroWinklerDistance j = new JaroWinklerDistance();\n \tdouble w = j.apply(name, _name);\n \tDecimalFormat df = new DecimalFormat(\"#.#\");\n \tw = Double.valueOf(df.format(w));\n \t\n\t\treturn w;\n\t}", "public double tolerance() {return tolerance;}", "@Test\n public void testOriginalAmountOwed() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getOriginalAmountOwed(), results.getOriginalAmountOwed(), 0.15);\n }", "private void joinSingleNumberAsFuzzy(double v) {\n if (Double.isNaN(v))\n flags |= NUM_NAN;\n else if (Double.isInfinite(v))\n flags |= NUM_INF;\n else if (isZero(v))\n flags |= NUM_ZERO;\n else if (isUInt32(v))\n flags |= NUM_UINT_POS; // not zero due to the zero-check above\n else\n flags |= NUM_OTHER;\n }", "@Test\n\tpublic void testCountSimilarity() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, true, false);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 15, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 5, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a global measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 30.11.15: (00:10) +++++ (01:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 00:10:00\", \"30.11.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MIN(IDEAS) AS IDEAS ON TIME.DEF.HOUR\",\n\t\t\t\t\t\t\"NAME='Philipp'\"), 1);\n\t\tr = res.get(0);\n\t\t// 70 minutes (00:00 - 00:09 and 01:01 - 02:00)\n\t\tassertEquals(70.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(70.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Edison\", 5, \"30.11.2015 00:00:00\", \"30.11.2015 00:50:00\");\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 01:00:00\", \"30.11.2015 02:00:00\");\n\t\tloadData(\"Edison\", 5, \"01.01.2015 00:10:00\", \"01.01.2015 00:50:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00)\n\t\tassertEquals(1.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(1.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\t}" ]
[ "0.65339905", "0.64875305", "0.63898045", "0.63877857", "0.6362546", "0.6276948", "0.62603956", "0.6214069", "0.6165262", "0.6054141", "0.6048647", "0.6026919", "0.6009336", "0.59995866", "0.5980829", "0.59710956", "0.59281856", "0.59163636", "0.5891541", "0.5866537", "0.5844361", "0.58431077", "0.5818568", "0.5787052", "0.57644945", "0.57586396", "0.5752872", "0.5739371", "0.5733096", "0.5709035", "0.5699446", "0.5658679", "0.5652992", "0.56446165", "0.5635951", "0.561929", "0.5592489", "0.5573941", "0.55717885", "0.5568812", "0.55656147", "0.55593395", "0.555109", "0.5544768", "0.5536381", "0.55347484", "0.5533734", "0.55298716", "0.5526059", "0.5508885", "0.5505553", "0.55050606", "0.55020005", "0.55000395", "0.5497096", "0.5469624", "0.54472136", "0.5436537", "0.54258925", "0.5398925", "0.53931475", "0.5389192", "0.5379837", "0.5370797", "0.5361204", "0.5348381", "0.5345016", "0.53420174", "0.53371674", "0.5329821", "0.53282094", "0.5320505", "0.531711", "0.5314611", "0.53048414", "0.5303521", "0.53025824", "0.5299143", "0.52892166", "0.5288682", "0.52871656", "0.52853996", "0.5277558", "0.5270369", "0.5268898", "0.52642953", "0.52576286", "0.5256809", "0.52472365", "0.52367806", "0.5229639", "0.5227251", "0.52252626", "0.52208775", "0.5219118", "0.5212878", "0.5204136", "0.5203329", "0.51972497", "0.5189766", "0.5189655" ]
0.0
-1
this function is just used for change unitprototype, this ser should have been an enum type.
public void setStructExprRecog(UnitProtoType.Type unitType, String strFont, ImageChop imgChop) { mnExprRecogType = EXPRRECOGTYPE_ENUMTYPE; mType = unitType; mstrFont = strFont; mimgChop = imgChop; mlistChildren = new LinkedList<StructExprRecog>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeSEREnumType(UnitProtoType.Type unitType, String strFont) {\n mnExprRecogType = EXPRRECOGTYPE_ENUMTYPE;\n mType = unitType;\n mstrFont = strFont;\n mlistChildren = new LinkedList<StructExprRecog>();\n }", "@Override\r\n public String toString() {\r\n return unit.getName();\r\n }", "public UnitTypes GetCurrentUnitType()\n {\n return MethodsCommon.GetTypeFromUnit(Unit);\n }", "public abstract String getUnit();", "public ServicesFormatEnum(){\n super();\n }", "public void setUnit(Unit newUnit){\r\n tacUnit = newUnit;\r\n }", "protected void\nsetTranspTypeElt( int type) \n\n{\n coinstate.transptype = type;\n}", "public void setUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum unit)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNIT$6);\n }\n target.setEnumValue(unit);\n }\n }", "public interface CHANGED_TYPE {\r\n public static final int FEE = 1;\r\n public static final int GRACE_PERIOD = 2;\r\n }", "public Enum() \n { \n set(\"\");\n }", "public String getUnit () {\n\treturn this.unit;\n }", "public String getUnit();", "public Unit getUnit(){\r\n return tacUnit;\r\n }", "private EnumEstadoLeyMercado(String codigoValor, Integer codigoTipo) {\n\t\tthis.codigoValor = codigoValor;\n\t\tthis.codigoTipo = codigoTipo;\n\t}", "@Override\n public String toString() {\n return value + symbol(this.type);\n }", "public void setUnit (String value) {\n\tthis.unit = value;\n }", "public void setUnitType(com.redknee.util.crmapi.soap.subscriptions.xsd._2010._06.SubscriptionBundleUnitType param){\n localUnitTypeTracker = true;\n \n this.localUnitType=param;\n \n\n }", "@Test\n\tpublic void testExternalValueAndNameUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tenummDt.add(\"Yellow\", 10);\n\t\tenummDt.add(\"Magenta\", 5);\n\n\t\t// note: this tests triggers a code path for updating the name that relies upon the name\n\t\t// being edited *after* new values are added above.\n\t\tString oldName = enummDt.getName();\n\t\tString newName = oldName + \"_updated\";\n\t\tenummDt.setName(newName);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\n\t\tassertEquals(10, getValue(en, \"Yellow\"));\n\t\tassertEquals(5, getValue(en, \"Magenta\"));\n\t\tassertEquals(newName, en.getName());\n\t}", "public void setUnit(String unit);", "public String getToUnit() {\r\n return this.toUnit;\r\n }", "@Override\n public int getType() {\n return 0x1c;\n }", "public String toString() {\n return _iotaEnum + \" - \" + _value ;\n }", "private Object writeReplace() throws ObjectStreamException {\n return new MeasureUnitProxy(type, subType);\n }", "public String backup() {\n try {\n// System.out.println(\"enum backup====\");\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ObjectOutputStream out = new ObjectOutputStream(baos);\n int nodeCount = EnumFactory.numberOfTypes;\n out.writeInt(nodeCount);\n for(int i=0; i<nodeCount; i++) {\n out.writeInt(countKeys[i]);\n out.writeInt(countKeys[i]);\n }\n out.close();\n return Base64.getEncoder().encodeToString(baos.toByteArray());\n } catch (IOException e) {\n System.out.print(\"IOException occurred.\" + e.toString());\n e.printStackTrace();\n return \"\";\n }\n }", "@Override\r\n\tpublic void vehicleType() {\n\r\n\t}", "@Override\r\n public String toString() {\r\n return \"InventoryChange [\" + \"type=\" + type + \", physicalCount=\" + physicalCount\r\n + \", adjustment=\" + adjustment + \", transfer=\" + transfer + \", measurementUnit=\"\r\n + measurementUnit + \", measurementUnitId=\" + measurementUnitId + \"]\";\r\n }", "public short getPrimitiveType() {\n \t\treturn unitType;\n \t}", "private void changeUnitWithDirection() {\n MainActivity app = MainActivity.app;\n if (app == null) return;\n int unit = SharedPreferencesManager.getCurrencyUnit(app);\n switch (unit) {\n case BRConstants.CURRENT_UNIT_BITS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_MBITS);\n break;\n case BRConstants.CURRENT_UNIT_MBITS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_BITCOINS);\n break;\n case BRConstants.CURRENT_UNIT_BITCOINS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_BITS);\n break;\n }\n\n }", "protected String getEnumeration()\n {\n return enumeration;\n }", "@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }", "String getUnit();", "public sym_complex_enum() {\n }", "@Override\n public String toString ()\n {\n return \"type = \" + type;\n }", "String getBaseUnit() {\n return baseUnit;\n }", "public String getCode() {\n return _toBaseUnit._code;\n }", "public Enum(String val) \n { \n set(val);\n }", "public byte getUnits() { return units; }", "public com.redknee.util.crmapi.soap.subscriptions.xsd._2010._06.SubscriptionBundleUnitType getUnitType(){\n return localUnitType;\n }", "private void encodeEnum(Encoder encoder, Enum type, int size) throws IOException {\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tencodeNameIdAttributes(encoder, type);\n\t\tlong[] keys = type.getValues();\n\t\tString metatype = \"uint\";\n\t\tfor (long key : keys) {\n\t\t\tif (key < 0) {\n\t\t\t\tmetatype = \"int\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tencoder.writeString(ATTRIB_METATYPE, metatype);\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, type.getLength());\n\t\tencoder.writeBool(ATTRIB_ENUM, true);\n\t\tfor (long key : keys) {\n\t\t\tencoder.openElement(ELEM_VAL);\n\t\t\tencoder.writeString(ATTRIB_NAME, type.getName(key));\n\t\t\tencoder.writeSignedInteger(ATTRIB_VALUE, key);\n\t\t\tencoder.closeElement(ELEM_VAL);\n\t\t}\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}", "public String getUnit()\n {\n return (this.unit);\n }", "DefiningUnitType getDefiningUnit();", "void setValue(gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum value);", "public String getUnit() {\n\t\treturn(symbol);\n\t}", "@Test\n\tpublic void testExternalNameUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tString oldName = enummDt.getName();\n\t\tString newName = oldName + \"_updated\";\n\t\tenummDt.setName(newName);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\t\tassertEquals(newName, en.getName());\n\t}", "@Override\r\n\tpublic void visit(EnumDefinition enumDefinition) {\n\r\n\t}", "private FamilyStatusType(String legacyLabel) {\n this.legacyLabel = legacyLabel;\n }", "@Test\n\tpublic void testExternalValueUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tenummDt.add(\"Yellow\", 10);\n\t\tenummDt.add(\"Magenta\", 5);\n\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\n\t\tassertEquals(10, en.getValue(\"Yellow\"));\n\t\tassertEquals(5, en.getValue(\"Magenta\"));\n\n\t\ttransactionID = program.startTransaction(\"Test\");\n\t\tenummDt.remove(\"Red\");\n\t\tenummDt.add(\"Red\", 25);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\ten = model.getEnum();\n\t\tassertEquals(25, en.getValue(\"Red\"));\n\t\tassertEquals(\"Red\", model.getValueAt(model.getRowCount() - 1, NAME_COL));\n\t}", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum getUnit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n return null;\n }\n return (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum)target.getEnumValue();\n }\n }", "Type(byte value) {\n\t\t\tthis.value = value;\n\t\t}", "public interface EnumsKeyConstants {\n\n /*客户状态*/\n static final String CSTM_STATE = \"CSTM_STATE\";\n\n interface CSTMSTATE {\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*正常*/\n static final String NORMAL = \"01\";\n\n /*停用*/\n static final String BLOCKUP = \"02\";\n\n /*冻结*/\n static final String FROZEN = \"03\";\n }\n\n /*短信类型*/\n static final String SMS_TYPE = \"SMS_TYPE\";\n\n interface SMSTYPE {\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*验证码*/\n static final String VERCODE = \"01\";\n\n /*通知*/\n static final String NOTICE = \"02\";\n\n /*营销*/\n static final String MARKETING = \"03\";\n\n /*未知*/\n static final String UNKNOWN = \"04\";\n }\n\n /*模板类型*/\n static final String SMODEL_TYPE = \"SMODEL_TYPE\";\n\n interface SMODELTYPE {\n /*验证码*/\n static final String VERCODE = \"01\";\n\n /*通知&订单*/\n static final String NOTICE = \"02\";\n }\n\n /*审核状态*/\n static final String AUDIT_STATE = \"AUDIT_STATE\";\n\n interface AUDITSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*审核中*/\n static final String ING = \"01\";\n\n /*审核通过*/\n static final String ED = \"02\";\n\n /*审核驳回*/\n static final String DF = \"03\";\n\n }\n\n /*运营商类型*/\n static final String OPERATOR_TYPE = \"OPERATOR_TYPE\";\n\n interface OPERATORTYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*移动*/\n static final String MOBILE = \"01\";\n\n /*电信*/\n static final String TELECOM = \"02\";\n\n /*联通*/\n static final String UNICOM = \"03\";\n }\n\n /*通道状态*/\n static final String CHANNEL_STATE = \"CHANNEL_STATE\";\n\n interface CHANNELSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*可用*/\n static final String ENABLE = \"01\";\n\n /*禁用*/\n static final String DISABLE = \"02\";\n }\n\n /*短信发送状态*/\n static final String SMSSEND_STATE = \"SMSSEND_STATE\";\n\n interface SMSSENDSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*成功*/\n static final String SUCCESS = \"01\";\n\n /*失败*/\n static final String FAILURE = \"02\";\n\n /*未知*/\n static final String UNKNOWN = \"03\";\n\n /*无效*/\n static final String INVALID = \"04\";\n\n /*其他*/\n static final String OTHER = \"05\";\n }\n\n /*短息接收状态*/\n static final String SMSDELIV_STATE = \"SMSDELIV_STATE\";\n\n interface SMSDELIVSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*收到*/\n static final String DELIV = \"01\";\n\n /*未收到*/\n static final String UNDELIV = \"02\";\n }\n\n /*批次单状态*/\n static final String BATCH_STATE = \"BATCH_STATE\";\n\n interface BATCHSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*等待发送*/\n static final String WAIT = \"01\";\n\n /*发送中*/\n static final String ING = \"02\";\n\n /*完成*/\n static final String FINISH = \"03\";\n\n /*已撤回*/\n static final String REVOKE = \"04\";\n\n /*已驳回*/\n static final String REJECT = \"05\";\n }\n\n /*适用范围类型*/\n static final String USEAGE_TYPE = \"USEAGE_TYPE\";\n\n interface USEAGETYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*通用*/\n static final String PUB = \"01\";\n\n /*个人*/\n static final String PRI = \"02\";\n }\n\n /*是否发送*/\n static final String SMSSEND_CODE = \"SMSSEND_CODE\";\n\n interface SMSSENDCODE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*发送*/\n static final String SEND = \"01\";\n\n /*不发送*/\n static final String DESEND = \"02\";\n }\n\n /*短信数量增减类型*/\n static final String ACCOUNT_TYPE = \"ACCOUNT_TYPE\";\n\n interface ACCNTTYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*充值*/\n static final String ADDITION = \"01\";\n\n /*消费*/\n static final String SUBTRACTION = \"02\";\n\n }\n\n /*充值单审核状态*/\n static final String RECHARGE_STATE = \"RECHARGE_STATE\";\n\n interface RECHARGESTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*成功*/\n static final String SUCCESS = \"01\";\n\n /*失败*/\n static final String FAILURE = \"02\";\n\n /*确认中*/\n static final String COMFIRM = \"03\";\n\n /*已取消*/\n static final String CANCEL = \"04\";\n\n }\n\n /*手机号是否在黑名单中*/\n static final String REPLY_BLACK = \"REPLY_BLACK\";\n\n interface REPLYBLACK{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*不在黑名单中*/\n static final String NOTINT = \"01\";\n\n /*在黑名单中*/\n static final String INT = \"02\";\n\n\n }\n /*逻辑删除enable*/\n static final String DELETE_ENABLE = \"DELETE_ENABLE\";\n\n interface DELETEENABLE{\n\n /*已删除*/\n static final Integer DELETE = 0;\n\n /*未删除*/\n static final Integer UNDELE = 1;\n\n\n }\n /*适用范围 模板 通用,个人*/\n static final String SUIT_RANGE = \"SUIT_RANGE\";\n\n interface SUITRANGE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*通用*/\n static final String COMMON = \"01\";\n\n /*个人*/\n static final String PERSONAL = \"02\";\n\n\n }\n\n /*使用場景 01 平台 , 02 接口*/\n static final String USE_TYPE = \"USE_TYPE\";\n\n interface USETYPE{\n\n /*平台*/\n static final String PLTFC = \"01\";\n\n /*接口*/\n static final String INTFC = \"02\";\n }\n\n /* 提醒类型 */\n static final String REMIND_TYPE = \"REMIND_TYPE\";\n\n interface REMINDTYPE{\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 短信数量 */\n static final String SMS_NUM = \"01\";\n /* 发送频率*/\n static final String SEND_RATE = \"02\";\n }\n\n /* 阈值类型 */\n static final String THRESHOLD_TYPE = \"THRESHOLD_TYPE\";\n\n interface THRESHOLDTYPE {\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 小于 */\n static final String LESS_THAN = \"01\";\n /* 等于*/\n static final String EQUAL = \"02\";\n /* 大于*/\n static final String GREATER_THAN = \"03\";\n }\n\n /* 客户类型 */\n static final String CSTM_TYPE = \"CSTM_TYPE\";\n\n interface CSTMTYPE{\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 个人 */\n static final String PERSON = \"01\";\n /* 企业*/\n static final String COMPANY = \"02\";\n }\n\n /* 支付状态 */\n static final String PAY_TYPE = \"PAY_TYPE\";\n\n interface PAYTYPE{\n /* 审核中 */\n static final String UNPAY = \"01\";\n /* 通过 */\n static final String PAY = \"02\";\n /* 驳回 */\n static final String REJECT = \"03\";\n /* 已取消 */\n static final String CANCEL = \"04\";\n }\n\n /* 任务状态 */\n static final String TASK_STATE = \"TASK_STATE\";\n\n interface TASKSTATE{\n /* 待发送 */\n static final String WAIT_SEND = \"01\";\n /* 已发送 */\n static final String SEND = \"02\";\n /* 成功 */\n static final String SUCCESS = \"03\";\n /* 失败 */\n static final String FAIL = \"04\";\n }\n\n /* 收款账户 */\n static final String PAY_ACCOUNT = \"PAY_ACCOUNT\";\n\n interface PAYACCOUNT{\n /* 个人账户 */\n static final String PRIVATE = \"01\";\n /* 对公账户 */\n static final String PUBLIC = \"02\";\n }\n\n}", "public void setUnits(byte units) { this.units = units; }", "protected String getStrainType()\n{\n\treturn \"Met E\";\n}", "public UnitConverter() {\r\n getParameters();\r\n }", "@Override\r\n\t\t\tpublic void serializar() {\n\r\n\t\t\t}", "public interface Division extends BusinessObject, Serializable {\n\n /**\n * Accessor method for Name.\n * <br>longTextAttribute The name of the division\n *\n * @return java.lang.String attribute of this Division.\n */\n public java.lang.String getName();\n\n /**\n * Mutator method for Name.\n * <br>longTextAttribute The name of the division\n *\n * @param aName set java.lang.String attribute of this Division.\n */\n public void setName(java.lang.String aName);\n\n\n /**\n * The enumeration for Name\n */\n public final static int NAME = 0;\n\n\n\n\n\n}", "public void testEnumUsingToString() throws Exception\n {\n assertEquals(\"\\\"c2\\\"\", MAPPER.writeValueAsString(AnnotatedTestEnum.C2));\n }", "private FileImport_RunImporter_PauseProcessing_Current_Type_ID_Enum( int v) {\n value = v;\n }", "@Updatable\n public String getUnit() {\n return unit;\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_DIGITAL_GOODS_QUANTITY_CHANGE;\n }", "@Override\n public void marshal(Object object, HierarchicalStreamWriter writer, MarshallingContext context) {\n EnumValue enumValue = (EnumValue) object;\n writer.startNode(\"enumValue\");\n net.ssehub.easy.varModel.model.datatypes.Enum e = \n (net.ssehub.easy.varModel.model.datatypes.Enum) enumValue.getDatatype();\n writer.addAttribute(\"project\", String.valueOf(e.getTopLevelParent().getName()));\n writer.addAttribute(\"type\", enumValue.getDatatype().getName());\n writer.addAttribute(\"enum\", enumValue.getQualifiedName());\n writer.endNode();\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "private ProfitPerTariffType ()\n {\n super();\n }", "@Override\n\tpublic void type() {\n\t\t\n\t}", "public String asString() {\n\t\t\tString enumName;\n\t\t\tswitch(this) {\n\t\t\tcase INDEX:\n\t\t\t\tenumName = \"index\";\n\t\t\t\tbreak;\n\t\t\tcase NAME:\n\t\t\t\tenumName = \"name\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tenumName = \"unsupported\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn enumName;\n\t\t}", "private EndpointStatusType(String type)\n\t\t{\n\t\t\tthis.type = type;\n\t\t}", "@Override\n public String getSpeedType() {\n return type;\n }", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn type;\n\t\t}", "public void setUnitTable(Units value);", "public int getType() {\n/* 50 */ return this.type;\n/* */ }", "Unit getUnit();", "public static void type(int typ) {\n ser_cli = typ;\n }", "public interface LMCPEnum {\n\n public long getSeriesNameAsLong();\n\n public String getSeriesName();\n\n public int getSeriesVersion();\n\n public String getName(long type);\n\n public long getType(String name);\n\n public LMCPObject getInstance(long type);\n\n public java.util.Collection<String> getAllTypes();\n}", "@Override\n\tpublic void setCashierType(String status) {\n\t}", "private AnalysisMethodEnum(String name) {\n\t\tthis.methodName = name;\n\t}", "public byte getSType() {\r\n return _sType;\r\n }", "public static void main(String[] args) {\n\n for (OperateTypeEnum test : OperateTypeEnum.values()) {\n System.out.println(test.name()+\" \"+test.ordinal());\n }\n\n EnumMap<OperateTypeEnum, String> enumMap = new EnumMap<OperateTypeEnum, String>(OperateTypeEnum.class);\n enumMap.put(OperateTypeEnum.DELETE, \"dddddddddddddd\");\n enumMap.put(OperateTypeEnum.UPDATE, \"uuuuuuuuuuuuuu\");\n for (Map.Entry<OperateTypeEnum, String> entry : enumMap.entrySet()) {\n System.out.println(entry.getValue() + entry.getKey().getEnumDesc());\n }\n\n// EnumSet<OperateTypeEnum> enumSets = EnumSet.of(OperateTypeEnum.DELETE);\n// EnumSet<OperateTypeEnum> enumSets = EnumSet.allOf(OperateTypeEnum.class);\n// EnumSet<OperateTypeEnum> enumSets = EnumSet.range(OperateTypeEnum.DELETE,OperateTypeEnum.UPDATE);\n EnumSet<OperateTypeEnum> enumSet = EnumSet.noneOf(OperateTypeEnum.class);\n enumSet.add(OperateTypeEnum.DELETE);\n enumSet.add(OperateTypeEnum.UPDATE);\n for (Iterator<OperateTypeEnum> it = enumSet.iterator(); it.hasNext();) {\n System.out.println(it.next().getEnumDesc());\n }\n for (OperateTypeEnum enumTest : enumSet) {\n System.out.println(enumTest.getEnumDesc() + \" ..... \");\n }\n\n EnumSet<OperateTypeEnum> enumSets = EnumSet.copyOf(enumSet);\n }", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "@Override\n public String getType()\n {\n return \"OO\";\n }", "@Override\r\n public String toString() {\r\n return tipo;\r\n }", "java.lang.String getSer();", "private String getType(){\r\n return type;\r\n }", "public void testEnum() {\n assertNotNull(MazeCell.valueOf(MazeCell.UNEXPLORED.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.INVALID_CELL.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.CURRENT_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.FAILED_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.WALL.toString()));\n }", "public String getUnitnm() {\r\n return unitnm;\r\n }", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "@Override\r\n\tpublic Unit unitSave(JsonObject requestBody) {\n\t\tUnit u = new Unit();\r\n\t\tif (requestBody.containsKey(\"unit_no\")) {\r\n\t\t\tu.setUnit_no(requestBody.getJsonString(\"unit_no\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"unit_remark\")) {\r\n\t\t\tu.setUnit_remark(unitTypeRepo.getUnitType(requestBody.getString(\"unit_remark\")));\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"UOM\")) {\r\n\t\t\tu.setUOM(requestBody.getJsonString(\"UOM\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"Description\")) {\r\n\t\t\tu.setDescription(requestBody.getJsonString(\"Description\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"unit_type\")) {\r\n\t\t\tu.setUnit_type(requestBody.getJsonString(\"unit_type\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"pipeGas\")) {\r\n\t\t\tu.setPipeGas(requestBody.getBoolean(\"pipeGas\"));\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (requestBody.containsKey(\"sanctionedLoadGrid\")) {\r\n\t\t\tu.setSanctionedLoadGrid(requestBody.getJsonNumber(\"sanctionedLoadGrid\").intValue());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"sanctionedLoadBackUp\")) {\r\n\t\t\tu.setSanctionedLoadBackUp(requestBody.getJsonNumber(\"sanctionedLoadBackUp\").intValue());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"soldStatus\")) {\r\n\t\t\tu.setSoldStatus(requestBody.getJsonString(\"soldStatus\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"parentId\")) {\r\n\r\n\t\t\tu.setParentAccount(towerRepo.gettower(requestBody.getJsonString(\"parentId\").getString()));\r\n\t\t}\r\n\t\tu.setUuid(Commonfunctionl.uuIDSend());\r\n\t\tDate d = new Date();\r\n\t\tu.setCreateDate(d);\r\n\t\tu.setUpdateDate(d);\r\n\t\tunitRepo.save(u);\r\n\t\treturn u;\r\n\t}", "public EVT_VARIANT() {\n/* 220 */ super(W32APITypeMapper.DEFAULT);\n/* */ }", "public void setUnit(String unit)\n {\n this.unit = unit;\n }", "public BFUnit(){\n \n }", "public final void mo92083O() {\n }", "@Override\n public String getType(){\n return Type;\n }", "boolean addEnum(EnumDefinition evd) throws ResultException, DmcValueException {\n// if (checkAndAdd(evd.getObjectName(),evd,enumDefs) == false){\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsg(evd.getObjectName(),evd,enumDefs,\"enum value names\"));\n// throw(ex);\n// }\n \n \tenumDefinitions.add(evd);\n \n if (checkAndAddDOT(evd.getDotName(),evd,globallyUniqueMAP,null) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsgDOT(evd.getObjectName(),evd,globallyUniqueMAP,\"definition names\"));\n \tthrow(ex);\n }\n\n // Things get a little tricky here - although EnumDefinitions are enums, they get\n // turned into internally generated TypeDefinitions, so we don't add them to the\n // allDefs map as EnumDefinitions.\n TypeDefinition td = new TypeDefinition();\n td.setInternallyGenerated(true);\n td.setName(evd.getName());\n \n // The name of an enum definition is schema.enum.EnumDefinition\n // For the associated type, it will be schema.enum.TypeDefinition\n DotName typeName = new DotName((DotName) evd.getDotName().getParentName(),\"TypeDefinition\");\n// DotName nameAndTypeName = new DotName(td.getName() + \".TypeDefinition\");\n td.setDotName(typeName);\n// td.setNameAndTypeName(nameAndTypeName);\n\n td.setEnumName(evd.getName().getNameString());\n td.addDescription(\"This is an internally generated type to allow references to \" + evd.getName() + \" values.\");\n td.setIsEnumType(true);\n td.setTypeClassName(evd.getDefinedIn().getSchemaPackage() + \".generated.types.DmcType\" + evd.getName());\n td.setPrimitiveType(evd.getDefinedIn().getSchemaPackage() + \".generated.enums.\" + evd.getName());\n td.setDefinedIn(evd.getDefinedIn());\n \n // Issue 4 fix\n if (evd.getNullReturnValue() != null)\n \ttd.setNullReturnValue(evd.getNullReturnValue());\n \n internalTypeDefs.put(td.getName(), td);\n \n // We add the new type to the schema's list of internally generated types\n evd.getDefinedIn().addInternalTypeDefList(td);\n \n // Add the type\n addType(td);\n\n if (evd.getObjectName().getNameString().length() > longestEnumName)\n longestActionName = evd.getObjectName().getNameString().length();\n \n if (extensions.size() > 0){\n \tfor(SchemaExtensionIF ext : extensions.values()){\n \t\text.addEnum(evd);\n \t}\n }\n\n return(true);\n }", "public Unit getUnit() {\n return unit;\n }", "private Enums(String s, int j)\n\t {\n\t System.out.println(3);\n\t }", "@Test\n public void test_constructor_0(){\n\tSystem.out.println(\"Testing TracerIsotopes's enumerations and getters.\");\n //Tests if values are correct for all enumerations, and tests the getters as well. You cannot instantiate new inumerations.\n \n TracerIsotopes ave=TracerIsotopes.concPb205t;\n assertEquals(\"concPb205t\",ave.getName());\n\n ave=TracerIsotopes.concU235t;\n assertEquals(\"concU235t\",ave.getName());\n \n ave=TracerIsotopes.concU236t;\n assertEquals(\"concU236t\",ave.getName()); \n \n String[] list=TracerIsotopes.getNames();\n assertEquals(\"concPb205t\",list[0]);\n assertEquals(\"concU235t\",list[1]);\n assertEquals(\"concU236t\",list[2]);\n \n \n \n }", "@Override\n\tpublic String toString() {\n\t\treturn type;\n\t}", "@Test\n\tpublic void testEnumSize1BadInput() throws Exception {\n\t\tCategory category = program.getListing()\n\t\t\t\t.getDataTypeManager()\n\t\t\t\t.getCategory(new CategoryPath(CategoryPath.ROOT, \"Category1\"));\n\t\tEnum enumm = createEnum(category, \"TestEnum\", 1);\n\t\tedit(enumm);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tassertNotNull(panel);\n\n\t\taddEnumValue();\n\n\t\twaitForSwing();\n\t\tDockingActionIf applyAction = getApplyAction();\n\t\tassertTrue(applyAction.isEnabled());\n\t\tassertTrue(panel.needsSave());\n\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tassertEquals(\"New_Name\", model.getValueAt(0, NAME_COL));\n\t\tassertEquals(0L, model.getValueAt(0, VALUE_COL));\n\n\t\taddEnumValue();\n\n\t\tString editName = \"New_Name_(1)\";\n\t\tassertEquals(editName, model.getValueAt(1, NAME_COL));\n\t\tassertEquals(1L, model.getValueAt(1, VALUE_COL));\n\n\t\taddEnumValue();\n\n\t\tassertEquals(\"New_Name_(2)\", model.getValueAt(2, NAME_COL));\n\t\tassertEquals(2L, model.getValueAt(2, VALUE_COL));\n\n\t\tint row = getRowFor(editName);\n\n\t\teditValueInTable(row, \"0x777\");\n\n\t\trow = getRowFor(editName); // the row may have changed if we are sorted on the values col\n\t\tassertEquals(0x77L, model.getValueAt(row, VALUE_COL));\n\t}", "protected String getUnits()\n {\n return units;\n }", "String getUnitsString();", "public abstract BaseQuantityDt setUnits(String theString);" ]
[ "0.6306719", "0.5811091", "0.57971716", "0.5739627", "0.5687438", "0.56356037", "0.5596495", "0.5561929", "0.555737", "0.5531003", "0.5496353", "0.54754895", "0.5460361", "0.54600376", "0.5442308", "0.5440607", "0.5434645", "0.5405561", "0.53959113", "0.5390586", "0.5390199", "0.5381293", "0.53669393", "0.5363495", "0.53503287", "0.5339976", "0.53370816", "0.5336678", "0.5320089", "0.5318478", "0.53120714", "0.530725", "0.5294558", "0.5278349", "0.52766144", "0.52733487", "0.52711236", "0.52705866", "0.52704597", "0.52676016", "0.5266184", "0.5254308", "0.5244844", "0.5243302", "0.5230189", "0.52296823", "0.52155906", "0.5212496", "0.5200214", "0.5198861", "0.5198673", "0.51841265", "0.51805305", "0.5172428", "0.5161438", "0.51608044", "0.5160147", "0.51594895", "0.5159455", "0.51546526", "0.5142126", "0.5142126", "0.5142126", "0.5139779", "0.5139153", "0.5135667", "0.51331973", "0.5117624", "0.51156825", "0.5113736", "0.51125646", "0.5112272", "0.51110166", "0.5103097", "0.51019806", "0.50995255", "0.5099373", "0.50990796", "0.50910056", "0.5089947", "0.5084976", "0.50841534", "0.5083225", "0.5083058", "0.5082272", "0.50692046", "0.5062023", "0.5060083", "0.50594765", "0.5049726", "0.50494885", "0.50494725", "0.5048812", "0.5047373", "0.50471485", "0.50439805", "0.5039467", "0.5034153", "0.5034119", "0.503161", "0.5030279" ]
0.0
-1
this interface should not be used, always assign cut mode.
public void setStructExprRecog(LinkedList<StructExprRecog> listChildren) { mnExprRecogType = EXPRRECOGTYPE_LISTCUT; mType = UnitProtoType.Type.TYPE_UNKNOWN; mstrFont = UNKNOWN_FONT_TYPE; mlistChildren = new LinkedList<StructExprRecog>(); mlistChildren.addAll(listChildren); int nLeft = Integer.MAX_VALUE, nTop = Integer.MAX_VALUE, nRightPlus1 = Integer.MIN_VALUE, nBottomPlus1 = Integer.MIN_VALUE; int nTotalArea = 0, nTotalValidChildren = 0; double dSumWeightedSim = 0; double dSumSimilarity = 0; for (StructExprRecog ser: mlistChildren) { if (ser.mnLeft == 0 && ser.mnTop == 0 && ser.mnHeight == 0 && ser.mnWidth == 0) { continue; // this can happen in some extreme case like extract2Recog input is null or empty imageChops // to avoid jeapodize the ser place, skip. } if (ser.mnLeft < nLeft) { nLeft = ser.mnLeft; } if (ser.mnLeft + ser.mnWidth > nRightPlus1) { nRightPlus1 = ser.mnLeft + ser.mnWidth; } if (ser.mnTop < nTop) { nTop = ser.mnTop; } if (ser.mnTop + ser.mnHeight > nBottomPlus1) { nBottomPlus1 = ser.mnTop + ser.mnHeight; } nTotalArea += ser.getArea(); dSumSimilarity += ser.getArea() * ser.mdSimilarity; nTotalValidChildren ++; dSumSimilarity += ser.mdSimilarity; } mnLeft = nLeft; mnTop = nTop; mnWidth = nRightPlus1 - nLeft; mnHeight = nBottomPlus1 - nTop; mimgChop = null; if (nTotalArea > 0) { mdSimilarity = dSumSimilarity / nTotalArea; } else { mdSimilarity = dSumSimilarity / nTotalValidChildren; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int invokeCutMode()\n{\n \n return(0);\n\n}", "public boolean isCut() {\n\t\treturn isCut;\n\t}", "public void performCut() {\n \t\ttext.cut();\n \t\tcheckSelection();\n \t\tcheckDeleteable();\n \t\tcheckSelectable();\n \t}", "public void cut() {\n\t\tcmd = new CutCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "private static boolean isCut(Spreadsheet ss) {\r\n \t\treturn Boolean.valueOf( (Boolean)ss.getAttribute(KEY_IS_CUT) ); //if attr is null return false\r\n \t}", "public void cutSelection() {\r\n \t\t// Bertoli Marco\r\n \t\tclipboard.cut();\r\n \t}", "public void onTextCut()\n\t{\n\t}", "public boolean isCutEnabled() {\n \t\tif (text == null || text.isDisposed())\n \t\t\treturn false;\n \t\treturn text.getSelectionCount() > 0;\n \t}", "private void initCutContext (SessionState state)\n\t{\n\t\tstate.setAttribute (STATE_CUT_IDS, new Vector ());\n\n\t\tstate.setAttribute (STATE_CUT_FLAG, Boolean.FALSE.toString());\n\n\t}", "@Override\n\tpublic void editorCut()\n\t{\n\t\teditorCopy();\n\t\teditorInsert(\"\");\n\t\tSystem.out.println(\"DEBUG: performing Cut\") ;\n\t}", "@Override\n public void cut() {\n clipboard.setContents(getSelectionAsList(true));\n }", "public void set_constant( double cutoff ){\n\t\tswitchOff=cutoff;\n\t}", "public void setCuttOff(String value) {\n setAttributeInternal(CUTTOFF, value);\n }", "public void cutCopyEnabled(boolean enabled);", "public void set_constant(double cutoff)\r\n\t{\r\n\t\tthis.switchValue = (int)cutoff;\t\r\n\t}", "@Override\r\n\tpublic void setCutoffInterval(long arg0) throws NotesApiException {\n\r\n\t}", "@Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();", "public String getCuttOff() {\n return (String)getAttributeInternal(CUTTOFF);\n }", "@Override\n\tpublic void setMode(int mode) {\n\t\t\n\t}", "public int getCuteness() {\n \t\treturn cuteness;\n \t}", "public final double getCutoff()\r\n\t{\r\n\t\treturn cutoff;\r\n\t}", "public void cut() throws IOException {\n // cut\n writer.write(0x1D);\n writer.write(\"V\");\n writer.write(48);\n writer.write(0);\n\n writer.flush();\n }", "public void doCut()\n {\n bothToolClicked(map.selectedHexesIterator(), true);\n }", "public TracePosition hCut() {\n\treturn myHCrum.hCut();\n/*\nudanax-top.st:9635:OrglRoot methodsFor: 'accessing'!\n{TracePosition} hCut\n\t\"This is primarily for the example routines.\"\n\t^myHCrum hCut!\n*/\n}", "public int compareTo(Cut<Comparable<?>> cut) {\n return cut == this ? 0 : -1;\n }", "public void logCut(Dataset ds){\n dataProcessToolPanel.logCut(dataset);\n }", "public void setUp() {\n subsystem = new SubsystemImpl();\n clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n action = new CutSubsystemAction(subsystem);\n }", "public int compareTo(Cut<Comparable<?>> cut) {\n return cut == this ? 0 : 1;\n }", "public void setCategory (String mode) { category = mode; }", "public void setCutModeActive(boolean leftEnabled, boolean rightEnabled) {\r\n\t\tif (leftEnabled || rightEnabled)\r\n\t\t\tif (leftEnabled)\r\n\t\t\t\tthis.graphicsTabItem.getGraphicsComposite().drawCutPointer(GraphicsMode.CUT_LEFT, leftEnabled, rightEnabled);\r\n\t\t\telse if (rightEnabled)\r\n\t\t\t\tthis.graphicsTabItem.getGraphicsComposite().drawCutPointer(GraphicsMode.CUT_RIGHT, leftEnabled, rightEnabled);\r\n\t\t\telse\r\n\t\t\t\tthis.graphicsTabItem.getGraphicsComposite().drawCutPointer(GraphicsMode.RESET, false, false);\r\n\t\telse\r\n\t\t\tthis.graphicsTabItem.getGraphicsComposite().drawCutPointer(GraphicsMode.RESET, false, false);\r\n\t}", "void cut(int cardPosition);", "private void doCutOff(NodeRef nodeRef)\n {\n if (this.nodeService.hasAspect(nodeRef, ASPECT_CUT_OFF) == false)\n {\n // Apply the cut off aspect and set cut off date\n Map<QName, Serializable> cutOffProps = new HashMap<QName, Serializable>(1);\n cutOffProps.put(PROP_CUT_OFF_DATE, new Date());\n this.nodeService.addAspect(nodeRef, ASPECT_CUT_OFF, cutOffProps);\n }\n }", "private CutOper(CutOper orig) {\n isUndo = !orig.isUndo;\n oppOper = orig;\n\n this.itemSlots = oppOper.itemSlots;\n // construct copy of modified items\n this.items = new ObjArray(Editor.getItems(), itemSlots, true);\n\n // save clipboard\n this.savedClipboard = Editor.getClipboard();\n }", "public void onCutScene() {\n\t\tAnimation src = getSourceAnimation();\n\t\tif( src != null ) {\n\t\t\tcutScene(src, vm.cutInfo.getStart(), vm.cutInfo.getEnd(), buildUniqueName(vm.scenes));\n\t\t\tlog.info(\"cutting out scene from {}\", vm.cutInfo);\n\t\t\tvm.cutInfo.reset();\n\t\t\tvm.setMarkStartEnabled(true);\n\t\t}\n\t\t\n\t}", "public MnjCutlyrcntrlOffstandardLImpl() {\n }", "public abstract Cut<C> a(BoundType boundType, DiscreteDomain<C> discreteDomain);", "public abstract void offLineMode ();", "public CutNode(double mod, boolean self) {\r\n\t\tsuper();\r\n\t\tthis.mod = mod;\r\n\t\tthis.self = self;\r\n\t}", "public abstract Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain);", "@Override\n public void setMode(RunMode mode) {\n\n }", "public void cut(final int p0, final int p1) {\n setCaretPosition(p0);\n moveCaretPosition(Math.max(p1, p0));\n JTextComponent.this.cut();\n }", "public void cut(int cutPoint) {\n if (cutPoint > deckOfCards.size()){\n return;\n }\n List<Card> cutList;\n cutList = new ArrayList<Card>(deckOfCards.subList(0,cutPoint));\n deckOfCards.subList(0,cutPoint).clear();\n deckOfCards.addAll(cutList);\n }", "@Override\n\tpublic void onModeChange() {\n\t}", "public boolean hasHorizontalCut() {\r\n\t\treturn mHorizontalCut;\r\n\t}", "private final native void setCutCopyPasteHandler(String id) /*-{\n\t\t$wnd.jQuery.ready(function() {\n\t\t\t$wnd.jQuery('#'+id).bind('cut', function(e) {\n\t\t\t\t$wnd.jQuery('#'+id).onkeyup()\n\t\t\t});\n\t\t\t$wnd.jQuery('#'+id).bind('copy', function(e) {\n\t\t\t\t$wnd.jQuery('#'+id).onkeyup()\n\t\t\t});\n\t\t\t$wnd.jQuery('#'+id).bind('paste', function(e) {\n\t\t\t\t$wnd.jQuery('#'+id).onkeyup()\n\t\t\t});\n\t\t});\n\t}-*/;", "public boolean hasVerticalCut() {\r\n\t\treturn mVerticalCut;\r\n\t}", "@Override\r\n\tpublic void carDriveModeChange() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic IFuzzySet cut(double minValue) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IFuzzySet cut(double minValue) {\n\t\t\t\treturn null;\n\t\t\t}", "public void cut(E data) {\n first = new Noder<>(data, first);\n }", "public void setPlyCutoff(int plyCutoff) {\n this.plyCutoff = plyCutoff;\n }", "public PointCutASTNode(PointCutASTNode self) {\n\t\tsuper(self);\n\t}", "@Override\r\n\tpublic long getCutoffInterval() throws NotesApiException {\n\t\treturn 0;\r\n\t}", "void setCrouching(boolean crouching);", "public void changeCuteness(int i) {\n \t\tcuteness += i;\n \t}", "boolean setCutPasteMacro(DocumentMacro macro) {\n if (lastRawMacro == null) {\n return false;\n }\n \n if (lastRawMacro instanceof ExecutionMacro) {\n ExecutionMacro emacro = (ExecutionMacro)lastRawMacro;\n if (emacro.getCommandId().compareTo(\"org.eclipse.ui.edit.cut\") == 0) {\n macro.setType(\"Cut\");\n return true;\n } else if (emacro.getCommandId().compareTo(\"org.eclipse.ui.edit.paste\") == 0) {\n macro.setType(\"Paste\");\n return true;\n }\n }\n return false;\n }", "@ModifyTransaction(value = Transactions.CUT_OVER)\n\tpublic void modifyCutOver(IsoBuffer buffer, Data data) {\n\t\tif (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_NETWORK_MANAGEMENT)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0810\");\n\t\t} else if (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_NETWORK_MANAGEMENT_ADVICE)\n\t\t\t\t|| buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\t\t\tConstants.MSG_TYPE_NETWORK_MANAGEMENT_REPEAT)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0830\");\n\t\t}\n\n\t\tbuffer.put(Constants.DE1, \"\");\n\t\tbuffer.put(Constants.DE39, \"00\");\n\t\tbuffer.disableField(Constants.DE55);\n\t}", "public void setMode(int inMode) {\n mode = inMode;\n }", "public void selectCutVertices() {\n BiConnectedComponents bcc_2p = graph2p_bcc;\n if (bcc_2p != null) {\n Set<String> new_sel = new HashSet<String>();\n\tnew_sel.addAll(bcc_2p.getCutVertices());\n setOperation(new_sel);\n }\n }", "public boolean inCut(int v) {\r\n return marked[v];\r\n }", "public void doCut ( RunData data)\n\t{\n\t\t// get the state object\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\tString[] cutItems = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif (cutItems == null)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile5\"));\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tVector cutIdsVector = new Vector ();\n\t\t\tString nonCutIds = NULL_STRING;\n\n\t\t\tString cutId = NULL_STRING;\n\t\t\tfor (int i = 0; i < cutItems.length; i++)\n\t\t\t{\n\t\t\t\tcutId = cutItems[i];\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tResourceProperties properties = ContentHostingService.getProperties (cutId);\n\t\t\t\t\tif (properties.getProperty (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tString alert = (String) state.getAttribute(STATE_MESSAGE);\n\t\t\t\t\t\tif (alert == null || ((alert != null) && (alert.indexOf(RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING) == -1)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (ContentHostingService.allowRemoveResource (cutId))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcutIdsVector.add (cutId);\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\tnonCutIds = nonCutIds + \" \" + properties.getProperty (ResourceProperties.PROP_DISPLAY_NAME) + \"; \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis15\"));\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\t// try-catch\n\t\t\t}\n\n\t\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t\t{\n\t\t\t\tif (nonCutIds.length ()>0)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis16\") +\" \" + nonCutIds);\n\t\t\t\t}\n\n\t\t\t\tif (cutIdsVector.size ()>0)\n\t\t\t\t{\n\t\t\t\t\tstate.setAttribute (STATE_CUT_FLAG, Boolean.TRUE.toString());\n\t\t\t\t\tif (((String) state.getAttribute (STATE_SELECT_ALL_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tstate.setAttribute (STATE_SELECT_ALL_FLAG, Boolean.FALSE.toString());\n\t\t\t\t\t}\n\n\t\t\t\t\tVector copiedIds = (Vector) state.getAttribute (STATE_COPIED_IDS);\n\t\t\t\t\tfor (int i = 0; i < cutIdsVector.size (); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tString currentId = (String) cutIdsVector.elementAt (i);\n\t\t\t\t\t\tif ( copiedIds.contains (currentId))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcopiedIds.remove (currentId);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (copiedIds.size ()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.setAttribute (STATE_COPIED_IDS, copiedIds);\n\n\t\t\t\t\tstate.setAttribute (STATE_CUT_IDS, cutIdsVector);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t// if-else\n\n\t}", "public abstract int getMode();", "public void setMode(int mode) {\n this.mode = mode;\n }", "public void setMode(int mode) {\r\n\t\tthis.mode = mode;\r\n\t}", "@Override\n public void run() {\n mode = NONE;\n }", "public void setMnjMfgCutlyrcntrlH(MnjMfgCutlyrcntrlHImpl value) {\n setAttributeInternal(MNJMFGCUTLYRCNTRLH, value);\n }", "public void change() {\r\n this.mode = !this.mode;\r\n }", "public static ArrayList<Integer> getCutPoints() {\n return cutPoints;\n }", "public void setMode(short mode)\n\t{\n\t\tthis.mode = mode;\n\t}", "void changeMode(int mode);", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t a.cut();\n\t if(e.getSource()==paste)\n\t\t a.paste();\n\t if(e.getSource()==copy)\n\t\t a.copy();\n\t if(e.getSource()==selectAll)\n\t\t a.selectAll();\n\t\n\t\t\n\t}", "public void testCtor_Accuracy2() {\n assertNotNull(\"Failed to create the action!\",\n new CutCommentAction(this.comment, Toolkit.getDefaultToolkit().getSystemClipboard()));\n }", "@Test\n\tpublic void testCopy() {\n\t\tImagePlus.resetClipboard();\n\n\t\t// cut == true, roi null\n\t\tproc = new ColorProcessor(2,3,new int[] {1,2,3,4,5,6});\n\t\tip = new ImagePlus(\"Copier\",proc);\n\t\tImagePlus.resetClipboard();\n\t\tassertNull(ip.getRoi());\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tip.copy(true);\n\t\tassertNull(ImagePlus.getClipboard()); // cut requires a selection\n\t\tassertNull(proc.getSnapshotPixels());\n\n\t\t// cut == true, roi not an area\n\t\t//proc = new ColorProcessor(2,3,new int[] {1,2,3,4,5,6});\n\t\t//ip = new ImagePlus(\"Copier\",proc);\n\t\t//ImagePlus.resetClipboard();\n\t\t//assertNull(ip.getRoi());\n\t\t//ip.setRoi(new Line(1,1,2,2));\n\t\t//assertNotNull(ip.getRoi());\n\t\t//assertNull(ImagePlus.getClipboard());\n\t\t//ip.copy(true);\n\t\t//assertNull(ImagePlus.getClipboard());\n\t\t//assertNull(proc.getSnapshotPixels());\n\n\t\t// cut == true, roi an area\n\t\tproc = new ColorProcessor(2,3,new int[] {1,2,3,4,5,6});\n\t\tip = new ImagePlus(\"Copier\",proc);\n\t\tImagePlus.resetClipboard();\n\t\tassertNull(ip.getRoi());\n\t\tip.setRoi(new Rectangle(1,1,2,2));\n\t\tassertNotNull(ip.getRoi());\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tip.copy(true);\n\t\tassertNotNull(ImagePlus.getClipboard());\n\t\tassertNotNull(proc.getSnapshotPixels());\n\n\t\t// cut == false, roi null\n\t\tproc = new ColorProcessor(2,3,new int[] {1,2,3,4,5,6});\n\t\tip = new ImagePlus(\"Copier\",proc);\n\t\tImagePlus.resetClipboard();\n\t\tassertNull(ip.getRoi());\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tip.copy(false);\n\t\tassertNotNull(ImagePlus.getClipboard());\n\t\tassertNull(proc.getSnapshotPixels());\n\n\t\t// cut == false, roi not an area\n\t\t//proc = new ColorProcessor(2,3,new int[] {1,2,3,4,5,6});\n\t\t//ip = new ImagePlus(\"Copier\",proc);\n\t\t//ImagePlus.resetClipboard();\n\t\t//assertNull(ip.getRoi());\n\t\t//ip.setRoi(new Line(1,1,2,2));\n\t\t//assertNotNull(ip.getRoi());\n\t\t//assertNull(ImagePlus.getClipboard());\n\t\t//ip.copy(false);\n\t\t//assertNull(ImagePlus.getClipboard());\n\t\t//assertNull(proc.getSnapshotPixels());\n\n\t\t// cut == false, roi an area\n\t\tproc = new ColorProcessor(2,3,new int[] {1,2,3,4,5,6});\n\t\tip = new ImagePlus(\"Copier\",proc);\n\t\tImagePlus.resetClipboard();\n\t\tassertNull(ip.getRoi());\n\t\tip.setRoi(new Rectangle(1,1,2,2));\n\t\tassertNotNull(ip.getRoi());\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tip.copy(false);\n\t\tassertNotNull(ImagePlus.getClipboard());\n\t\tassertNull(proc.getSnapshotPixels());\n\n\t\t// reset state to keep from messing up other tests\n\t\tImagePlus.resetClipboard();\n\t}", "public void setMode(@SliceMode int mode) {\n setMode(mode, false /* animate */);\n }", "public void setMode(int mode) {\n \t\treset();\n \t}", "public CPCAdapter(String code) {\n super();\n operationCode = code;\n if (code.equalsIgnoreCase(COPY))\n codeIndex = 0;\n else if (code.equalsIgnoreCase(CUT))\n codeIndex = 1;\n else if (code.equalsIgnoreCase(PASTE))\n codeIndex = 2;\n else\n System.out.println(\"wrong specfication of operation\");\n }", "@SuppressWarnings(\"unused\")\r\n private void snakeSubcutaneousVOI() {\r\n \r\n // set the subcutaneous VOI as active\r\n subcutaneousVOI.setActive(true);\r\n subcutaneousVOI.getCurves().elementAt(0).setActive(true);\r\n \r\n float[] sigmas = new float[2];\r\n sigmas[0] = 1.0f;\r\n sigmas[1] = 1.0f;\r\n \r\n AlgorithmSnake snake = new AlgorithmSnake(srcImage, sigmas, 50, 2, subcutaneousVOI, AlgorithmSnake.OUT_DIR);\r\n snake.run();\r\n\r\n subcutaneousVOI = snake.getResultVOI();\r\n subcutaneousVOI.setName(\"Subcutaneous area\");\r\n \r\n }", "public void setSciMode(boolean entry) {\r\n\t\tsciMode = entry;\r\n\t}", "public void setDjCutWidth(String value) {\n setAttributeInternal(DJCUTWIDTH, value);\n }", "public void setMode(int mode) {\r\n this.mode = mode;\r\n setSleeping(mode == MODE_EMPTY);\r\n repaint();\r\n }", "public void setMode(int mode){\n mMode = mode;\n }", "public void setCutDate(Date value) {\n setAttributeInternal(CUTDATE, value);\n }", "public abstract void onLineMode ();", "void doCut(boolean surface, boolean building) {\r\n\t\tdoCopy(surface, building);\r\n\t\tif (surface && building) {\r\n\t\t\tdoDeleteBoth();\r\n\t\t} else\r\n\t\tif (surface) {\r\n\t\t\tdoDeleteSurface();\r\n\t\t} else\r\n\t\tif (building) {\r\n\t\t\tdoDeleteBuilding();\r\n\t\t}\r\n\t}", "void jMenu1_actionPerformed(ActionEvent e) {\n\r\n cutMenuItem.setEnabled(false);\r\n\r\n\r\n }", "@Override\n protected void screenMode(int mode) {\n\n }", "public interface InterTripleCut {\n\tvoid tripleCut();\n}", "public void setMode(String channel, String mode);", "private void handle_mode_display() {\n\t\t\t\n\t\t}", "public void setMode(String mode){\n\t\tthis.mode=mode;\n\t}", "public void setConcern(long concern);", "void selectionModeChanged(SelectionMode mode);", "public void setMode(int i) {\r\n\t\t_mode = i;\r\n\t}", "public void defaultstatus()\n {\n try{\n this.isExpaneded = false;\n \n // hide the right annotation edit and diff area\n if (main_splitpane !=null)\n {\n main_splitpane.setDividerLocation(\n main_splitpane.getParent().getWidth() // width of wholesplitter\n - this.main_splitpane.getDividerSize() // width of divider of splitter\n );\n }}catch(Exception ex){\n System.out.println(\"error 1206151048\");\n }\n }", "public void setMode(String mode) {\n this.mode = mode;\n }", "public double getScoreCutoff() {\n return scoreCutoff;\n }", "public void get_haircut(){\r\n \t\t\tSystem.out.println(\"Customer \" + this.iD + \" is getting his hair cut\");\r\n \t\t\ttry {\r\n \t\t\t\tsleep(5050);\r\n \t\t\t } catch (InterruptedException ex) {}\r\n \t\t }", "@Override\n public CommandCategory getCat() {\n return super.getCat();\n }", "boolean setMode(int mode);", "public void COPower(){\r\n COP = true;\r\n }", "private static void cut(GL10 gl, String modelName) throws IOException {\n\t\tmPiece0.build(gl, mSurfaces, mPiece0.mVerticies.size(), modelName);\n\t\tbbMin = new Point3d(mPiece0.bbMin.x, mPiece0.bbMin.y, mPiece0.bbMin.z);\n\t\tbbMax = new Point3d(mPiece0.bbMax.x, mPiece0.bbMax.y, mPiece0.bbMax.z);\n\n\t\t// make use of built surfaces to save texture duplication - reuse textureID\n\t\tfor (int i = 0; i < mPiece0.mSurfaces.length; i++) {\n\t\t\tSurface s = mSurfaces.get(i);\n\t\t\ts.textureID = mPiece0.mSurfaces[i].textureID;\n\t\t}\n\n\t\t// **************************** Y axis ****************************\n\t\tif (mNumCutsPerAxis[1] > 0) {\n\t\t\tcutOneDirection(new Point3d(0, 1, 0), (bbMax.y - bbMin.y) / ((float) mNumCutsPerAxis[1] + 1f));\n\t\t\t// move to front queue to start over\n\t\t\twhile (!mPieces.isEmpty())\n\t\t\t\tmQinfront.add(mPieces.remove(0));\n\t\t}\n\n\t\t// **************************** X axis ****************************\n\t\tif (mNumCutsPerAxis[0] > 0) {\n\t\t\tcutOneDirection(new Point3d(1, 0, 0), (bbMax.x - bbMin.x) / ((float) mNumCutsPerAxis[0] + 1f));\n\t\t\twhile (!mPieces.isEmpty())\n\t\t\t\tmQinfront.add(mPieces.remove(0));\n\t\t}\n\n\t\t// **************************** Z axis ****************************\n\t\tif (mNumCutsPerAxis[2] > 0)\n\t\t\tcutOneDirection(new Point3d(0, 0, 1), (bbMax.z - bbMin.z) / ((float) mNumCutsPerAxis[2] + 1f));\n\t\telse {\n\t\t\twhile (!mQinfront.isEmpty())\n\t\t\t\tmPieces.add(mQinfront.remove(0));\n\t\t}\n\n\t\t// now build them all, except interior pieces\n\t\tint i = 0;\n\t\twhile (i < mPieces.size()) {\n\t\t\t\n\t\t\tPiece piece = mPieces.get(i);\n\t\t\tpiece.build(gl, mSurfaces, mPiece0.mVerticies.size(), modelName);\n\t\t\t\n\t\t\t// toss if all interior\n\t\t\tboolean toss = true;\n\t\t\tint sLen = piece.mSurfaces.length;\n\t\t\tfor(int sIdx=0; sIdx<sLen; sIdx++) {\n\t\t\t\t\n\t\t\t\t// not interior if any surface other than last on list\n\t\t\t\tif((piece.mSurfaces[sIdx].idxLength > 0) && (sIdx != (sLen - 1))) {\n\t\t\t\t\ttoss = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(toss)\n\t\t\t\tmPieces.remove(i);\n\t\t\telse\n\t\t\t\tpiece.mIndex = i++;\n\t\t}\n\n\t\t// break discontinuous into multiple pieces\n\t\ti = 0;\n\t\twhile(i < mPieces.size()) {\n\t\t\t\n\t\t\tPiece[] ps = continuityTest(mPieces.get(i));\n\t\t\t\n\t\t\tif(ps != null) {\n\t\t\t\t\n\t\t\t\t// remove the culprit\n\t\t\t\tmPieces.remove(i);\n\t\t\t\t// discontinuous - broken into multiple\n\t\t\t\tfor (Piece p : ps) {\n\t\t\t\t\tp.build(gl, mSurfaces, mPiece0.mVerticies.size(), modelName);\n\t\t\t\t\tmPieces.add(i++, p);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\ti++;\n\t\t}\n\t\t\n\t\t// renumber\n\t\ti = 0;\n\t\tfor(Piece p : mPieces)\n\t\t\tp.mIndex = i++;\n\n\t\tmNumPieces = mPieces.size();\n\t}" ]
[ "0.7595876", "0.7230139", "0.66313374", "0.6594449", "0.6465474", "0.6250114", "0.61743397", "0.6087965", "0.6070986", "0.6036997", "0.6021229", "0.6008295", "0.60056305", "0.598338", "0.59220606", "0.58226746", "0.5817607", "0.57865584", "0.575757", "0.5719907", "0.57120264", "0.56937945", "0.56862056", "0.5684332", "0.56793916", "0.5667384", "0.5641201", "0.56382716", "0.562359", "0.5593873", "0.5569725", "0.5560631", "0.55557895", "0.54993176", "0.54702175", "0.5466552", "0.54592365", "0.54572606", "0.543634", "0.54330575", "0.542552", "0.5366307", "0.53542477", "0.53316957", "0.532221", "0.5318203", "0.5314056", "0.53063816", "0.53063816", "0.5302314", "0.5260815", "0.52319884", "0.5228838", "0.5222579", "0.52198845", "0.5219489", "0.5201314", "0.51971644", "0.5195394", "0.51922274", "0.5178704", "0.5165688", "0.5163759", "0.5159533", "0.5148651", "0.51480407", "0.51412964", "0.5141188", "0.51316524", "0.5129555", "0.51248896", "0.512193", "0.5114299", "0.51058275", "0.50849617", "0.50764656", "0.507606", "0.5073954", "0.5071429", "0.5070924", "0.50604516", "0.5055093", "0.5053539", "0.5051253", "0.50490344", "0.5044263", "0.5040177", "0.50134754", "0.5009778", "0.5001104", "0.5000064", "0.49984053", "0.49950862", "0.49942958", "0.49925074", "0.49905473", "0.4987933", "0.4974195", "0.4972733", "0.4952486", "0.4932776" ]
0.0
-1
this function is just used for change unitprototype, this ser should have been an enum type.
public void changeSEREnumType(UnitProtoType.Type unitType, String strFont) { mnExprRecogType = EXPRRECOGTYPE_ENUMTYPE; mType = unitType; mstrFont = strFont; mlistChildren = new LinkedList<StructExprRecog>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String toString() {\r\n return unit.getName();\r\n }", "public UnitTypes GetCurrentUnitType()\n {\n return MethodsCommon.GetTypeFromUnit(Unit);\n }", "public abstract String getUnit();", "public ServicesFormatEnum(){\n super();\n }", "public void setUnit(Unit newUnit){\r\n tacUnit = newUnit;\r\n }", "protected void\nsetTranspTypeElt( int type) \n\n{\n coinstate.transptype = type;\n}", "public void setUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum unit)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNIT$6);\n }\n target.setEnumValue(unit);\n }\n }", "public interface CHANGED_TYPE {\r\n public static final int FEE = 1;\r\n public static final int GRACE_PERIOD = 2;\r\n }", "public Enum() \n { \n set(\"\");\n }", "public String getUnit () {\n\treturn this.unit;\n }", "public String getUnit();", "public Unit getUnit(){\r\n return tacUnit;\r\n }", "private EnumEstadoLeyMercado(String codigoValor, Integer codigoTipo) {\n\t\tthis.codigoValor = codigoValor;\n\t\tthis.codigoTipo = codigoTipo;\n\t}", "@Override\n public String toString() {\n return value + symbol(this.type);\n }", "public void setUnit (String value) {\n\tthis.unit = value;\n }", "public void setUnitType(com.redknee.util.crmapi.soap.subscriptions.xsd._2010._06.SubscriptionBundleUnitType param){\n localUnitTypeTracker = true;\n \n this.localUnitType=param;\n \n\n }", "@Test\n\tpublic void testExternalValueAndNameUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tenummDt.add(\"Yellow\", 10);\n\t\tenummDt.add(\"Magenta\", 5);\n\n\t\t// note: this tests triggers a code path for updating the name that relies upon the name\n\t\t// being edited *after* new values are added above.\n\t\tString oldName = enummDt.getName();\n\t\tString newName = oldName + \"_updated\";\n\t\tenummDt.setName(newName);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\n\t\tassertEquals(10, getValue(en, \"Yellow\"));\n\t\tassertEquals(5, getValue(en, \"Magenta\"));\n\t\tassertEquals(newName, en.getName());\n\t}", "public void setUnit(String unit);", "public String getToUnit() {\r\n return this.toUnit;\r\n }", "@Override\n public int getType() {\n return 0x1c;\n }", "public String toString() {\n return _iotaEnum + \" - \" + _value ;\n }", "private Object writeReplace() throws ObjectStreamException {\n return new MeasureUnitProxy(type, subType);\n }", "public String backup() {\n try {\n// System.out.println(\"enum backup====\");\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ObjectOutputStream out = new ObjectOutputStream(baos);\n int nodeCount = EnumFactory.numberOfTypes;\n out.writeInt(nodeCount);\n for(int i=0; i<nodeCount; i++) {\n out.writeInt(countKeys[i]);\n out.writeInt(countKeys[i]);\n }\n out.close();\n return Base64.getEncoder().encodeToString(baos.toByteArray());\n } catch (IOException e) {\n System.out.print(\"IOException occurred.\" + e.toString());\n e.printStackTrace();\n return \"\";\n }\n }", "@Override\r\n\tpublic void vehicleType() {\n\r\n\t}", "@Override\r\n public String toString() {\r\n return \"InventoryChange [\" + \"type=\" + type + \", physicalCount=\" + physicalCount\r\n + \", adjustment=\" + adjustment + \", transfer=\" + transfer + \", measurementUnit=\"\r\n + measurementUnit + \", measurementUnitId=\" + measurementUnitId + \"]\";\r\n }", "public short getPrimitiveType() {\n \t\treturn unitType;\n \t}", "private void changeUnitWithDirection() {\n MainActivity app = MainActivity.app;\n if (app == null) return;\n int unit = SharedPreferencesManager.getCurrencyUnit(app);\n switch (unit) {\n case BRConstants.CURRENT_UNIT_BITS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_MBITS);\n break;\n case BRConstants.CURRENT_UNIT_MBITS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_BITCOINS);\n break;\n case BRConstants.CURRENT_UNIT_BITCOINS:\n SharedPreferencesManager.putCurrencyUnit(app, BRConstants.CURRENT_UNIT_BITS);\n break;\n }\n\n }", "@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }", "protected String getEnumeration()\n {\n return enumeration;\n }", "String getUnit();", "public sym_complex_enum() {\n }", "@Override\n public String toString ()\n {\n return \"type = \" + type;\n }", "String getBaseUnit() {\n return baseUnit;\n }", "public String getCode() {\n return _toBaseUnit._code;\n }", "public byte getUnits() { return units; }", "public com.redknee.util.crmapi.soap.subscriptions.xsd._2010._06.SubscriptionBundleUnitType getUnitType(){\n return localUnitType;\n }", "public Enum(String val) \n { \n set(val);\n }", "private void encodeEnum(Encoder encoder, Enum type, int size) throws IOException {\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tencodeNameIdAttributes(encoder, type);\n\t\tlong[] keys = type.getValues();\n\t\tString metatype = \"uint\";\n\t\tfor (long key : keys) {\n\t\t\tif (key < 0) {\n\t\t\t\tmetatype = \"int\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tencoder.writeString(ATTRIB_METATYPE, metatype);\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, type.getLength());\n\t\tencoder.writeBool(ATTRIB_ENUM, true);\n\t\tfor (long key : keys) {\n\t\t\tencoder.openElement(ELEM_VAL);\n\t\t\tencoder.writeString(ATTRIB_NAME, type.getName(key));\n\t\t\tencoder.writeSignedInteger(ATTRIB_VALUE, key);\n\t\t\tencoder.closeElement(ELEM_VAL);\n\t\t}\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}", "public String getUnit()\n {\n return (this.unit);\n }", "DefiningUnitType getDefiningUnit();", "void setValue(gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum value);", "public String getUnit() {\n\t\treturn(symbol);\n\t}", "@Test\n\tpublic void testExternalNameUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tString oldName = enummDt.getName();\n\t\tString newName = oldName + \"_updated\";\n\t\tenummDt.setName(newName);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\t\tassertEquals(newName, en.getName());\n\t}", "private FamilyStatusType(String legacyLabel) {\n this.legacyLabel = legacyLabel;\n }", "@Override\r\n\tpublic void visit(EnumDefinition enumDefinition) {\n\r\n\t}", "@Test\n\tpublic void testExternalValueUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tenummDt.add(\"Yellow\", 10);\n\t\tenummDt.add(\"Magenta\", 5);\n\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\n\t\tassertEquals(10, en.getValue(\"Yellow\"));\n\t\tassertEquals(5, en.getValue(\"Magenta\"));\n\n\t\ttransactionID = program.startTransaction(\"Test\");\n\t\tenummDt.remove(\"Red\");\n\t\tenummDt.add(\"Red\", 25);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\ten = model.getEnum();\n\t\tassertEquals(25, en.getValue(\"Red\"));\n\t\tassertEquals(\"Red\", model.getValueAt(model.getRowCount() - 1, NAME_COL));\n\t}", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum getUnit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n return null;\n }\n return (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum)target.getEnumValue();\n }\n }", "public void setUnits(byte units) { this.units = units; }", "Type(byte value) {\n\t\t\tthis.value = value;\n\t\t}", "public interface EnumsKeyConstants {\n\n /*客户状态*/\n static final String CSTM_STATE = \"CSTM_STATE\";\n\n interface CSTMSTATE {\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*正常*/\n static final String NORMAL = \"01\";\n\n /*停用*/\n static final String BLOCKUP = \"02\";\n\n /*冻结*/\n static final String FROZEN = \"03\";\n }\n\n /*短信类型*/\n static final String SMS_TYPE = \"SMS_TYPE\";\n\n interface SMSTYPE {\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*验证码*/\n static final String VERCODE = \"01\";\n\n /*通知*/\n static final String NOTICE = \"02\";\n\n /*营销*/\n static final String MARKETING = \"03\";\n\n /*未知*/\n static final String UNKNOWN = \"04\";\n }\n\n /*模板类型*/\n static final String SMODEL_TYPE = \"SMODEL_TYPE\";\n\n interface SMODELTYPE {\n /*验证码*/\n static final String VERCODE = \"01\";\n\n /*通知&订单*/\n static final String NOTICE = \"02\";\n }\n\n /*审核状态*/\n static final String AUDIT_STATE = \"AUDIT_STATE\";\n\n interface AUDITSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*审核中*/\n static final String ING = \"01\";\n\n /*审核通过*/\n static final String ED = \"02\";\n\n /*审核驳回*/\n static final String DF = \"03\";\n\n }\n\n /*运营商类型*/\n static final String OPERATOR_TYPE = \"OPERATOR_TYPE\";\n\n interface OPERATORTYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*移动*/\n static final String MOBILE = \"01\";\n\n /*电信*/\n static final String TELECOM = \"02\";\n\n /*联通*/\n static final String UNICOM = \"03\";\n }\n\n /*通道状态*/\n static final String CHANNEL_STATE = \"CHANNEL_STATE\";\n\n interface CHANNELSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*可用*/\n static final String ENABLE = \"01\";\n\n /*禁用*/\n static final String DISABLE = \"02\";\n }\n\n /*短信发送状态*/\n static final String SMSSEND_STATE = \"SMSSEND_STATE\";\n\n interface SMSSENDSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*成功*/\n static final String SUCCESS = \"01\";\n\n /*失败*/\n static final String FAILURE = \"02\";\n\n /*未知*/\n static final String UNKNOWN = \"03\";\n\n /*无效*/\n static final String INVALID = \"04\";\n\n /*其他*/\n static final String OTHER = \"05\";\n }\n\n /*短息接收状态*/\n static final String SMSDELIV_STATE = \"SMSDELIV_STATE\";\n\n interface SMSDELIVSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*收到*/\n static final String DELIV = \"01\";\n\n /*未收到*/\n static final String UNDELIV = \"02\";\n }\n\n /*批次单状态*/\n static final String BATCH_STATE = \"BATCH_STATE\";\n\n interface BATCHSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*等待发送*/\n static final String WAIT = \"01\";\n\n /*发送中*/\n static final String ING = \"02\";\n\n /*完成*/\n static final String FINISH = \"03\";\n\n /*已撤回*/\n static final String REVOKE = \"04\";\n\n /*已驳回*/\n static final String REJECT = \"05\";\n }\n\n /*适用范围类型*/\n static final String USEAGE_TYPE = \"USEAGE_TYPE\";\n\n interface USEAGETYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*通用*/\n static final String PUB = \"01\";\n\n /*个人*/\n static final String PRI = \"02\";\n }\n\n /*是否发送*/\n static final String SMSSEND_CODE = \"SMSSEND_CODE\";\n\n interface SMSSENDCODE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*发送*/\n static final String SEND = \"01\";\n\n /*不发送*/\n static final String DESEND = \"02\";\n }\n\n /*短信数量增减类型*/\n static final String ACCOUNT_TYPE = \"ACCOUNT_TYPE\";\n\n interface ACCNTTYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*充值*/\n static final String ADDITION = \"01\";\n\n /*消费*/\n static final String SUBTRACTION = \"02\";\n\n }\n\n /*充值单审核状态*/\n static final String RECHARGE_STATE = \"RECHARGE_STATE\";\n\n interface RECHARGESTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*成功*/\n static final String SUCCESS = \"01\";\n\n /*失败*/\n static final String FAILURE = \"02\";\n\n /*确认中*/\n static final String COMFIRM = \"03\";\n\n /*已取消*/\n static final String CANCEL = \"04\";\n\n }\n\n /*手机号是否在黑名单中*/\n static final String REPLY_BLACK = \"REPLY_BLACK\";\n\n interface REPLYBLACK{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*不在黑名单中*/\n static final String NOTINT = \"01\";\n\n /*在黑名单中*/\n static final String INT = \"02\";\n\n\n }\n /*逻辑删除enable*/\n static final String DELETE_ENABLE = \"DELETE_ENABLE\";\n\n interface DELETEENABLE{\n\n /*已删除*/\n static final Integer DELETE = 0;\n\n /*未删除*/\n static final Integer UNDELE = 1;\n\n\n }\n /*适用范围 模板 通用,个人*/\n static final String SUIT_RANGE = \"SUIT_RANGE\";\n\n interface SUITRANGE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*通用*/\n static final String COMMON = \"01\";\n\n /*个人*/\n static final String PERSONAL = \"02\";\n\n\n }\n\n /*使用場景 01 平台 , 02 接口*/\n static final String USE_TYPE = \"USE_TYPE\";\n\n interface USETYPE{\n\n /*平台*/\n static final String PLTFC = \"01\";\n\n /*接口*/\n static final String INTFC = \"02\";\n }\n\n /* 提醒类型 */\n static final String REMIND_TYPE = \"REMIND_TYPE\";\n\n interface REMINDTYPE{\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 短信数量 */\n static final String SMS_NUM = \"01\";\n /* 发送频率*/\n static final String SEND_RATE = \"02\";\n }\n\n /* 阈值类型 */\n static final String THRESHOLD_TYPE = \"THRESHOLD_TYPE\";\n\n interface THRESHOLDTYPE {\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 小于 */\n static final String LESS_THAN = \"01\";\n /* 等于*/\n static final String EQUAL = \"02\";\n /* 大于*/\n static final String GREATER_THAN = \"03\";\n }\n\n /* 客户类型 */\n static final String CSTM_TYPE = \"CSTM_TYPE\";\n\n interface CSTMTYPE{\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 个人 */\n static final String PERSON = \"01\";\n /* 企业*/\n static final String COMPANY = \"02\";\n }\n\n /* 支付状态 */\n static final String PAY_TYPE = \"PAY_TYPE\";\n\n interface PAYTYPE{\n /* 审核中 */\n static final String UNPAY = \"01\";\n /* 通过 */\n static final String PAY = \"02\";\n /* 驳回 */\n static final String REJECT = \"03\";\n /* 已取消 */\n static final String CANCEL = \"04\";\n }\n\n /* 任务状态 */\n static final String TASK_STATE = \"TASK_STATE\";\n\n interface TASKSTATE{\n /* 待发送 */\n static final String WAIT_SEND = \"01\";\n /* 已发送 */\n static final String SEND = \"02\";\n /* 成功 */\n static final String SUCCESS = \"03\";\n /* 失败 */\n static final String FAIL = \"04\";\n }\n\n /* 收款账户 */\n static final String PAY_ACCOUNT = \"PAY_ACCOUNT\";\n\n interface PAYACCOUNT{\n /* 个人账户 */\n static final String PRIVATE = \"01\";\n /* 对公账户 */\n static final String PUBLIC = \"02\";\n }\n\n}", "protected String getStrainType()\n{\n\treturn \"Met E\";\n}", "public UnitConverter() {\r\n getParameters();\r\n }", "@Override\r\n\t\t\tpublic void serializar() {\n\r\n\t\t\t}", "public interface Division extends BusinessObject, Serializable {\n\n /**\n * Accessor method for Name.\n * <br>longTextAttribute The name of the division\n *\n * @return java.lang.String attribute of this Division.\n */\n public java.lang.String getName();\n\n /**\n * Mutator method for Name.\n * <br>longTextAttribute The name of the division\n *\n * @param aName set java.lang.String attribute of this Division.\n */\n public void setName(java.lang.String aName);\n\n\n /**\n * The enumeration for Name\n */\n public final static int NAME = 0;\n\n\n\n\n\n}", "public void testEnumUsingToString() throws Exception\n {\n assertEquals(\"\\\"c2\\\"\", MAPPER.writeValueAsString(AnnotatedTestEnum.C2));\n }", "@Updatable\n public String getUnit() {\n return unit;\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_DIGITAL_GOODS_QUANTITY_CHANGE;\n }", "private FileImport_RunImporter_PauseProcessing_Current_Type_ID_Enum( int v) {\n value = v;\n }", "@Override\n public void marshal(Object object, HierarchicalStreamWriter writer, MarshallingContext context) {\n EnumValue enumValue = (EnumValue) object;\n writer.startNode(\"enumValue\");\n net.ssehub.easy.varModel.model.datatypes.Enum e = \n (net.ssehub.easy.varModel.model.datatypes.Enum) enumValue.getDatatype();\n writer.addAttribute(\"project\", String.valueOf(e.getTopLevelParent().getName()));\n writer.addAttribute(\"type\", enumValue.getDatatype().getName());\n writer.addAttribute(\"enum\", enumValue.getQualifiedName());\n writer.endNode();\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "private ProfitPerTariffType ()\n {\n super();\n }", "@Override\n\tpublic void type() {\n\t\t\n\t}", "public String asString() {\n\t\t\tString enumName;\n\t\t\tswitch(this) {\n\t\t\tcase INDEX:\n\t\t\t\tenumName = \"index\";\n\t\t\t\tbreak;\n\t\t\tcase NAME:\n\t\t\t\tenumName = \"name\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tenumName = \"unsupported\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn enumName;\n\t\t}", "private EndpointStatusType(String type)\n\t\t{\n\t\t\tthis.type = type;\n\t\t}", "@Override\n public String getSpeedType() {\n return type;\n }", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn type;\n\t\t}", "public void setUnitTable(Units value);", "Unit getUnit();", "public static void type(int typ) {\n ser_cli = typ;\n }", "public int getType() {\n/* 50 */ return this.type;\n/* */ }", "public interface LMCPEnum {\n\n public long getSeriesNameAsLong();\n\n public String getSeriesName();\n\n public int getSeriesVersion();\n\n public String getName(long type);\n\n public long getType(String name);\n\n public LMCPObject getInstance(long type);\n\n public java.util.Collection<String> getAllTypes();\n}", "@Override\n\tpublic void setCashierType(String status) {\n\t}", "public byte getSType() {\r\n return _sType;\r\n }", "private AnalysisMethodEnum(String name) {\n\t\tthis.methodName = name;\n\t}", "public static void main(String[] args) {\n\n for (OperateTypeEnum test : OperateTypeEnum.values()) {\n System.out.println(test.name()+\" \"+test.ordinal());\n }\n\n EnumMap<OperateTypeEnum, String> enumMap = new EnumMap<OperateTypeEnum, String>(OperateTypeEnum.class);\n enumMap.put(OperateTypeEnum.DELETE, \"dddddddddddddd\");\n enumMap.put(OperateTypeEnum.UPDATE, \"uuuuuuuuuuuuuu\");\n for (Map.Entry<OperateTypeEnum, String> entry : enumMap.entrySet()) {\n System.out.println(entry.getValue() + entry.getKey().getEnumDesc());\n }\n\n// EnumSet<OperateTypeEnum> enumSets = EnumSet.of(OperateTypeEnum.DELETE);\n// EnumSet<OperateTypeEnum> enumSets = EnumSet.allOf(OperateTypeEnum.class);\n// EnumSet<OperateTypeEnum> enumSets = EnumSet.range(OperateTypeEnum.DELETE,OperateTypeEnum.UPDATE);\n EnumSet<OperateTypeEnum> enumSet = EnumSet.noneOf(OperateTypeEnum.class);\n enumSet.add(OperateTypeEnum.DELETE);\n enumSet.add(OperateTypeEnum.UPDATE);\n for (Iterator<OperateTypeEnum> it = enumSet.iterator(); it.hasNext();) {\n System.out.println(it.next().getEnumDesc());\n }\n for (OperateTypeEnum enumTest : enumSet) {\n System.out.println(enumTest.getEnumDesc() + \" ..... \");\n }\n\n EnumSet<OperateTypeEnum> enumSets = EnumSet.copyOf(enumSet);\n }", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "@Override\n public String getType()\n {\n return \"OO\";\n }", "java.lang.String getSer();", "public String getUnitnm() {\r\n return unitnm;\r\n }", "@Override\r\n public String toString() {\r\n return tipo;\r\n }", "private String getType(){\r\n return type;\r\n }", "public void testEnum() {\n assertNotNull(MazeCell.valueOf(MazeCell.UNEXPLORED.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.INVALID_CELL.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.CURRENT_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.FAILED_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.WALL.toString()));\n }", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "@Override\r\n\tpublic Unit unitSave(JsonObject requestBody) {\n\t\tUnit u = new Unit();\r\n\t\tif (requestBody.containsKey(\"unit_no\")) {\r\n\t\t\tu.setUnit_no(requestBody.getJsonString(\"unit_no\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"unit_remark\")) {\r\n\t\t\tu.setUnit_remark(unitTypeRepo.getUnitType(requestBody.getString(\"unit_remark\")));\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"UOM\")) {\r\n\t\t\tu.setUOM(requestBody.getJsonString(\"UOM\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"Description\")) {\r\n\t\t\tu.setDescription(requestBody.getJsonString(\"Description\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"unit_type\")) {\r\n\t\t\tu.setUnit_type(requestBody.getJsonString(\"unit_type\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"pipeGas\")) {\r\n\t\t\tu.setPipeGas(requestBody.getBoolean(\"pipeGas\"));\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (requestBody.containsKey(\"sanctionedLoadGrid\")) {\r\n\t\t\tu.setSanctionedLoadGrid(requestBody.getJsonNumber(\"sanctionedLoadGrid\").intValue());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"sanctionedLoadBackUp\")) {\r\n\t\t\tu.setSanctionedLoadBackUp(requestBody.getJsonNumber(\"sanctionedLoadBackUp\").intValue());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"soldStatus\")) {\r\n\t\t\tu.setSoldStatus(requestBody.getJsonString(\"soldStatus\").getString());\r\n\t\t}\r\n\t\tif (requestBody.containsKey(\"parentId\")) {\r\n\r\n\t\t\tu.setParentAccount(towerRepo.gettower(requestBody.getJsonString(\"parentId\").getString()));\r\n\t\t}\r\n\t\tu.setUuid(Commonfunctionl.uuIDSend());\r\n\t\tDate d = new Date();\r\n\t\tu.setCreateDate(d);\r\n\t\tu.setUpdateDate(d);\r\n\t\tunitRepo.save(u);\r\n\t\treturn u;\r\n\t}", "public void setUnit(String unit)\n {\n this.unit = unit;\n }", "public EVT_VARIANT() {\n/* 220 */ super(W32APITypeMapper.DEFAULT);\n/* */ }", "public BFUnit(){\n \n }", "public final void mo92083O() {\n }", "public Unit getUnit() {\n return unit;\n }", "@Override\n public String getType(){\n return Type;\n }", "boolean addEnum(EnumDefinition evd) throws ResultException, DmcValueException {\n// if (checkAndAdd(evd.getObjectName(),evd,enumDefs) == false){\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsg(evd.getObjectName(),evd,enumDefs,\"enum value names\"));\n// throw(ex);\n// }\n \n \tenumDefinitions.add(evd);\n \n if (checkAndAddDOT(evd.getDotName(),evd,globallyUniqueMAP,null) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsgDOT(evd.getObjectName(),evd,globallyUniqueMAP,\"definition names\"));\n \tthrow(ex);\n }\n\n // Things get a little tricky here - although EnumDefinitions are enums, they get\n // turned into internally generated TypeDefinitions, so we don't add them to the\n // allDefs map as EnumDefinitions.\n TypeDefinition td = new TypeDefinition();\n td.setInternallyGenerated(true);\n td.setName(evd.getName());\n \n // The name of an enum definition is schema.enum.EnumDefinition\n // For the associated type, it will be schema.enum.TypeDefinition\n DotName typeName = new DotName((DotName) evd.getDotName().getParentName(),\"TypeDefinition\");\n// DotName nameAndTypeName = new DotName(td.getName() + \".TypeDefinition\");\n td.setDotName(typeName);\n// td.setNameAndTypeName(nameAndTypeName);\n\n td.setEnumName(evd.getName().getNameString());\n td.addDescription(\"This is an internally generated type to allow references to \" + evd.getName() + \" values.\");\n td.setIsEnumType(true);\n td.setTypeClassName(evd.getDefinedIn().getSchemaPackage() + \".generated.types.DmcType\" + evd.getName());\n td.setPrimitiveType(evd.getDefinedIn().getSchemaPackage() + \".generated.enums.\" + evd.getName());\n td.setDefinedIn(evd.getDefinedIn());\n \n // Issue 4 fix\n if (evd.getNullReturnValue() != null)\n \ttd.setNullReturnValue(evd.getNullReturnValue());\n \n internalTypeDefs.put(td.getName(), td);\n \n // We add the new type to the schema's list of internally generated types\n evd.getDefinedIn().addInternalTypeDefList(td);\n \n // Add the type\n addType(td);\n\n if (evd.getObjectName().getNameString().length() > longestEnumName)\n longestActionName = evd.getObjectName().getNameString().length();\n \n if (extensions.size() > 0){\n \tfor(SchemaExtensionIF ext : extensions.values()){\n \t\text.addEnum(evd);\n \t}\n }\n\n return(true);\n }", "private Enums(String s, int j)\n\t {\n\t System.out.println(3);\n\t }", "@Test\n public void test_constructor_0(){\n\tSystem.out.println(\"Testing TracerIsotopes's enumerations and getters.\");\n //Tests if values are correct for all enumerations, and tests the getters as well. You cannot instantiate new inumerations.\n \n TracerIsotopes ave=TracerIsotopes.concPb205t;\n assertEquals(\"concPb205t\",ave.getName());\n\n ave=TracerIsotopes.concU235t;\n assertEquals(\"concU235t\",ave.getName());\n \n ave=TracerIsotopes.concU236t;\n assertEquals(\"concU236t\",ave.getName()); \n \n String[] list=TracerIsotopes.getNames();\n assertEquals(\"concPb205t\",list[0]);\n assertEquals(\"concU235t\",list[1]);\n assertEquals(\"concU236t\",list[2]);\n \n \n \n }", "@Override\n\tpublic String toString() {\n\t\treturn type;\n\t}", "protected String getUnits()\n {\n return units;\n }", "String getUnitsString();", "@Test\n\tpublic void testEnumSize1BadInput() throws Exception {\n\t\tCategory category = program.getListing()\n\t\t\t\t.getDataTypeManager()\n\t\t\t\t.getCategory(new CategoryPath(CategoryPath.ROOT, \"Category1\"));\n\t\tEnum enumm = createEnum(category, \"TestEnum\", 1);\n\t\tedit(enumm);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tassertNotNull(panel);\n\n\t\taddEnumValue();\n\n\t\twaitForSwing();\n\t\tDockingActionIf applyAction = getApplyAction();\n\t\tassertTrue(applyAction.isEnabled());\n\t\tassertTrue(panel.needsSave());\n\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tassertEquals(\"New_Name\", model.getValueAt(0, NAME_COL));\n\t\tassertEquals(0L, model.getValueAt(0, VALUE_COL));\n\n\t\taddEnumValue();\n\n\t\tString editName = \"New_Name_(1)\";\n\t\tassertEquals(editName, model.getValueAt(1, NAME_COL));\n\t\tassertEquals(1L, model.getValueAt(1, VALUE_COL));\n\n\t\taddEnumValue();\n\n\t\tassertEquals(\"New_Name_(2)\", model.getValueAt(2, NAME_COL));\n\t\tassertEquals(2L, model.getValueAt(2, VALUE_COL));\n\n\t\tint row = getRowFor(editName);\n\n\t\teditValueInTable(row, \"0x777\");\n\n\t\trow = getRowFor(editName); // the row may have changed if we are sorted on the values col\n\t\tassertEquals(0x77L, model.getValueAt(row, VALUE_COL));\n\t}", "public abstract BaseQuantityDt setUnits(String theString);" ]
[ "0.58121246", "0.5797544", "0.57406056", "0.5685439", "0.5634475", "0.55950797", "0.5561276", "0.55541474", "0.55280614", "0.5497328", "0.54772615", "0.5459936", "0.54585856", "0.5442126", "0.54416823", "0.54351974", "0.54044545", "0.53969115", "0.53917277", "0.53884083", "0.5380058", "0.5369338", "0.53633654", "0.5348639", "0.5339916", "0.53384626", "0.533587", "0.5319303", "0.53177315", "0.53137183", "0.5305892", "0.529309", "0.52792555", "0.5278069", "0.5272175", "0.52712846", "0.5270877", "0.52702713", "0.5268693", "0.52668506", "0.5252215", "0.5245946", "0.5242167", "0.5227244", "0.5226626", "0.5214232", "0.52126557", "0.5199708", "0.51991475", "0.5197146", "0.51829416", "0.51816094", "0.5173613", "0.51619136", "0.51607126", "0.5159979", "0.5158414", "0.5156638", "0.5153778", "0.51433426", "0.51433426", "0.51433426", "0.51375985", "0.513699", "0.51345855", "0.5131284", "0.5117433", "0.51149195", "0.51142055", "0.5113811", "0.51115954", "0.51107967", "0.5101803", "0.51009446", "0.5098481", "0.5097974", "0.509751", "0.50884104", "0.5088034", "0.5087105", "0.5083668", "0.5083401", "0.50824386", "0.5080295", "0.50678766", "0.50644296", "0.50601107", "0.5059688", "0.50500727", "0.504929", "0.50484663", "0.5048028", "0.50468683", "0.5044526", "0.50435936", "0.50388086", "0.5035018", "0.5033635", "0.5031388", "0.5030855" ]
0.63061476
0
if nAnalyticMode & 1 == 1, extract principle from H divided sers with cap and/or under if nAnalyticMode & 2 == 2, extract principle from sers with left top note if nAnalyticMode & 4 == 4, extract principle from sers with upper and/or lower note(s) if nAnalyticMode & 8 == 8, extract rooted value from root sers.
public StructExprRecog getPrincipleSER(int nAnalyticMode) { if (mnExprRecogType == EXPRRECOGTYPE_HCUTCAP && (nAnalyticMode & 1) == 1) { return mlistChildren.getLast(); } else if (mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER && (nAnalyticMode & 1) == 1) { return mlistChildren.getFirst(); } else if (mnExprRecogType == EXPRRECOGTYPE_HCUTCAPUNDER && (nAnalyticMode & 1) == 1) { return mlistChildren.get(1); } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTLEFTTOPNOTE && (nAnalyticMode & 2) == 2) { return mlistChildren.getLast(); } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE && (nAnalyticMode & 4) == 4) { return mlistChildren.getFirst(); } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE && (nAnalyticMode & 4) == 4) { return mlistChildren.getFirst(); } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES && (nAnalyticMode & 4) == 4) { return mlistChildren.getFirst(); } else if (mnExprRecogType == EXPRRECOGTYPE_GETROOT && (nAnalyticMode & 8) == 8) { return mlistChildren.getLast(); } else { return this; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Boolean getAppositivePrs(PairInstance inst) {\n if (inst.getAnaphor().getSentId()!=inst.getAntecedent().getSentId()) \n return false;\n\n// exclude pairs where anaphor is an NE -- this might be a bad idea though..\n if (inst.getAnaphor().isEnamex()) \n return false;\n\n\n if (inst.getAntecedent().isEnamex() &&\n inst.getAnaphor().isEnamex()) {\n\n// exclude pairs of NE that have different type\n\n if (!(inst.getAntecedent().getEnamexType().equals(\n inst.getAnaphor().getEnamexType())))\n return false;\n\n// exclude pairs of LOC-ne\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"gpe\"))\n return false;\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"loc\"))\n return false;\n }\n\n// should have not-null maxnp-trees (otherwise -- problematic mentions)\n\nTree sentenceTree=inst.getAnaphor().getSentenceTree();\nTree AnaTree=inst.getAnaphor().getMaxNPParseTree();\nTree AnteTree=inst.getAntecedent().getMaxNPParseTree();\nif (sentenceTree==null) return false;\nif (AnaTree==null) return false;\nif (AnteTree==null) return false;\n\n\n// the structure should be ( * (,) (ANA)) or ( * (,) (ANTE)) -- depends on the ordering, annotation, mention extraction etc\n\n if (AnteTree.parent(sentenceTree)==AnaTree) {\n Tree[] chlds=AnaTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnteTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n }\n if (AnaTree.parent(sentenceTree)==AnteTree) {\n\n Tree[] chlds=AnteTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnaTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n\n }\n\n return false;\n\n }", "private void SearchCtes(){\n double d1=0.0;\n boolean elev=false;\n boolean c1=true;\n boolean c2=false;\n boolean c3=false;\n String A=\"\";\n String B=\"\";\n String C=\"\";\n int i=0;\n int j=0;\n while(this.Eq.charAt(i)!='=') {\n //j=i;\n if(this.Eq.charAt(i)=='+'||this.Eq.charAt(i)=='D'){\n i++;\n }\n if(this.Eq.charAt(i)=='^'){\n elev=true;\n i++;\n }\n if(this.Eq.charAt(i)=='2'&&elev) {//final do D^2\n if(A==\"\"){\n this.a=0.0;\n }else{\n this.a=Integer.parseInt(A);\n } \n elev=false; \n c1=false;\n c2=true;\n i++;\n }\n if(this.Eq.charAt(i)=='1'&&elev) {//final do D^1\n if(B==\"\"){\n this.b=0.0;\n }else{\n this.b=Integer.parseInt(B);\n } \n elev=false; \n c2=false;\n c3=true;\n i++;\n }\n if(c1&&!elev){\n A+=this.Eq.charAt(i);\n }\n if(c2&&!elev){\n B+=this.Eq.charAt(i);\n }\n if(c3&&!elev){\n C+=this.Eq.charAt(i);\n }\n i++;\n } \n if(C==\"\"){\n this.c=0.0;\n }else{\n this.c=Integer.parseInt(C);\n } \n }", "public static void main(String[] args) {\n In in = new In(\"/Users/kliner/Downloads/wordnet/digraph3.txt\");\n Digraph digraph = new Digraph(in);\n SAP sap = new SAP(digraph);\n System.out.println(sap.ancestor(0, 4));\n System.out.println(sap.ancestor(10, 13));\n System.out.println(sap.length(10, 13));\n// System.out.println(sap.ancestor(7, 3));\n// System.out.println(sap.length(7, 3));\n// System.out.println(sap.ancestor(3, 7));\n// System.out.println(sap.length(3, 7));\n// System.out.println(sap.ancestor(7, 1));\n// System.out.println(sap.length(7, 1));\n// System.out.println(sap.ancestor(7, 0));\n// System.out.println(sap.length(7, 0));\n// System.out.println(sap.ancestor(10, 11));\n// System.out.println(sap.length(10, 11));\n// System.out.println(sap.ancestor(10, 12));\n// System.out.println(sap.length(10, 12));\n// System.out.println(sap.ancestor(5, 12));\n// System.out.println(sap.length(5, 12));\n// System.out.println(sap.ancestor(0, 12));\n// System.out.println(sap.length(0, 12));\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\n\tnew VetClinic();\n\t\n\t// WELCOME TO MY CODE: MAIRA LORENA WALTERO GUEVARA \n\t// This code is for demonstration purposes for my application for Graduate Software Engineer (Dublin)in DATALEX \n\t\n\t// MY CLINIC IS DIVIDED IN TWO SUPER CLASES: \n\t// 1. STAFF AND 2. ANIMALS \n\t\n\t// 1. STAFF HAS 3 CHILDREN: \n\t// 1.1 ADMINISTRATIVE STAFF AND 1.2 MEDICAL STAFF\n\t// 1.1 ADMININSTRATIVE STAFF HAS 3 CHILDS: \n\t//1.1.1 HR (id=229 -230) , 1.1.2 IT (id=226-228) AND 1.1.3 RECEPTIONIST (id=221-225)\n\t\n\t// 1.2. MEDICAL STAFF HAS 3 CHILDREN: \n\t//1.2.1 SMALL ANIMALS VETS (id= 111 - 125) , 1.2.2 LARGE ANIMALS VETS (id= 126 - 130) AND LABORATORIANS (id= 131 - 140) \n\t//1.2.1 SMALL ANIMALS VETS is only attending small animals = pets \n\t//1.2.2 LARGE ANIMALS VETS is only attending large animals = livestock animals \n\t//1.2.3 LABORATORIANS are attending both type of animals but only if they need. \n\t\n\t//2. ANIMALS HAS TWO SUBCLASSES: \n\t//2.1 COMPANION ANIMALS AND 2.2 LIVESTOCK ANIMALS \n\t//2.1 COMPANION ANIMALS HAS 3 SUBCLASSES:\n\t//2.1.2 CAT , 2.1.2 DOG AND 2.1.3 RABBIT \n\t//2.2 LIVESTOCK ANIMALS HAS TWO SUBCLASSES: \n\t//2.2.1 CATTLE AND 2.2.2 SHEEP \n\t\n\t// THE ARE TREE TYPES OF CLASES WHO CONTAIN THE METHODS IN ORDER TO CREATE THE FUNTIONS \n\t// 1. READING FILES , 2. MAIN CLASS OF METHODS AND 3. PRINT AND QUESTION METHODS\n\t\n\t// 1. READING FILES: \n\t// 1.1 INFOANIMALS AND INFOSTAFF : IN HERE THE METHOD READ THE FILE AND IN SOME CASES CREATE AN ARRAY LIST WITH RANDOM ELEMENTS \n\t// 1.2 MAIN CLASS OF METHOS: IN HERE THERE ARE THE METHODS TO CREATE THE INTANCES, POPULATE THE QUEUES, ASSING TASKS AND DO THE SEARCHS \n\t// 1.3 PRINT AND QUESTION METHODS: THIS CONTAIN THE METHODS TO ASK TO THE USER QUESTIONS AND PRINT THE ANSWER USING THE METHODS INSIDE OF INFORMATION CLASS\n\t}", "private static final int edu (StringBuffer buf, long mksa, int option) {\n\t\tint len0 = buf.length();\n\t\tint i, e, o, xff;\n\t\tint nu=0; \n\t\tboolean sep = false;\n\t\tlong m;\n\n\t\t/* Remove the 'log' or 'mag[]' part */\n\t\tif ((mksa&_log) != 0) {\n\t\t\tmksa &= ~_log;\n\t\t\tif ((mksa&_mag) != 0) mksa &= ~_mag;\n\t\t}\n\n\t\t/* Check unitless -- edited as empty string */\n\t\tif (mksa == underScore) return(0);\n\n\t\t/* Find the best symbol for the physical dimension */\n\t\tif (option > 0) {\n\t\t\tnu = (mksa&_mag) == 0 ? 0 : 1;\n\t\t\tfor (m=(mksa<<8)>>8; m!=0; m >>>= 8) {\n\t\t\t\tif ((m&0xff) != _e0 ) nu++ ;\n\t\t\t}\n\n\t\t\t/* Find whether this number corresponds to a composed unit */\n\t\t\tfor (i=0; i<uDef.length; i++) {\n\t\t\t\tif (uDef[i].mksa != mksa) continue;\n\t\t\t\tif (uDef[i].fact != 1) continue;\n\t\t\t\tbuf.append(uDef[i].symb) ;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// A basic unit need no explanation \n\t\t\tif (nu == 1) return(buf.length() - len0) ;\n\n\t\t\t// Add the explanation in MKSA within parenthesis\n\t\t\tif (buf.length() != len0) buf.append(\" [\") ;\n\t\t\telse nu = 0;\t// nu used as an indicator to add the ) \n\t\t}\n\n\t\to = _m0;\t// Zero power of magnitude\n\t\txff = 7;\t// Mask for magnitude\n\t\tfor (i=0; i<8; i++) {\n\t\t\te = (int)((mksa>>>(56-(i<<3)))&xff) - o;\n\t\t\to = _e0 ;\t// Other units: the mean is _e0 \n\t\t\txff = 0xff;\t// Other units\n\t\t\tif (e == 0) continue;\n\t\t\tif (sep) buf.append(\".\"); sep = true;\n\t\t\tbuf.append(MKSA[i]);\n\t\t\tif (e == 1) continue;\n\t\t\tif (e>0) buf.append(\"+\") ;\n\t\t\tbuf.append(e) ;\n\t\t}\n\t\tif (nu>0) buf.append(\"]\");\n\t\treturn(buf.length() - len0) ;\n\t}", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "private void stage1_2() {\n\n\t\tString s = \"E $:( 3E0 , 3E0 ) ( $:( 3E0 , 3E0 ) \";\n\n//\t s = SymbolicString.makeConcolicString(s);\n\t\tStringReader sr = new StringReader(s);\n\t\tSystem.out.println(s);\n\t\tFormula formula = new Formula(s);\n\t\tMap<String, Decimal> actual = formula.getVariableValues();\n\t}", "@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}", "public void inferOutwardsInformation()\n\t{\n\t\t// To prepare everything, delete all outwards information\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t{\n\t\t\tgetFace(i).setNoOfFacesToOutside(IndexArray.NONE);\n\t\t}\n\t\tfor(int i=0; i<simplices.size(); i++)\n\t\t{\n\t\t\tgetSimplex(i).setOuterFaceIndex(IndexArray.NONE);\n\t\t\tgetSimplex(i).setOuterNeighbourSimplexIndex(IndexArray.NONE);\n\t\t}\n\t\t\n\t\t// First, find the indices of all outside faces, ...\n\t\tArrayList<Integer> outsideFaceIndices = getOutsideFaceIndicesBeforeAllInfoHasBeenInferred();\n\t\t\n\t\t// System.out.println(\"SimplicialComplex::inferOutwardsInformation: outsideFaceIndices=\"+outsideFaceIndices);\n\t\t\n\t\tint noOfFacesToOutside = 0;\n\t\t\n\t\t// ... mark the number of faces to the outside as zero from these outside faces, ...\n\t\tfor(int outsideFaceIndex : outsideFaceIndices)\n\t\t{\n\t\t\tfaces.get(outsideFaceIndex).setNoOfFacesToOutside(noOfFacesToOutside);\n\t\t}\n\t\t\n\t\tint noOfChangedSimplices;\n\t\tdo\n\t\t{\n\t\t\t// System.out.println(\"SimplicialComplex::inferOutwardsInformation: noOfFacesToOutside=\"+noOfFacesToOutside);\n\t\t\t\n\t\t\t// reset the number of changed simplices\n\t\t\tnoOfChangedSimplices = 0;\n\t\t\t\n\t\t\t// go through all simplices...\n\t\t\tfor(Simplex simplex : simplices)\n\t\t\t{\n\t\t\t\t// System.out.println(\" SimplicialComplex::inferOutwardsInformation: simplex index=\"+getSimplexIndex(simplex));\n\n\t\t\t\t// ... whose outwards information has not been set, ...\n\t\t\t\tif(simplex.getOuterFaceIndex() == IndexArray.NONE)\n\t\t\t\t{\n\t\t\t\t\t// ... and infer its outer face index\n\t\t\t\t\tint outerFaceIndex = simplex.inferOuterFaceIndex();\n\n\t\t\t\t\t// System.out.println(\" SimplicialComplex::inferOutwardsInformation: outerFaceIndex=\"+outerFaceIndex);\n\n\t\t\t\t\t// has inferring the outer-face index actually succeeded?\n\t\t\t\t\tif(outerFaceIndex != IndexArray.NONE)\n\t\t\t\t\t{\n\t\t\t\t\t\t// yes\n\n\t\t\t\t\t\t// System.out.println(\" SimplicialComplex::inferOutwardsInformation: getFace(outerFaceIndex).getNoOfFacesToOutside()=\"+getFace(outerFaceIndex).getNoOfFacesToOutside());\n\n\t\t\t\t\t\t// check if this face's number of faces to the outside = <i>noOfFacesToOutside</i>\n\t\t\t\t\t\tif(getFace(outerFaceIndex).getNoOfFacesToOutside() == noOfFacesToOutside)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// yes; set this simplex's outwards information, first its outer face...\n\t\t\t\t\t\t\tsimplex.setOuterFaceIndex(outerFaceIndex);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// ... and then its outer neighbour simplex index\n\t\t\t\t\t\t\tsimplex.setOuterNeighbourSimplexIndex(\n\t\t\t\t\t\t\t\t\tIndexArray.getFirstOtherIndex(\n\t\t\t\t\t\t\t\t\t\t\tthis.getSimplexIndex(simplex),\t// the index of <i>simplex</i>\n\t\t\t\t\t\t\t\t\t\t\tgetFace(outerFaceIndex).getSimplexIndices()\n\t\t\t\t\t\t\t\t\t\t\t)\t// the index of the simplex neighbouring face #<i>outerFaceIndex</i> that is *not* <i>simplex</i>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// set this simplex's other faces' outwards information\n\t\t\t\t\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// find the <i>i</i>th face of the simplex\n\t\t\t\t\t\t\t\tFace face = simplex.getFace(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// has this face's outward information been set?\n\t\t\t\t\t\t\t\tif(face.getNoOfFacesToOutside() == IndexArray.NONE)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tface.setNoOfFacesToOutside(noOfFacesToOutside + 1);\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// increase the number of changed simplices\n\t\t\t\t\t\t\tnoOfChangedSimplices++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// increase the number of faces to the outside by 1\n\t\t\tnoOfFacesToOutside++;\t\t\t\n\t\t}\n\t\twhile(noOfChangedSimplices > 0);\n//\t\t\n//\t\t// ... and mark the outer neighbour of each simplex that has an outside face as the outside\n//\t\t// and its outer face as the outside face, and set <i>noOfFacesToOutside</i> for the remaining faces to 1\n//\t\tnoOfFacesToOutside++;\t// now has value 1\n//\t\t// Do this by going through all simplices, ...\n//\t\tfor(Simplex simplex : simplices)\n//\t\t{\t\t\t\n//\t\t\t// ...and if a simplex has an outside face, ...\n//\t\t\tint outsideFaceIndex = simplex.getFaceIndexInList(outsideFaceIndices);\n//\t\t\t\n//\t\t\t// System.out.println(\"SimplicialComplex::inferOutwardsInformation: outsideFaceIndex = \"+outsideFaceIndex);\n//\t\t\t\n//\t\t\tif(outsideFaceIndex != IndexArray.NONE)\n//\t\t\t{\n//\t\t\t\t// ...then add the relevant outwards information to the simplex ...\n//\t\t\t\tsimplex.setOuterFaceIndex(outsideFaceIndex);\n//\t\t\t\tsimplex.setOuterNeighbourSimplexIndex(IndexArray.OUTSIDE);\n//\t\t\t\t\n//\t\t\t\t// ...and set <i>noOfFacesToOutside</i> for the faces that have not already been marked as outside faces as 1; ...\n//\t\t\t\tfor(int i=0; i<4; i++)\n//\t\t\t\t{\n//\t\t\t\t\t// take the <i>i</i>th face\n//\t\t\t\t\tFace face = simplex.getFace(i);\n//\t\t\t\t\t\n//\t\t\t\t\t// if its <i>noOfFacesToOutside</i> variable has not been set yet, set it to 1\n//\t\t\t\t\tif(face.getNoOfFacesToOutside() == IndexArray.NONE) face.setNoOfFacesToOutside(noOfFacesToOutside);\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\telse\n//\t\t\t{\n//\t\t\t\t// ... otherwise mark the outwards information as not set.\n//\t\t\t\tsimplex.setOuterFaceIndex(IndexArray.NONE);\n//\t\t\t\tsimplex.setOuterNeighbourSimplexIndex(IndexArray.NONE);\t\t\t\t\n//\t\t\t}\n//\t\t\t\n//\t\t\t// System.out.println(\"SimplicialComplex::inferOutwardsInformation: simplex = \"+simplex);\n//\t\t}\n//\t\t\n//\t\t// Next, iterate \"inwards\"!\n//\t\t\n//\t\t// Create a list of all the simplices that have been changed in the current iteration\n//\t\tArrayList<Simplex> changedSimplices = new ArrayList<Simplex>();\n//\t\t\n//\t\tdo\n//\t\t{\n//\t\t\t// the number of faces to the outside will be one more for the next set of faces\n//\t\t\tnoOfFacesToOutside++;\n//\t\t\t\n//\t\t\t// clear the list of simplices that have been changed in this iteration\n//\t\t\tchangedSimplices.clear();\n//\n//\t\t\t// Go through all simplices...\n//\t\t\tfor(Simplex simplex : simplices)\n//\t\t\t{\n//\t\t\t\t// System.out.println(\"SimplicialComplex::inferOutwardsInformation: simplex = \"+simplex);\n//\n//\t\t\t\t// ... that lack outwards information, ...\n//\t\t\t\tif(simplex.getOuterFaceIndex() == IndexArray.NONE)\n//\t\t\t\t{\n//\t\t\t\t\t// System.out.println(\"SimplicialComplex::inferOutwardsInformation: \");\n//\t\t\t\t\t\n//\t\t\t\t\t// ... find the indices of the current simplex's neighbours, ...\n//\t\t\t\t\tint[] neighbourSimplexIndices = simplex.getNeighbourSimplexIndices();\n//\t\t\t\t\t\n//\t\t\t\t\t// System.out.println(\"SimplicialComplex::inferOutwardsInformation: neighbourSimplexIndices = \"+neighbourSimplexIndices);\n//\t\t\t\t\t\n//\t\t\t\t\t// ... identify the first of the nearest-neighbour simplices *with* outwards information\n//\t\t\t\t\t// that hasn't been changed in the current iteration, ...\n//\t\t\t\t\tint outerNeighbourSimplexIndex = IndexArray.NONE;\n//\t\t\t\t\tfor(int i=0; (i<4) && (outerNeighbourSimplexIndex == IndexArray.NONE); i++)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tint neighbourSimplexIndex = neighbourSimplexIndices[i];\n//\t\t\t\t\t\tSimplex neighbour = simplices.get(neighbourSimplexIndex);\n//\t\t\t\t\t\tif(\n//\t\t\t\t\t\t\t\t(neighbour.getOuterFaceIndex() != IndexArray.NONE)\t// neighbour's outwards information has been set...\n//\t\t\t\t\t\t\t\t&& (!changedSimplices.contains(neighbour))\t// ... and neighbour is not in list of simplices that have been changed in this iteration\n//\t\t\t\t\t\t)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\touterNeighbourSimplexIndex = neighbourSimplexIndex;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t// ... and if there is such a neighbour...\n//\t\t\t\t\tif(outerNeighbourSimplexIndex != IndexArray.NONE)\n//\t\t\t\t\t{\n//\t\t\t\t\t\t// ... set <simplex>'s outwards information towards this neighbour, ...\n//\t\t\t\t\t\tsimplex.setOuterNeighbourSimplexIndex(outerNeighbourSimplexIndex);\n//\t\t\t\t\t\tsimplex.setOuterFaceIndex(simplex.sharedFaceIndex(simplices.get(outerNeighbourSimplexIndex)));\n//\t\t\t\t\t\n//\t\t\t\t\t\t// ... add the changed simplex to the list of changed simplices, ...\n//\t\t\t\t\t\tchangedSimplices.add(simplices.get(outerNeighbourSimplexIndex));\n//\t\t\t\t\t\t\n//\t\t\t\t\t\t// ...and set <i>noOfFacesToOutside</i> for the faces that have not already been marked as outside faces as <i>noOfFacesToOutside</i>\n//\t\t\t\t\t\tfor(int i=0; i<4; i++)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// take the <i>i</i>th face\n//\t\t\t\t\t\t\tFace face = simplex.getFace(i);\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t// if its <i>noOfFacesToOutside</i> variable has not been set yet, set it to 1\n//\t\t\t\t\t\t\tif(face.getNoOfFacesToOutside() == IndexArray.NONE) face.setNoOfFacesToOutside(noOfFacesToOutside);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\t// repeat if simplices have been changed in the iteration that just finished\n//\t\twhile (changedSimplices.size() > 0);\n\t}", "void calcHorizSeamInfo() {\n SeamInfo tl = null;\n SeamInfo dl = null;\n SeamInfo l = null;\n if (this.topLeft() != null) {\n tl = topLeft().seamInfo;\n }\n if (this.downLeft() != null) {\n dl = downLeft().seamInfo;\n }\n if (this.left != null) {\n l = left.seamInfo;\n }\n\n double min = Double.MAX_VALUE;\n SeamInfo cameFrom = null;\n\n if (tl != null && min > tl.totalWeight) {\n min = tl.totalWeight;\n cameFrom = tl;\n }\n if (dl != null && min > dl.totalWeight) {\n min = dl.totalWeight;\n cameFrom = dl;\n }\n if (l != null && min > l.totalWeight) {\n min = l.totalWeight;\n cameFrom = l;\n }\n\n // for top border cases\n if (cameFrom == null) {\n min = 0;\n }\n\n this.seamInfo = new SeamInfo(this, min + this.energy(), cameFrom, false);\n }", "public static void caso12(){\n\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso1.owl\",\"file:resources/caso1.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"pan\");\n\t\tif(map==null){\n\t\t\tSystem.out.println(\"El map es null\");\n\t\t}\n\t}", "private void test() {\n\t\tCoordinate[] polyPts = new Coordinate[]{ \n\t\t\t\t new Coordinate(-98.50165524249245,45.216163960194365), \n\t\t\t\t new Coordinate(-96.07562805826798,39.725652270504796), \t\n\t\t\t\t new Coordinate(-88.95179971518155,39.08088689505274), \t\n\t\t\t\t new Coordinate(-87.96893561066132,44.647653935023214),\n\t\t \t\t new Coordinate(-89.72876449996915,41.54448973482366)\n\t\t\t\t };\n Coordinate[] seg = new Coordinate[2]; \n \n \tCoordinate midPt = new Coordinate();\n \tmidPt.x = ( polyPts[ 0 ].x + polyPts[ 2 ].x ) / 2.0 - 1.0;\n \tmidPt.y = ( polyPts[ 0 ].y + polyPts[ 2 ].y ) / 2.0 - 1.0;\n seg[0] = polyPts[ 0 ];\n seg[1] = midPt; \n \n \n\t\tfor ( int ii = 0; ii < (polyPts.length - 2); ii++ ) {\n\t\t\tfor ( int jj = ii + 2; jj < (polyPts.length); jj ++ ) {\n\t\t seg[0] = polyPts[ii];\n\t\t seg[1] = polyPts[jj]; \n\t\t \n\t\t\t boolean good = polysegIntPoly( seg, polyPts );\n\t String s;\n\t\t\t if ( good ) {\n\t\t\t\t\ts = \"Qualify!\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ts = \"Not qualify\";\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t\t\n\t\t\t System.out.println( \"\\npoint \" + ii + \"\\t<Point Lat=\\\"\" + \n\t\t\t\t\t polyPts[ii].y + \"\\\" Lon=\\\"\" + polyPts[ii].x + \"\\\"/>\" \n\t\t\t\t\t + \"\\t=>\\t\" + \"point \" + jj+ \"\\t<Point Lat=\\\"\" + \n polyPts[jj].y + \"\\\" Lon=\\\"\" + polyPts[jj].x + \"\\\"/>\"\n + \"\\t\" + s );\n \n\t\t\t}\n\t }\n\n\t}", "@TaDaMethod(variablesToTrack = {\"ssn\", \"weekWage\", \"workWeeks\", \"ssn2\",\n\t\t\t\"capitalGains\", \"capitalLosses\", \"stockDividends\"}, \n\t\t\tcorrespondingDatabaseAttribute = {\"job.ssn\", \"job.WEEKWAGE\", \"job.WORKWEEKS\", \"investment.ssn\",\n\t\t\t\"investment.CAPITALGAINS\", \"investment.CAPITALLOSSES\", \"investment.STOCKDIVIDENDS\"})\n\tprivate void calculateSlopesAndIntercepts(){\n\t\tHashMap<Integer, Integer> ssnWeekWage = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnWorkWeeks = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnInvestmentIncome = new HashMap<Integer, Integer>();\n\t\t\n\t\ttry {\n\t\t\tstatement = Factory.getConnection().createStatement();\n\t results = statement.executeQuery(\"SELECT SSN, WEEKWAGE, WORKWEEKS from job\"); \n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"WEEKWAGE\") == null || results.getString(\"WORKWEEKS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn = results.getInt(\"SSN\");\n\t \tint weekWage = results.getInt(\"WEEKWAGE\");\n\t \tint workWeeks = results.getInt(\"WORKWEEKS\");\n\t \t\n\t \tssnWeekWage.put(ssn, weekWage);\n\t \tssnWorkWeeks.put(ssn, workWeeks);\n\t }\n\t \n\t results = statement.executeQuery(\"SELECT SSN, CAPITALGAINS, CAPITALLOSSES, STOCKDIVIDENDS from investment\");\n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"CAPITALGAINS\") == null || results.getString(\"CAPITALLOSSES\") == null || results.getString(\"STOCKDIVIDENDS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn2 = results.getInt(\"SSN\");\n\t \tint capitalGains = results.getInt(\"CAPITALGAINS\");\n\t \tint capitalLosses = results.getInt(\"CAPITALLOSSES\");\n\t \tint stockDividends = results.getInt(\"STOCKDIVIDENDS\");\n\t \tint investmentIncome = capitalGains + stockDividends + capitalLosses;\n\t \t\n\t \tssnInvestmentIncome.put(ssn2, investmentIncome);\n\t }\n\t \n\t // Calculate Cofficients\n\t // Build an array list of Work Weeks and an array list of Income;\n\t ArrayList<Integer> workWeeksList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeList = new ArrayList<Integer>();\n\t ArrayList<Integer> weeklyWageList = new ArrayList<Integer>();\n\t ArrayList<Integer> investmentList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeListForInvestment = new ArrayList<Integer>();\n\t \n\t for (Iterator<Integer> i = ssnWorkWeeks.keySet().iterator(); i.hasNext();){\n\t \tint SSNkey = (Integer) i.next();\n\t \tif(ssnWorkWeeks.get(SSNkey) != null && ssnWeekWage.get(SSNkey) != null){\n\t\t \tint workWeeks = (Integer) ssnWorkWeeks.get(SSNkey);\n\t\t \tint weekWage = (Integer) ssnWeekWage.get(SSNkey);\n\t\t \tif(workWeeks > 0 && weekWage > 0){\n\t\t \t\tworkWeeksList.add(workWeeks);\n\t\t\t \tincomeList.add(workWeeks * weekWage);\n\t\t\t \tweeklyWageList.add(weekWage);\n\t\t\t \tif(ssnInvestmentIncome.get(SSNkey) != null && ssnInvestmentIncome.get(SSNkey) != null){\n\t\t\t \t\tint investmentIncome = (Integer) ssnInvestmentIncome.get(SSNkey);\n\t\t\t \t\tinvestmentList.add(investmentIncome);\n\t\t\t \t\tincomeListForInvestment.add(workWeeks * weekWage);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t \n\t // Set the member variable for the cofficients for given Work Weeks find Income\n\t workWeeksFindIncome = new CalculateRegression().calculateRegressionNumbers(workWeeksList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given Weekly Wage find Income\n\t weeklyWageFindIncome = new CalculateRegression().calculateRegressionNumbers(weeklyWageList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given InvestmentIncome find Income \n\t investmentIncomeFindIncome = new CalculateRegression().calculateRegressionNumbers(investmentList,incomeListForInvestment);\n\t \n\t\t} catch (SQLException e) {\n\t while (e != null)\n\t {\n\t System.err.println(\"\\n----- SQLException -----\");\n\t System.err.println(\" SQL State: \" + e.getSQLState());\n\t System.err.println(\" Error Code: \" + e.getErrorCode());\n\t System.err.println(\" Message: \" + e.getMessage());\n\t // for stack traces, refer to derby.log or uncomment this:\n\t //e.printStackTrace(System.err);\n\t e = e.getNextException();\n\t }\n\t\t}\t\n\t\t\n\t}", "public void printInfo() {\n System.out.println(\"\\n\\n---------------------BASIC RESULTS-----------------------\\n\");\n System.out.println(\"Most positive article: \" + mostPositiveDoc + \"\\nwith positivity \" + mostPositive + \"\\n\");\n System.out.println(\"Most negative article: \" + mostNegativeDoc + \"\\nwith negativity \" + mostNegative + \"\\n\");\n if (biggestDifference >= 0) {\n System.out.println(\"Biggest difference: \" + biggestDifferenceDoc + \"\\nwith more positivity by \" + biggestDifference);\n } else {\n System.out.println(\"Biggest difference: \" + biggestDifferenceDoc + \"\\nwith more negativity by \" + Math.abs(biggestDifference));\n }\n \n System.out.println(\"\\nAverage positivity: \" + avgPositive);\n System.out.println(\"Average negativity: \" + avgNegative);\n System.out.println(\"\\n-----------------------------------------------------------\\n\");\n System.out.println(\"\\n---------------------ADVANCED RESULTS----------------------\");\n \n System.out.println(\"\\nAverage positivity for PUBLISHERS:\");\n for (String s : publisherOptimism.keySet()) {\n LinkedList<Double> positives = publisherOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for PUBLISHERS:\");\n for (String s : publisherPessimism.keySet()) {\n LinkedList<Double> negatives = publisherPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage positivity for REGIONS:\");\n for (String s : regionOptimism.keySet()) {\n LinkedList<Double> positives = regionOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for REGIONS:\");\n for (String s : regionPessimism.keySet()) {\n LinkedList<Double> negatives = regionPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage positivity for DATES:\");\n for (LocalDate s : dayOptimism.keySet()) {\n LinkedList<Double> positives = dayOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for DATES:\");\n for (LocalDate s : dayPessimism.keySet()) {\n LinkedList<Double> negatives = dayPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage positivity for WEEKDAYS:\");\n for (DayOfWeek s : weekdayOptimism.keySet()) {\n LinkedList<Double> positives = weekdayOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for WEEKDAYS:\");\n for (DayOfWeek s : weekdayPessimism.keySet()) {\n LinkedList<Double> negatives = weekdayPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\n-----------------------------------------------------------\\n\");\n \n }", "public static void main(String[] args){\n In in = new In(args[0]);\n Digraph G = new Digraph(in);\n SAP sap = new SAP(G);\n while (!StdIn.isEmpty()) {\n int v = StdIn.readInt();\n int w = StdIn.readInt();\n int length = sap.length(v, w);\n int ancestor = sap.ancestor(v, w);\n StdOut.printf(\"length = %d, ancestor = %d\\n\", length, ancestor);\n }\n \n // horse and zebra\n //[28075, 46599, 46600, 49952, 68015], [82086]\n\n }", "public static void main2(String[] args)\n\t{\n\t\tString designString = \"design23e\";\n\t\tdouble coolingRate = 1.0;\n\n\t\tDesign design = new Design(designString, coolingRate, \"distance-M1\", true, \"Unified\");\n\n\t\tSystem.out.println(\"FIGURE 1 160nt\");\n\t\tdouble distance = (160 * (1.0 / 3.0) * 1.8 * 1.8) * 1E-18;\n\t\tgetStats(distance, design);\n\n\t\tSystem.out.println(\"FIGURE 1 640nt\");\n\t\tdistance = (640 * (1.0 / 3.0) * 1.8 * 1.8) * 1E-18;\n\t\tgetStats(distance, design);\n\n\t\tSystem.out.println(\"SITUATION A\");\n\t\tdistance = (56 * (1.0 / 3.0) * 1.8 * 1.8 + 1 * 16.0 * 0.34 * 16 * 0.34) * 1E-18;\n\t\tgetStats(distance, design);\n\n\t\tSystem.out.println(\"SITUATION B\");\n\t\tdistance = ((48 * (1.0 / 3.0) + 1) * 1.8 * 1.8 + 1 * 16.0 * 0.34 * 16 * 0.34) * 1E-18;\n\t\tgetStats(distance, design);\n\t}", "public static void main(String args[]) {\n\n // aacd(1,1,3,4) amd(1,13,4) kcd(11,3,4)\n // Note : 1,1,34 is not valid as we don't have values corresponding\n // to 34 in alphabet\n int[] arr = {1, 1, 3, 4};\n printAllInterpretations(arr);\n\n // aaa(1,1,1) ak(1,11) ka(11,1)\n int[] arr2 = {1, 1, 1};\n printAllInterpretations(arr2);\n\n // bf(2,6) z(26)\n int[] arr3 = {2, 6};\n printAllInterpretations(arr3);\n\n // ab(1,2), l(12)\n int[] arr4 = {1, 2};\n printAllInterpretations(arr4);\n\n // a(1,0} j(10)\n int[] arr5 = {1, 0};\n printAllInterpretations(arr5);\n\n // \"\" empty string output as array is empty\n int[] arr6 = {};\n printAllInterpretations(arr6);\n\n // abba abu ava lba lu\n int[] arr7 = {1, 2, 2, 1};\n printAllInterpretations(arr7);\n }", "public static void main(String[] args) {\n\t\tAnalyse ana = new Analyse(20, 5);\r\n//\t\tArrayList<Map.Entry<Integer, Double>> current = ana.getNeighbor(\"\")\r\n//\t\tfor(int i = 0; i < ana.average.length; i++){\r\n//\t\t\tSystem.out.println(ana.average[i]);\r\n//\t\t}\r\n//\t\tfor (int i = 0; i < 5; i++) {\r\n//\t\t\tSystem.out.println(ana.heap.get(i).getValue());\r\n//\t\t}\r\n\t\tSystem.out.println(ana.similarity.size());\r\n//\t\tArrayList<Map.Entry<Integer, Double>> record = ana.getNeighbor(\"0155061224\");\r\n//\t\tSystem.out.println(ana.heap.size());\r\n//\t\tSystem.out.println(record.size());\r\n//\t\tfor(int i = 0; i < record.size(); i++){\r\n//\t\t\tSystem.out.println(record.get(i).getKey());\r\n//\t\t\tSystem.out.println(record.get(i).getValue());\r\n////\t\t\tSystem.out.println(ana.matrix[record.get(i).getKey()][ana.read.getItems().indexOf(3149)]);\r\n//\t\t}\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"score\" + ana.predictionBaseline(\"100\"));\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(end - start);\r\n//\t\tSystem.out.println(ana.predictionBaseline(\"0155061224\"));\r\n\t}", "public static void main(String args[] ) throws Exception {\n String l[] = br.readLine().split(\" \");\n long N = Long.parseLong(l[0]);\n long S = Long.parseLong(l[1]);\n long E = Long.parseLong(l[2]);\n TreeMap<Long,Long> t1 = new TreeMap<Long,Long>();\n TreeMap<Long,Long> t2 = new TreeMap<Long,Long>();\n for(int i=0;i<N;i++) {\n String s[] = br.readLine().split(\" \");\n long x = Long.parseLong(s[0]);\n long p = Long.parseLong(s[1]);\n t1.put((x-p),(x+p));\n }\n ArrayList<Long> l1 = new ArrayList<Long>(t1.keySet());\n ArrayList<Long> l2 = new ArrayList<Long>(t1.values());\n long c = l1.get(0);\n long d = l2.get(0);\n for(int i=1;i<t1.size();i++)\n {\n if(l1.get(i)<=d)\n d = Math.max(d,l2.get(i));\n else\n {\n \n t2.put(c,d);\n c = l1.get(i);\n d = l2.get(i);\n }\n \n }\n t2.put(c,d);\n int i;\n long ans = 0;\n l1=new ArrayList<Long>(t2.keySet());\n l2=new ArrayList<Long>(t2.values());\n \n \n for(i=0;i<l1.size();i++)\n {\n if(S>=E)\n {\n S=E;\n break;\n }\n if(l1.get(i)<=S && S<=l2.get(i))\n S = l2.get(i);\n \n else if(S<=l1.get(i) && E>=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = l2.get(i);\n \n }\n else if(S<=l1.get(i) && E>=l1.get(i) && E<=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = E;\n }\n else if(S<=l1.get(i) && E<=l1.get(i))\n {\n ans+=E-S;\n S = E;\n }\n }\n if(S<E)\n ans+=E-S;\n pw.println(ans);\n \n pw.close();\n }", "@SuppressWarnings(\"unused\")\r\n private void findAbdomenVOI() {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 39; angle < 45; angle += 3) {\r\n int x, y, yOffset;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n scaleFactor = Math.tan(angleRad);\r\n x = xDim;\r\n y = ycm;\r\n yOffset = y * xDim;\r\n while (x > xcm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n x--;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n x = xcm;\r\n y = 0;\r\n yOffset = y * xDim;\r\n while (y < ycm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n y++;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n x = 0;\r\n y = ycm;\r\n yOffset = y * xDim;\r\n while (x < xcm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n x++;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 225 && angle <= 315) {\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n x = xcm;\r\n y = yDim;\r\n yOffset = y * xDim;\r\n while (y < yDim && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n y--;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n }\r\n } // end for (angle = 0; ...\r\n \r\n int[] x1 = new int[xValsAbdomenVOI.size()];\r\n int[] y1 = new int[xValsAbdomenVOI.size()];\r\n int[] z1 = new int[xValsAbdomenVOI.size()];\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n x1[idx] = xValsAbdomenVOI.get(idx);\r\n y1[idx] = xValsAbdomenVOI.get(idx);\r\n z1[idx] = 0;\r\n }\r\n\r\n // make the VOI's and add the points to them\r\n abdomenVOI = new VOI((short)0, \"Abdomen\");\r\n abdomenVOI.importCurve(x1, y1, z1);\r\n\r\n\r\n }", "public static void main(String[] args) {\n\t\tint array[]={2,3,4,6};\n\t\tint n=array.length;\n\t\tint maximum=Integer.MIN_VALUE;\n\t\tint minimum=Integer.MAX_VALUE;\n\t\tfor(int i:array)\n\t\t{\n\t\t\tif(i>maximum)\n\t\t\t\tmaximum=i;\n\t\t\tif(i<minimum)\n\t\t\t\tminimum=i;\n\t\t}\n\t\t\n\t\tint mark[]=new int[maximum+2];\n\t\tint value[]=new int[maximum+2];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tmark[array[i]]=1; // marking ki exist karta hai no need to search in the array.\n\t\t\tvalue[array[i]]=1; //har value se ek fbt to banega hi (1 node ka)\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=minimum;i<=maximum;i++){\n\t\t\tif(mark[i]==1) // element is present in the array.// we have found the first factor now find 2nd factor.\n\t\t\t{\n\t\t// find the multiples of arr[i] which are less than max value and also less than its square\n\t\t\tfor(int j=i+i ;j<=maximum && j/i<=i;j=j+i)\n\t\t\t{\n\t\t\t\tif(mark[j]==1 && mark[j/i]==1) // i is the first factor and j/i is the 2nd factor.j is the product that serves as root.\n\t\t\t\t{\n\t\t\t\t\t// value =all combination of left child with right child.\n\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t\t\n\t\t\t\t\t// if the 2 child are not same then one more orientation.\n\t\t\t\t\tif(i!=(j/i))\n\t\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tans=ans+value[i];\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "public static void main(String[] args) throws Exception {\n\t\tGbifAuthorityProvider gbifAp = new GbifAuthorityProvider();\n\t\tgbifAp.setDataProvider(new AnalyzerDataProviderFileBased(new File(\"E:/GoldenGATEv3/Plugins/AnalyzerData/AuthorityAugmenterData/GbifData/\")) {\n\t\t\tpublic boolean isDataEditable(String dataName) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpublic boolean isDataEditable() {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpublic boolean isDataAvailable(String dataName) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* some test cases:\n\t\t * - tribe Formicini\n\t\t * - species Orchis maculata\n\t\t * - subspecies Dactylorchis maculata arduennensis\n\t\t * - species Catapaguroides pectinipes\n\t\t */\n\t\tString testEpithet = \"Catapaguroides pectinipes\";//\"Hymenoptera\";//\"Braunsia\";//\"Chenopodium\";\n\t\tString testRank = SPECIES_ATTRIBUTE;\n\t\tProperties hierarchy = gbifAp.getAuthority(testEpithet.split(\"\\\\s+\"), testRank, null, -1, true);\n\t\tfor (Iterator rit = hierarchy.keySet().iterator(); rit.hasNext();) {\n\t\t\tString rank = ((String) rit.next());\n\t\t\tif (rank.indexOf('.') != -1)\n\t\t\t\tbreak;\n\t\t\tSystem.out.println(rank + \": \" + hierarchy.getProperty(rank));\n\t\t\tif (!rit.hasNext())\n\t\t\t\treturn;\n\t\t}\n\t\tfor (int r = 0;; r++) {\n\t\t\tString prefix = (r + \".\");\n\t\t\tboolean prefixEmpty = true;\n\t\t\tfor (Iterator rit = hierarchy.keySet().iterator(); rit.hasNext();) {\n\t\t\t\tString rank = ((String) rit.next());\n\t\t\t\tif (!rank.startsWith(prefix))\n\t\t\t\t\tcontinue;\n\t\t\t\tprefixEmpty = false;\n\t\t\t\tSystem.out.println(rank + \": \" + hierarchy.getProperty(rank));\n\t\t\t}\n\t\t\tif (prefixEmpty)\n\t\t\t\tbreak;\n\t\t}\n\t}", "public int \r\nomStudent_dMajorGPA( View mStudentOrig,\r\n String InternalEntityStructure,\r\n String InternalAttribStructure,\r\n Integer GetOrSetFlag )\r\n{\r\n zVIEW mStudent = new zVIEW( );\r\n //:VIEW lDegTrkM BASED ON LOD lDegTrkM\r\n zVIEW lDegTrkM = new zVIEW( );\r\n //:VIEW mStudenC BASED ON LOD mStudenC\r\n zVIEW mStudenC = new zVIEW( );\r\n //:VIEW mStudenCO BASED ON LOD mStudenC\r\n zVIEW mStudenCO = new zVIEW( );\r\n //:DECIMAL MajorGPA\r\n double MajorGPA = 0.0;\r\n //:DECIMAL GPA_Divisor\r\n double GPA_Divisor = 0.0;\r\n //:DECIMAL GPA_Points\r\n double GPA_Points = 0.0;\r\n //:DECIMAL FinalGrade\r\n double FinalGrade = 0.0;\r\n //:DECIMAL CreditHours\r\n double CreditHours = 0.0;\r\n //:INTEGER CourseID\r\n int CourseID = 0;\r\n //:STRING ( 20 ) szDecimalString\r\n String szDecimalString = null;\r\n //:STRING ( 2 ) szFinalGrade\r\n String szFinalGrade = null;\r\n //:STRING ( 32 ) szEntityName\r\n String szEntityName = null;\r\n int RESULT = 0;\r\n int lTempInteger_0 = 0;\r\n int lTempInteger_1 = 0;\r\n int lTempInteger_2 = 0;\r\n int lTempInteger_3 = 0;\r\n zVIEW vTempViewVar_0 = new zVIEW( );\r\n int lTempInteger_4 = 0;\r\n int lTempInteger_5 = 0;\r\n int lTempInteger_6 = 0;\r\n\r\n\r\n //:CASE GetOrSetFlag\r\n switch( GetOrSetFlag )\r\n { \r\n //:OF zDERIVED_GET:\r\n case zDERIVED_GET :\r\n\r\n //:// This is a calculation of the major GPA based on the list of Degree Track major courses and\r\n //:// the Student's academic record.\r\n //:// We try to use the derived DegreeTrack path in mStudent. If it's not there, we will activate\r\n //:// lDegTrkM and include it.\r\n\r\n //:GetEntityNameFromStructure( InternalEntityStructure, szEntityName )\r\n //:IF szEntityName = \"StudentMajorDegreeTrack\"\r\n if ( ZeidonStringCompare( szEntityName, 1, 0, \"StudentMajorDegreeTrack\", 1, 0, 33 ) == 0 )\r\n { \r\n //:// We're already positioned on the correct entity.\r\n //:mStudent = mStudentOrig\r\n SetViewFromView( mStudent, mStudentOrig );\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:// Position on the correct DegreeTrack entity.\r\n //:CreateViewFromView( mStudent, mStudentOrig )\r\n CreateViewFromView( mStudent, mStudentOrig );\r\n //:IF szEntityName = \"mStudent.DC_StudentMajorDegreeTrack\"\r\n if ( ZeidonStringCompare( szEntityName, 1, 0, \"mStudent.DC_StudentMajorDegreeTrack\", 1, 0, 33 ) == 0 )\r\n { \r\n //:SET CURSOR FIRST mStudent.StudentMajorDegreeTrack WHERE mStudent.StudentMajorDegreeTrack.ID = mStudent.DC_StudentMajorDegreeTrack.ID\r\n {MutableInt mi_lTempInteger_0 = new MutableInt( lTempInteger_0 );\r\n GetIntegerFromAttribute( mi_lTempInteger_0, mStudent, \"DC_StudentMajorDegreeTrack\", \"ID\" );\r\n lTempInteger_0 = mi_lTempInteger_0.intValue( );}\r\n RESULT = mStudent.cursor( \"StudentMajorDegreeTrack\" ).setFirst( \"ID\", lTempInteger_0 ).toInt();\r\n\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:SET CURSOR FIRST mStudent.StudentMajorDegreeTrack WHERE mStudent.StudentMajorDegreeTrack.ID = mStudent.CDC_StudentMajorDegreeTrack.ID\r\n {MutableInt mi_lTempInteger_1 = new MutableInt( lTempInteger_1 );\r\n GetIntegerFromAttribute( mi_lTempInteger_1, mStudent, \"CDC_StudentMajorDegreeTrack\", \"ID\" );\r\n lTempInteger_1 = mi_lTempInteger_1.intValue( );}\r\n RESULT = mStudent.cursor( \"StudentMajorDegreeTrack\" ).setFirst( \"ID\", lTempInteger_1 ).toInt();\r\n } \r\n\r\n //:END\r\n } \r\n\r\n //:END\r\n\r\n //:SET CURSOR FIRST mStudent.MajorGPA_DegreeTrack \r\n //: WHERE mStudent.MajorGPA_DegreeTrack.ID = mStudent.MajorDegreeTrack.ID \r\n {MutableInt mi_lTempInteger_2 = new MutableInt( lTempInteger_2 );\r\n GetIntegerFromAttribute( mi_lTempInteger_2, mStudent, \"MajorDegreeTrack\", \"ID\" );\r\n lTempInteger_2 = mi_lTempInteger_2.intValue( );}\r\n RESULT = mStudent.cursor( \"MajorGPA_DegreeTrack\" ).setFirst( \"ID\", lTempInteger_2 ).toInt();\r\n //:IF RESULT < zCURSOR_SET\r\n if ( RESULT < zCURSOR_SET )\r\n { \r\n //:ACTIVATE lDegTrkM WHERE lDegTrkM.DegreeTrack.ID = mStudent.MajorDegreeTrack.ID \r\n {MutableInt mi_lTempInteger_3 = new MutableInt( lTempInteger_3 );\r\n GetIntegerFromAttribute( mi_lTempInteger_3, mStudent, \"MajorDegreeTrack\", \"ID\" );\r\n lTempInteger_3 = mi_lTempInteger_3.intValue( );}\r\n omStudent_fnLocalBuildQual_1( mStudentOrig, vTempViewVar_0, lTempInteger_3 );\r\n RESULT = ActivateObjectInstance( lDegTrkM, \"lDegTrkM\", mStudentOrig, vTempViewVar_0, zSINGLE );\r\n DropView( vTempViewVar_0 );\r\n //:INCLUDE mStudent.MajorGPA_DegreeTrack FROM lDegTrkM.DegreeTrack \r\n RESULT = IncludeSubobjectFromSubobject( mStudent, \"MajorGPA_DegreeTrack\", lDegTrkM, \"DegreeTrack\", zPOS_AFTER );\r\n //:DropObjectInstance( lDegTrkM )\r\n DropObjectInstance( lDegTrkM );\r\n } \r\n\r\n //:END \r\n //:MajorGPA = 0\r\n MajorGPA = 0;\r\n //:GET VIEW mStudenCO NAMED \"mStudenC\"\r\n RESULT = GetViewByName( mStudenCO, \"mStudenC\", mStudentOrig, zLEVEL_TASK );\r\n //:IF RESULT >= 0\r\n if ( RESULT >= 0 )\r\n { \r\n //:CreateViewFromView( mStudenC, mStudenCO )\r\n CreateViewFromView( mStudenC, mStudenCO );\r\n //:GPA_Divisor = 0\r\n GPA_Divisor = 0;\r\n //:GPA_Points = 0\r\n GPA_Points = 0;\r\n //:FOR EACH mStudenC.Registration WHERE ( mStudenC.Registration.Status = \"C\" // Completed\r\n //: OR mStudenC.Registration.Status = \"F\" // Transferred\r\n //: OR mStudenC.Registration.Status = \"X\" ) // L. Transferred\r\n //: AND mStudenC.Registration.wRepeatedClass != \"R\"\r\n RESULT = mStudenC.cursor( \"Registration\" ).setFirst().toInt();\r\n while ( RESULT > zCURSOR_UNCHANGED )\r\n { \r\n if ( ( CompareAttributeToString( mStudenC, \"Registration\", \"Status\", \"C\" ) == 0 || CompareAttributeToString( mStudenC, \"Registration\", \"Status\", \"F\" ) == 0 || CompareAttributeToString( mStudenC, \"Registration\", \"Status\", \"X\" ) == 0 ) &&\r\n CompareAttributeToString( mStudenC, \"Registration\", \"wRepeatedClass\", \"R\" ) != 0 )\r\n { \r\n\r\n //:IF mStudenC.RegistrationCourse EXISTS\r\n lTempInteger_4 = CheckExistenceOfEntity( mStudenC, \"RegistrationCourse\" );\r\n if ( lTempInteger_4 == 0 )\r\n { \r\n //:CourseID = mStudenC.RegistrationCourse.ID \r\n {MutableInt mi_CourseID = new MutableInt( CourseID );\r\n GetIntegerFromAttribute( mi_CourseID, mStudenC, \"RegistrationCourse\", \"ID\" );\r\n CourseID = mi_CourseID.intValue( );}\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:IF mStudenC.EquivalentCourse EXISTS\r\n lTempInteger_5 = CheckExistenceOfEntity( mStudenC, \"EquivalentCourse\" );\r\n if ( lTempInteger_5 == 0 )\r\n { \r\n //:CourseID = mStudenC.EquivalentCourse.ID \r\n {MutableInt mi_CourseID = new MutableInt( CourseID );\r\n GetIntegerFromAttribute( mi_CourseID, mStudenC, \"EquivalentCourse\", \"ID\" );\r\n CourseID = mi_CourseID.intValue( );}\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:CourseID = 0\r\n CourseID = 0;\r\n } \r\n\r\n //:END \r\n } \r\n\r\n //:END\r\n //:SET CURSOR FIRST mStudent.MajorGPA_Course WHERE mStudent.MajorGPA_Course.ID = CourseID\r\n RESULT = mStudent.cursor( \"MajorGPA_Course\" ).setFirst( \"ID\", CourseID ).toInt();\r\n //:IF RESULT >= zCURSOR_SET \r\n if ( RESULT >= zCURSOR_SET )\r\n { \r\n //:szFinalGrade = mStudenC.Registration.FinalGrade\r\n {MutableInt mi_lTempInteger_6 = new MutableInt( lTempInteger_6 );\r\n StringBuilder sb_szFinalGrade;\r\n if ( szFinalGrade == null )\r\n sb_szFinalGrade = new StringBuilder( 32 );\r\n else\r\n sb_szFinalGrade = new StringBuilder( szFinalGrade );\r\n GetVariableFromAttribute( sb_szFinalGrade, mi_lTempInteger_6, 'S', 3, mStudenC, \"Registration\", \"FinalGrade\", \"\", 0 );\r\n lTempInteger_6 = mi_lTempInteger_6.intValue( );\r\n szFinalGrade = sb_szFinalGrade.toString( );}\r\n //:GetStringFromAttributeByContext( szDecimalString,\r\n //: mStudenC, \"Registration\", \"FinalGrade\", \"DegreeTrackGradePointValue\", 20 )\r\n {StringBuilder sb_szDecimalString;\r\n if ( szDecimalString == null )\r\n sb_szDecimalString = new StringBuilder( 32 );\r\n else\r\n sb_szDecimalString = new StringBuilder( szDecimalString );\r\n GetStringFromAttributeByContext( sb_szDecimalString, mStudenC, \"Registration\", \"FinalGrade\", \"DegreeTrackGradePointValue\", 20 );\r\n szDecimalString = sb_szDecimalString.toString( );}\r\n //:IF szFinalGrade = \"F\"\r\n if ( ZeidonStringCompare( szFinalGrade, 1, 0, \"F\", 1, 0, 3 ) == 0 )\r\n { \r\n //:// Failed Course\r\n //:CreditHours = mStudenC.Registration.CreditHours\r\n {MutableDouble md_CreditHours = new MutableDouble( CreditHours );\r\n GetDecimalFromAttribute( md_CreditHours, mStudenC, \"Registration\", \"CreditHours\" );\r\n CreditHours = md_CreditHours.doubleValue( );}\r\n //:GPA_Divisor = GPA_Divisor + CreditHours\r\n GPA_Divisor = GPA_Divisor + CreditHours;\r\n //:// GPA_Points are not impacted for this case.\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:FinalGrade = StrToDecimal( szDecimalString )\r\n //:IF FinalGrade > 0\r\n if ( FinalGrade > 0 )\r\n { \r\n //:// Passed Course\r\n //:// The only other entries considered are those with grades D through A, in which case FinalGrade is > 0.\r\n //:CreditHours = mStudenC.Registration.CreditHours\r\n {MutableDouble md_CreditHours = new MutableDouble( CreditHours );\r\n GetDecimalFromAttribute( md_CreditHours, mStudenC, \"Registration\", \"CreditHours\" );\r\n CreditHours = md_CreditHours.doubleValue( );}\r\n //:GPA_Divisor = GPA_Divisor + CreditHours\r\n GPA_Divisor = GPA_Divisor + CreditHours;\r\n //:GPA_Points = GPA_Points + (FinalGrade * CreditHours)\r\n GPA_Points = GPA_Points + ( FinalGrade * CreditHours );\r\n } \r\n\r\n //:END\r\n } \r\n\r\n //:END\r\n } \r\n\r\n } \r\n\r\n RESULT = mStudenC.cursor( \"Registration\" ).setNext().toInt();\r\n //:END\r\n } \r\n\r\n\r\n //:END\r\n //:MajorGPA = GPA_Points / GPA_Divisor\r\n MajorGPA = GPA_Points / GPA_Divisor;\r\n //:DropView( mStudenC )\r\n DropView( mStudenC );\r\n } \r\n\r\n //:END\r\n //:IF mStudent != mStudentOrig\r\n if ( mStudent != mStudentOrig )\r\n { \r\n //:DropView( mStudent )\r\n DropView( mStudent );\r\n } \r\n\r\n //:END\r\n\r\n //:StoreValueInRecord ( mStudentOrig,\r\n //: InternalEntityStructure, InternalAttribStructure, MajorGPA, 0 )\r\n StoreValueInRecord( mStudentOrig, InternalEntityStructure, InternalAttribStructure, MajorGPA, 0 );\r\n break ;\r\n\r\n //: /* end zDERIVED_GET */\r\n //:OF zDERIVED_SET:\r\n case zDERIVED_SET :\r\n break ;\r\n } \r\n\r\n\r\n //: /* end zDERIVED_SET */\r\n //:END /* case */\r\n return( 0 );\r\n// END\r\n}", "public static void relprecision() throws IOException \n\t{\n\t \n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\eclipse64\\\\data\\\\labeled_titles.txt\");\n\t // File fFile = new File(\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelation\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL());\n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\t//trainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tList<String> statements= new ArrayList<String>() ;\n\t\tList<String> notstatements= new ArrayList<String>() ;\n\t\tDouble TPcount = 0.0 ; \n\t\tDouble FPcount = 0.0 ;\n\t\tDouble NonTPcount = 0.0 ;\n\t\tDouble TPcountTot = 0.0 ; \n\t\tDouble NonTPcountTot = 0.0 ;\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tif (title.contains(\"<YES>\") || title.contains(\"<TREAT>\") || title.contains(\"<DIS>\") || title.contains(\"</\"))\n\t\t\t{\n\t\t\t\n\t\t\t\tBoolean TP = false ; \n\t\t\t\tBoolean NonTP = false ;\n\t if (title.contains(\"<YES>\") && title.contains(\"</YES>\"))\n\t {\n\t \t TP = true ; \n\t \t TPcountTot++ ; \n\t \t \n\t }\n\t else\n\t {\n\t \t NonTP = true ; \n\t \t NonTPcountTot++ ; \n\t }\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\ttitle = title.replaceAll(\"<YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<DIS>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</DIS>\", \" \") ;\n\t\t\t\ttitle = title.toLowerCase() ;\n\t\n\t\t\t\tcount++ ; \n\t\n\t\t\t\t// get the goldstandard concepts for current title \n\t\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\t\n\t\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\t\n\t\t\t\t// get the concepts \n\t\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\t\n\t\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,dataset.FILE_NAME_Patterns) ;\n\t\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t\t{\n\t\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelationdisc\") ;\n\t\t\t\t\t\n\t\t\t if (TP )\n\t\t\t {\n\t\t\t \t TPcount++ ; \n\t\t\t \t \n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t FPcount++ ; \n\t\t\t }\n\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t notstatements.add(title) ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}", "public static void main(String[] args) {\r\n Provinces Hainaut = new Provinces();\r\n Provinces Namur = new Provinces();\r\n\r\n /* Create be.heh.isims.ihm.tp1.ex2.Ville */\r\n Ville Mons = new Ville();\r\n Ville Dinant = new Ville();\r\n Ville Charlerois = new Ville();\r\n\r\n /* Create be.heh.isims.ihm.tp1.ex2.Magasin Chains */\r\n Magasin Saturne = new Magasin(0);\r\n Magasin Julles = new Magasin(0);\r\n Magasin MediaMarkt = new Magasin(0);\r\n\r\n /* Add Mons Benefice */\r\n Saturne.setBenefice(1200);\r\n Julles.setBenefice(1200);\r\n MediaMarkt.setBenefice(2400);\r\n Mons.addBilan(Saturne);\r\n Mons.addBilan(Julles);\r\n Mons.addBilan(MediaMarkt);\r\n\r\n /* Set and add Benefice to Dinant */\r\n Saturne.setBenefice(2400);\r\n Julles.setBenefice(2400);\r\n MediaMarkt.setBenefice(2400);\r\n Dinant.addBilan(Saturne);\r\n Dinant.addBilan(Julles);\r\n Dinant.addBilan(MediaMarkt);\r\n\r\n /* Set and add Benefice to Charlerois */\r\n Saturne.setBenefice(1250);\r\n Julles.setBenefice(4500);\r\n MediaMarkt.setBenefice(2400);\r\n Charlerois.addBilan(Saturne);\r\n Charlerois.addBilan(Julles);\r\n Charlerois.addBilan(MediaMarkt);\r\n\r\n\r\n /* Add be.heh.isims.ihm.tp1.ex2.Magasin to province */\r\n Hainaut.addBilan(Mons);\r\n Hainaut.addBilan(Charlerois);\r\n Namur.addBilan(Dinant);\r\n\r\n System.out.println(\"\\nBilan par be.heh.isims.ihm.tp1.ex2.Ville\");\r\n System.out.println(\"Bilan Dinant : \"+ Namur.calculeBenefice());\r\n System.out.println(\"Bilan Mons : \" + Mons.calculeBenefice());\r\n System.out.println(\"Bilan Charlerois : \" + Charlerois.calculeBenefice());\r\n\r\n System.out.println(\"\\nBilan par Province\");\r\n System.out.println(\"Bilan Namur : \" + Namur.calculeBenefice());\r\n System.out.println(\"Bilan Hainaut : \" + Hainaut.calculeBenefice());\r\n\r\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "public int \r\nomStudent_dHighSAT_Score( View mStudent,\r\n String InternalEntityStructure,\r\n String InternalAttribStructure,\r\n Integer GetOrSetFlag )\r\n{\r\n double dTotalComposite = 0.0;\r\n\r\n\r\n //:CASE GetOrSetFlag\r\n switch( GetOrSetFlag )\r\n { \r\n //:OF zDERIVED_GET:\r\n case zDERIVED_GET :\r\n\r\n //:ComputeHighExamScoreSAT( dTotalComposite, mStudent )\r\n //:StoreValueInRecord ( mStudent,\r\n //: InternalEntityStructure, InternalAttribStructure, dTotalComposite, 0 )\r\n StoreValueInRecord( mStudent, InternalEntityStructure, InternalAttribStructure, dTotalComposite, 0 );\r\n break ;\r\n\r\n //: /* end zDERIVED_GET */\r\n //:OF zDERIVED_SET:\r\n case zDERIVED_SET :\r\n break ;\r\n } \r\n\r\n\r\n //: /* end zDERIVED_SET */\r\n //:END /* case */\r\n return( 0 );\r\n// END\r\n}", "private void subdivide(EChannel cod_info) {\n\t\tint scfb_anz = 0;\n\n\t\tif ( bigvalues_region == 0) {\n\t\t\t/* no big_values region */\n\t\t\tcod_info.region0_count = 0;\n\t\t\tcod_info.region1_count = 0;\n\t\t} else {\n\n\t\t\tif ( cod_info.window_switching_flag == 0 ) {\n\n\t\t\t\tint index0, index1;\n\n\t\t\t\t/* Calculate scfb_anz */\n\t\t\t\twhile (scalefac_band_long[scfb_anz] < bigvalues_region)\n\t\t\t\t\tscfb_anz++;\n\t\t\t\t/*\t\t\tassert (scfb_anz < 23); */\n\n\t\t\t\tindex0 = (cod_info.region0_count = subdv_table[scfb_anz][0]) + 1;\n\t\t\t\tindex1 = (cod_info.region1_count = subdv_table[scfb_anz][1]) + 1;\n\n\t\t\t\tcod_info.address1 = scalefac_band_long[index0];\n\t\t\t\tcod_info.address2 = scalefac_band_long[index0 + index1];\n\t\t\t\tcod_info.address3 = bigvalues_region;\n\t\t\t} else {\n\t\t\t\tif ( (cod_info.block_type == 2) && (cod_info.mixed_block_flag == 0) ) {\n\t\t\t\t\tcod_info.region0_count = 8;\n\t\t\t\t\tcod_info.region1_count = 12;\n\t\t\t\t\tcod_info.address1 = 36;\n\t\t\t\t} else {\n\t\t\t\t\tcod_info.region0_count = 7;\n\t\t\t\t\tcod_info.region1_count = 13;\n\t\t\t\t\tcod_info.address1 = scalefac_band_long[ cod_info.region0_count + 1 ];\n\t\t\t\t}\n\t\t\t\tcod_info.address2 = bigvalues_region;\n\t\t\t\tcod_info.address3 = 0;\n\n\t\t\t}\n\t\t}\n\t}", "public static void main(String... args) {\n\n Set<Long> As = new HashSet<>();\n int N = 100;\n for (long p = -N; p <= N; ++p) {\n for (long q = -N; q <= p; ++q) {\n for (long r = -N; r <= q; ++r) {\n if (r==0 || p==0 || q==0)\n continue;\n\n long nom = r*p*q;\n long den = r*p + r*q + p*q;\n\n if (den != 0 && nom % den==0 && (nom^den)>=0) {\n long A = nom/den;\n\n if (A==nom) {\n As.add(A);\n System.out.printf(\"A=%d (p=%d, q=%d, r=%d)\\n\", A, p, q, r);\n }\n }\n }\n }\n }\n Long[] aa = As.toArray(new Long[As.size()]);\n Arrays.sort(aa);\n System.out.printf(\"============\\n\");\n System.out.printf(\"A(%d)=%s\\n\", aa.length, Arrays.toString(aa));\n\n for (long a = 1; a < 100; ++a) {\n if (isAlexandrian(a))\n System.out.printf(\"A=%dn\", a);\n }\n }", "@Test\n public void test37() throws Throwable {\n Complex complex0 = new Complex(2444.619, 1026.8487);\n Complex complex1 = complex0.cos();\n Complex complex2 = complex1.log();\n Complex complex3 = complex0.atan();\n double double0 = complex2.abs();\n Complex complex4 = complex1.multiply(2444.619);\n double double1 = complex2.abs();\n Complex complex5 = new Complex(2444.619, Double.POSITIVE_INFINITY);\n Complex complex6 = complex2.divide(complex0);\n List<Complex> list0 = complex2.nthRoot(1155);\n String string0 = complex2.toString();\n ComplexField complexField0 = complex0.getField();\n double double2 = complex0.abs();\n Complex complex7 = complex0.multiply(complex1);\n Complex complex8 = complex5.sin();\n Complex complex9 = complex1.sin();\n Complex complex10 = complex5.sinh();\n Complex complex11 = complex1.sinh();\n Complex complex12 = complex1.atan();\n }", "private double getAngleDisplacement(SkeletonNode root, int f) {\r\n\r\n\t\t/**------------------------------------------------------**/\r\n\t\tdouble ang = 0;\r\n\t\tint ang_counter = 0;\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tSkeletonNode parent =\troot.getParent();\r\n\t\tif(parent==null) return ang;\r\n\t\tString root_name = \t\troot.getName();\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tint group_size = ControlVariables.third_level_ang_filter_size;\r\n\t\tint group_size_half = (group_size/2)+(group_size % 2);\r\n\t\tint total_filter_size_i = (group_size_half*2) +\r\n\t\t\t\t(Math.min(f-group_size_half, 0)) +\r\n\t\t\t\t(Math.min(skeletonNodes.length - (f+group_size_half+1), 0));\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tfor(int j = f-group_size_half; j < f; j++) {\r\n\t\t\tif(j < 0) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tfor(int j = f; j < f+group_size_half; j++) {\r\n\t\t\tif((j+1) >= skeletonWrappers.length) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tif(total_filter_size_i != ang_counter) {\r\n\t\t\tSystem.out.println(total_filter_size_i);\r\n\t\t\tSystem.out.println(ang_counter);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treturn((1.0)/(ang_counter+0.0))*ang;\r\n\t\t/**------------------------------------------------------**/\r\n\t}", "private static void analyse1() {\n\t\tList<String> twoYearIncomeInRateList2 = getTwoYearIncomeInRateList(BasicAnalyse.stockBasicMap.keySet(), 0, 10000, \"2016-4\", \"2015-4\");\r\n\t\tList<String> twoYearIncomeInRateList = getTwoYearIncomeInRateList(twoYearIncomeInRateList2, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoYearProfitInRateList = getTwoYearProfitInRateList(twoYearIncomeInRateList, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoSeasonIncomeInRateList = getTwoSeasonIncomeInRateList(twoYearProfitInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tList<String> twoSeasonProfitInRateList = getTwoSeasonProfitInRateList(twoSeasonIncomeInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tHashMap<String, List<HistoryDomain>> codeHisMap = HistoryAnalyse.getCodeHisMap(HistoryAnalyse.historyMap, twoSeasonProfitInRateList);\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateMap = HistoryAnalyse.getOrderDateMap(codeHisMap);\r\n\t\tHashMap<String, String> dieTingTimeMap = PriceAnalyse.getDieTingLastTimeMap(orderDateMap, 5, -100, -20);\r\n\t\tHashMap<String, String> endDateMap = AnalyseUtil.getCodeDateMap(orderDateMap.keySet(), \"2017-10-13\");\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateDTMap = HistoryAnalyse.getCodeHisMap(orderDateMap, dieTingTimeMap.keySet());\r\n\t\tHashMap<String, List<HistoryDomain>> afterDieTingHisMap = HistoryAnalyse.getHisMapByStartAndEndDateMap(orderDateDTMap, dieTingTimeMap, endDateMap);\r\n\t\tHashMap<String, Double> highestFlowInRate = PriceAnalyse.getHighestFlowInRate(afterDieTingHisMap, -2000, 20);\r\n\t\tHashMap<String, List<String>> conceptListMap = ConceptAnalyse.getConceptListMap(highestFlowInRate.keySet());\r\n\r\n\t\t\r\n\t\tSystem.out.println(conceptListMap);\r\n\t}", "public int[] solution(String S, int[] P, int[] Q) {\n \n int[][] result = new int[S.length()][4];\n int[] returnResult = new int[P.length];\n \n //how many different solutions exist?\n //'A' [0], [0] - 1 solution\n //'AG' [0, 0, 1], [0, 1, 1] - 3\n // 'AGT' [0,0,0,1,1,2], [0,1,1,2,2,2] - 6\n // 10\n // 15\n // 21\n \n //Prefix Sum - calculation\n \n for (int i = 1; i< S.length()+1; i++){\n \n if (i == 1){\n switch (S.substring(i-1, i)){\n case \"A\": result[i-1][0] = 1;\n break;\n case \"C\": result[i-1][1] = 1;\n break;\n case \"G\": result[i-1][2] = 1;\n break;\n case \"T\": result[i-1][3] = 1;\n break;\n }\n }else{\n int a = 0;\n switch (S.substring(i-1, i)){\n case \"A\": a = 0;\n break;\n case \"C\": a= 1;\n break;\n case \"G\": a =2;\n break;\n case \"T\": a =3;\n break;\n }\n result[i-1][a] = 1 + result[i-2][a];\n result[i-1][(a+1)%4] = result[i-2][(a+1)%4];\n result[i-1][(a+2)%4] = result[i-2][(a+2)%4];\n result[i-1][(a+3)%4] = result[i-2][(a+3)%4];\n }\n\n }\n \n /*\n for (double i : result){\n System.out.println(i);\n }\n */\n \n //A = 1, G = 2, C = 3, T = 4\n //when A found return 1 and move to next computation.\n // P[k] <= Q[K]\n int lowerBound = 0;\n int upperBound = 0;\n for (int i = 0; i < P.length; i++){\n lowerBound = P[i];\n upperBound = Q[i];\n \n int[] toEvaluate = new int[4];\n\n //System.out.println(lowerBound);\n if (lowerBound == 0){\n toEvaluate[0]= result[upperBound][0];\n toEvaluate[1]= result[upperBound][1];\n toEvaluate[2]= result[upperBound][2];\n toEvaluate[3]= result[upperBound][3];\n }else{\n toEvaluate[0]= result[upperBound][0] - result[lowerBound-1][0]; \n toEvaluate[1]= result[upperBound][1] - result[lowerBound-1][1];\n toEvaluate[2]= result[upperBound][2] - result[lowerBound-1][2];\n toEvaluate[3]= result[upperBound][3] - result[lowerBound-1][3];\n }\n \n /*\n for (int eval : toEvaluate){\n System.out.println(eval);\n \n }\n */\n if (toEvaluate[0] > 0) {returnResult[i] = 1;\n }else if (toEvaluate[1] > 0) {returnResult[i] = 2;\n }else if (toEvaluate[2] > 0) {returnResult[i] = 3;\n }else if (toEvaluate[3] > 0) {returnResult[i] = 4;\n }\n \n }\n \n return returnResult; \n }", "private void processAxioms(){\n if(isComplexAxiom()){\n isTerminology = false;\n isTerminologyWithRCIs = false;\n }\n else{\n inspectAxiomLHS();\n\n Predicate<OWLClass> repeatedEquality = e -> equalityNameCount.get(e) > 1;\n Predicate<OWLClass> repeatedInclusion = e -> inclusionNameCount.get(e) > 1;\n\n //No shared names or repeated equalities\n if(containsSharedNames() || equalityNameCount.keySet().stream().anyMatch(repeatedEquality)){\n isTerminology = false;\n isTerminologyWithRCIs = false;\n }\n //Has some repeated inclusions\n else if(inclusionNameCount.keySet().stream().anyMatch(repeatedInclusion)){\n isTerminology = false;\n isTerminologyWithRCIs = true;\n }\n else{\n //Is a terminology hence is a terminology with RCIs\n isTerminology = true;\n isTerminologyWithRCIs = true;\n }\n\n }\n }", "private double calc_gain_ratio(String attrb,int partitonElem,HashMap<Integer, WeatherData> trainDataXMap,HashMap<Integer, WeatherData> trainDataYMap,double information_gain_System,int total_count_in_train)\n\t{\n\t\t\n\t\tHashMap<Integer,Integer> X_Train_attrb_part1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,Integer> X_Train_attrb_part2 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part1 = new HashMap<Integer,WeatherData>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part2 = new HashMap<Integer,WeatherData>();\n\t\t//System.out.println(\"the partition elem is\"+partitonElem);\n\t\tfor(int i=1;i<=trainDataXMap.size();i++)\n\t\t{\n\t\t\tWeatherData wd = trainDataXMap.get(i);\n\t\t\t\n\t\t\tfor(Feature f: wd.getFeatures())\n\t\t\t{\n\t\t\t\tif(f.getName().contains(attrb))\n\t\t\t\t{\n\t\t\t\t\tint attrb_val = Integer.parseInt(f.getValues().get(0).toString());\n\t\t\t\t\tint xTRainKey = getKey(wd);\n\t\t\t\t\tif(attrb_val <= partitonElem)\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part1.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part1.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part2.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part2.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Size of first partition\n\t\tint Total_Count_attr_part1 = X_Train_attrb_part1.size();\n\t\t//System.out.println(\"the size of X first partition\"+Total_Count_attr_part1);\n\t\t//System.out.println(\"the size of Y first partition\"+Y_Train_attrb_part1.size());\n\t\t\n\t\t//Size of second partition\n\t\tint Total_Count_attr_part2 = X_Train_attrb_part2.size();\n\t\t//System.out.println(\"the size of X second partition\"+Total_Count_attr_part2);\n\t\t//System.out.println(\"the size of Y second partition\"+Y_Train_attrb_part2.size());\n\t\t\n\t\t//No of records in first partition where EVENT = RAIN \n\t\tint count_rain_yes_part1 = getCountsOfRain(Y_Train_attrb_part1,true,Total_Count_attr_part1);\n\t\t//System.out.println(\"count of rain in first part1\"+count_rain_yes_part1);\n\t\t\n\t\t//No of records in first partition where EVENT != RAIN Y_Train_attrb_part1\n\t\tint count_rain_no_part1 = getCountsOfRain(Y_Train_attrb_part1,false,Total_Count_attr_part1);\t\t\n\t\t//System.out.println(\"count of no rain in first part1\"+count_rain_no_part1);\n\t\t\n\t\t//Compute the Information Gain in first partition\n\t\t\n\t\tdouble prob_yes_rain_part1 = 0.0;\n\t\tdouble prob_no_rain_part1 = 0.0;\n\t\tdouble prob_yes_rain_part2 = 0.0;\n\t\tdouble prob_no_rain_part2 = 0.0;\n\t\tdouble getInfoGain_part1 = 0.0;\n\t double getInfoGain_part2 = 0.0;\n\t double gain_ratio_partition = 0.0;\n\t\tif(Total_Count_attr_part1!=0){\n\t\t\tprob_yes_rain_part1 = (count_rain_yes_part1/(double)Total_Count_attr_part1);\n\t\t\tprob_no_rain_part1 = (count_rain_no_part1/(double)Total_Count_attr_part1);\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part1!=0.0) && (prob_no_rain_part1!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part1 = getInformationGain(prob_yes_rain_part1,prob_no_rain_part1);\n\t\t}\t\t\n\t\t\n\t\t//System.out.println(\"the info gain from part1\"+getInfoGain_part1);\n\t\t//No of records in second partition where EVENT = RAIN \n int count_rain_yes_part2 = getCountsOfRain(Y_Train_attrb_part2,true,Total_Count_attr_part2);\n\t\t\n //No of records in first partition where EVENT != RAIN\n\t\tint count_rain_no_part2 = getCountsOfRain(Y_Train_attrb_part2,false,Total_Count_attr_part2);\t\n\t\t\n\t\t//Compute the Information Gain in second partition\n\t\tif(Total_Count_attr_part2!=0)\n\t\t{\n\t\t\tprob_yes_rain_part2 = (count_rain_yes_part2/(double)Total_Count_attr_part2);\n\t\t\tprob_no_rain_part2 = (count_rain_no_part2/(double)Total_Count_attr_part2);\n\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part2!=0.0) && (prob_no_rain_part2!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part2 = getInformationGain(prob_yes_rain_part2,prob_no_rain_part2);\n\t\t}\n\t\t//System.out.println(\"the info gain from part2\"+getInfoGain_part2);\n\t\t\n\t\t//Total Information from both partitions\n\t\tdouble infoGainFrom_Partition = getInfoGain_part1 + getInfoGain_part2;\n\t\t\n\t\t//Gain from the Partition\n\t\tdouble Gain_from_partition = information_gain_System - infoGainFrom_Partition;\n\t\t//System.out.println(\"The inf gain from system\"+information_gain_System);\n\t\t//System.out.println(\"The inf gain from part\"+infoGainFrom_Partition);\n\t\t//System.out.println(\"The gain from part\"+Gain_from_partition);\n\t\t\n\t\t//Split information of partition\n\t\tif((Total_Count_attr_part1!=0) && (Total_Count_attr_part2!=0))\n\t\t{\n\t\n\t\t\tdouble splitInfoFromPartition = getInformationGain(((double)Total_Count_attr_part1/total_count_in_train),\n ((double)Total_Count_attr_part2/total_count_in_train));\n\t\t\t\n\t\t\t//System.out.println(\"The split info from partition\"+splitInfoFromPartition);\n \n\t\t\t//Gain ratio of Partition\n gain_ratio_partition = Gain_from_partition/splitInfoFromPartition;\n\t\t}\n\t\t//System.out.println(\"The gain ratio info from partition\"+gain_ratio_partition);\n\t\treturn gain_ratio_partition;\n\t}", "private void findVOIs(short[] cm, ArrayList<Integer> xValsAbdomenVOI, ArrayList<Integer> yValsAbdomenVOI, short[] srcBuffer, ArrayList<Integer> xValsVisceralVOI, ArrayList<Integer> yValsVisceralVOI) {\r\n \r\n // angle in radians\r\n double angleRad;\r\n \r\n // the intensity profile along a radial line for a given angle\r\n short[] profile;\r\n \r\n // the x, y location of all the pixels along a radial line for a given angle\r\n int[] xLocs;\r\n int[] yLocs;\r\n try {\r\n profile = new short[xDim];\r\n xLocs = new int[xDim];\r\n yLocs = new int[xDim];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT allocate profile\");\r\n return;\r\n }\r\n \r\n // the number of pixels along the radial line for a given angle\r\n int count;\r\n \r\n // The threshold value for muscle as specified in the JCAT paper\r\n int muscleThresholdHU = 16;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = cm[0];\r\n int y = cm[1];\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = cm[1] - (int)((x - cm[0]) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // x, y is a candidate abdomen VOI point\r\n // if there are more abdomenTissueLabel pixels along the radial line,\r\n // then we stopped prematurely\r\n \r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends and the muscle starts\r\n \r\n // start at the end of the profile array since its order is from the\r\n // center-of-mass to the abdomen voi point\r\n \r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx <= 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n break;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = cm[0] + (int)((cm[1] - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n x--;\r\n y = cm[1] - (int)((cm[0] - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n y++;\r\n x = cm[0] - (int)((y - cm[1]) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n\r\n }\r\n } // end for (angle = 0; ...\r\n\r\n }", "public void calculate() {\n\t\t\n\t\tHashMap<Integer, Vertex> vertices = triangulation.getVertices();\n\t\tHashMap<Integer, Face> faces = triangulation.getFaces();\n\n\t\tHashMap<Integer, Integer> chords = new HashMap<Integer, Integer>();\n\t\tList<Vertex> onOuterCircle = new LinkedList<Vertex>();\n\t\tList<Edge> outerCircle = new LinkedList<Edge>();\n\n\t\tfor (Vertex v : vertices.values()) {\n\t\t\tchords.put(v.getId(), 0);\n\t\t\tchildren.put(v.getId(), new LinkedList<Integer>());\n\t\t}\n\n\t\t// determine outer face (randomly, use the first face)\n\t\tFace outerFace = null;\n\t\tfor (Face f : faces.values()) {\n\t\t\touterFace = f;\n\t\t\tbreak;\n\t\t}\n\t\tif (outerFace == null) {\n\t\t\t// there are no faces at all in the embedding\n\t\t\treturn;\n\t\t}\n\n\t\tEdge e = outerFace.getIncidentEdge();\n\t\tvertexOrder[1] = e.getSource();\n\t\tvertexOrder[0] = e.getTarget();\n\t\tonOuterCircle.add(e.getTarget());\n\t\tonOuterCircle.add(e.getNext().getTarget());\n\t\tonOuterCircle.add(e.getSource());\n\t\touterCircle.add(e.getNext().getNext().getTwin());\n\t\touterCircle.add(e.getNext().getTwin());\n\t\t\n\t\t//System.out.println(\"outerCircle 0 \" + outerCircle.get(0).getId() + \" - source: \" + outerCircle.get(0).getSource().getId() + \" - target: \" + outerCircle.get(0).getTarget().getId());\n\t\t//System.out.println(\"outerCircle 1 \" + outerCircle.get(1).getId() + \" - source: \" + outerCircle.get(1).getSource().getId() + \" - target: \" + outerCircle.get(1).getTarget().getId());\n\t\t\n\n\t\tfor (int k=vertexOrder.length-1; k>1; k--) {\n\t\t\t//System.out.println(\"k: \" + k + \" - outerCircle size: \" + outerCircle.size());\n\t\t\t// chose v != v_0,v_1 such that v on outer face, not considered yet and chords(v)=0\n\t\t\tVertex nextVertex = null;\n\t\t\tint nextVertexId = -1;\n\t\t\tfor (int i=0; i<onOuterCircle.size(); i++) {\n\t\t\t\tnextVertex = onOuterCircle.get(i);\n\t\t\t\tnextVertexId = nextVertex.getId();\n\t\t\t\tif (nextVertexId != vertexOrder[0].getId() && nextVertexId != vertexOrder[1].getId()\n\t\t\t\t\t\t&& chords.get(nextVertexId) == 0) {\n\t\t\t\t\t// remove from list\n\t\t\t\t\tonOuterCircle.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"nextVertexId: \" + nextVertexId);\n\n\t\t\t// found the next vertex; add it to the considered vertices\n\t\t\tvertexOrder[k] = nextVertex;\n\t\t\t\n\t\t\t// determine children\n\t\t\tList<Integer> childrenNextVertex = children.get(nextVertexId);\n\t\t\t\n\t\t\t// update edges of outer circle\n\t\t\tint index = 0;\n\t\t\t\n\t\t\twhile (outerCircle.get(index).getTarget().getId() != nextVertexId) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tEdge outofNextVertex = outerCircle.remove(index+1);\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"outOfNextVertex \" + outofNextVertex.getId() + \" - source: \" + outofNextVertex.getSource().getId() + \" - target: \" + outofNextVertex.getTarget().getId());\n\t\t\tEdge intoNextVertex = outerCircle.remove(index);\n\t\t\t//System.out.println(\"intoNextVertex \" + intoNextVertex.getId() + \" - source: \" + intoNextVertex.getSource().getId() + \" - target: \" + intoNextVertex.getTarget().getId());\n\t\t\tEdge current = intoNextVertex.getNext();\n\t\t\t//System.out.println(\"current \" + current.getId() + \" - source: \" + current.getSource().getId() + \" - target: \" + current.getTarget().getId());\n\t\t\t\n\t\t\tint endIndex = index;\n\t\t\t\n\t\t\twhile (current.getId() != outofNextVertex.getId()) {\n\t\t\t\tEdge onCircle = current.getNext().getTwin();\n\t\t\t\touterCircle.add(endIndex, onCircle);\n\t\t\t\t\n\t\t\t\tchildrenNextVertex.add(0, onCircle.getSource().getId());\n\t\t\t\t\n\t\t\t\tendIndex++;\n\t\t\t\tcurrent = current.getTwin().getNext();\n\t\t\t\tonOuterCircle.add(onCircle.getTarget());\n\t\t\t}\n\t\t\t\n\t\t\tEdge lastEdge = outofNextVertex.getNext().getTwin();\n\t\t\touterCircle.add(endIndex, lastEdge);\n\t\t\t\n\t\t\tchildrenNextVertex.add(0, lastEdge.getSource().getId());\n\t\t\tchildrenNextVertex.add(0, lastEdge.getTarget().getId());\n\n\t\t\t// update chords\n\t\t\tfor (Vertex v : onOuterCircle) {\n\t\t\t\tEdge incidentEdge = v.getOutEdge();\n\t\t\t\tint firstEdgeId = incidentEdge.getId();\n\t\t\t\tint chordCounter = -2; // the 2 neighbours are on the outer circle, but no chords\n\t\t\t\tdo {\n\t\t\t\t\tif (onOuterCircle.contains(incidentEdge.getTarget())) {\n\t\t\t\t\t\tchordCounter++;\n\t\t\t\t\t}\n\t\t\t\t\tincidentEdge = incidentEdge.getTwin().getNext();\n\t\t\t\t} while (incidentEdge.getId() != firstEdgeId);\n\t\t\t\tchords.put(v.getId(), chordCounter);\n\t\t\t}\n\t\t}\n\t}", "public void calCEDI(PtsReportXMLParser prxmlp, ArrayList spks,\n HashMap<String, Speaker> parts) {\n if (parts == null) {\n System.out.println(\"parts are null!!!!\");\n return;\n }\n collectInfo(parts);\n calDis(spks, parts, dris_, false); //calculate outgoing links of expressive disagreement\n genQuintileSc(prxmlp, spks, parts, false);\n calDis(spks, parts, respto_dris_, true);\n genQuintileSc(prxmlp, spks, parts, true);\n ArrayList<String> keys = new ArrayList(Arrays.asList(parts.keySet().toArray()));\n /*\n for (String key: keys) {\n System.out.println(parts.get(key).getTension().showDistributions());\n }\n * \n */\n //genQuintileSc(prxmlp, spks, parts, true); //calculate ingoing links of expressive disagreement\n //System.out.println(\"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\");\n //System.out.println(\"++++++++++++++++++++++++++++++++\\ncalculate Expressive Disagreement - CDXI quintile\");\n //System.out.println(\"percentage of disagreement:\" + ((double)total_dri_)/utts_.size());\n }", "public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }", "public double getResult(){\n double x;\n x= (3+Math.sqrt(9-4*3*(1-numberOfStrands)))/(2*3);\n if(x<0){\n x= (3-Math.sqrt(9-(4*3*(1-numberOfStrands))))/6;\n\n }\n numberOfLayers=(float) x;\n diameter=((2*numberOfLayers)-1)*strandDiameter;\n phaseSpacing=(float)(Math.cbrt(ab*bc*ca));\n\n netRadius=diameter/2;\n\n\n\n //SGMD calculation\n float prod=1;\n for(int rand=0;rand<spacingSub.size();rand++){\n prod*=spacingSub.get(rand);\n }\n\n //SGMD calculation\n sgmd=Math.pow((Math.pow(netRadius,subconductors)*prod*prod),1/(subconductors*subconductors));\n capacitance=((8.854e-12*2*3.14)/Math.log(phaseSpacing/sgmd));\n Log.d(\"How\",\"phase spacing:\"+phaseSpacing+\" sgmd=\"+sgmd);\n return capacitance*1000;\n\n\n }", "public ChampionnatComplexe (int [] Eq12,Matrice mat,Options o ) {\n\t\topt = o;\n\t\tint equilibrea = 0;\n\t\tint equilibreb = 0;\n\t\tgrpA1 = new int [3]; \n\t\tgrpA2 = new int [3]; \n\t\tgrpB1 = new int [3]; \n\t\tgrpB2 = new int [3]; \n\t\tfor (int i = 0 ; i < 3 ; i++ ) {\n\t\t\tgrpA1 [i] = Eq12 [i]; \n\t\t\tgrpA2 [i] = Eq12 [i+3]; \n\t\t\tgrpB1 [i] = Eq12 [i+6]; \n\t\t\tgrpB2 [i] = Eq12 [i+9]; \n\t\t}\n\t\tArrays.sort(grpA1);\n\t\tArrays.sort(grpA2);\n\t\tArrays.sort(grpB1);\n\t\tArrays.sort(grpB2);\n\t\tint a=0;\n\t\tfor ( int i = 0 ; i < 3 ; i ++ ) {\n\t\t\tfor ( int j = 0 ; j < 3 ; j ++ ) {\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpA1[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpA2[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpB1[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpB2[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpA2[j]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpA1[j]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpB2[j]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpB1[j]-1);\n\t\t\t}\n\n\t\t\ta = (int) Math.random();\n\t\t\tif (a==0) {\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpB1[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpB1[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpA1[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpA1[i]-1);\n\t\t\t} else {\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpB2[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpB2[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpA2[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpA2[i]-1);\n\t\t\t}\n\t\t}\n\t\tint z;\n\t\tfor ( z= 0; z < 3 ; z++) {\n\t\t\tequilibrea = grpA1[z] + grpA2[z] ;\n\t\t\tequilibreb = grpB1[z] + grpB2[z] ;\n\t\t}\n\t\tequilibreDesPoule = Integer.max(equilibrea, equilibreb) - Integer.min(equilibreb, equilibreb);\n\t\tnoteDistance = getDistanceTotale() * 100 / 52000 ;\n\t\tnoteEquilibre = getEquilibreDesPoules() * 100 / 36 ;\n\t\tnoteMoyennePondereeEqDist = ( (noteDistance * opt.getPourcentageDistance()) + (noteEquilibre * (100 - opt.getPourcentageDistance()) ))/100;\n\t}", "public static void main(String[] args) {\n\t\t\n//\t\t//PA4 a\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"b\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 b\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");rhs11.add(\"b\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"c\");rhs12.add(\"d\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 c\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"U\");rhs11.add(\"S\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"S\");rhs12.add(\"S\");\t\t\n//\t\tArrayList<String> rhs13 = new ArrayList<>();\n//\t\trhs13.add(\"S\");rhs13.add(\"*\");\n//\t\tArrayList<String> rhs14 = new ArrayList<>();\n//\t\trhs14.add(\"(\");rhs14.add(\"S\");rhs14.add(\")\");\n//\t\tArrayList<String> rhs15 = new ArrayList<>();\n//\t\trhs15.add(\"a\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\trhs1.add(rhs13);\n//\t\trhs1.add(rhs14);\n//\t\trhs1.add(rhs15);\n//\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n\t\t\n//\t\t//PA-3 d\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"rexpr\");rhs11.add(\"U\");rhs11.add(\"rterm\");\t\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"rterm\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\tRule r1 = new Rule(\"rexpr\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"rterm\");rhs21.add(\"r factor\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"r factor\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"rterm\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"r factor\");rhs31.add(\"*\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"rprimary\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"r factor\", rhs3);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs4 = new ArrayList<>();\n//\t\tArrayList<String> rhs41 = new ArrayList<>();\n//\t\trhs41.add(\"a\");\n//\t\tArrayList<String> rhs42 = new ArrayList<>();\n//\t\trhs42.add(\"b\");\n//\t\trhs4.add(rhs41);\n//\t\trhs4.add(rhs42);\n//\t\tRule r4 = new Rule(\"rprimary\", rhs4);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\trules.add(r4);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\t\n\t\t\t\n//\t\t//PA-3 e\t\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"0\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"T\");rhs12.add(\"1\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"1\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"A\");rhs22.add(\"0\");\t\t\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\t\tRule r2 = new Rule(\"T\", rhs2);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\n\t\t\n//\t\t//PA-3 f\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"B\");rhs11.add(\"C\");\t\n//\t\trhs1.add(rhs11);\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"B\");rhs21.add(\"b\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"e\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"B\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"A\");rhs31.add(\"C\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"a\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"C\", rhs3);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tSystem.out.println(g);\n//\t\tg.eliminateEpsilonRule();\n//\t\tSystem.out.println(g);\n//\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\t}", "public static int sapQuestions (int sapPathway)\r\n {\r\n int questionNumber = (int)(Math.random()*20)+1;\r\n\r\n switch (questionNumber)\r\n {\r\n case 1: System.out.println(\"Which of the following is not a social institution?\\r\\n\" + \r\n \"1.) family\\r\\n\" + \r\n \"2.) education\\r\\n\" + \r\n \"3.) hidden Media\\r\\n\" + \r\n \"4.) social Media\\r\\n\");\r\n break;\r\n case 2: System.out.println(\"Stereotypes are maintained by _______\\r\\n\" + \r\n \"1.) ignoring contradictory evidence\\r\\n\" + \r\n \"2.) individualization \\r\\n\" + \r\n \"3.) overcomplicating generalization that is applied to all members of a group\\r\\n\" + \r\n \"4.) the ideology of “rescue”\\r\\n\");\r\n break;\r\n case 3: System.out.println(\"Racism is about _____\\r\\n\" + \r\n \"1.) effect not Intent\\r\\n\" + \r\n \"2.) intent not effect\\r\\n\" + \r\n \"3.) response not question\\r\\n\" + \r\n \"4.) question not response\\r\\n\");\r\n break;\r\n case 4: System.out.println(\"What is the definition of theory?\\r\\n\" + \r\n \"1.) what’s important to you\\r\\n\" + \r\n \"2.) best possible explanation based on available evidence\\r\\n\" + \r\n \"3.) your experiences, what you think is real\\r\\n\" + \r\n \"4.) determines how you interpret situations\\r\\n\");\r\n break;\r\n case 5: System.out.println(\"Which of the following is not an obstacle to clear thinking?\\r\\n\" + \r\n \"1.) drugs\\r\\n\" + \r\n \"2.) close-minded\\r\\n\" + \r\n \"3.) honesty\\r\\n\" + \r\n \"4.) emotions\\r\\n\");\r\n break;\r\n case 6: System.out.println(\"What does the IQ test asses?\\r\\n\" + \r\n \"1.) literacy skills\\r\\n\" + \r\n \"2.) survival skills\\r\\n\" + \r\n \"3.) logical reasoning skills\\r\\n\" + \r\n \"4.) 1 and 3\\r\\n\");\r\n break;\r\n case 7: System.out.println(\"How many types of intelligence are there?\\r\\n\" + \r\n \"1.) 27\\r\\n\" + \r\n \"2.) 5\\r\\n\" + \r\n \"3.) 3\\r\\n\" + \r\n \"4.) 8\\r\\n\");\r\n break;\r\n case 8: System.out.println(\"Emotions have 3 components\\r\\n\" + \r\n \"1.) psychological, cognitive, behavioral\\r\\n\" + \r\n \"2.) psychological, physical, social\\r\\n\" + \r\n \"3.) intensity, range, exposure\\r\\n\" + \r\n \"4.) range, duration, intensity\\r\\n\");\r\n break;\r\n case 9: System.out.println(\"Which of the following is not a component of happiness?\\r\\n\" + \r\n \"1.) diet and nutrition\\r\\n\" + \r\n \"2.) time in nature\\r\\n\" + \r\n \"3.) interventions\\r\\n\" + \r\n \"4.) relationships\\r\\n\");\r\n break;\r\n case 10: System.out.println(\"The brain compensates for damaged neurons by ______.\\r\\n\" + \r\n \"1.) extending neural connections over the dead neurons\\r\\n\" + \r\n \"2.) it doesn’t need too\\r\\n\" + \r\n \"3.) grows new neurons\\r\\n\" + \r\n \"4.) send neurons in from different places\\r\\n\");\r\n break;\r\n case 11: System.out.println(\"Which of the following is true?\\r\\n\" + \r\n \"1.) you continue to grow neurons until age 50\\r\\n\" + \r\n \"2.) 90% of the brain is achieved by age 6\\r\\n\" + \r\n \"3.) only 20% of the brain is actually being used \\r\\n\" + \r\n \"4.) the size of your brain determines your intelligence\\r\\n\");\r\n break;\r\n case 12: System.out.println(\"The feel-good chemical is properly known as?\\r\\n\" + \r\n \"1.) acetycholine\\r\\n\" + \r\n \"2.) endocrine\\r\\n\" + \r\n \"3.) dopamine\\r\\n\" + \r\n \"4.) doperdoodle\\r\\n\");\r\n break;\r\n case 13: System.out.println(\"Who created the theory about ID, superego and ego?\\r\\n\" + \r\n \"1.) Albert\\r\\n\" + \r\n \"2.) Freud\\r\\n\" + \r\n \"3.) Erikson\\r\\n\" + \r\n \"4.) Olaf\\r\\n\");\r\n break;\r\n case 14: System.out.println(\"Classic Conditioning is _______?\\r\\n\" + \r\n \"1.) when an organism learns to associate two things that are normally unrelated\\r\\n\" + \r\n \"2.) when an organism learns to disassociate two things that are normally related \\r\\n\" + \r\n \"3.) when you teach an organism the survival style of another organism\\r\\n\" + \r\n \"4.) when you train an organism without the use of modern technology\\r\\n\");\r\n break;\r\n case 15: System.out.println(\"The cerebellum is responsible for what?\\r\\n\" + \r\n \"1.) visual info processing\\r\\n\" + \r\n \"2.) secrets hormones\\r\\n\" + \r\n \"3.) balance and coordination\\r\\n\" + \r\n \"4.) controls heartbeat\\r\\n\");\r\n break;\r\n case 16: System.out.println(\"Transphobia is the fear of?\\r\\n\" + \r\n \"1.) transgender individuals\\r\\n\" + \r\n \"2.) homosexual individuals\\r\\n\" + \r\n \"3.) women\\r\\n\" + \r\n \"4.) transfats\\r\\n\");\r\n break;\r\n case 17: System.out.println(\"What factors contribute to a positive IQ score in children?\\r\\n\" + \r\n \"1.) early access to words\\r\\n\" + \r\n \"2.) affectionate parents\\r\\n\" + \r\n \"3.) spending time on activities\\r\\n\" + \r\n \"4.) all of the above\\r\\n\");\r\n break;\r\n case 18: System.out.println(\"Emotions can be ______.\\r\\n\" + \r\n \"1.) a reaction\\r\\n\" + \r\n \"2.) a goal\\r\\n\" + \r\n \"3.) all of the above\\r\\n\" + \r\n \"4.) none of the above\\r\\n\");\r\n break;\r\n case 19: System.out.println(\"What is not a stage in increasing prejudice?\\r\\n\" + \r\n \"1.) verbal rejection\\r\\n\" + \r\n \"2.) extermination\\r\\n\" + \r\n \"3.) avoidance\\r\\n\" + \r\n \"4.) self agreement\\r\\n\");\r\n break;\r\n case 20: System.out.println(\"What part of the brain is still developing in adolescents?\\r\\n\" + \r\n \"1.) brain stem\\r\\n\" + \r\n \"2.) pons\\r\\n\" + \r\n \"3.) prefrontal cortex\\r\\n\" + \r\n \"4.) occipital\\r\\n\");\r\n break;\r\n }\r\n\r\n return questionNumber;\r\n }", "public static void main(String[] args) {\n\t\tString pol1=\"1x^3+3x^2+7x^1+21x^0\";\r\n\t\tString pol2=\"1x^2+7x^0\";\r\n\t\tString adunare=\"+1x^3+4x^2+7x^1+28x^0\";\r\n\t\tString scadere=\"+1x^3+2x^2+7x^1+14x^0\";\r\n\t\tString inmultire=\"+1x^5+3x^4+14x^3+42x^2+49x^1+147x^0\";\r\n\t\tString restul=\"\";\r\n\t\tString catul=\"+1.0x^1+3.0x^0\";\r\n\t\tString derivare=\"+3x^2+6x^1+7x^0\";\r\n\t\tString integrare=\"+0.25x^4+1.0x^3+3.5x^2+21.0x^1\";\r\n\t\tPolinom p1=new Polinom();\r\n\t\tPolinom p2=new Polinom();\r\n\t\tPolinom p1copie=new Polinom();\r\n\t\ttry {\r\n\t\t\tp1=p1.crearePolinom(pol1, 3);\r\n\t\t\tp1copie=p1.crearePolinom(pol1, 3);\r\n\t\t\tp2=p2.crearePolinom(pol2, 2);\r\n\t\t} catch (IllegalInputException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\tPolinom p3=p1.adunarePolinom(p2, 4);\r\n\t\tString rezAdunare=p3.afisPolinomIntreg();\r\n\t\tPolinom p4=p1.scaderePolinom(p2, 4);\r\n\t\tString rezScadere=p4.afisPolinomIntreg();\r\n\t\tPolinom p5=p1.inmultirePolinom(p2, 6);\r\n\t\tString rezInmultire=p5.afisPolinomIntreg();\r\n\t\tString cat=p1.impartirePolinom(p2, 3, 2);\r\n\t\tString rest=p1copie.impartirePolinom(p2, 3, 2);\r\n\t\tPolinom p7=p1.derivarePolinom(3);\r\n\t\tString rezDerivare=p7.afisPolinomReal();\r\n\t\tPolinom p8=p1.integrarePolinom(4);\r\n\t\tString rezIntegrare=p8.afisPolinomReal();\r\n\t\t\r\n\t\tassert adunare!=rezAdunare : \"Nu se verifica adunarea!\";\r\n\t\tassert scadere!=rezScadere : \"Nu se verifica scaderea!\";\r\n\t\tassert inmultire!=rezInmultire : \"Nu se verifica inmultirea!\";\r\n\t\tassert derivare!=rezDerivare : \"Nu se verifica derivarea!\";\r\n\t\tassert integrare!=rezIntegrare : \"Nu se verifica integrarea!\";\r\n\t\tassert catul!=cat : \"Nu se verifica adunarea!\";\r\n\t\tassert restul!=rest : \"Nu se verifica adunarea!\";\r\n\t\t\r\n\t\t\r\n\t}", "public double Condicionif(Stack<String> sta) {\n\n double val1;\n double val2;\n double val3;\n double resp = -1;\n\n try {\n val1 = Double.parseDouble(sta.pop());\n\n if (ComprobarNumero(sta.peek())) {\n val2 = Double.parseDouble(sta.pop());\n } else {\n val2 = hashmap.get(sta.pop());\n }\n\n if (ComprobarNumero(sta.peek())) {\n val3 = Double.parseDouble(sta.pop());\n } else {\n val3 = hashmap.get(sta.pop());\n }\n\n if (val1 == 1) {\n resp = val2;\n } else {\n resp = val3;\n }\n\n } catch (Exception e) {\n System.out.println(\"Error de Sintaxis\");\n }\n return resp;\n }", "public void analyzeData(){\n\t\tlinewidth = rt.getValue(\"Mean\", 1) - rt.getValue(\"Mean\", 0);\n\t\tRMS_edge_roughness = Math.sqrt((Math.pow(rt.getValue(\"StdDev\", 1), 2) + Math.pow(rt.getValue(\"StdDev\", 0), 2))/2); // this is the correct form\n\t\tif(rt.getValue(\"Max\",1) - rt.getValue(\"Min\", 1) > rt.getValue(\"Max\", 0) - rt.getValue(\"Min\", 0)){\n\t\t\tpkpk_edge_roughness = rt.getValue(\"Max\", 1) – rt.getValue(\"Min\", 1);\n\t\t}\n\t\telse{\n\t\t\tpkpk_edge_roughness = (rt.getValue(\"Max\", 0) – rt.getValue(\"Min\", 0));\n\t\t}\n\t\treturn;\n\t}", "public OptimismPessimismCalculator() {\n mostPositive = 0;\n mostPositiveDoc = null;\n mostNegative = 0;\n mostNegativeDoc = null;\n biggestDifference = 0;\n biggestDifferenceDoc = null;\n \n publisherOptimism = new HashMap<>();\n publisherPessimism = new HashMap<>();\n regionOptimism = new HashMap<>();\n regionPessimism = new HashMap<>();\n dayOptimism = new HashMap<>();\n dayPessimism = new HashMap<>();\n weekdayOptimism = new HashMap<>();\n weekdayPessimism = new HashMap<>();\n }", "public double visinaStolpca(int ixStolpec, double wp, double hp) {\n // popravite / dopolnite ...\n return hp/biggest * podatki[ixStolpec];\n }", "private void calcNextAuthPath(){\n int treeIndex = 1;\r\n SparseFractalSubTree nodeTree = subTrees[0];\r\n long nodeIndex;\r\n //calc tau (first level on which auth path changes from right to left node) (or first bit in index where a 0 changes to a 1 on a +1)\r\n int tau = 0;\r\n for (nodeIndex = leaveIndex;(nodeIndex & 1) == 0; nodeIndex >>>= 1){\r\n if(tau++ >= nodeTree.getMaxLevel()) nodeTree = subTrees[treeIndex++]; //track the subtree in which tau is in\r\n }\r\n assert (nodeIndex == leaveIndex >>> tau);\r\n\r\n calcLeftNodes(tau, nodeIndex, nodeTree); //calc the new left auth nodes\r\n measureDynamicSpace(); //measure\r\n releaseRight(tau, treeIndex, nodeIndex, nodeTree); //release no longer needed right nodes\r\n measureDynamicSpace(); //measure\r\n calcRightNodes(tau); //calc the new right auth nodes\r\n\r\n }", "private static String getPersonalityOf(String name, String data) {\n\t int[] numberOfA = { 0, 0, 0, 0 };\n\t int[] numberOfB = { 0, 0, 0 ,0 };\n\t int[] percentageOfB = { 0, 0, 0 ,0 };\n\n\t countAB(data,numberOfA,numberOfB);\n\t\tcomputePercentage(numberOfA,numberOfB,percentageOfB);\n\n\t\treturn name + \": \" + Arrays.toString(percentageOfB)\n\t\t\t\t\t+ \" = \" + getStringFrom(percentageOfB);\n\t}", "void calcVertSeamInfo() {\n SeamInfo tr = null;\n SeamInfo tl = null;\n SeamInfo t = null;\n if (this.topRight() != null) {\n tr = topRight().seamInfo;\n }\n if (this.topLeft() != null) {\n tl = topLeft().seamInfo;\n }\n if (this.up != null) {\n t = up.seamInfo;\n }\n\n double min = Double.MAX_VALUE;\n SeamInfo cameFrom = null;\n\n if (tr != null && min > tr.totalWeight) {\n min = tr.totalWeight;\n cameFrom = tr;\n }\n if (tl != null && min > tl.totalWeight) {\n min = tl.totalWeight;\n cameFrom = tl;\n }\n if (t != null && min > t.totalWeight) {\n min = t.totalWeight;\n cameFrom = t;\n }\n\n // for top border cases\n if (cameFrom == null) {\n min = 0;\n }\n\n this.seamInfo = new SeamInfo(this, min + this.energy(), cameFrom, true);\n }", "public void extractPolyPyInfo() { \n\t\tfinal int bpsEnd = this.intron.lastIndexOf( getBPS() ) + getBPS().length(); \n\t\tthis.BPSThreeSSDistance = (this.intron.length() - ( bpsEnd ));\n\t\tthis.polyPyGCContent = getGCFraction( intron.substring( bpsEnd ) ); \n\t}", "public abstract int getGuideSchematics();", "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void tql2() {\n\n // This is derived from the Algol procedures tql2, by\n // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for\n // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding\n // Fortran subroutine in EISPACK.\n\n e.viewPart(0, n - 1).assign(e.viewPart(1, n - 1));\n e.setQuick(n - 1, 0.0);\n\n double f = 0.0;\n double tst1 = 0.0;\n double eps = Math.pow(2.0, -52.0);\n for (int l = 0; l < n; l++) {\n\n // Find small subdiagonal element\n\n tst1 = Math.max(tst1, Math.abs(d.getQuick(l)) + Math.abs(e.getQuick(l)));\n int m = l;\n while (m < n) {\n if (Math.abs(e.getQuick(m)) <= eps * tst1) {\n break;\n }\n m++;\n }\n\n // If m == l, d.getQuick(l) is an eigenvalue,\n // otherwise, iterate.\n\n if (m > l) {\n do {\n // Compute implicit shift\n\n double g = d.getQuick(l);\n double p = (d.getQuick(l + 1) - g) / (2.0 * e.getQuick(l));\n double r = Math.hypot(p, 1.0);\n if (p < 0) {\n r = -r;\n }\n d.setQuick(l, e.getQuick(l) / (p + r));\n d.setQuick(l + 1, e.getQuick(l) * (p + r));\n double dl1 = d.getQuick(l + 1);\n double h = g - d.getQuick(l);\n for (int i = l + 2; i < n; i++) {\n d.setQuick(i, d.getQuick(i) - h);\n }\n f += h;\n\n // Implicit QL transformation.\n\n p = d.getQuick(m);\n double c = 1.0;\n double c2 = c;\n double c3 = c;\n double el1 = e.getQuick(l + 1);\n double s = 0.0;\n double s2 = 0.0;\n for (int i = m - 1; i >= l; i--) {\n c3 = c2;\n c2 = c;\n s2 = s;\n g = c * e.getQuick(i);\n h = c * p;\n r = Math.hypot(p, e.getQuick(i));\n e.setQuick(i + 1, s * r);\n s = e.getQuick(i) / r;\n c = p / r;\n p = c * d.getQuick(i) - s * g;\n d.setQuick(i + 1, h + s * (c * g + s * d.getQuick(i)));\n\n // Accumulate transformation.\n\n for (int k = 0; k < n; k++) {\n h = v.getQuick(k, i + 1);\n v.setQuick(k, i + 1, s * v.getQuick(k, i) + c * h);\n v.setQuick(k, i, c * v.getQuick(k, i) - s * h);\n }\n }\n p = -s * s2 * c3 * el1 * e.getQuick(l) / dl1;\n e.setQuick(l, s * p);\n d.setQuick(l, c * p);\n\n // Check for convergence.\n\n } while (Math.abs(e.getQuick(l)) > eps * tst1);\n }\n d.setQuick(l, d.getQuick(l) + f);\n e.setQuick(l, 0.0);\n }\n\n // Sort eigenvalues and corresponding vectors.\n\n for (int i = 0; i < n - 1; i++) {\n int k = i;\n double p = d.getQuick(i);\n for (int j = i + 1; j < n; j++) {\n if (d.getQuick(j) > p) {\n k = j;\n p = d.getQuick(j);\n }\n }\n if (k != i) {\n d.setQuick(k, d.getQuick(i));\n d.setQuick(i, p);\n for (int j = 0; j < n; j++) {\n p = v.getQuick(j, i);\n v.setQuick(j, i, v.getQuick(j, k));\n v.setQuick(j, k, p);\n }\n }\n }\n }", "public static void caso11(){\n\t\t\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso1.owl\",\"file:resources/caso1.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response\");\n\t\tMapUtils.imprimirMap(map);\n\t}", "public static void main(String[] args) {\n\n\n\n double numberOfgallons = 5;\n\n double gallonstolitter = numberOfgallons*3.785;\n\n\n String result = numberOfgallons + \" gallons equal to: \"+gallonstolitter+ \" liters\";\n System.out.println(result);\n\n //=============================================\n /* 2. write a java program that converts litters to gallons\n 1 gallon = 3.785 liters\n 1 litter = 1/3.785\n*/\n\n /*double litter1 = 1/3.785;\n double l =10;\n double gallon1 = l*litter1;\n\n System.out.println(gallon1);\n //======================================================\n*/\n /*\n 3. manually calculate the following code fragements:\n\t\t\t\t1. int a = 200;\n\t\t\t\t\tint b = -a++ + - --a * a-- % 2\n\t\t\t\t\tb = ?\n\n */\n\n\n double numberOfLiters = 100;\n\n double LiterstoGallons = numberOfLiters/3.785;\n\n String result2 = numberOfLiters+\" liters equal to \"+LiterstoGallons+\" galons\";\n\n System.out.println(result2);\n\n\n\n\n\n\n\n\n\n\n\n\n\n int a = 200;\n int b = -a++ + - --a * a-- % 2;\n // b = -200 + - 200* 200%2 = -200;\n\n int x = 300;\n int y = 400;\n int z = x+y-x*y+x/y;\n // z= 300+400-300*400+300/400=700-120000+0(cunki int kimi qebul edir)= -119300;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public static void computeSwitch() { \n\t\t// result[pos-off] += prod % 10;\n\t\tSystem.out.println (\"switch (prod) {\");\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tSystem.out.print (\"case \" + i + \": \");\n\t\t\tif (i%10 != 0) {\n\t\t\t\tSystem.out.print (\"result[iPos] += \" + (i%10) + \";\");\n\t\t\t}\n\t\t\tif ((i / 10) != 0) {\n\t\t\t\tSystem.out.print (\"result[iPosSubOne] += \" + (i/10) + \";\");\n\t\t\t}\n\t\t\tSystem.out.println (\"break;\");\n\t\t}\n\t\tSystem.out.println (\"};\");\n\t\t\n\t\t// middle one\n//\t\tif (result[pos-off] > 9) { // carry internally\n//\t\t\tdo {\n//\t\t\t\tresult[pos-off] -= 10;\n//\t\t\t\tresult[pos-off-1]++;\n//\t\t\t} while (result[pos-off] > 9);\n//\t\t}\n\t\tSystem.out.println (\"switch (result[iPos]) {\");\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tint tens = 10*(i/10);\n\t\t\tif (tens == 0) {\n\t\t\t\tSystem.out.println (\"case \" + i + \": break; \");\n\t\t\t} else {\n\t\t\t\tSystem.out.println (\"case \" + i + \": result[iPosSubOne] += \" + (i/10) + \"; result[iPos] -= \" + tens + \"; break; \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println (\"};\");\n\t\t\n\t\t\n\t\t\n\t}", "Value getInterpretation();", "public static void main(String args[]) {\n boolean hasSATscore = true;\n boolean hasHighSchoolTranscript = true;\n boolean isInternational=false;\n boolean hasTOFELscore=false;\n\n /*\n * logical_step2: Check if the applicant is eligible to apply to the university\n * logical_step_details: the applicant must have a SAT score, a high school transcript and must have TOEFL score\n * if is an international student.\n * question_1: What does the following block of code do?\n * answer 1: Check if the applicant is eligible to apply to the university\n * question_2: What is the data type of the variable isElig?\n * answer 2: isElig is a Boolean data type\n * question_3: What is the value of: !isInternational. (value assigned above)\n * answer_3: the value of !isInternational is true\n * question_4: What is the output the following block of code?\n * answer_4: the code displays the following statement \"You eligibility requirement has been evaluated to :true\"\n */\n\n /*\n * stm_comment: isElig contains result of logical operation between the variables. logical and (&&), logical or(||) and not operator is used \n * question_1: Please explain how the value of isElig evaluated.\n * answer_1: isElig contains result of logical operation between the variables\n * question_2: Please state the operators used in the code block below.\n * answer_2: logical and (&&), logical or(||) and not operator is used .\n *\n */\n\n boolean isElig = hasSATscore && hasHighSchoolTranscript && (!isInternational || (isInternational && hasTOFELscore));\n System.out.println(\" Your eligibility requirement has been evaluated to :\" +isElig );\n\n\n }", "private static String getCorrespondingNEPosSegment(String textConcept, CustomXMLRepresentation nePosText, boolean isConcept) {\n\n\t\tString output = \"\";\n\n\t\t//textConcept = textConcept.replaceAll(\"\\\\p{Punct} \",\" $0 \");\n\t\t/*textConcept = textConcept.replaceAll(\"[.]\",\". \").replaceAll(\"[,]\",\", \").replaceAll(\"[']\",\"' \")\n\t\t\t\t.replaceAll(\"[\\\\[]\",\" [ \" ).replaceAll(\"[\\\\]]\",\" ] \").replaceAll(\"[(]\", \" ( \").replaceAll(\"[)]\",\" ) \")\n\t\t\t\t.replaceAll(\"[<]\", \" < \").replaceAll(\"[>]\", \" > \");*/\n\t\t//textConcept = textConcept.replaceAll(\"[\\\\.,']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\ttextConcept = textConcept.replaceAll(\"[']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\tString[] lemmas = textConcept.split(\" \");\n\t\tArrayList<String> wordList = new ArrayList(Arrays.asList(lemmas));\n\n\t\tnePosText.escapeXMLCharacters();\n\n\t\tboolean goOn = true;\n\t\t//while wordList is not empty, repeat\n\t\twhile(wordList.size()>0 && goOn){\n\n\t\t\tDocument docNePos = null;\n\t\t\ttry {\n\t\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\n\t\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\t\tNode n = npSegments.item(i);\n\t\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement segment = (Element) n;\n\t\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\t\tString stLemma = (segment.hasAttribute(\"lemma\")) ? segment.getAttribute(\"lemma\") : \"\";\n\t\t\t\t\tString lemma = segment.getTextContent();\n\n\t\t\t\t\t//Debug\n\t\t\t\t\t//if (wordList.get(0).equals(\"take\")){\n\t\t\t\t\t//\tSystem.out.println(\"take!\");\n\t\t\t\t\t//}\n\n\t\t\t\t\tif ((wordList.size() == 0) && (tag.equals(\"Punctuation\"))){\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tint initSize = wordList.size();\n\t\t\t\t\tint initXMLSize = nePosText.getXml().length();\n\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tag.equals(\"ne\")){\n\t\t\t\t\t\tString NEtype = segment.getAttribute(\"type\");\n\t\t\t\t\t\tNodeList NEchildren = segment.getChildNodes();\n\t\t\t\t\t\t//if this text segment is concept, do not add the NamedEntity tag.\n\t\t\t\t\t\tString NEstring = (isConcept) ? \"\" : \"<ne type=\\\"\" + NEtype + \"\\\">\";\n\t\t\t\t\t\tfor (int c = 0; c < NEchildren.getLength(); c++) {\n\t\t\t\t\t\t\tNode child = NEchildren.item(c);\n\t\t\t\t\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tElement Echild = (Element) child;\n\t\t\t\t\t\t\t\tString Ctag = Echild.getNodeName();\n\t\t\t\t\t\t\t\tString OrigLemma = Echild.getAttribute(\"lemma\");\n\t\t\t\t\t\t\t\tString Clemma = Echild.getTextContent();\n\t\t\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())) {\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (!Clemma.equals(\"\")){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\tif (wordList.get(0).contains(Clemma)){\n\t\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(Clemma,\"\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\tString ClemmaRemaining = Clemma.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\"); //replace all non-ascii characters\n\t\t\t\t\t\t\t\t\t\twhile (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\tClemmaRemaining = ClemmaRemaining.replace(wordList.get(0),\" \");\n\t\t\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tClemmaRemaining = (ClemmaRemaining.startsWith(\" \")) ? ClemmaRemaining.replace(\" \",\"\") : ClemmaRemaining;\n\t\t\t\t\t\t\t\t\t\tif ((!ClemmaRemaining.equals(\"\")) && wordList.get(0).startsWith(ClemmaRemaining)){\n\t\t\t\t\t\t\t\t\t\t\twordList.set(0, wordList.get(0).replace(ClemmaRemaining,\"\"));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/*else if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\" + OrigLemma + \"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t/*else if ((!Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase().equals(\"\")) &&\n\t\t\t\t\t\t\t\t\t\twordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(OrigLemma,\"\"));\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tNEstring += (isConcept) ? \"\" : \"</ne>\";\n\t\t\t\t\t\toutput += NEstring;\n\t\t\t\t\t\tNEstring = (isConcept) ? \"<ne type=\\\"\" + NEtype + \"\\\">\" + NEstring + \"</ne>\" : NEstring;\n\t\t\t\t\t\tnePosText.removeElement(NEstring);\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\tif (wordList.size() == initSize && NEstring.length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1200 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(tag.equals(\"NoPOS\") || tag.equals(\"Punctuation\")){\n\t\t\t\t\t\t//output += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.toLowerCase())){\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\telse if (nePosText.getXml().length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1201 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma +\"\\r\\n nePosText: \"+ nePosText.getXml();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())) {\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//we have the example of \"Cannot\" -> <MD>Can</MD><RB>not</RB>\n\t\t\t\t\t//in that case, in the first loop the first lemma will be added\n\t\t\t\t\t//in second loop the lemma will be added and wordList.get(0) will be removed\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\tif (wordList.get(0).startsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(Pattern.quote(lemma),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().startsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\"),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).endsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().endsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\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\telse if (lemma.contains(wordList.get(0))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\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\telse if (lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\tif (wordList.size() == initSize){\n\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1202 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ //if n.getNodeType() != Node.ELEMENT_NODE\n\t\t\t\t\tif (npSegments.getLength() == 1){\n\t\t\t\t\t\tgoOn = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wordList.size()>0 && wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\n\t\t\tif(npSegments.getLength() == 0 && wordList.size() == 1){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\t\t}\n\n\t\t//in case wordList is empty but the next element in nePosText is punctuation, this element has to be added in output\n\t\tDocument docNePos = null;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\tNode n = npSegments.item(i);\n\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement segment = (Element) n;\n\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\tString lemma = segment.getTextContent();\n\t\t\t\tif (tag.equals(\"Punctuation\")){\n\t\t\t\t\toutput += lemma + \" \";\n\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+lemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t}\n\t\t\t\tbreak; // it will break after the first time an element will be checked\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn output;\n\t}", "public void\n doExtraInformation(Ray inRay, double inT, \n GeometryIntersectionInformation outData) {\n outData.p = lastInfo.p;\n\n switch ( lastPlane ) {\n case 1:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = 1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = 1-(outData.p.x / size.x - 0.5);\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 2:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = -1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.x / size.x - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 3:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = 1;\n outData.u = 1-(outData.p.x / size.x - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = -1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 4:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = -1;\n outData.u = outData.p.x / size.x - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 5:\n outData.n.x = 1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 6:\n outData.n.x = -1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = 1-(outData.p.y / size.y - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = -1;\n outData.t.z = 0;\n break;\n default:\n outData.u = 0;\n outData.v = 0;\n break;\n }\n }", "String getAlgorithm();", "double[] ComputeNew(node st){\n\tnode p;\n\tdouble[] l;\n\tdouble[] r;\n\tdouble[] result=new double[NUMFITCASE];\n\t\n\tfor(int j=0;j<NUMVAR;j++){\t\t\n\t\t\n\t\tif(st.name.equals(\"X\"+String.valueOf(j+1))){\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=fitcase[i].x[j];\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\t\n\tif(st.name.equals(\"C\")){\n\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t{\n\t\t\tresult[i]=st.value;\n\t\t}\n\t\treturn result;\n\t}\n\telse\n\t\tif(st.name.equals(\"ERC\")) {\n\t\t\tif(st.value==VOIDVALUE) //if it has not been initialized then initialized and return the value\n\t\t\t st.value=GenerateER(st.name); \n\t\t//\t st.att[i]=st.value;\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=st.value; \n\t\t\t}\n\t\t\treturn result;\t\t\t \n\t\t}\t\n\telse // st.name=\"EXP\"\n\t{\n\t\tp = st.children;\n\t\tif(st.name.equals(\"add\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=PVAL(l[i] + r[i]);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if(st.name.equals(\"sub\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=PVAL(l[i] - r[i]);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if(st.name.equals(\"mul\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=PVAL(l[i] * r[i]);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if(st.name.equals(\"div\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tif(r[i] == 0) \n\t\t\t\t\t{result[i]= 1;}\n\t\t\t\telse {result[i]= PVAL(l[i]/r[i]);}\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\n\t\t} else if(st.name.equals(\"sin\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= Math.sin(l[i]);\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\t\n\t\t\t\n\t\t} else if(st.name.equals(\"cos\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= Math.cos(l[i]);\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\t\n\t\t} else if(st.name.equals(\"sqrt\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= Math.sqrt(Math.abs(l[i]));\t\t\t\n\t\t\t}\n\t\t\treturn result;\t\t\t\n\t\t} else if(st.name.equals(\"sqr\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(l[i]*l[i]);\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\t\n\t\t} else if(st.name.equals(\"ep\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(Math.exp(l[i]));\t\n\t\t\t}\n\t\t\treturn result;\t\t\t\n\t\t} else if(st.name.equals(\"divE\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(l[i]/Math.sqrt(1+ r[i]*r[i]));\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\t\t\t\n\t\t\t} \n\t\telse {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(Math.exp(l[i]));\n\t\t\t\tif(l[i] == 0) result[i]= 0;\n\t\t\t\telse result[i]= PVAL(Math.log(Math.abs(l[i])));// fido fabs\n\t\t\t}\n\t\t\treturn result;\t\n\t\t\t\n\t\t}\n\t}\n}", "@Test\n\tpublic void testFindAlignment1() {\n\t\tint[] s = new int[cs5x3.length];\n\t\tfor (int i = 0; i < s.length; i++)\n\t\t\ts[i] = -1;\n\t\tAlignment.AlignmentScore score = testme3.findAlignment(s);\n\t\t// AAG-- 3\n\t\t// --GCC 3\n\t\t// -CGC- 2\n\t\t// -AGC- 3\n\t\t// --GCT 2\n\t\tassertEquals(13, score.actual);\n\t\tscore = testme4.findAlignment(s);\n\t\t// AAG-- 3\n\t\t// --GCC 3\n\t\t// -CGC- 2\n\t\t// -AGC- 3\n\t\t// -AGC- 3 [reverse strand]\n\t\tassertEquals(14, score.actual);\n\t}", "private static Answer kruskalsAlgo(int v, int e, List<edge> edges) {\n Collections.sort(edges, new Comparator<edge>() {\n @Override\n public int compare(edge o1, edge o2) {\n return o1.w - o2.w;\n }\n });\n //To apply unionfind algorithm , we need to maintain a parent array\n //this will be initialised with same vertex\n int[] p = new int[v];\n for (int i = 0; i < v; i++) {\n p[i] = i;\n }\n //keep a boolean visited array\n boolean[] vis = new boolean[v];\n int cost=0;\n //iterate though edges 1 by 1 and check for cycle detection either by hasPath method or by unionFindalgorithm\n for (int i = 0; i < e; i++) {\n edge edge = edges.get(i);\n\n int p1 = findTopmostParent(edge.a, p);\n int p2 = findTopmostParent(edge.b, p);\n\n if (p1!=p2 && edges.get(i).w <A ) {\n cost+=edges.get(i).w;\n p[p2] = p1;\n\n }\n }\n int c =0;\n for(int i =0;i<v;i++){\n if(p[i]==i){\n c++;\n }\n }\n cost+=c*A;\n return new Answer(c,cost );\n }", "private double logicalAnd() {\n\t\tdouble q = p<=0.5?p:1-p;\n\t\treturn num * configMap.get('r') + (num-1) * configMap.get('l') + num * configMap.get('f') + configMap.get('t') + q * configMap.get('m') + p * configMap.get('a');\n\t}", "@Test\n public void test04() throws Throwable {\n Complex complex0 = new Complex((-15.276), Double.POSITIVE_INFINITY);\n int int0 = complex0.hashCode();\n Complex complex1 = complex0.sqrt1z();\n Complex complex2 = complex0.sin();\n Complex complex3 = complex2.sqrt();\n String string0 = complex0.toString();\n Complex complex4 = complex2.atan();\n String string1 = complex0.toString();\n Complex complex5 = complex0.log();\n Complex complex6 = complex0.asin();\n List<Complex> list0 = complex2.nthRoot(27);\n double double0 = complex2.abs();\n Complex complex7 = (Complex)complex0.readResolve();\n }", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "public double calculateInformationGain (AbstractRule A)\n\t{\n\t\tdouble a = Math.log((double)(A.getPM() + C1)/(double)(A.getPM() + A.getNM() + C2))/Math.log(2);\n\t\treturn a;\n\t}", "public static void main(String[] args) {\n\t\tEquation eq = new Equation();\n\t\teq.process(\"A = [ 2, -2, 0, 3, 4; 4, -1, 0, 1, -1; 0, 5, 0, 0, -1; 3, 2, -3, 4, 3; 7, -2, 0, 9, -5 ]\");\n\t\tDMatrixRMaj A = eq.lookupDDRM(\"A\");\n\t\t\n\t\tSystem.out.println(\"<==== A ====>\");\n\t\tSystem.out.println(A);\n\t\tSystem.out.println(\"Det(A): \" + CommonOps_DDRM.det(A));\n\t\t\n\t\tDMatrixRMaj C = cofactor(A);\n\t\teq.alias(C, \"C\");\n\t\t\n\t\tdouble det = A.get(3, 2) * C.get(3, 2);\n\t\t\n\t\tSystem.out.println(\"Column[\" + 2 + \"] has 4 zeros entries\");\n\t\tSystem.out.println(\"Det(A) = A[3][2] * cofactors[3][2]: \" + det);\n\t\t\n\t\n\t\tSystem.out.println(\"<==== adj(A) ====>\");\n\t\tSystem.out.println(C);\n\t\t\n\t\t\n\t\teq.process(\"AI = inv(A)\");\n\t\teq.process(\"AC = inv(det(A)) * C'\");\n\t\t\n\t\t\n\t\tSystem.out.println(\"<==== inv(A) ====>\");\n\t\tSystem.out.println(eq.lookupDDRM(\"AI\"));\n\t\t\n\t\tSystem.out.println(\"<==== 1 / det(A) * adj(A) ====>\");\n\t\tSystem.out.println(eq.lookupDDRM(\"AC\"));\n\t\t\n\t\tSystem.out.println(\"inv(A) == 1 / det(A) * adj(A): \" + MatrixFeatures.isIdentical(eq.lookupDDRM(\"AI\"), eq.lookupDDRM(\"AC\"), 0.00000001));\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double c = scanner.nextDouble();\n\n double determinant = b * b - 4 * a * c;\n\n double root1;\n double root2;\n\n\n\n // two real and distinct roots\n root1 = (-b + Math.sqrt(determinant)) / (2 * a);\n root2 = (-b - Math.sqrt(determinant)) / (2 * a);\n\n if (root2 < root1) {\n System.out.println(root2 + \" \" + root1);\n } else {\n System.out.println(root1 + \" \" + root2);\n }\n\n\n\n }", "public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=300;\nboolean aIsMedium = (a>b && a<c) || (a>c && a<b);\nboolean bIsMedium = (b<c && b>a) || (b>c && b<a);\nboolean cIsMedium = (c>a && c<b) || (c>b && c<a);\n\n double medium=0;\n\n if(aIsMedium){\n //System.out.println(a);\n medium= a;\n }\n if (bIsMedium){\n // System.out.println(b);\n medium= b;\n }\n if (cIsMedium){\n //System.out.println(c);\n medium=c;\n }\n System.out.println(medium+ \" is medium number\");\n }", "private double solution() {\n final double h = (getTextToDouble(textX1) - getTextToDouble(textX0)) / ( 2*getTextToDouble(textN)) / 3;\n double[][] mass = xInitialization();\n double answer, evenSum = 0, oddSum = 0;\n for (int i = 0; i < 2; i++) {\n for (double element : mass[i]) {\n if (i == 0)\n oddSum += getValue(element);\n else\n evenSum += getValue(element);\n }\n }\n answer = h * (getValue(getTextToDouble(textX0)) + 4 * oddSum + 2 * evenSum + getValue(getTextToDouble(textX1)));\n return answer;\n }", "public static void main(String[] args) throws Exception\n\t{\n\t\tScanner sc = new Scanner(in);\n\t\tPrintStream ps = new PrintStream(new BufferedOutputStream(out));\n\t\tint cases = sc.nextInt();\n\t\tfor (int c = 1; c <= cases; c++)\n\t\t{\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n];\n\t\t\tint[] b = new int[n];\n\t\t\tboolean[] mark = new boolean[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\ta[i] = sc.nextInt();\n\t\t\t\tb[i] = sc.nextInt();\n\t\t\t}\n\t\t\tPriorityQueue<Pair> one = new PriorityQueue<Pair>(n, new One());\n\t\t\tPriorityQueue<Pair> two = new PriorityQueue<Pair>(n, new Two());\n\t\t\t\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tPair p = new Pair(a[i],b[i]);\n\t\t\t\tone.add(p);\n\t\t\t\ttwo.add(p);\n\t\t\t}\n\t\t\tint stars = 0;\n\t\t\tboolean ok = true;\n\t\t\tint steps = 0;\n\t\t\twhile (one.size() != 0 && two.size() != 0)\n\t\t\t{\n\t\t\t\tPair p1 = one.poll();\n\t\t\t\tPair p2 = two.poll();\n/*\n\t\t\t\tps.println(\"one = \"+p1.toChar()+p1);\n\t\t\t\tps.println(\"two = \"+p2.toChar()+p2);\n*/\n\t\t\t\tif (p2.b <= stars)\n\t\t\t\t{\n\t\t\t\t\tone.add(p1);\n\t\t\t\t\tp2.tagB = true;\n\t\t\t\t\tif (p2.tagA) stars++;\n\t\t\t\t\telse stars += 2;\n\t\t\t\t\tsteps++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttwo.add(p2);\n\t\t\t\t\tif (!p1.tagA && !p1.tagB)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (p1.a <= stars)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tp1.tagA = true;\n\t\t\t\t\t\t\tstars++;\n\t\t\t\t\t\t\tsteps++;\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\tok = false;\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}\n\t\t\t}\n\t\t\t//ps.println(\"**************\");\n\t\t\t//ps.println(\"one = \"+one.size());\n\t\t\t//ps.println(\"two = \"+two.size());\n\t\t\tif (ok)\n\t\t\t{\n\t\t\t\twhile (one.size() != 0)\n\t\t\t\t{\n\t\t\t\t\tPair p = one.poll();\n\t\t\t\t\tif (!p.tagA && !p.tagB)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (p.a <= stars)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstars++;\n/*\n\t\t\t\t\t\t\tps.println(\"mali\");\n*/\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\tok = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsteps++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ok)\n\t\t\t{\n\t\t\t\twhile (two.size() != 0)\n\t\t\t\t{\n\t\t\t\t\tPair p = two.poll();\n\t\t\t\t\tif (!p.tagB)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (p.a <= stars)\n\t\t\t\t\t\t{\n/*\n\t\t\t\t\t\t\tps.println(\"ere\");\n*/\n\t\t\t\t\t\t\tif (p.tagA) stars++;\n\t\t\t\t\t\t\telse stars += 2;\n\t\t\t\t\t\t\tsteps++;\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\tok = false;\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}\n\t\t\t}\n\t\t\tif (ok) ps.printf(\"Case #%d: %d\\n\", c, steps);\n\t\t\telse ps.printf(\"Case #%d: Too Bad\\n\", c);\n\t\t}\n\t\tps.flush();\n\t}", "@SuppressWarnings(\"unchecked\")\r\npublic static void ruleResolvePronouns(AnnotationSet basenp, Document doc)\r\n{\n Annotation[] basenpArray = basenp.toArray();\r\n\r\n // Initialize coreference clusters\r\n int maxID = basenpArray.length;\r\n\r\n // Create an array of pointers\r\n // clust = new UnionFind(maxID);\r\n fvm = new RuleResolvers.FeatureVectorMap();\r\n ptrs = new int[maxID];\r\n clusters = new HashSet[maxID];\r\n for (int i = 0; i < clusters.length; i++) {\r\n ptrs[i] = i;\r\n HashSet<Annotation> cluster = new HashSet<Annotation>();\r\n cluster.add(basenpArray[i]);\r\n clusters[i] = cluster;\r\n }\r\n Annotation zero = new Annotation(-1, -1, -1, \"zero\");\r\n\r\n for (int i = 1; i < basenpArray.length; i++) {\r\n Annotation np2 = basenpArray[i];\r\n if (FeatureUtils.isPronoun(np2, doc)) {\r\n Annotation ant = ruleResolvePronoun(basenpArray, i, doc);\r\n if (ant != null) {\r\n np2.setProperty(Property.PRO_ANTES, ant);\r\n }\r\n else {\r\n np2.setProperty(Property.PRO_ANTES, zero);\r\n }\r\n }\r\n }\r\n}", "public static void main(String[] args){\n\n ArrayList<String> test = new ArrayList<>();\n test.add(\"T\");\n test.add(\"L\");\n\n ArrayList<String> test2 = new ArrayList<>();\n test2.add(\"P\");\n\n PFD pfd1 = new PFD(test,test2,1);\n\n ArrayList<String> test3 = new ArrayList<>();\n test3.add(\"T\");\n test3.add(\"L\");\n\n ArrayList<String> test4 = new ArrayList<>();\n test4.add(\"M\");\n\n PFD pfd2 = new PFD(test3,test4,1);\n\n ArrayList<String> test5 = new ArrayList<>();\n test5.add(\"P\");\n ArrayList<String> test6 = new ArrayList<>();\n test6.add(\"M\");\n\n ArrayList<String> test7 = new ArrayList<>();\n test7.add(\"T\");\n ArrayList<String> test8 = new ArrayList<>();\n test8.add(\"S\");\n\n PFD pfd3 = new PFD(test5,test6,3);\n PFD pfd4 = new PFD(test7,test8,3);\n ArrayList<PFD> test2List = new ArrayList<PFD>(Arrays.asList(pfd1, pfd2));\n ArrayList<String> r = new ArrayList<String>(Arrays.asList(\"M\", \"S\", \"T\", \"P\"));\n// System.out.println(test2List);\n// System.out.println(\"Closure: \" + getClosureForAttr(new ArrayList<String>(Arrays.asList(\"T\",\"M\")),test2List,1));\n// System.out.println(\"BDNF? \"+ isSatisfiedBDFN(test2List,3));\n// System.out.println(getCanCover1(test2List));\n// S = DecomposeWithTheCertainty(r,test2List,4);\n// System.out.println(turnDeOutputToString());\n// System.out.println(getAllComb(r, new ArrayList<ArrayList<String>>()));\n\n// System.out.println(getMinimalKeys(test2List,r,4));\n\n// System.out.println(\"B-prime: \"+getBetaPrimeList(test2List,r,2));\n// System.out.println(\"Satisfied 3NF? \"+isSatisfied3NF(test2List,r,3));\n// System.out.println(\"Is not subset:\"+isNotSubset(pfd4,test2List));\n ArrayList<String> t = new ArrayList<>();\n t.add(\"A\");\n t.add(\"B\");\n t.add(\"C\");\n ArrayList<String> t1 = new ArrayList<>();\n t1.add(\"B\");\n t1.add(\"A\");\n// t1.add(\"D\");\n t.retainAll(t1);\n// System.out.println(t.toString());\n// System.out.println(String.join(\"\",t1));\n//\n// System.out.println(getAllCombo(r).toString());\n double x = 2 / 3.0;\n System.out.println(x);\n\n}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\n\t\t\n\t ICCChamp2017();\n\t System.out.println(\"England\");\n\t FinalIndVsPAk();\n\t System.out.println(\"Finals India Lifted ICC 2017\");\n\t \n\t\tFirstUmpieRevire();\n\t\tSystem.out.println(\"Simon Taufel First Umpier Reviews the Score Board\");\n\t SecondUmpireReview();\n\t System.out.println(\"Billy Bowden Second Umpier Reviews the Score Board\");\n\t ThridUmpireReview();\n\t System.out.println(\"David Shepard Thrid Umpier Reviews the Score Board\");\n\t \n\t \n\t Firstcommentary();\n\t System.out.println(\"Ravi is the commentary\");\n\t Secondcommentary();\n\t System.out.println(\"Gavaskar is the commentary\");\n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\tint Dhoni, Rahul, Sachin,Kholi;\n\t System.out.println(\"Enter four Batsman Score Display the Mini Score Of the Batsman \");\n\t in = new Scanner(System.in);\n\t \n\t \n\t \n\t \n\t Dhoni = in.nextInt();\n\t Kholi = in.nextInt();\n\t Rahul = in.nextInt();\n\t Sachin = in.nextInt();\n\t \n\t if ( Dhoni <= Kholi && Dhoni <= Rahul && Dhoni <= Sachin )\n\t System.out.println(\"Dhoni is the Mini Scored Btsmans.\");\n\t else\n\t \t if ( Kholi <= Dhoni && Kholi <= Rahul && Kholi <= Sachin )\n\t System.out.println(\"Kholi is the Min Scored Batsmans .\");\n\t else if ( Rahul <= Dhoni && Rahul <= Kholi && Rahul <= Sachin )\n\t System.out.println(\"Rahul is the Min Scored Batsmans.\");\n\t else if ( Sachin <= Dhoni && Sachin <= Kholi && Sachin <= Rahul ) \n\t \t System.out.println(\"Sachin is the Min Scored Batsmans.\"); \n\t else \n\t System.out.println(\"Every one Scored 0 Duck\");\n\t \n\t \n\t int Sami,Irfan, Jaffar,Imran;\n\t System.out.println(\"Enter four Blowers Who Taken Wickets Display the Mini Wickets Of the Match\");\n\t \n\t \n\t \n\t \n\t \n\t Sami = in.nextInt();\n\t Irfan = in.nextInt();\n\t Jaffar = in.nextInt();\n\t Imran = in.nextInt();\n\t \n\t if ( Sami <= Irfan && Sami <= Jaffar && Sami <= Imran )\n\t System.out.println(\"Sami is the Mini Scored Btsmans.\");\n\t else\n\t \t if ( Imran <= Irfan && Imran <= Jaffar && Imran <= Sami )\n\t System.out.println(\"Imran is the Min Scored Batsmans .\");\n\t else if ( Irfan <= Sami && Irfan <= Jaffar && Irfan <= Imran )\n\t System.out.println(\"Irfan is the Min Scored Batsmans.\");\n\t else if (Jaffar <= Irfan && Jaffar <= Jaffar &&Jaffar <= Imran ) \n\t \t System.out.println(\"Jaffar is the Min Scored Batsmans.\"); \n\t else \n\t System.out.println(\"No on Taken Wickets\");\n\t \n\t \n\t \n\t \n\t\t \n\t}", "public void discretize(double esize, boolean squareCaps, double interpPower) {\n\t\tint nbp = basePoints.length;\n\t\tTreePoint[] rnodes = new TreePoint[nbp];\n\n\t\tfor (int i = 0; i < nbp; i++) {\n\t\t\tTreePoint p = basePoints[i];\n\t\t\trnodes[i] = p.makeCopy();\n\t\t\tif (p.index < 0) {\n\t\t\t\tE.fatalError(\"lost index\");\n\t\t\t}\n\t\t\trnodes[i].setInStructure();\n\t\t\tif (rnodes[i].getSourceIndex() < 0) {\n\t\t\t\tE.error(\"lost source index....\");\n\t\t\t}\n\n\t\t\t/*\n\t\t\tif (rnodes[i].getSourceIndex() == 5) {\n\t\t\t\tE.info(\"processing index 5 \" + nbp);\n\t\t\t\tfor (int k = 0; k < nbp; k++) {\n\t\t\t\t\tE.info(\"others \" + basePoints[k].getSourceIndex() + \" \" + basePoints[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\n\t\t}\n\n\t\tif (basePoints[1].minor) {\n\t\t\tminor = true;\n\t\t\trnodes[0].setRadius(rnodes[1].getRadius());\n\t\t\tif (squareCaps) {\n\t\t\t\t// E.info(\"got minor point, but using square Caps \" + basePoints[1]);\n\n\t\t\t} else {\n\t\t\t //TODO - anything? E.info(\"adjusting minor point for round caps \" + basePoints[1]);\n\t\t\t\tdouble f = rnodes[0].getRadius() / (rnodes[0].distanceTo(rnodes[1]));\n\t\t\t\tif (f < 0.9) {\n\t\t\t\t\trnodes[0].shiftTowards(rnodes[1], f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t\tTreePoint sna = rnodes[0];\n\t\tsna.setCumulativeArea(0.);\n\t\tsna.setCumulativeLength(0.);\n\t\tsna.setCumulativeResistance(0.);\n\t\tsna.setCumulativeRecR32(0.);\n\n\n\t\tfor (int i = 1; i < nbp; i++) {\n\t\t\tTreePoint snb = rnodes[i];\n\t\t\tdouble dl = sna.distanceTo(snb);\n\t\t\tsnb.setCumulativeLength(sna.getCumulativeLength() + dl);\n\n\t\t\tdouble ra = sna.getRadius();\n\t\t\tdouble rb = snb.getRadius();\n\t\t\t// POSSERR this is not the area of a fustrum, its just the bit parallel to the axis\n\t\t\t// if dl is zero, there's still an area, though we don't want to include it in the \n\t\t\t// squareCaps case. In effect, this applies squareCaps and neglects the end area\n\t\t\t// when a thin section emerges from the end of a fat one.\n\t\t\tdouble darea = Math.PI * (rb + ra) * dl;\n\t\t\tsnb.setCumulativeArea(sna.getCumulativeArea() + darea);\n\n\t\t\tdouble dres = dl / (Math.PI * ra * rb);\n\t\t\tsnb.setCumulativeResistance(sna.getCumulativeResistance() + dres);\n\n\t\t\tdouble dsrt = powRIntegral(ra, rb, dl, interpPower);\n\n\t\t\tsnb.setCumulativeRecR32(sna.getCumulativeRecR32() + dsrt);\n\t\t\tsna = snb;\n\t\t}\n\n\n\t\tTreePoint snend = rnodes[nbp - 1];\n\t\tdouble tlb = snend.getCumulativeRecR32();\n\n\n\t\t//E.info(\"segment length is \" + snend.getCumulativeLength() + \" rec r32 \" + tlb + \" \" +\n\t\t//\t\tsna.getRadius() + \" \" + snend.getRadius());\n\t\tdouble esizeeff = esize / Math.pow(2., interpPower);\n\t\t// TODO this is so esize 1 with diameter 1 gives expected no of cpts - check....\n\n\t\tint ninner = (int)(tlb / esizeeff);\n\t\tdouble dlf = tlb / (ninner + 1);\n\n\t\tint nwn = ninner + 2;\n\t\tTreePoint[] wknodes = new TreePoint[nwn];\n\n\n\t\tint ipr = 0;\n\t\tfor (int i = 0; i < nwn; i++) {\n\t\t\tdouble fcrr32 = i * dlf;\n\n\t\t\tArrayList<TreePoint> preNodes = new ArrayList<TreePoint>();\n\t\t\twhile (ipr < nbp-2 && fcrr32 > rnodes[ipr+1].getCumulativeRecR32()) {\n\t\t\t\tipr += 1;\n\t\t\t\tpreNodes.add(rnodes[ipr]);\n\n\t\t\t}\n\t\t\tTreePoint sa = rnodes[ipr];\n\t\t\tif (ipr + 1 >= rnodes.length) {\n\t\t\t\tE.error(\"interpolate miscount? \" + fcrr32 + \" \" + rnodes[rnodes.length-1].getCumulativeRecR32());\n\t\t\t}\n\n\t\t\tTreePoint sb = rnodes[ipr+1];\n\n\t\t\tTreePoint newn = interpolateNode(sa, sb, fcrr32, interpPower);\n\n\n\t\t\twknodes[i] = newn;\n\t\t\tnewn.setDiscPre(preNodes);\n\n\t\t\tfor (TreePoint sn : preNodes) {\n\t\t\t\tString sid = sn.getID();\n\t\t\t\tif (sid != null) {\n\t\t\t\t\treapplyLabel(sn, sid, wknodes[i-1], newn);\n\t\t\t\t}\n\t\t\t\tif (sn.hasLabels()) {\n\t\t\t\t\tfor (String s : sn.getLabels()) {\n\t\t\t\t\t\treapplyLabel(sn, s, wknodes[i-1], newn);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (minor) {\n\t\t\twknodes[1].setMinor();\n\t\t}\n\n\t\tfor (int i = 1; i < nwn; i++) {\n\t\t\twknodes[i].localizeParentConnection(wknodes[i-1]);\n\t\t}\n\n\t\tTreePoint oldlast = rnodes[nbp-1];\n\t\tTreePoint newlast = wknodes[nwn-1];\n\n\t\tdouble dlast = oldlast.distanceTo(newlast);\n\t\tif (Math.abs(dlast) > 1.e-6) {\n\t\t\tE.error(\"interpolation mess up...\" + dlast);\n\t\t}\n\t\t if (oldlast.getID() != null) {\n\t\t\t newlast.setID(oldlast.getID());\n\t\t }\n\t\t newlast.setInStructure();\n\n\t\t newlast.index = oldlast.index;\n\t\t newlast.pathLength = oldlast.pathLength;\n\n\t\tbaseSegment.setNewPoints(wknodes);\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // int m = sc.nextInt();\n int n = sc.nextInt();\n Tree[] tree = new Tree[n];\n for (int i = 0; i < n; i++) {\n tree[i] = new Tree(i + 1, sc.nextInt());\n }\n // System.out.println(Arrays.toString(tree));\n\n // Arrays.sort(tree,(a,b)->b.num-a.num);\n StringBuilder sb = new StringBuilder();\n int first = 0;\n\n boolean shibai = false;\n\n while (first < n) {\n while (first < n && tree[first].num == 0) {\n first++;\n }\n int idx = first + 1;\n out:\n while (idx < n) {\n while (idx < n && tree[idx].num == 0) {\n idx++;\n\n }\n while (idx < n && first < n && tree[idx].num > 0 && tree[first].num > 0) {\n\n sb.append(tree[first].type)\n .append(\" \")\n .append(tree[idx].type)\n .append(\" \");\n tree[idx].num--;\n tree[first].num--;\n if (tree[first].num == 0) {\n first++;\n break out;\n }\n }\n }\n// System.out.println(Arrays.toString(tree));\n// System.out.println(idx);\n if (idx > n - 1) {\n if (tree[first].num == 0) break;\n if (tree[first].num == 1) {\n sb.append(tree[first].type);\n break;\n } else {\n System.out.println(\"-\");\n shibai = true;\n break;\n }\n }\n }\n\n// while (true){\n// if(tree[0].num==1){\n// sb.append(tree[0].type);\n// break;\n// }\n// if(tree[1].num==0){\n// System.out.println(\"-\");\n// shibai=true;\n// break;\n// }\n// while (tree[1].num>0){\n// sb.append(tree[0].type).append(\" \").append(tree[1].type).append(\" \");\n// tree[0].num--;\n// tree[1].num--;\n// }\n// //System.out.println(sb.toString());\n// // System.out.println(Arrays.toString(tree));\n// // Arrays.sort(tree,(a,b)->b.num-a.num);\n//\n// }\n if (!shibai) {\n System.out.println(sb.toString());\n }\n\n\n }", "ANDDecomposition createANDDecomposition();", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "@Test\n public void test13() throws Throwable {\n Complex complex0 = new Complex(2444.619, 1026.8487);\n Complex complex1 = complex0.acos();\n Complex complex2 = complex0.cos();\n Complex complex3 = complex2.log();\n Complex complex4 = complex0.atan();\n double double0 = complex3.abs();\n Complex complex5 = complex2.multiply(2444.619);\n double double1 = complex3.abs();\n Complex complex6 = new Complex(2444.619, Double.POSITIVE_INFINITY);\n Complex complex7 = complex3.divide(complex0);\n List<Complex> list0 = complex3.nthRoot(1155);\n String string0 = complex3.toString();\n ComplexField complexField0 = complex0.getField();\n double double2 = complex0.abs();\n Complex complex8 = complex0.multiply(complex2);\n Complex complex9 = complex6.sin();\n Complex complex10 = complex2.sin();\n Complex complex11 = complex6.sinh();\n Complex complex12 = complex2.sinh();\n Complex complex13 = complex2.atan();\n Complex complex14 = complex12.acos();\n Complex complex15 = complex14.divide(complex0);\n }", "@Override\n\tprotected void initPredicate() {\n\t\t\n\t\tString pred1 = \"pred list(root) == root::DoubleLinkedList<modCount,header,size> * header::Entry<ele,header,header> & size=0 || \" +\n\t\t\"root::DoubleLinkedList<modCount,header,size> * header::Entry<eleH,first,last> * first::Entry<ele1,header,header> & first=last & size=1 || \" +\n\t\t\"root::DoubleLinkedList<modCount,header,size> * header::Entry<eleH,first,last> * first::Entry<ele1,nextF,prevF> * last::Entry<ele2,nextL,prevL> * lseg(nextF,first,last,prevL,size1) & prevF=header & nextL=header & size=2+size1\";\n\t\t\n\t\tString pred2 = \"pred lseg(next,first,last,prev,size) == next=last & prev=first & size=0 || \" +\n\t\t\t\t\"next::Entry<item,next1,prev1> * lseg(next1,next,last,prev,size1) & prev1=first & size=size1+1\";\n\t\t\n\t\t\n//\t\tString pred0 = \"pred list(root) == root::DoubleLinkedList<modCount,header,size> * dll(header,size)\";\n//\t\tString pred1 = \"pred dll(header,size) == header::Entry<ele,header,header> & size=0 || header::Entry<ele,next,prev> * nndll(next,header,header,prev,size)\";\n//\t\tString pred2 = \"pred nndll(curr,prev,header,prevH,size) == curr::Entry<ele,header,prev> & prevH=curr & size=1 || curr::Entry<ele,next,prev> * nndll(next,curr,header,prevH,size1) & size=size1+1\";\n\t\t\t\t\n\t\tString pred = pred1 + \";\" + pred2;\n\t\tInitializer.initPredicate(pred);\n\t}", "private static void printSwitchCase(Node oroot, int i,String s, ArrayList<Token> list, String p) {\n\t\tString taps =\"\";\n\t\tfor(int k = 0; k<i+2; k++){\t// get how many taps at front of each line.\n\t\t\ttaps +=\"\\t\";\n\t\t}\n\t\tif(oroot.children.size() == 0){\t\t// if node does not have sub node, this means it is most inner case,return\n\t\t\tSystem.out.println(taps+\"switch(s[index + \"+ i +\"]){\");\n\t\t\tSystem.out.println(taps+\"default:return new Token(\"+\"Token.Tag.\"+getTag(s,list)+\", \\\"\"+s+\"\\\",0);\");\n\t\t\tSystem.out.println(taps+\"}\");\n\t\t\treturn;\n\t\t}\n\t\tString temp =\"\"; // remember each level's char\n\t\tString prob =p;\t// get possible match. for example, when reading <<, but the prob will still be <.\n\t\tif(oroot.children.size()!= 0){\n\t\t\tSystem.out.println(taps+\"switch(s[index + \"+ i +\"]){\");\n\t\t\tfor(int j = 0;j<oroot.children.size(); j++){\n\t\t\t\ttemp = s;\n\t\t\t\tprob = bestMatch(s,list); // find the best match possible\n\t\t\t\ts += oroot.children.get(j).current;\t\n\t\t\t\tif(prob.length() == 0){\n\t\t\t\t\tprob = p;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(taps+\"case '\"+oroot.children.get(j).current+\"':\");\n\t\t\t\tint m = j;\n\t\t\t\tint n = i;\n\t\t\t\ti++; // get deep into level\n\t\t\t\tprintSwitchCase(oroot.children.get(j), i,s, list,prob);\n\t\t\t\t\n\t\t\t\ts = temp;\t// make sure it string s be previous level s\n\t\t\t\tj = m;\n\t\t\t\ti = n;\n\t\t\t}\n\t\t\tif(i!=0){// if it is not first level\n\t\t\t\tif(prob.equals(\"\")){\t// if possible match is empty string, means null, no possible match.\n\t\t\t\t\tSystem.out.println(taps+\"default:return null;\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(taps+\"default:return new Token(\"+\"Token.Tag.\"+getTag(prob,list)+\", \\\"\"+prob+\"\\\",0);\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(taps+\"}\");\n\t\t\t}\n\t\t}\t\n\t}", "@Override\n protected void doAlgorithmA1() {\n int xP = 0;\n int yP = 0;\n\n\n //Taking the variable out of the list that are in the bounds\n //Testing that the bound has variables\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n xP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX().getPosition();\n }\n int xU = 0;\n int xL = 0;\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n yP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY().getPosition();\n }\n int yU = 0;\n int yL = 0;\n int cright = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCright();\n int cleft = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCleft();\n\n\n\n for (Variable variable : csp.getVars()) {\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n if (variable.getPosition() == xP) {\n xU = variable.getUpperDomainBound();\n xL = variable.getLowerDomainBound();\n }\n }\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n if (variable.getPosition() == yP) {\n yU = variable.getUpperDomainBound();\n yL = variable.getLowerDomainBound();\n }\n }\n }\n\n boolean first = false;\n boolean second = false;\n\n //Testing if the bound is true, false or inconclusive\n\n if (xL + cleft >= yU + cright) {\n first = true;\n }\n if (xU + cleft < yL + cright) {\n second = true;\n }\n\n //are first and second not equal is the bound not inconclusive\n if (first != second) {\n if (first) { //a true Simple Bound was found\n //checks if it was the last constraint in a csp\n //If so the csp is true\n //else check the next constraint and do this method again\n if (csp.getSimpleConstraints().size() - 1 == cIndex) {\n System.out.println(\"P is satisfiable\");\n System.out.println(System.nanoTime()-startTime);\n return;\n } else {\n bIndex = 0;\n cIndex++;\n unit=false;\n doAlgorithmA1();\n }\n } else if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) { //a false Simple Bound was found\n //\n bIndex = 0;\n cIndex = 0;\n if (isInconclusive) {\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n doAlgorithmA2();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n } else {//an inconclusive Simple Bound was found\n //checks if the bound wasn't already inconclusive\n if(!isInconclusive){\n unit=true;\n unitSB = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex);\n }else {\n unit=false;\n }\n isInconclusive = true;\n\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) {\n cIndex = 0;\n bIndex = 0;\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.1 ===============\\n\");\n\t\t/*\n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\t*/\n\t\t// Pattern1 Start\n\t\tint size = 7;\n\t\n\t\tfor (int j=0;j<size;j++) {\n\t\t\tfor (int i=0;i<size;i++) {\n\t\t\t\tif((i+j)%2==0) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"O \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"X \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\t\n\t\t// Pattern1 End\n\t\tSystem.out.println(\"\\n============== Prog.2 ===============\\n\");\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// Pattern 2 Start\n\t\tint maxNum;\n\t\tint arr[] = {8,2,4,1,13,7,5,3};\n\t\tSystem.out.print(\"Length of array: \"+arr.length+\"\\nValues in Array:\");\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t\n\t\tfor (int i=0;i<arr.length-1;i++) {\n\t\t\tif (arr[i]>arr[i+1]) {\n\t\t\t\tint tmp=arr[i+1]; // small value in tmp\n\t\t\t\tarr[i+1]=arr[i]; // large value\n\t\t\t\tarr[i]=tmp;\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tmaxNum=Array.getInt(arr, arr.length-1);\n\t\tSystem.out.print(\"\\nMax number in array: \"+maxNum+\"\\n\\n\");\n\t\t\n\t\t\n\t\tfor (int j=0;j<maxNum;j++) {\n\t\t\tfor (int i=0;i<arr.length;i++) {\n\t\t\t\tif (j>=arr[i]) {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"* \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t\t// Pattern 2 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.3 ===============\\n\");\n\t\t\n\t\t// Pattern 3 Start\n\t\t\n\t\t// Find missing value without using sorting\n\t\tint arr2[] = {4,5,10,2,9,3,1,11,6,8};\n\t\tint total=0;\n\t\tfor (int i=0;i<arr2.length;i++) {\n\t\t\ttotal=total+arr2[i];\n\t\t}\n\t\tSystem.out.print(\"Array size: \"+arr2.length+\" & Array sum is: \"+total);\n\t\t\n\t\t// Pattern 3 End\n\t\tSystem.out.println(\"\\n============== Prog.4 ===============\\n\");\n\t\t// Pattern 4 Start\n\t\t/*\n\t\t *\n\t\t **\n\t\t ***\n\t\t ****\n\t\t ******\n\t\t * */\n\t\tint range=5;\n\t\tfor (int i=0;i<range;i++) {\n\t\t\tfor (int j=0;j<=i;j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 4 End\n\t\tSystem.out.println(\"\\n============== Prog.5 ===============\\n\");\n\t\t// Pattern 5 Start\n\t\t/*\n\t\t *\n\t\t * *\n\t\t * * *\n\t\t * * * *\n\t\t * * * * *\n\t\t * */\n\t\tint prog5Length=5;\n\t\tfor (int i=1;i<=prog5Length;i++) {\n\t\t\tfor (int j=4;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" *\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 5 End\n\t\tSystem.out.println(\"\\n============== Prog.6 ===============\\n\");\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// Pattern 6 Start\n\t\tint prog6Size=15;\n\t\tfor(int i=1;i<=prog6Size/2;i++) {\n\t\t\tfor(int j=(prog6Size/2)-1;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=1;k<=i;k++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\tfor(int i=1;i<=(prog6Size/2)-1;i++) {\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=(prog6Size/2)-1;k>=i;k--) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\t// Pattern 6 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.7 ===============\\n\");\n\t\t/*\n\t\t * Print integer line using 2D array, Ex.\n\t\t * 1\n\t\t * 2\n\t\t * 3\n\t\t * 4\n\t\t * 5\n\t\t * */\n\t\t// Pattern 7 Start\n\t\tint row=5,col=1;\n\t\tint[][] my2DArray=new int[row][col];\n\t\tmy2DArray[0][0]=1;\n\t\tmy2DArray[1][0]=2;\n\t\tmy2DArray[2][0]=3;\n\t\tmy2DArray[3][0]=4;\n\t\tmy2DArray[4][0]=5;\n\t\tfor(int i=0;i<row;i++) {\n\t\t\tSystem.out.println(my2DArray[i][0]);\n\t\t}\n\t\t// Pattern 7 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.8 ===============\\n\");\n\t\t/*\n\t\t *\n *\n *\n *\n *\n\t\t* */\n\t\t// Pattern 8 Start\n\t\tint prog8Size=5;\n\t\tfor (int m=1;m<=prog8Size;m++) {\n\t\t\tfor (int i=prog8Size-1;i>m-1;i--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}System.out.print(\" *\\n\");\n\t\t}\n\t\t// Pattern 8 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.9 ===============\\n\");\n\t\t// Pattern 9 Start\n\t\t\n\t\t// Pattern 9 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.10 ===============\\n\");\n\t\t// Pattern 10 Start\n\t\t\n\t\t// Pattern 10 End\n\t\t\n\t}", "protected void virtual_n_squared() {\n\t\tint ns_i, ns_j, di, edge;\n\t\tint[] num_inters = new int[2];\n\t\t// NOTE: These were long-double, which is not accessible in java.\n\t\t// These may not have been doing anything on a given platform anyway.\n\t\tdouble eonn,ijsepsqrd, ije6, ije12, newe6, newe12;\n\t\tdouble denn, nnprb, ijlatsepsqrd, dl[] = new double[3], dp[] = new double[3], gstot;\n\t\tdouble truncEtot, fullEtot, dennOLD;\n\t\t// ANJ End of long-doubles.\n\t\tdouble max_circ_trunc2;\n\t\tdouble ijunscaledsepsqrd, unscaled_boxsqrd = 0.0;\n\t\t\n\t\t// Using a spherical truncation as big as the cell:\n\t\t// It implements a _fixed_length_ cut-off, and so the unscaled cell is used later:\n\t\tmax_circ_trunc2 = Math.pow((double)lsize[0][2]*0.5*(Math.sqrt(2.0/3.0)),2.0);\n\t\t\n\t\t// count the number of interactions included:\n\t\tnum_inters[0] = 0;\n\t\tnum_inters[1] = 0;\n\t\t\n\t\tnewe6 = 0.0; newe12 = 0.0; gstot = 0.0;\n\t\ttruncEtot = 0.0; fullEtot = 0.0;\n\t\tfor( ns_i = 0; ns_i < n; ns_i++ ) {\n\t\t\tfor( ns_j = ns_i; ns_j < n; ns_j++ ) {\n\t\t\t\tif( ns_i != ns_j) {\n\t\t\t\t\t\n\t\t\t\t\t// Calc relative lattice position:\n\t\t\t\t\tdl[0] = latt[c_lat][ns_j].x - latt[c_lat][ns_i].x;\n\t\t\t\t\tdl[1] = latt[c_lat][ns_j].y - latt[c_lat][ns_i].y;\n\t\t\t\t\tdl[2] = latt[c_lat][ns_j].z - latt[c_lat][ns_i].z;\n\t\t\t\t\t\n\t\t\t\t\t// Calc relative particle position:\n\t\t\t\t\tdp[0]=(latt[c_lat][ns_j].x+disp[ns_j].x)-(latt[c_lat][ns_i].x+disp[ns_i].x);\n\t\t\t\t\tdp[1]=(latt[c_lat][ns_j].y+disp[ns_j].y)-(latt[c_lat][ns_i].y+disp[ns_i].y);\n\t\t\t\t\tdp[2]=(latt[c_lat][ns_j].z+disp[ns_j].z)-(latt[c_lat][ns_i].z+disp[ns_i].z);\n\t\t\t\t\t\n\t\t\t\t\t// Shift particle to nearest image of the LATTICE SITE!\n\t\t\t\t\t// ...while also building up the square of the latt and particle displmt.\n\t\t\t\t\tijsepsqrd = 0.0; ijlatsepsqrd = 0.0;\n\t\t\t\t\tijunscaledsepsqrd = 0.0;\n\t\t\t\t\tedge = 0;\n\t\t\t\t\tfor( di = 0; di < 3; di++ ) {\n\t\t\t\t\t\tif( dl[di] < -0.5-NN_INC_TOL ) {\n\t\t\t\t\t\t\tdl[di] += 1.0;\n\t\t\t\t\t\t\tdp[di] += 1.0;\n\t\t\t\t\t\t} else if( dl[di] > 0.5-NN_INC_TOL ) {\n\t\t\t\t\t\t\tdl[di] -= 1.0;\n\t\t\t\t\t\t\tdp[di] -= 1.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tijsepsqrd += dp[di]*dp[di]*box2[c_lat][di];\n\t\t\t\t\t\tijlatsepsqrd += dl[di]*dl[di]*box2[c_lat][di];\n\t\t\t\t\t\tif( di == 0 ) unscaled_boxsqrd = init_boxes[c_lat].x*init_boxes[c_lat].x;\n\t\t\t\t\t\tif( di == 1 ) unscaled_boxsqrd = init_boxes[c_lat].y*init_boxes[c_lat].y;\n\t\t\t\t\t\tif( di == 2 ) unscaled_boxsqrd = init_boxes[c_lat].z*init_boxes[c_lat].z;\n\t\t\t\t\t\tijunscaledsepsqrd += dl[di]*dl[di]*unscaled_boxsqrd;\n\t\t\t\t\t\tif( Math.abs(Math.abs(dl[di])-0.5) < NN_INC_TOL ) {\n\t\t\t\t\t\t\tedge = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( edge == 0 ) {\n\t\t\t\t\t\t// particle-particle interaction:\n\t\t\t\t\t\tije6 = ij_inter_pow(ijsepsqrd,3.0); ije12 = ij_inter_pow(ijsepsqrd,6.0);\n\t\t\t\t\t\tnewe6 += ije6; newe12 += ije12;\n\t\t\t\t\t\t//System.out.printf(\"ES %i %i %g %g %g %g\\n\",ns_i,ns_j,sqrt(ijsepsqrd),ije6,ije12,lj_eta*(ije12-ije6));\n\t\t\t\t\t\tif( ijunscaledsepsqrd < max_circ_trunc2 ) {\n\t\t\t\t\t\t\tfullEtot += lj_eta*(ije12 - ije6);\n\t\t\t\t\t\t\tnum_inters[0]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( ijunscaledsepsqrd < max_dr2 ) {\n\t\t\t\t\t\t\ttruncEtot += lj_eta*(ije12 - ije6);\n\t\t\t\t\t\t\tnum_inters[1]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// site-site interaction:\n\t\t\t\t\t\tijsepsqrd = ijlatsepsqrd;\n\t\t\t\t\t\tije6 = ij_inter_pow(ijsepsqrd,3.0); ije12 = ij_inter_pow(ijsepsqrd,6.0);\n\t\t\t\t\t\t//System.out.printf(\"GS %i %i %g %g %g %g\\n\",ns_i,ns_j,sqrt(ijsepsqrd),ije6,ije12,lj_eta*(ije12-ije6));\n\t\t\t\t\t\tnewe6 -= ije6; newe12 -= ije12;\n\t\t\t\t\t\tif( ijunscaledsepsqrd < max_circ_trunc2 ) fullEtot -= lj_eta*(ije12 - ije6);\n\t\t\t\t\t\tif( ijunscaledsepsqrd < max_dr2 ) truncEtot -= lj_eta*(ije12 - ije6);\n\t\t\t\t\t\t\n\t\t\t\t\t\tgstot += 4.0*(ije12-ije6);\n\t\t\t\t\t\t//System.out.printf(\"TOT %i,%i %e %e %e\\n\",ns_i,ns_j,newe6,newe12,newe12-newe6);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\teonn = lj_eta*(newe12 - newe6) + EN_SHIFT;\n//\t\tdennOLD = (eonn - calc_e_from_scratch(c_lat) );\n\t\tdennOLD = (eonn - truncEtot);\n\t\tdenn = fullEtot - truncEtot;\n\t\tnnprb = Math.exp(-denn);\n\t\tSystem.out.println(\" NN2 \"+dennOLD+\" \"+denn+\" \"+nnprb+\" \"+truncEtot+\" \"+fullEtot);\n\t\tif( !init_nncalc ) {\n\t\t\tSystem.out.println(\" NNTEST \"+Math.sqrt(max_circ_trunc2)+\" \"+ \n\t\t\t\t\t2.0*num_inters[0]/216.0+\" \"+ 2.0*num_inters[1]/216.0);\n\t\t\tinit_nncalc = true;\n\t\t}\n\t\treturn;\n\t}", "@Test\n\tpublic void upperLeft2SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 2);\n\t\td.set(1, 3);\n\t\td.set(2, 4);\n\t\td.set(13, 13);\n\t\td.set(15, 14);\n\t\td.set(16, 15);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(5);\n\t\tassertTrue(3==test_arr.get(0).getX() && 0==test_arr.get(0).getY()\n\t\t\t&& 2==test_arr.get(1).getX() && 0==test_arr.get(1).getY()\n\t\t\t&& 1==test_arr.get(2).getX() && 0==test_arr.get(2).getY());\n\t}", "public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb = new StringBuilder();\n StringTokenizer st;\n for (int i = 1; i <= 10; i++) {\n sb.append(\"#\").append(i).append(\" \");\n int N = Integer.parseInt(br.readLine());\n int[][] tree = new int[N+1][2];\n String[] cal = new String[N+1];\n \n for (int j = 1; j <= N; j++) {\n st = new StringTokenizer(br.readLine());\n int n = Integer.parseInt(st.nextToken());\n String tmp = st.nextToken();\n cal[j] = tmp;\n if(operator.indexOf(tmp)!=-1) {\n tree[j][0] = Integer.parseInt(st.nextToken());\n tree[j][1] = Integer.parseInt(st.nextToken());\n }\n }\n sb.append(calcTree(1,tree,cal)).append(\"\\n\");\n }\n System.out.println(sb);\n }", "public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}", "public String getDimensionPresupuesto()\r\n/* 217: */ {\r\n/* 218:256 */ OrganizacionConfiguracion aux = AppUtil.getOrganizacion().getOrganizacionConfiguracion();\r\n/* 219:257 */ String numeroDimension = \"\";\r\n/* 220:258 */ if ((!aux.getNombreDimension1().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension1()))\r\n/* 221: */ {\r\n/* 222:259 */ this.arregloMascara = aux.getMascaraDimension1().split(\"\\\\.\");\r\n/* 223:260 */ numeroDimension = \"1\";\r\n/* 224: */ }\r\n/* 225:261 */ else if ((!aux.getNombreDimension2().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension2()))\r\n/* 226: */ {\r\n/* 227:262 */ this.arregloMascara = aux.getMascaraDimension2().split(\"\\\\.\");\r\n/* 228:263 */ numeroDimension = \"2\";\r\n/* 229: */ }\r\n/* 230:264 */ else if ((!aux.getNombreDimension3().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension3()))\r\n/* 231: */ {\r\n/* 232:265 */ this.arregloMascara = aux.getMascaraDimension3().split(\"\\\\.\");\r\n/* 233:266 */ numeroDimension = \"3\";\r\n/* 234: */ }\r\n/* 235:267 */ else if ((!aux.getNombreDimension4().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension4()))\r\n/* 236: */ {\r\n/* 237:268 */ this.arregloMascara = aux.getMascaraDimension4().split(\"\\\\.\");\r\n/* 238:269 */ numeroDimension = \"4\";\r\n/* 239: */ }\r\n/* 240:270 */ else if ((!aux.getNombreDimension5().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension5()))\r\n/* 241: */ {\r\n/* 242:271 */ this.arregloMascara = aux.getMascaraDimension5().split(\"\\\\.\");\r\n/* 243:272 */ numeroDimension = \"5\";\r\n/* 244: */ }\r\n/* 245:274 */ return numeroDimension;\r\n/* 246: */ }", "public void minimize() {\n D = new boolean[states.length][states.length];\r\n S = new ArrayList<ArrayList<HashSet<Point>>>(); // lol\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int i = 0; i < states.length; i++) {\r\n ArrayList<HashSet<Point>> innerList = new ArrayList<HashSet<Point>>();\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int j = 0; j < states.length; j++) {\r\n Arrays.fill(D[i], false);\r\n innerList.add(new HashSet<Point>());\r\n }\r\n S.add(innerList);\r\n }\r\n\r\n // 2. states with different acceptances are distinguishable\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n if (acceptStates.contains(i) != acceptStates.contains(j)) {\r\n D[i][j] = true;\r\n }\r\n }\r\n }\r\n\r\n // 3. mark as possibly indistinguishable, enforce distinguishability\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n // only pairs that are as of yet indistinguishable\r\n if (D[i][j]) {\r\n continue;\r\n }\r\n\r\n DFAState qi = states[i];\r\n DFAState qj = states[j];\r\n\r\n // one of the things being compared is unreachable\r\n if (qi == null || qj == null) {\r\n continue;\r\n }\r\n\r\n // helps emulate \"for any\"\r\n boolean distinguished = false;\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n // if on the same letter, qm and qn move to distinguishable states\r\n if (D[m][n] || D[n][m]) {\r\n dist(i, j);\r\n distinguished = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!distinguished) {\r\n // qm and qn are indistinguishable\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n if (m < n && !(i == m && j == n)) {\r\n S.get(m).get(n).add(new Point(i, j));\r\n } else if (m > n && !(i == n && j == m)) {\r\n S.get(n).get(m).add(new Point(i, j));\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n mergeStates();\r\n }", "String tomar_decisiones(String decision);", "public String designPN(String nr)\r\n {\r\n String newStr=\"(\";\r\n if(nr.length()!=10){return null;}\r\n else\r\n {\r\n newStr=newStr+nr.substring(0,4)+\")-\";\r\n // System.out.println(\"phase 1 \"+ newStr);\r\n newStr=newStr+nr.substring(4,7)+\"-\";\r\n // System.out.println(\"phase 2 \"+ newStr);\r\n newStr=newStr+nr.substring(7,10);\r\n // System.out.println(\"phase 3 \"+ newStr);\r\n }\r\n return newStr;\r\n\r\n }", "public static void caso32(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response2\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}", "private int fourOfaKind() {\n\t\tif (hand[1].getValueIndex() == hand[2].getValueIndex() && hand[2].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\tif (hand[0].getValueIndex() == hand[1].getValueIndex()\n\t\t\t\t\t|| hand[4].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\t\tresult.setPrimaryValuePos(hand[3].getValueIndex());\n\t\t\t\t\n\t\t\t\tif( result.getPrimaryValuePos() == hand[4].getValueIndex()) {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[0].getValueIndex());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[4].getValueIndex());\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public void test1() {\n SAP sap = getSapFromFile(\".\\\\W6.WordNet\\\\WordNetTests\\\\TestData\\\\digraph1.txt\");\n assertEquals(\"\", 0, sap.length(3, 3));\n assertEquals(\"\", 3, sap.ancestor(3, 3));\n assertEquals(\"\", 1, sap.ancestor(11, 7));\n assertEquals(\"\", 5, sap.length(11, 7));\n \n Iterable<Integer> a1 = Arrays.asList(new Integer[]{2, 5});\n Iterable<Integer> a2 = Arrays.asList(new Integer[]{7, 7});\n assertEquals(\"\", 1, sap.ancestor(a1,a2));\n assertEquals(\"\", 3, sap.length(a1,a2));\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n BufferedReader sc = new BufferedReader(new FileReader(\"comehome.in\"));\n BufferedWriter out = new BufferedWriter(new FileWriter(\"comehome.out\"));\n int[][] adjMat = new int[58][58];\n ArrayList<Character> capsUsed = new ArrayList<Character>();\n int paths = Integer.parseInt(sc.readLine());\n for (int i = 0; i < adjMat.length; i++) {\n Arrays.fill(adjMat[i], 500000);\n }\n for (int i = 0; i < paths; i++) {\n String[] spl = sc.readLine().split(\" \");\n char u = spl[0].charAt(0);\n char v = spl[1].charAt(0);\n int weight = Integer.parseInt(spl[2]);\n adjMat[map(u)][map(v)] = Math.min(weight, adjMat[map(u)][map(v)]);//this is a multigraph, just take minimum edge weight\n adjMat[map(v)][map(u)] = Math.min(weight, adjMat[map(v)][map(u)]);//since its the only one that will count\n if (Character.isUpperCase(u)) {\n capsUsed.add(u);\n }\n if (Character.isUpperCase(v)) {\n capsUsed.add(v);\n }\n }\n for (int k = 0; k < adjMat.length; k++) {//intermediate...\n for (int i = 0; i < adjMat.length; i++) {\n for (int j = 0; j < adjMat.length; j++) {\n if (adjMat[i][k] + adjMat[k][j] < adjMat[i][j]) {\n adjMat[i][j] = adjMat[i][k] + adjMat[k][j];\n }\n }\n }\n }\n int min = Integer.MAX_VALUE;\n char minChar = '0';\n int zMap = map('Z');\n for (char c : capsUsed) {\n if (c != 'Z') {\n if (adjMat[map(c)][zMap] < min) {\n min = adjMat[map(c)][zMap];\n minChar = c;\n }\n }\n }\n //System.out.println(adjMat[map('R')][map('Z')]);\n out.append(minChar + \" \" + min + \"\\n\");\n out.close();\n }", "private Type establishIntersectionType() {\n\r\n\t\tdouble Pq0 = AngleUtil.getTurn(p0, p1, q0);\r\n\t\tdouble Pq1 = AngleUtil.getTurn(p0, p1, q1);\r\n\r\n\t\tdouble Qp0 = AngleUtil.getTurn(q0, q1, p0);\r\n\t\tdouble Qp1 = AngleUtil.getTurn(q0, q1, p1);\r\n\r\n\t\t// check if all turn have none angle. In this case, lines are collinear.\r\n\t\tif (Pq0 == AngleUtil.NONE && Pq1 == AngleUtil.NONE || Qp0 == AngleUtil.NONE && Qp1 == AngleUtil.NONE) {\r\n\t\t\t// at this point, we know that lines are collinear.\r\n\t\t\t// we must check if they overlap for segments intersection\r\n\t\t\tif (q0.getDistance(p0) <= p0.getDistance(p1) && q0.getDistance(p1) <= p0.getDistance(p1)) {\r\n\t\t\t\t// then q0 is in P limits and p0 or p1 is in Q limits\r\n\t\t\t\t// TODO this check is no sufficient\r\n\t\t\t\tinPLimits = true;\r\n\t\t\t\tinQLimits = true;\r\n\t\t\t}\r\n\t\t\treturn Type.COLLINEAR;\r\n\t\t}\r\n\t\t// check if q0 and q1 lie around P AND p0 and p1 lie around Q.\r\n\t\t// in this case, the two segments intersect\r\n\t\telse if (Pq0 * Pq1 <= 0 && Qp0 * Qp1 <= 0) {\r\n\t\t\t// else if(Pq0 <= 0 && Pq1 >= 0 && Qp0 <= 0 && Qp1 >= 0 ||\r\n\t\t\t// Pq0 >= 0 && Pq1 <= 0 && Qp0 >= 0 && Qp1 <= 0){\r\n\r\n\t\t\tinPLimits = true;\r\n\t\t\tinQLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t}\r\n\r\n\t\t// At this point, we know that segments are not crossing\r\n\t\t// check if q0 and q1 lie around P or p0 and p1 lie around Q.\r\n\t\t// in this case, a segment cross a line\r\n\t\telse if (Pq0 * Pq1 <= 0) {\r\n\t\t\tinQLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t} else if (Qp0 * Qp1 <= 0) {\r\n\t\t\tinPLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t}\r\n\r\n\t\t// At this point, we know that each segment lie on one side of the other\r\n\t\t// We now check the slope to know if lines are Type.PARALLEL\r\n\t\tdouble pSlope = p0.getSlope(p1);\r\n\t\tdouble qSlope = q0.getSlope(q1);\r\n\t\tif (PrecisionUtil.areEquals(pSlope, qSlope))\r\n\t\t\t// TODO check the infinity case\r\n\t\t\t// this test works even if the slopes are \"Double.infinity\" due to the verticality of the lines and division\r\n\t\t\t// by 0\r\n\t\t\treturn Type.PARALLEL;\r\n\t\telse\r\n\t\t\treturn Type.INTERSECT;\r\n\t}" ]
[ "0.49149823", "0.48731843", "0.48441935", "0.4686829", "0.46772215", "0.4625434", "0.45637146", "0.45547312", "0.45530024", "0.4549208", "0.45422935", "0.44976908", "0.4497212", "0.44742295", "0.44552112", "0.44531345", "0.4448911", "0.44346926", "0.44177976", "0.44092068", "0.44053683", "0.43996117", "0.43927044", "0.43917686", "0.4351001", "0.4346086", "0.43457916", "0.43424773", "0.43353358", "0.43293035", "0.43292877", "0.4328214", "0.4324458", "0.4324446", "0.43042597", "0.43036795", "0.42932305", "0.42922783", "0.4288307", "0.42877686", "0.42836958", "0.42820197", "0.42805988", "0.42758393", "0.42713806", "0.42634702", "0.42618248", "0.42565072", "0.42515224", "0.42467833", "0.42384946", "0.42380762", "0.42380196", "0.4235959", "0.42318", "0.42314175", "0.42297608", "0.4229683", "0.42279866", "0.42133546", "0.42112753", "0.42109495", "0.4203113", "0.42028567", "0.42004612", "0.41970292", "0.41939318", "0.41920507", "0.41890654", "0.41864786", "0.41819337", "0.4179109", "0.41770348", "0.4175944", "0.41720057", "0.4170096", "0.41662762", "0.41645548", "0.41642934", "0.41620058", "0.4158366", "0.4157705", "0.41548038", "0.41514063", "0.41509128", "0.41506675", "0.41495612", "0.41484234", "0.41369343", "0.41355756", "0.41350216", "0.41321582", "0.41307893", "0.4130548", "0.41256708", "0.4124374", "0.41241974", "0.4123182", "0.4122417", "0.41205952" ]
0.62023705
0
needs original image chop as parameter which will be used for matrix and m exprs.
public StructExprRecog restruct() throws InterruptedException { if (Thread.currentThread().isInterrupted()) { throw new InterruptedException(); } if (mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) { return this; // basic element return this to save computing time and space } else if (mlistChildren.size() == 0) { StructExprRecog ser = new StructExprRecog(mbarrayBiValues); ser.setSERPlace(this); ser.setSimilarity(0); // type unknown, similarity is 0. return ser; } else if (mlistChildren.size() == 1 && mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) { // if a matrix, we cannot convert [x] -> x (e.g. 2 * [2 + 3] -> 2 * 2 + 3 is wrong). StructExprRecog ser = mlistChildren.getFirst().restruct(); return ser; } else if (mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT || mnExprRecogType == EXPRRECOGTYPE_HCUTCAP || mnExprRecogType == EXPRRECOGTYPE_HCUTCAPUNDER || mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER || mnExprRecogType == EXPRRECOGTYPE_HLINECUT || mnExprRecogType == EXPRRECOGTYPE_MULTIEXPRS || mnExprRecogType == EXPRRECOGTYPE_GETROOT || mnExprRecogType == EXPRRECOGTYPE_VCUTMATRIX) { // assume horizontal cut is always clear before call restruct, i.e. hblank, hcap, hunder, hcapunder are not confused. // there is a special case for HBlankCut, Under and cap cut (handwriting divide may miss recognized). StructExprRecog[] serarrayNoLnDe = new StructExprRecog[3]; boolean bIsDivide = isActuallyHLnDivSER(this, serarrayNoLnDe); //need to do it here as well as in vertical restruct StructExprRecog serReturn = new StructExprRecog(mbarrayBiValues); LinkedList<StructExprRecog> listCuts = new LinkedList<StructExprRecog>(); if (bIsDivide) { listCuts.add(serarrayNoLnDe[0].restruct()); listCuts.add(serarrayNoLnDe[1].restruct()); listCuts.add(serarrayNoLnDe[2].restruct()); } else { for (StructExprRecog ser : mlistChildren) { listCuts.add(ser.restruct()); } } if (listCuts.getFirst().getExprRecogType() == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE && listCuts.getFirst().isPossibleVLnChar() && listCuts.getLast().getExprRecogType() == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE && listCuts.getLast().isPossibleVLnChar() && (bIsDivide || mnExprRecogType == EXPRRECOGTYPE_HLINECUT) // is actually H-line cut. && mnWidth >= ConstantsMgr.msdPlusHeightWidthRatio * mnHeight && mnWidth <= mnHeight / ConstantsMgr.msdPlusHeightWidthRatio && listCuts.getFirst().mnHeight >= ConstantsMgr.msdPlusTopVLnBtmVLnRatio * listCuts.getLast().mnHeight && listCuts.getFirst().mnHeight <= listCuts.getLast().mnHeight / ConstantsMgr.msdPlusTopVLnBtmVLnRatio && listCuts.getFirst().mnLeft < listCuts.getLast().getRight() && listCuts.getFirst().getRight() > listCuts.getLast().mnLeft && listCuts.getFirst().getBottomPlus1() >= listCuts.get(1).mnTop && listCuts.getLast().mnTop <= listCuts.get(1).getBottomPlus1()) { // the shape of this ser should match + // seems like a + instead of 1/1 double dSimilarity = (listCuts.getFirst().getArea() * listCuts.getFirst().mdSimilarity + listCuts.get(1).getArea() * listCuts.get(1).mdSimilarity + listCuts.getLast().getArea() * listCuts.getLast().mdSimilarity) / (listCuts.getFirst().getArea() + listCuts.get(1).getArea() + listCuts.getLast().getArea()); // total area should not be zero here. // now we merge the three parts into + LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); ImageChop imgChopTop = listCuts.getFirst().getImageChop(false); listParts.add(imgChopTop); ImageChop imgChopHLn = listCuts.get(1).getImageChop(false); listParts.add(imgChopHLn); ImageChop imgChopBottom = listCuts.getLast().getImageChop(false); listParts.add(imgChopBottom); ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container. serReturn.setStructExprRecog(UnitProtoType.Type.TYPE_ADD, UNKNOWN_FONT_TYPE, mnLeft, mnTop, mnWidth, mnHeight, imgChop4SER, dSimilarity); } else if (bIsDivide) { // is actually an h line cut, i.e. div. serReturn.setStructExprRecog(listCuts, EXPRRECOGTYPE_HLINECUT); } else { serReturn.setStructExprRecog(listCuts, mnExprRecogType); serReturn = serReturn.identifyHSeperatedChar(); // special treatment for like =, i, ... if (serReturn.mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) { serReturn = serReturn.identifyStrokeBrokenChar(); // convert like 7 underline to 2. } } return serReturn; } else { // listcut, vblankcut, vcutlefttop, vcutlower, vcutupper, vcutlowerupper // the children are vertically cut. if cut mode is LISTCUT, also treated as vertically cut. // make the following assumptions for horizontally cut children // 1. the h-cut modes have been clear (i.e. normal horizontally cut, cap, undercore etc) // 2. the getroot, vcutmatrix and multiexprs have been clear. // 3. the v-cut modes are not clear // step 1. merge all the vertically cut children into main mlistChildren, and for all h-blank cut children, merge all of its h-blank cut // into itself. LinkedList<StructExprRecog> listMergeVCutChildren1 = new LinkedList<StructExprRecog>(); listMergeVCutChildren1.addAll(mlistChildren); LinkedList<StructExprRecog> listMergeVCutChildren = new LinkedList<StructExprRecog>(); boolean bHasVCutChild = true; while(bHasVCutChild) { bHasVCutChild = false; for (int idx = 0; idx < listMergeVCutChildren1.size(); idx ++) { if (/*listMergeVCutChildren1.get(idx).mnExprRecogType == EXPRRECOGTYPE_LISTCUT // treat list cut like vblankcut only when we print its value to string || */listMergeVCutChildren1.get(idx).isVCutNonMatrixType()) { for (int idx1 = 0; idx1 < listMergeVCutChildren1.get(idx).mlistChildren.size(); idx1 ++) { if (/*listMergeVCutChildren1.get(idx).mlistChildren.get(idx1).mnExprRecogType == EXPRRECOGTYPE_LISTCUT // treat list cut like vblankcut only when we print its value to string || */listMergeVCutChildren1.get(idx).mlistChildren.get(idx1).isVCutNonMatrixType()) { bHasVCutChild = true; } int idx2 = listMergeVCutChildren.size() - 1; StructExprRecog serToAdd = listMergeVCutChildren1.get(idx).mlistChildren.get(idx1); for (; idx2 >= 0; idx2 --) { double dListChildCentral = listMergeVCutChildren.get(idx2).mnLeft + listMergeVCutChildren.get(idx2).mnWidth / 2.0; double dToAddCentral = serToAdd.mnLeft + serToAdd.mnWidth / 2.0; if (dListChildCentral < dToAddCentral) { break; } } listMergeVCutChildren.add(idx2 + 1, serToAdd); } // do not consider hblankcut list size == 1 case because it is impossible. } else { int idx2 = listMergeVCutChildren.size() - 1; StructExprRecog serToAdd = listMergeVCutChildren1.get(idx); for (; idx2 >= 0; idx2 --) { double dListChildCentral = listMergeVCutChildren.get(idx2).mnLeft + listMergeVCutChildren.get(idx2).mnWidth / 2.0; double dToAddCentral = serToAdd.mnLeft + serToAdd.mnWidth / 2.0; if (dListChildCentral < dToAddCentral) { break; } } listMergeVCutChildren.add(idx2 + 1, serToAdd); } } if (bHasVCutChild) { listMergeVCutChildren1.clear(); listMergeVCutChildren1 = listMergeVCutChildren; listMergeVCutChildren = new LinkedList<StructExprRecog>(); } } for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) { StructExprRecog serChild = listMergeVCutChildren.get(idx); if (serChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { LinkedList<StructExprRecog> listHBlankCutChildren1 = new LinkedList<StructExprRecog>(); listHBlankCutChildren1.addAll(serChild.mlistChildren); LinkedList<StructExprRecog> listHBlankCutChildren = new LinkedList<StructExprRecog>(); boolean bHasHBlankCutChild = true; while(bHasHBlankCutChild) { bHasHBlankCutChild = false; for (int idx0 = 0; idx0 < listHBlankCutChildren1.size(); idx0 ++) { if (listHBlankCutChildren1.get(idx0).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { for (int idx1 = 0; idx1 < listHBlankCutChildren1.get(idx0).mlistChildren.size(); idx1 ++) { if (listHBlankCutChildren1.get(idx0).mlistChildren.get(idx1).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { bHasHBlankCutChild = true; } listHBlankCutChildren.add(listHBlankCutChildren1.get(idx0).mlistChildren.get(idx1)); } } else { listHBlankCutChildren.add(listHBlankCutChildren1.get(idx0)); } } if (bHasHBlankCutChild) { listHBlankCutChildren1.clear(); listHBlankCutChildren1 = listHBlankCutChildren; listHBlankCutChildren = new LinkedList<StructExprRecog>(); } } StructExprRecog serNewChild = new StructExprRecog(serChild.mbarrayBiValues); serNewChild.setStructExprRecog(listHBlankCutChildren, EXPRRECOGTYPE_HBLANKCUT); listMergeVCutChildren.set(idx, serNewChild); } } // step 2: identify upper notes or lower notes, This is raw upper lower identification procedure. h-cut // children are not analyzed. LinkedList<Integer> listCharLevel = new LinkedList<Integer>(); LinkedList<Integer> list1SideAnchorBaseIdx = new LinkedList<Integer>(); // first of all, find out the highest child which must be base int nBiggestChildHeight = 0; int nBiggestChildIdx = 0; int nHighestNonHDivChildHeight = -1; int nHighestNonHDivChildIdx = -1; for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) { if (listMergeVCutChildren.get(idx).mnHeight > nBiggestChildHeight) { nBiggestChildIdx = idx; nBiggestChildHeight = listMergeVCutChildren.get(idx).mnHeight; } if (isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx)) == false && listMergeVCutChildren.get(idx).mnHeight > nHighestNonHDivChildHeight) { // non-hdiv child could be cap or under. nHighestNonHDivChildIdx = idx; nHighestNonHDivChildHeight = listMergeVCutChildren.get(idx).mnHeight; } } boolean bHasNonHDivBaseChild = false; // ok, if we have a non h-div child, biggest child is the biggest non h-div child. Otherwise, use biggest child. if (nHighestNonHDivChildIdx >= 0) { nBiggestChildHeight = nHighestNonHDivChildHeight; nBiggestChildIdx = nHighestNonHDivChildIdx; bHasNonHDivBaseChild = true; } listCharLevel.add(0); list1SideAnchorBaseIdx.add(nBiggestChildIdx); // from highest child to right StructExprRecog serBiggestChild = listMergeVCutChildren.get(nBiggestChildIdx); BLUCharIdentifier bluCIBiggest = new BLUCharIdentifier(serBiggestChild); BLUCharIdentifier bluCI = bluCIBiggest.clone(); int nLastBaseHeight = listMergeVCutChildren.get(nBiggestChildIdx).mnHeight; for (int idx = nBiggestChildIdx + 1; idx < listMergeVCutChildren.size(); idx ++) { StructExprRecog ser = listMergeVCutChildren.get(idx); if (idx > nBiggestChildIdx + 1 // if idx == nBiggestChildIdx + 1, we have already used the bluCIBiggest. && ((bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getLast() == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1))) || (!bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getLast() == 0))) { StructExprRecog serBase = listMergeVCutChildren.get(idx - 1); bluCI.setBLUCharIdentifier(serBase); nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight; list1SideAnchorBaseIdx.add(idx - 1); } else { list1SideAnchorBaseIdx.add(list1SideAnchorBaseIdx.getLast()); } int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note // only from left to right we do the following work. if (thisCharLevel == 0 && listCharLevel.size() > 0 && ((listCharLevel.getLast() != 0 && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1 && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base / listMergeVCutChildren.get(idx - 1).mlistChildren.size() >= ser.mnHeight)) ) { // to see if it could be upper lower note or lower upper note. if (listCharLevel.getLast() == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) { thisCharLevel = 1; } else if (listCharLevel.getLast() == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) { thisCharLevel = -1; } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type. // first of all, find out which h-blank-div child is closest to it. int nMinDistance = Integer.MAX_VALUE; int nMinDistanceIdx = 0; double dAvgChildHeight = 0; for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) { int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1() - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1()); if (nDistance <= nMinDistance) { // allow a little bit overhead nMinDistance = nDistance; nMinDistanceIdx = idx2; } dAvgChildHeight += listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnHeight; } dAvgChildHeight /= listMergeVCutChildren.get(idx - 1).mlistChildren.size(); if (dAvgChildHeight * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) { StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx); int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild); if (thisHCutChildCharLevel == 0) { // this char level is calculated from its closest last ser if it is base. BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild); thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser); } else { thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base. } } } } listCharLevel.add(thisCharLevel); } // from highest char to left bluCI = bluCIBiggest.clone(); for (int idx = nBiggestChildIdx - 1; idx >= 0; idx --) { StructExprRecog ser = listMergeVCutChildren.get(idx); if ((bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getFirst() == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx + 1))) || (!bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getFirst() == 0)) { StructExprRecog serBase = listMergeVCutChildren.get(idx + 1); bluCI.setBLUCharIdentifier(serBase); list1SideAnchorBaseIdx.addFirst(idx + 1); } else { list1SideAnchorBaseIdx.addFirst(list1SideAnchorBaseIdx.getFirst()); } int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note listCharLevel.addFirst(thisCharLevel); } // from left to highest char bluCI = bluCIBiggest.clone(); nLastBaseHeight = 0;// to avoid the first char misrecognized to note instead of base, // do not use listMergeVCutChildren.get(nBiggestChildIdx).mnHeight; // however, from right to left identification can still misrecognize it to note // so we need further check later on. for (int idx = 1; idx < nBiggestChildIdx; idx ++) { StructExprRecog ser = listMergeVCutChildren.get(idx); if ((bHasNonHDivBaseChild && listCharLevel.get(idx - 1) == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1))) || (!bHasNonHDivBaseChild && listCharLevel.get(idx - 1) == 0)) { // base char StructExprRecog serBase = listMergeVCutChildren.get(idx - 1); bluCI.setBLUCharIdentifier(serBase); nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight; } int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note // only from left to right we do the following work. if (thisCharLevel == 0 && idx > 0 && (listCharLevel.get(idx - 1) != 0 || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1)) && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) { // to see if it could be upper lower note or lower upper note. if (listCharLevel.get(idx - 1) == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) { thisCharLevel = 1; } else if (listCharLevel.get(idx - 1) == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) { thisCharLevel = -1; } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type. // first of all, find out which h-blank-div child is closest to it. int nMinDistance = Integer.MAX_VALUE; int nMinDistanceIdx = 0; for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) { int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1() - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1()); if (nDistance <= nMinDistance) { // allow a little bit overhead nMinDistance = nDistance; nMinDistanceIdx = idx2; } } StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx); int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild); if (thisHCutChildCharLevel == 0) { // this char level is calculated from its closest last ser if it is base. BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild); thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser); } else { thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base. } } } int nLastSideAnchorBaseType = listMergeVCutChildren.get(list1SideAnchorBaseIdx.get(idx)).mnExprRecogType; int nThisSideAnchorBaseType = bluCI.mserBase.mnExprRecogType; if (listCharLevel.get(idx) != thisCharLevel) { if ((nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAP || nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTUNDER || nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAPUNDER) && (nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAP && nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTUNDER && nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAPUNDER)) { // h-cut is always not accurate listCharLevel.set(idx, thisCharLevel); } else if ((nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAP || nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTUNDER || nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAPUNDER) && (nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAP && nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTUNDER && nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAPUNDER)) { // do not change. } else if (listCharLevel.get(idx) == 0) { // if from one side this char is not base char, then it is not base char listCharLevel.set(idx, thisCharLevel); } else if (thisCharLevel != 0) { // if one side is 1 while the other side is - 1, then use left side value listCharLevel.set(idx, thisCharLevel); } else if (listCharLevel.get(idx) != 0 && list1SideAnchorBaseIdx.get(idx) > idx + 1) { // if see from right this ser is a note and right anchor is not next to this ser, we use left side value. listCharLevel.set(idx, thisCharLevel); } } } // from right to highest char seems not necessary. boolean bNeedReidentifyFirst = false; // now the first child may be misrecognized to be -1 or 1, correct it and reidentify char level from 0 to the original first base if (listCharLevel.getFirst() == -1 && (listMergeVCutChildren.size() < 2 // only have one child, so it has to be base || listMergeVCutChildren.getFirst().mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE // could be base of base**something || ((listMergeVCutChildren.getFirst().isLetterChar() || listMergeVCutChildren.getFirst().isNumberChar()) && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTUNDER))) { // could be base of base ** something listCharLevel.set(0, 0); bNeedReidentifyFirst = true; } else if (listCharLevel.getFirst() == 1) { boolean bIsRoot = true, bIsTemperature = true; int idx = 1; for (; idx < listCharLevel.size(); idx ++) { if (listCharLevel.get(idx) != 1) { break; } } if (idx == listCharLevel.size() || listCharLevel.get(idx) != 0 || listMergeVCutChildren.get(idx).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_GETROOT) { bIsRoot = false; } if (listMergeVCutChildren.size() < 2 || listMergeVCutChildren.getFirst().mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE || (listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_SMALL_O && listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_BIG_O && listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_ZERO) || listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE || (listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_SMALL_C && listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_BIG_C && listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_BIG_F)) { bIsTemperature = false; } if (!bIsRoot && !bIsTemperature // if root or temperature, then it should be upper note && (listMergeVCutChildren.size() < 2 // only have one child, so it has to be base || (listMergeVCutChildren.getFirst().mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE && listMergeVCutChildren.getFirst().isLetterChar() && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAP && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER) // could be base_something )) { listCharLevel.set(0, 0); bNeedReidentifyFirst = true; } } if (bNeedReidentifyFirst) { int idx = 1; while (idx < listMergeVCutChildren.size()) { if ((listCharLevel.get(idx - 1) == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1))) || ((idx - 1) == 0)) { // base char can be anchor or first ser StructExprRecog serBase = listMergeVCutChildren.get(idx - 1); bluCI.setBLUCharIdentifier(serBase); nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight; } StructExprRecog ser = listMergeVCutChildren.get(idx); int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note // only from left to right we do the following work. if (thisCharLevel == 0 && idx > 0 && (listCharLevel.get(idx - 1) != 0 || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1)) && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) { // to see if it could be upper lower note or lower upper note. if (listCharLevel.get(idx - 1) == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) { thisCharLevel = 1; } else if (listCharLevel.get(idx - 1) == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) { thisCharLevel = -1; } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type. // first of all, find out which h-blank-div child is closest to it. int nMinDistance = Integer.MAX_VALUE; int nMinDistanceIdx = 0; for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) { int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1() - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1()); if (nDistance <= nMinDistance) { // allow a little bit overhead nMinDistance = nDistance; nMinDistanceIdx = idx2; } } StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx); int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild); if (thisHCutChildCharLevel == 0) { // this char level is calculated from its closest last ser if it is base. BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild); thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser); } else { thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base. } } } if (listCharLevel.get(idx) != thisCharLevel) { // do not consider the impact seen from the other side, even the other side is root or Fahranheit or celcius // this is because if the other side is root or Fahrenheit or celcius, if this level is -1, then it is -1 // anyway, if it is 0, because the left most should not be 1 seen from the other side, so doesn't matter // if it is 1, then Fahranheit and celcius and root can handle. listCharLevel.set(idx, thisCharLevel); } else if (thisCharLevel == 0) { break; // this char level is base and is the same as before adjusting, so no need to go futher. } idx ++; } // need not to go through from right to left again. } // step 3. idenitify the mode: matrix mode, multi-expr mode or normal mode LinkedList<StructExprRecog> listMergeMatrixMExprs = new LinkedList<StructExprRecog>(); LinkedList<Integer> listMergeMMLevel = new LinkedList<Integer>(); for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) { if (listCharLevel.get(idx) == 0) { //restruct hdivs first, change like hcap(cap, hblank) to hblank(hcap, ...). // otherwise, multi expressions can not be correctly identified. StructExprRecog serPreRestructedHCut = preRestructHDivSer4MatrixMExprs(listMergeVCutChildren.get(idx)); if (serPreRestructedHCut != listMergeVCutChildren.get(idx)) { listMergeVCutChildren.set(idx, serPreRestructedHCut); } } } lookForMatrixMExprs(listMergeVCutChildren, listCharLevel, listMergeMatrixMExprs, listMergeMMLevel); // step 4: identify upper notes or lower notes. LinkedList<StructExprRecog> listBaseULIdentified = new LinkedList<StructExprRecog>(); listCharLevel.clear(); int idx0 = 0; // step 1: find the first real base ser, real base means a base ser which would be better if it is not hblankcut for (; idx0 < listMergeMatrixMExprs.size(); idx0 ++) { if (listMergeMMLevel.get(idx0) == 0 && listMergeMatrixMExprs.get(idx0).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HBLANKCUT) { break; } } if (idx0 == listMergeMatrixMExprs.size()) { // no non-hblankcut base, so find hblankcut base instead. for (idx0 = 0; idx0 < listMergeMatrixMExprs.size(); idx0 ++) { if (listMergeMMLevel.get(idx0) == 0) { break; } } } // there should be a base, so we need not to worry about idx0 == listMergeMatrixMExprs.size() int nIdxFirstBaseChar = idx0; for (idx0 = 0; idx0 <= nIdxFirstBaseChar; idx0 ++) { listBaseULIdentified.add(listMergeMatrixMExprs.get(idx0)); listCharLevel.add(listMergeMMLevel.get(idx0)); } for (; idx0 < listMergeMatrixMExprs.size(); idx0 ++) { StructExprRecog ser = listMergeMatrixMExprs.get(idx0); if (idx0 > 0 && listCharLevel.getLast() == 0) { StructExprRecog serBase = listBaseULIdentified.getLast(); bluCI.setBLUCharIdentifier(serBase); } if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { ser = ser.identifyHSeperatedChar(); // find out if they are special char or not. have to do it here before child restruct coz if it is =, its position may change later. } if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { StructExprRecog[] serarrayNoLnDe = new StructExprRecog[3]; boolean bIsDivide = isActuallyHLnDivSER(ser, serarrayNoLnDe); //need to do it here as well as in h-cut restruct because h-cut restruct may for independent h-cut ser so never come here. if (bIsDivide) { LinkedList<StructExprRecog> listCuts = new LinkedList<StructExprRecog>(); listCuts.add(serarrayNoLnDe[0].restruct()); listCuts.add(serarrayNoLnDe[1].restruct()); listCuts.add(serarrayNoLnDe[2].restruct()); ser.setStructExprRecog(listCuts, EXPRRECOGTYPE_HLINECUT); } } if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { // special treatment for hblankcut LinkedList<StructExprRecog> listSerTopParts = new LinkedList<StructExprRecog>(); LinkedList<StructExprRecog> listSerBaseParts = new LinkedList<StructExprRecog>(); LinkedList<StructExprRecog> listSerBottomParts = new LinkedList<StructExprRecog>(); for (int idx1 = 0; idx1 < ser.mlistChildren.size(); idx1 ++) { StructExprRecog serChild = ser.mlistChildren.get(idx1); if (bluCI.isUpperNote(serChild)) { listSerTopParts.add(serChild); } else if (bluCI.isLowerNote(serChild)) { listSerBottomParts.add(serChild); } else { listSerBaseParts.add(serChild); } } // add the parts into base-upper-lower list following the order bottom->top->base. if (listSerBottomParts.size() > 0) { StructExprRecog serChildBottomPart = new StructExprRecog(ser.getBiArray()); if (listSerBottomParts.size() == 1) { serChildBottomPart = listSerBottomParts.getFirst(); } else { serChildBottomPart.setStructExprRecog(listSerBottomParts, EXPRRECOGTYPE_HBLANKCUT); } listBaseULIdentified.add(serChildBottomPart); listCharLevel.add(-1); } if (listSerTopParts.size() > 0) { StructExprRecog serChildTopPart = new StructExprRecog(ser.getBiArray()); if (listSerTopParts.size() == 1) { serChildTopPart = listSerTopParts.getFirst(); } else { serChildTopPart.setStructExprRecog(listSerTopParts, EXPRRECOGTYPE_HBLANKCUT); } listBaseULIdentified.add(serChildTopPart); listCharLevel.add(1); } if (listSerBaseParts.size() > 0) { StructExprRecog serChildBasePart = new StructExprRecog(ser.getBiArray()); if (listSerBaseParts.size() == 1) { serChildBasePart = listSerBaseParts.getFirst(); } else { serChildBasePart.setStructExprRecog(listSerBaseParts, EXPRRECOGTYPE_HBLANKCUT); } listBaseULIdentified.add(serChildBasePart); listCharLevel.add(0); } } else { listBaseULIdentified.add(ser); listCharLevel.add(listMergeMMLevel.get(idx0)); } } // step 4.1 special treatment for upper or lower note divided characters like j, i is different coz very unlikely i's dot will be looked like a independent upper note. for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) { if (listCharLevel.get(idx) != 0 || listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) { continue; // need to find base and the base has to be a single char. } StructExprRecog serBase = listBaseULIdentified.get(idx); if (idx < listBaseULIdentified.size() - 2 && listCharLevel.get(idx + 1) == -1 && listCharLevel.get(idx + 2) == 0 && serBase.isPossibleNumberChar() && listBaseULIdentified.get(idx + 2).isPossibleNumberChar()) { // left and right are both number char, middle is a lower note StructExprRecog serPossibleDot = listBaseULIdentified.get(idx + 1); StructExprRecog serNextBase = listBaseULIdentified.get(idx + 2); double dWOverHThresh = ConstantsMgr.msdExtendableCharWOverHThresh / ConstantsMgr.msdCharWOverHMaxSkewRatio; if (serPossibleDot.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotHeight * serPossibleDot.mnHeight && serNextBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotHeight * serPossibleDot.mnHeight && serBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotWidth * serPossibleDot.mnWidth && serNextBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotWidth * serPossibleDot.mnWidth && serPossibleDot.mnWidth < dWOverHThresh * serPossibleDot.mnHeight && serPossibleDot.mnHeight < dWOverHThresh * serPossibleDot.mnWidth) { // serPossibleDot is a dot serPossibleDot.mType = UnitProtoType.Type.TYPE_DOT; } } if (serBase.mType == UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET || serBase.mType == UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET || serBase.mType == UnitProtoType.Type.TYPE_BIG_J || serBase.mType == UnitProtoType.Type.TYPE_CLOSE_BRACE || serBase.mType == UnitProtoType.Type.TYPE_INTEGRATE || serBase.mType == UnitProtoType.Type.TYPE_SMALL_J_WITHOUT_DOT) { int idx1 = idx + 1; for (; idx1 < listBaseULIdentified.size(); idx1 ++) { if (listCharLevel.get(idx1) == 1) { break; // find the first upper note } } if (idx1 < listBaseULIdentified.size() && listBaseULIdentified.get(idx1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (listBaseULIdentified.get(idx1).mType == UnitProtoType.Type.TYPE_DOT // at this moment there is no dot multiply. || listBaseULIdentified.get(idx1).mType == UnitProtoType.Type.TYPE_STAR) && (listBaseULIdentified.get(idx1).mnLeft - serBase.getRightPlus1()) < serBase.mnWidth * ConstantsMgr.msdSmallJDotVPlaceThresh // the left-right gap between dot and j main body has to be very small && (serBase.mnTop - listBaseULIdentified.get(idx1).getBottomPlus1()) < serBase.mnHeight * ConstantsMgr.msdSmallJDotHPlaceThresh // the top-bottom gap between dot and j main body has to be very small && serBase.mnTop > listBaseULIdentified.get(idx1).getBottomPlus1()) { // main body must be low the dot StructExprRecog serSmallj = new StructExprRecog(serBase.mbarrayBiValues); int nLeft = Math.min(serBase.mnLeft, listBaseULIdentified.get(idx1).mnLeft); int nTop = Math.min(serBase.mnTop, listBaseULIdentified.get(idx1).mnTop); int nRightPlus1 = Math.max(serBase.getRightPlus1(), listBaseULIdentified.get(idx1).getRightPlus1()); int nBottomPlus1 = Math.max(serBase.getBottomPlus1(), listBaseULIdentified.get(idx1).getBottomPlus1()); int nTotalArea = serBase.getArea() + listBaseULIdentified.get(idx1).getArea(); double dSimilarity = (serBase.getArea() * serBase.mdSimilarity + listBaseULIdentified.get(idx1).getArea() * listBaseULIdentified.get(idx1).mdSimilarity)/nTotalArea; // total area should not be zero here. // now we merge the two into small j and replace the seperated two sers with small j LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); ImageChop imgChopTop = listBaseULIdentified.get(idx1).getImageChop(false); listParts.add(imgChopTop); ImageChop imgChopBase = serBase.getImageChop(false); listParts.add(imgChopBase); ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container. serSmallj.setStructExprRecog(UnitProtoType.Type.TYPE_SMALL_J, UNKNOWN_FONT_TYPE, nLeft, nTop, nRightPlus1 - nLeft, nBottomPlus1 - nTop, imgChop4SER, dSimilarity); listBaseULIdentified.remove(idx1); // remove idx1 first because idx1 is after idx. Otherwise, will remove a wrong child. listBaseULIdentified.remove(idx); listCharLevel.remove(idx1); // remove idx1 first because idx1 is after idx. Otherwise, will remove a wrong child. listCharLevel.remove(idx); listBaseULIdentified.add(idx, serSmallj); listCharLevel.add(idx, 0); } } } // step 4.2, identify cap under // now we need to handle the cap and/or under notes for \Sigma, \Pi and \Integrate // this is for the case that \topunder{infinite, \Sigma, n = 1} is misrecognized to // \topunder{infinite, \Sigma, n^=}_1, or \topunder{1+2+3+4, \integrate, 5+6+7+8+9} // is misrecognized to 1 + 5 ++26 \topunder(+3, \integrate, +} + 7+8++4+9. LinkedList<StructExprRecog> listCUIdentifiedBLU = new LinkedList<StructExprRecog>(); LinkedList<Integer> listCUIdentifiedCharLvl = new LinkedList<Integer>(); int nLastCUBaseAreaIdx = -1; for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) { StructExprRecog serBase = listBaseULIdentified.get(idx).getPrincipleSER(1); if ((listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAPUNDER || listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP || listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER) && listCharLevel.get(idx) == 0 && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (serBase.mType == UnitProtoType.Type.TYPE_INTEGRATE || serBase.mType == UnitProtoType.Type.TYPE_BIG_SIGMA || serBase.mType == UnitProtoType.Type.TYPE_BIG_PI) && idx < listBaseULIdentified.size() - 1) { StructExprRecog serCap = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)? null:listBaseULIdentified.get(idx).mlistChildren.getFirst(); int nWholeCapTop = (serCap==null)?0:serCap.mnTop; int nWholeCapBottomP1 = (serCap==null)?0:serCap.getBottomPlus1(); StructExprRecog serUnder = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP)? null:listBaseULIdentified.get(idx).mlistChildren.getLast(); int nWholeUnderTop = (serUnder==null)?0:serUnder.mnTop; int nWholeUnderBottomP1 = (serUnder==null)?0:serUnder.getBottomPlus1(); LinkedList<StructExprRecog> listIdentifiedCap = new LinkedList<StructExprRecog>(); if (serCap != null) { listIdentifiedCap.add(serCap); } LinkedList<StructExprRecog> listIdentifiedUnder = new LinkedList<StructExprRecog>(); if (serUnder != null) { listIdentifiedUnder.add(serUnder); } int idx1 = idx - 1; // now go through its left side for (; idx1 > nLastCUBaseAreaIdx; idx1 --) { StructExprRecog serThis = listBaseULIdentified.get(idx1); if (listCharLevel.get(idx1) == 1 && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER // this character is a top level char and we have cap note && (serCap.mnLeft - serThis.getRightPlus1()) <= Math.max(serCap.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough && serBase.mnTop >= serThis.getBottomPlus1() // Base is below this which means this is a cap. && (Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1) - Math.min(serThis.mnTop, nWholeCapTop)) <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large /*&& serThis.getBottomPlus1() < serCap.mnTop && serThis.mnTop > serCap.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap. listIdentifiedCap.addFirst(serThis); serCap = serThis; nWholeCapTop = Math.min(serThis.mnTop, nWholeCapTop); nWholeCapBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1); } else if (listCharLevel.get(idx1) == -1 && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTCAP // this character is a bottom level char and we have under && (serUnder.mnLeft - serThis.getRightPlus1()) <= Math.max(serUnder.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough && serBase.getBottomPlus1() <= serThis.mnTop // Base is above this which means this is a under && (Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1) - Math.min(serThis.mnTop, nWholeUnderTop)) <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large /*&& serThis.getBottomPlus1() < serUnder.mnTop && serThis.mnTop > serUnder.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap. listIdentifiedUnder.addFirst(serThis); serUnder = serThis; nWholeUnderTop = Math.min(serThis.mnTop, nWholeUnderTop); nWholeUnderBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1); } else { break; // ok, we arrive at the left edge of this CUBase Area, exit. } } for (int idx2 = nLastCUBaseAreaIdx + 1; idx2 <= idx1; idx2 ++) { // so, now add the chars which are not belong to this cap under area. listCUIdentifiedBLU.add(listBaseULIdentified.get(idx2)); listCUIdentifiedCharLvl.add(listCharLevel.get(idx2)); } nLastCUBaseAreaIdx = idx; // now go through its right side serCap = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)? null:listBaseULIdentified.get(idx).mlistChildren.getFirst(); serUnder = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP)? null:listBaseULIdentified.get(idx).mlistChildren.getLast(); idx1 = idx + 1; for (; idx1 < listBaseULIdentified.size(); idx1 ++) { StructExprRecog serThis = listBaseULIdentified.get(idx1); if (listCharLevel.get(idx1) == 1 && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER // this character is a top level char and we have cap note && (serThis.mnLeft - serCap.getRightPlus1()) <= Math.max(serCap.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough && serBase.mnTop >= serThis.getBottomPlus1() // Base is below this which means this is a cap. && (Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1) - Math.min(serThis.mnTop, nWholeCapTop)) <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large /*&& serThis.getBottomPlus1() < serCap.mnTop && serThis.mnTop > serCap.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap. nLastCUBaseAreaIdx = idx1; listIdentifiedCap.add(serThis); serCap = serThis; nWholeCapTop = Math.min(serThis.mnTop, nWholeCapTop); nWholeCapBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1); } else if (listCharLevel.get(idx1) == -1 && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTCAP // this character is a bottom level char and we have under note && (serThis.mnLeft - serUnder.getRightPlus1()) <= Math.max(serUnder.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough && serBase.getBottomPlus1() <= serThis.mnTop // Base is above this which means this is a under && (Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1) - Math.min(serThis.mnTop, nWholeUnderTop)) <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large /*&& serThis.getBottomPlus1() < serUnder.mnTop && serThis.mnTop > serUnder.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap. nLastCUBaseAreaIdx = idx1; listIdentifiedUnder.add(serThis); serUnder = serThis; nWholeUnderTop = Math.min(serThis.mnTop, nWholeUnderTop); nWholeUnderBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1); } else { break; // ok, we arrive at the left edge of this CUBase Area, exit. } } // ok, now we have get all the cap parts and all the under parts, // it is time for us to reconstruct this SER and add it to the new BLU list. StructExprRecog serNewCap = null, serNewUnder = null, serNew; if (listIdentifiedCap.size() == 1) { serNewCap = listIdentifiedCap.getFirst(); } else if (listIdentifiedCap.size() > 1) { // size > 1 serNewCap = new StructExprRecog(serBase.mbarrayBiValues); serNewCap.setStructExprRecog(listIdentifiedCap, EXPRRECOGTYPE_VBLANKCUT); } if (listIdentifiedUnder.size() == 1) { serNewUnder = listIdentifiedUnder.getFirst(); } else if (listIdentifiedUnder.size() > 1) { // size > 1 serNewUnder = new StructExprRecog(serBase.mbarrayBiValues); serNewUnder.setStructExprRecog(listIdentifiedUnder, EXPRRECOGTYPE_VBLANKCUT); } LinkedList<StructExprRecog> listThisAllChildren = new LinkedList<StructExprRecog>(); int nExprRecogType = EXPRRECOGTYPE_HCUTCAPUNDER; if (serNewCap != null) { listThisAllChildren.add(serNewCap); } else { nExprRecogType = EXPRRECOGTYPE_HCUTUNDER; } listThisAllChildren.add(serBase); if (serNewUnder != null) { listThisAllChildren.add(serNewUnder); } else { nExprRecogType = EXPRRECOGTYPE_HCUTCAP; } serNew = new StructExprRecog(serBase.mbarrayBiValues); serNew.setStructExprRecog(listThisAllChildren, nExprRecogType); listCUIdentifiedBLU.add(serNew); listCUIdentifiedCharLvl.add(0); // done! Now go to the next SER in listBaseULIdentified. idx = nLastCUBaseAreaIdx; } } // now we have arrive at the end of listBaseULIdentified. We need to go through from nLastCUBaseAreaIdx + 1 to here // and add the remaining parts into listCUIdentifiedBLU. for (int idx = nLastCUBaseAreaIdx + 1; idx < listBaseULIdentified.size(); idx ++) { // so, now add the chars which are not belong to this cap under area. listCUIdentifiedBLU.add(listBaseULIdentified.get(idx)); listCUIdentifiedCharLvl.add(listCharLevel.get(idx)); } // reset listBaseULIdentified and listCharLevel because they will be used latter on. listBaseULIdentified = listCUIdentifiedBLU; listCharLevel = listCUIdentifiedCharLvl; // step 4.3 : at last, trying to rectify some miss-identified char levels for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) { if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_EQUAL || listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_EQUAL_ALWAYS) && (idx > 0 && idx < listBaseULIdentified.size() - 1) && listCharLevel.get(idx) != 0 && ((listCharLevel.get(idx - 1) == 0 && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx - 1).mnTop && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx - 1).getBottomPlus1()) || (listCharLevel.get(idx + 1) == 0 && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx + 1).mnTop && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx + 1).getBottomPlus1()) ) ) { // if the character is = or always=, and its left or right char is a base char but it is not base char and this char is // in right position then change its char level to base char. listCharLevel.set(idx, 0); } if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_SUBTRACT) { // need not to convert low and small subtract to dot because we have done before. if (listCharLevel.get(idx) != 0 && (idx < listBaseULIdentified.size() - 1) && (listCharLevel.get(idx + 1) == 0) && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx + 1).mnTop + listBaseULIdentified.get(idx + 1).mnHeight * ConstantsMgr.msdSubtractVRangeAgainstNeighbourH && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx + 1).getBottomPlus1() - listBaseULIdentified.get(idx + 1).mnHeight * ConstantsMgr.msdSubtractVRangeAgainstNeighbourH && (listBaseULIdentified.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE || listBaseULIdentified.get(idx).mnWidth >= listBaseULIdentified.get(idx + 1).mnWidth * ConstantsMgr.msdSubtractWidthAgainstNeighbourW)) { // if the character is -, and its right char is a base char but it is an upper or lower note char and it's in right position // and its width is long enough, then change its char level to base char. do not use calculate char level because we have got // wrong information from calculate char level. listCharLevel.set(idx, 0); } } if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_DOT) { if (((idx < listBaseULIdentified.size() - 1)?(listCharLevel.get(idx + 1) == 0):true) && ((idx > 0)?(listCharLevel.get(idx - 1) == 0):true)) { if (listCharLevel.get(idx) == -1) { // if the character is \dot, and its left and right char is a base char but it is an lower note char // then change its char level to base char. listCharLevel.set(idx, 0); } else if (listCharLevel.get(idx) == 0 && idx != 0 && idx != listBaseULIdentified.size() - 1) { // if the character is \dot, and its left and right char is a base char and itself is also a base char // then it actually means multiply. listBaseULIdentified.get(idx).mType = UnitProtoType.Type.TYPE_DOT_MULTIPLY; } } else if (listCharLevel.get(idx) == 0 && idx > 0 && idx < listBaseULIdentified.size() - 1 && listCharLevel.get(idx + 1) == 1 && listCharLevel.get(idx - 1) == 1) { // if the character is \dot, and its left and right char is a upper note char and itself is a base char // then change its char level to upper note. listCharLevel.set(idx, 1); } } if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_DOT && listCharLevel.get(idx) == -1 && ((idx < listBaseULIdentified.size() - 1)?(listCharLevel.get(idx + 1) == 0):true) && ((idx > 0)?(listCharLevel.get(idx - 1) == 0):true)) { // if the character is \dot, and its left and right char is a base char but it is an lower note char // then change its char level to base char. listCharLevel.set(idx, 0); } // need not to consider a case like \topunder{infinite, \Sigma, n = 1} is misrecognized to // \topunder{infinite, \Sigma, n^=}_1. This kind of situation has been processed. } // step 5, since different levels have been well-sorted, we merge them. LinkedList<StructExprRecog> listBaseTrunk = new LinkedList<StructExprRecog>(); LinkedList<LinkedList<StructExprRecog>> listLeftTopNote = new LinkedList<LinkedList<StructExprRecog>>(); LinkedList<LinkedList<StructExprRecog>> listLeftBottomNote = new LinkedList<LinkedList<StructExprRecog>>(); LinkedList<LinkedList<StructExprRecog>> listUpperNote = new LinkedList<LinkedList<StructExprRecog>>(); LinkedList<LinkedList<StructExprRecog>> listLowerNote = new LinkedList<LinkedList<StructExprRecog>>(); int nLastBaseIdx = -1; for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) { if (listCharLevel.get(idx) == 0) { listBaseTrunk.add(listBaseULIdentified.get(idx)); listLeftTopNote.add(new LinkedList<StructExprRecog>()); listLeftBottomNote.add(new LinkedList<StructExprRecog>()); listUpperNote.add(new LinkedList<StructExprRecog>()); listLowerNote.add(new LinkedList<StructExprRecog>()); int nLastBaseIdxInBaseTrunk = listBaseTrunk.size() - 2; if (nLastBaseIdx < idx - 1) { // nLastBaseIdx == idx - 1 means no notes between nLastBaseIdx and this base. // Note that even if nLastBaseIdx is -1, nLastBaseIdx == idx - 1 is still a valid adjustment. int[] narrayNoteGroup = groupNotesForPrevNextBases(listBaseULIdentified, listCharLevel, nLastBaseIdx, idx); for (int idx1 = nLastBaseIdx + 1; idx1 < idx; idx1 ++) { int nGroupIdx = idx1 - nLastBaseIdx - 1; if (listCharLevel.get(idx1) == -1) { // lower note if (narrayNoteGroup[nGroupIdx] == 0) { listLowerNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1)); } else if (narrayNoteGroup[nGroupIdx] == 1) { listLeftBottomNote.getLast().add(listBaseULIdentified.get(idx1)); } // ignore if narrayNoteGroup[nGroupIdx] == other values } else if (listCharLevel.get(idx1) == 1) { // upper note if (narrayNoteGroup[nGroupIdx] == 0) { listUpperNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1)); } else if (narrayNoteGroup[nGroupIdx] == 1) { listLeftTopNote.getLast().add(listBaseULIdentified.get(idx1)); } // ignore if narrayNoteGroup[nGroupIdx] == other values } // ignore if listCharLevel.get(idx1) is not -1 or 1. } } if (nLastBaseIdxInBaseTrunk > 0) { convertNotes2HCut(nLastBaseIdxInBaseTrunk, listBaseTrunk, listLeftTopNote, listLeftBottomNote, listUpperNote, listLowerNote); } nLastBaseIdx = idx; } } if (nLastBaseIdx >= 0) { int nLastBaseIdxInBaseTrunk = listBaseTrunk.size() - 1; for (int idx1 = nLastBaseIdx + 1; idx1 < listBaseULIdentified.size(); idx1 ++) { if (listCharLevel.get(idx1) == -1) { listLowerNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1)); } else { // idx1 is not nLastBaseIdx, so that it must be either 1 or -1. listUpperNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1)); } } convertNotes2HCut(nLastBaseIdxInBaseTrunk, listBaseTrunk, listLeftTopNote, listLeftBottomNote, listUpperNote, listLowerNote); } // step 6, create a list of merged and reconstructed children. LinkedList<StructExprRecog> listProcessed = new LinkedList<StructExprRecog>(); for (int idx = 0; idx < listBaseTrunk.size(); idx ++) { StructExprRecog serThis = listBaseTrunk.get(idx); serThis = serThis.restruct(); if (listLeftTopNote.get(idx).size() > 0) { StructExprRecog serLeftTopNote = new StructExprRecog(mbarrayBiValues); if (listLeftTopNote.get(idx).size() > 1) { serLeftTopNote.setStructExprRecog(listLeftTopNote.get(idx), EXPRRECOGTYPE_VBLANKCUT); } else { serLeftTopNote = listLeftTopNote.get(idx).getFirst(); } serLeftTopNote = serLeftTopNote.restruct(); LinkedList<StructExprRecog> listWithLeftTopNote = new LinkedList<StructExprRecog>(); listWithLeftTopNote.add(serLeftTopNote); listWithLeftTopNote.add(serThis); serThis = new StructExprRecog(mbarrayBiValues); serThis.setStructExprRecog(listWithLeftTopNote, EXPRRECOGTYPE_VCUTLEFTTOPNOTE); if (serThis.mlistChildren.getLast().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThis.mlistChildren.getFirst().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_ZERO || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SMALL_O || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_BIG_O) ) { if (serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_SMALL_C || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_BIG_C) { // need not to reset left top width and height because they have been set. // similarly, need not to reset similarity. LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false); listParts.add(imgChopLeftTop); ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false); listParts.add(imgChopBase); ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container. serThis.setStructExprRecog(UnitProtoType.Type.TYPE_CELCIUS, UNKNOWN_FONT_TYPE, imgChop4SER); } else if (serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_BIG_F) { // need not to reset left top width and height because they have been set. // similarly, need not to reset similarity. LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false); listParts.add(imgChopLeftTop); ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false); listParts.add(imgChopBase); ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container. serThis.setStructExprRecog(UnitProtoType.Type.TYPE_FAHRENHEIT, UNKNOWN_FONT_TYPE, imgChop4SER); } else if ((serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_ONE || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_FORWARD_SLASH || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_SMALL_L) && listLowerNote.get(idx).size() >= 1 && listLowerNote.get(idx).getFirst().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_ZERO || listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_SMALL_O || listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_BIG_O) ) { LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false); listParts.add(imgChopLeftTop); ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false); listParts.add(imgChopBase); ImageChop imgChopLowerNote = listLowerNote.get(idx).getFirst().getImageChop(false); listParts.add(imgChopLowerNote); ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container. serThis.setStructExprRecog(UnitProtoType.Type.TYPE_PERCENT, UNKNOWN_FONT_TYPE, imgChop4SER); listLowerNote.get(idx).removeFirst(); // first element of lower note list should be removed here because it has been merged into serThis. } } else if (serThis.mlistChildren.getLast().mnExprRecogType == EXPRRECOGTYPE_GETROOT) { StructExprRecog serRootLevel = serThis.mlistChildren.getLast().mlistChildren.getFirst(); StructExprRecog serRooted = serThis.mlistChildren.getLast().mlistChildren.getLast(); if (serRootLevel.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_LEFT || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_SHORT || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_MEDIUM || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_LONG || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_TALL || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_VERY_TALL)) { LinkedList<StructExprRecog> listRoot = new LinkedList<StructExprRecog>(); listRoot.add(serLeftTopNote); listRoot.add(serRootLevel); listRoot.add(serRooted); serThis.setStructExprRecog(listRoot, EXPRRECOGTYPE_GETROOT); } else { LinkedList<StructExprRecog> listNewRootLevel = new LinkedList<StructExprRecog>(); listNewRootLevel.add(serLeftTopNote); listNewRootLevel.add(serRootLevel); StructExprRecog serNewRootLevel = new StructExprRecog(mbarrayBiValues); serNewRootLevel.setStructExprRecog(listNewRootLevel, EXPRRECOGTYPE_VBLANKCUT); serNewRootLevel = serNewRootLevel.restruct(); LinkedList<StructExprRecog> listRoot = new LinkedList<StructExprRecog>(); listRoot.add(serNewRootLevel); listRoot.add(serThis.mlistChildren.getLast().mlistChildren.get(1)); listRoot.add(serRooted); serThis.setStructExprRecog(listRoot, EXPRRECOGTYPE_GETROOT); } } else { // ignore left top note serThis = serThis.mlistChildren.getLast(); } } if (listLowerNote.get(idx).size() > 0 && listUpperNote.get(idx).size() > 0) { StructExprRecog serLowerNote = new StructExprRecog(mbarrayBiValues); if (listLowerNote.get(idx).size() > 1) { serLowerNote.setStructExprRecog(listLowerNote.get(idx), EXPRRECOGTYPE_VBLANKCUT); } else { serLowerNote = listLowerNote.get(idx).getFirst(); } serLowerNote = serLowerNote.restruct(); // restruct lower note StructExprRecog serUpperNote = new StructExprRecog(mbarrayBiValues); if (listUpperNote.get(idx).size() > 1) { serUpperNote.setStructExprRecog(listUpperNote.get(idx), EXPRRECOGTYPE_VBLANKCUT); } else { serUpperNote = listUpperNote.get(idx).getFirst(); } serUpperNote = serUpperNote.restruct(); // restruct upper note LinkedList<StructExprRecog> listWithLUNote = new LinkedList<StructExprRecog>(); listWithLUNote.add(serThis); listWithLUNote.add(serLowerNote); listWithLUNote.add(serUpperNote); serThis = new StructExprRecog(mbarrayBiValues); serThis.setStructExprRecog(listWithLUNote, EXPRRECOGTYPE_VCUTLUNOTES); } else if(listLowerNote.get(idx).size() > 0) { StructExprRecog serLowerNote = new StructExprRecog(mbarrayBiValues); if (listLowerNote.get(idx).size() > 1) { serLowerNote.setStructExprRecog(listLowerNote.get(idx), EXPRRECOGTYPE_VBLANKCUT); } else { serLowerNote = listLowerNote.get(idx).getFirst(); } serLowerNote = serLowerNote.restruct(); // restruct lower note LinkedList<StructExprRecog> listWithLowerNote = new LinkedList<StructExprRecog>(); listWithLowerNote.add(serThis); listWithLowerNote.add(serLowerNote); serThis = new StructExprRecog(mbarrayBiValues); serThis.setStructExprRecog(listWithLowerNote, EXPRRECOGTYPE_VCUTLOWERNOTE); } else if (listUpperNote.get(idx).size() > 0) { StructExprRecog serUpperNote = new StructExprRecog(mbarrayBiValues); if (listUpperNote.get(idx).size() > 1) { serUpperNote.setStructExprRecog(listUpperNote.get(idx), EXPRRECOGTYPE_VBLANKCUT); } else { serUpperNote = listUpperNote.get(idx).getFirst(); } serUpperNote = serUpperNote.restruct(); // restruct upper note LinkedList<StructExprRecog> listWithUpperNote = new LinkedList<StructExprRecog>(); listWithUpperNote.add(serThis); listWithUpperNote.add(serUpperNote); serThis = new StructExprRecog(mbarrayBiValues); serThis.setStructExprRecog(listWithUpperNote, EXPRRECOGTYPE_VCUTUPPERNOTE); serThis = serThis.identifyHSeperatedChar(); // a VCUTUPPERNOTE could be misrecognized i. } // base is always not v cut. listProcessed.add(serThis); } StructExprRecog serReturn = new StructExprRecog(mbarrayBiValues); if (listProcessed.size() == 1) { serReturn = listProcessed.getFirst(); } else if (listProcessed.size() > 1) { serReturn.setStructExprRecog(listProcessed, EXPRRECOGTYPE_VBLANKCUT); } return serReturn; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native MagickImage chopImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;", "public ImageChop shrinkImgArray() {\n if (mnLeft == 0 && mnTop == 0 && getRightPlus1() == mnWidth && getBottomPlus1() == mnHeight) {\n return this;\n } else {\n byte[][] barrayImg = new byte[mnWidth][mnHeight];\n // copy matrix.\n for (int idx = 0; idx < mnWidth; idx ++) {\n System.arraycopy(mbarrayImg[idx + mnLeft], mnTop, barrayImg[idx], 0, mnHeight);\n }\n int nX0InOriginalImg = mnX0InOriginalImg + mnLeft;\n int nY0InOriginalImg = mnY0InOriginalImg + mnTop;\n ImageChop imgChopReturn = new ImageChop();\n imgChopReturn.setImageChop(barrayImg, 0, 0, mnWidth, mnHeight, mbarrayOriginalImg, nX0InOriginalImg, nY0InOriginalImg, mnChopType);\n return imgChopReturn;\n }\n }", "public native MagickImage cropImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;", "List<List<Pixel>> transform(Image img, String operation);", "private void enhanceImage(){\n }", "static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}", "@Test\n\tpublic void testIsInvertedLut() {\n\t\tip = new ImagePlus(\"CircusHell\",(Image)null);\n\t\tassertFalse(ip.isInvertedLut());\n\n\t\t// null image proc with non null image\n\t\tip = new ImagePlus(\"CircusHell\",new BufferedImage(50,75,BufferedImage.TYPE_USHORT_555_RGB));\n\t\tassertEquals(ip.ip.isInvertedLut(),ip.isInvertedLut());\n\n\t\t// non null image\n\t\tproc = new ByteProcessor(2,3,new byte[]{1,2,3,4,5,6},new IndexColorModel(8,1,new byte[]{1},new byte[]{2},new byte[]{3}));\n\t\tip = new ImagePlus(\"CircusHell\",proc);\n\t\tassertEquals(ip.ip.isInvertedLut(),ip.isInvertedLut());\n\t}", "private List<Bitmap> cutImage(Bitmap picture) {\n List<Bitmap> newPieces = new ArrayList<Bitmap>();\n int w = picture.getWidth();\n int h = picture.getHeight();\n int boxWidth = w / Board.NUM_COLS;\n int boxHeight = h / Board.NUM_ROWS;\n for (int i = 0; i < Board.NUM_ROWS; i++) {\n for (int j = 0; j < Board.NUM_ROWS; j++) {\n Bitmap pictureFragment = Bitmap.createBitmap(picture, j * boxWidth, i * boxHeight, boxWidth, boxHeight);\n newPieces.add(pictureFragment);\n }\n }\n return newPieces;\n }", "public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }", "public Mosaic(PImage img, PImage lastSeenImage, Tile[] tiles, Tile[] lastSeenTiles, int tileSize, int pdfScale, float evenRowShift, float oddRowShift)\n {\n //this.tileSum = tilesCounter(tiles);\n this.tiles = tiles;\n this.pdfScale = pdfScale;\n this.transparentBackground = true;\n this.tileSize = tileSize;\n this.xTiles = 0;\n this.yTiles = 0;\n this.xCanvasSize = width/4*3+70;\n this.yCanvasSize = height-20;\n this.hoverIndex = new int[2];\n this.hoverIndex[0] = 0;\n this.hoverIndex[1] = 0;\n this.firstCellPosition = new int[2];\n this.firstCellPosition[0] = 210;\n this.firstCellPosition[1] = 10;\n this.xTileSize = tiles[0].getW();\n this.yTileSize = tiles[0].getH();\n this.evenRowShift = (int) (xTileSize * evenRowShift);\n this.oddRowShift = (int) (xTileSize * oddRowShift);\n this.tileMiniatures = new PImage[8];\n this.tileMiniaturesV = new PImage[8];\n this.tileMiniaturesH = new PImage[8];\n this.tileMiniaturesVH = new PImage[8];\n this.avaragedImgs = new PImage[5];\n this.lastSeenImage = lastSeenImage;\n this.lastSeenTiles = lastSeenTiles;\n this.lastImgRatio = 0.0f;\n this.lastTileRatio = tiles[0].getW()*tiles[0].getH();\n setImage(img);\n setMiniatures();\n \n }", "public void filterImage()\r\n {\r\n\t if (!isInverted && !isBlured )\r\n {\r\n cropedEdited = cropedPart;\r\n }\r\n\t float[] elements = {0.0f, 1.0f, 0.0f, -1.0f,brightnessLevel,1.0f,0.0f,0.0f,0.0f}; \r\n\t Kernel kernel = new Kernel(3, 3, elements); \r\n\t BufferedImageOp change = new ConvolveOp(kernel); \r\n\t cropedEdited = change.filter(cropedEdited, null);\r\n repaint();\r\n }", "@SuppressWarnings(\"unused\")\n\tprivate void cloneImage() {\n//\t\tColorModel cm = offimg.getColorModel();\n//\t\t boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();\n//\t\t WritableRaster raster = offimg.copyData(null);\n//\t\t offimg2 = new BufferedImage(cm, raster, isAlphaPremultiplied, null);\n//\t\t BufferedImage currentImage = new BufferedImage(width,height,BufferedImage.TYPE_3BYTE_BGR);\n\n\t//Fastest method to clone the image (DOES NOT WORK for MACOS)\n//\t\t int[] frame = ((DataBufferInt)offimg.getRaster().getDataBuffer()).getData();\n//\t\t int[] imgData = ((DataBufferInt)offimg2.getRaster().getDataBuffer()).getData();\n//\t\t System.arraycopy(frame,0,imgData,0,frame.length);\n\t}", "List<List<Pixel>> filter(Image img, int multiplier, String operation);", "public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }", "static private Fits common_crop(ImageHDU h, Header old_header,\n int xCenter, int yCenter, int xSize, int ySize)\n throws FitsException, IOException {\n if (SUTDebug.isDebug()) {\n System.out.println(\"entering common_crop: xCenter = \" + xCenter +\n \" yCenter = \" + yCenter + \" xSize = \" + xSize + \" ySize = \" + ySize);\n }\n\n\n\t /* first, do the header */\n Header newHeader = getNewHeader(h,old_header, xCenter, yCenter, xSize, ySize);\n int newNaxis1 = newHeader.getIntValue(\"NAXIS1\");\n int newNaxis2 = newHeader.getIntValue(\"NAXIS2\");\n\n\t /* now do the pixels */\n int[] tileOffset;\n int[] tileSize;\n int naxis3 = 0;\n ImageTiler tiler = h.getTiler();\n int naxis = old_header.getIntValue(\"NAXIS\");\n int minX = xCenter - xSize / 2;\n int maxX = xCenter + xSize / 2;\n int minY = yCenter - ySize / 2;\n int maxY = yCenter + ySize / 2;\n\n if (naxis == 2) {\n tileOffset = new int[]{minY, minX};\n tileSize = new int[]{maxY - minY, maxX - minX};\n\n } else if (naxis == 3) {\n naxis3 = newHeader.getIntValue(\"NAXIS3\");\n tileOffset = new int[]{0, minY, minX};\n tileSize = new int[]{naxis3, maxY - minY, maxX - minX};\n } else {\n throw new FitsException(\n \"Cannot crop images with NAXIS other than 2 or 3\");\n }\n\n int dims2[] = new int[]{newNaxis1, newNaxis2};\n int dims3[] = new int[]{newNaxis1, newNaxis2, naxis3};\n\n ImageData neImageData = null;\n //convert the data to float\n float[] objm32 = (float[]) ArrayFuncs.convertArray(tiler.getTile(tileOffset, tileSize), Float.TYPE, true);\n if (naxis == 2) {\n // make 2dim\n float[][] float2d = (float[][]) ArrayFuncs.curl(objm32, dims2);\n //convert back to original type\n neImageData = new ImageData(ArrayFuncs.convertArray(float2d, FitsRead.getDataType(newHeader.getIntValue(\"BITPIX\")), true) );\n } else {\n\n // make 3dim\n float[][][] float3d = (float[][][]) ArrayFuncs.curl(objm32, dims3);\n neImageData = new ImageData(ArrayFuncs.convertArray(float3d, FitsRead.getDataType(newHeader.getIntValue(\"BITPIX\")), true) );\n }\n\n ImageHDU newImageHDU = new ImageHDU(newHeader, neImageData);\n Fits outFits = new Fits();\n outFits.addHDU(newImageHDU);\n return (outFits);\n }", "private void actionViewOriginalImage ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint imagIndex = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\t//---- Get path to the original image\r\n\t\t\t\tString filePath = DataController.getTable().getElement(imagIndex).getDataFile().getFilePath();\r\n\r\n\t\t\t\t//---- Load the image into the image viewer\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\r\n\r\n\t\t\t\t//---- Change button icon\r\n\t\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_ORIGINAL_IMAGE);\r\n\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setIcon(iconButton);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setActionCommand(FormMainHandlerCommands.AC_VIEW_CELL);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setToolTipText(\"View cells\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}", "private Bitmap createSubImageAt(int row, int col) {\n Bitmap subImage = Bitmap.createBitmap(originalImage, col * width, row * height, width, height);\n return subImage;\n }", "@Override\n public void onClick(View view) {\n\n Bitmap bit = bitmap.copy(Bitmap.Config.ARGB_8888, false);\n Mat src = new Mat(bit.getHeight(), bit.getWidth(), CvType.CV_8UC(3));\n Utils.bitmapToMat(bit, src);\n Imgproc.cvtColor(src, src, Imgproc.COLOR_BGR2GRAY);\n Mat dst = new Mat(bit.getHeight(), bit.getWidth(), CvType.CV_8UC1);\n Mat kernel = new Mat(new Size(3, 3), CvType.CV_32FC1, new Scalar(0));\n kernel.put(0, 0, -1, 0, -1);\n kernel.put(1, 0, 0, 5, 0);\n kernel.put(2, 0, -1, 0, -1);\n Imgproc.filter2D(src, dst, src.depth(), kernel);\n Utils.matToBitmap(dst, bitmap);\n img.setImageBitmap(bitmap);\n }", "public chi(chm chm, ImageView imageView) {\n super(imageView);\n this.c = chm;\n }", "private void reanderImage(ImageData data) {\n \n }", "public void fuzzify() {\n ImageArray newCopy = currentIm.copy();\n \n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n \n for(int rr = 1; rr < rows-1; rr++){\n \n for(int cc = 1; cc < cols-1; cc++){\n fuzPixel(rr,cc,newCopy);\n \n }\n \n }\n \n currentIm = newCopy.copy();\n \n \n }", "public void i() {\n float f2;\n float f3 = 0.0f;\n RectF b2 = b(getDisplayMatrix());\n q.a(this.e, \"checkMatrixBounds cur rect: \" + b2.toString() + \" width: \" + b2.width() + \" height: \" + b2.height());\n if (b2 != null && getDrawable() != null) {\n float height = b2.height();\n float width = b2.width();\n int i2 = this.j;\n if (height <= ((float) i2)) {\n q.a(this.e, \"+1111111111111+: height<=cropperHeight\");\n switch (n.a[this.L.ordinal()]) {\n case 1:\n f2 = -b2.top;\n break;\n case 2:\n f2 = (((float) i2) - height) - b2.top;\n break;\n default:\n f2 = (((((float) i2) - height) / 2.0f) - b2.top) + ((float) getTopBottomGap());\n break;\n }\n } else if (b2.top > ((float) getTopBottomGap())) {\n f2 = (-b2.top) + ((float) getTopBottomGap());\n q.a(this.e, \"+2222222222222+: \" + b2.top + \" \" + getTopBottomGap());\n } else if (b2.bottom < ((float) (getTopBottomGap() + i2))) {\n f2 = ((float) (getTopBottomGap() + i2)) - b2.bottom;\n q.a(this.e, \"+333333333333333+: \" + i2 + \" \" + getTopBottomGap() + \" \" + b2.bottom);\n } else {\n f2 = 0.0f;\n }\n int i3 = this.i;\n if (width <= ((float) i3)) {\n switch (n.a[this.L.ordinal()]) {\n case 1:\n f3 = -b2.left;\n break;\n case 2:\n f3 = (((float) i3) - width) - b2.left;\n break;\n default:\n f3 = (((((float) i3) - width) / 2.0f) - b2.left) + ((float) getLeftRightGap());\n break;\n }\n } else if (b2.left > ((float) getLeftRightGap())) {\n f3 = (-b2.left) + ((float) getLeftRightGap());\n } else if (b2.right < ((float) (getLeftRightGap() + i3))) {\n f3 = ((float) (getLeftRightGap() + i3)) - b2.right;\n }\n q.a(this.e, \"correct: \" + f3 + Token.SEPARATOR + f2);\n this.x.postTranslate(f3, f2);\n }\n }", "public void apply(OFImage image)\n {\n int height = image.getHeight();\n int width = image.getWidth();\n OFImage original = new OFImage(image);\n \n for(int y = 0; y < height; y++) {\n for(int x = 0; x < width; x++) {\n Color currentPixel = original.getPixel(x,y);\n int grn,blu,red;\n grn = 255 - currentPixel.getGreen();\n red = 255 - currentPixel.getRed();\n blu = 255 - currentPixel.getBlue();\n image.setPixel(x, y, new Color(red,blu,grn));\n }\n }\n }", "public native boolean modulateImage(String modulate) throws MagickException;", "private Operation filterOperation(Operation op) {\n\t\t\tif (op instanceof ImageOperation) {\n\t\t\t\tImage i = ((ImageOperation) op).getImage();\n\t\t\t\tDimension d = ImageSize.get(i);\n\t\t\t\tBufferedImage bi = new BufferedImage(d.width, d.height,\n\t\t\t\t\t\tBufferedImage.TYPE_INT_ARGB);\n\t\t\t\tGraphics2D g3 = bi.createGraphics();\n\t\t\t\tg3.drawImage(i, 0, 0, null);\n\t\t\t\tg3.dispose();\n\t\t\t\t((ImageOperation) op).setImage(bi);\n\t\t\t}\n\t\t\treturn op;\n\t\t}", "public void cropMoleculeRecognition(){\n mOpenCameraView.disableView();\n\n Mat transformMat = Imgproc.getPerspectiveTransform(mCaptureAreaAdjusted,new MatOfPoint2f(new Point(0,0),new Point(0,400),new Point(400,400), new Point(400,0)));\n Mat croppedImage = new Mat();\n Imgproc.warpPerspective(mGray, croppedImage, transformMat, new Size(400, 400));\n\n /* cleanup the AR marker */\n int cropout = 240;\n\n croppedImage.submat(0,cropout,0,cropout).setTo(new Scalar(0));\n Core.MinMaxLocResult mmr;\n\n for(int i = 0; i<cropout; i++){\n mmr = Core.minMaxLoc(croppedImage.row(i).colRange(cropout,400));\n Core.add(croppedImage.row(i).colRange(0,cropout),new Scalar(mmr.maxVal/2),croppedImage.row(i).colRange(0,cropout));\n\n mmr = Core.minMaxLoc(croppedImage.col(i).rowRange(cropout, 400));\n Core.add(croppedImage.col(i).rowRange(0, cropout),new Scalar(mmr.maxVal/2),croppedImage.col(i).rowRange(0, cropout));\n }\n\n /*for now, just save the cropedImage*/\n /* in the live version, will need to sort out the ar marker on the top left */\n Imgcodecs.imwrite(getFilesDir().toString().concat(\"/croppedImg.png\"),croppedImage);\n Intent intent = new Intent(this,viewCapture.class);\n intent.putExtra(\"flagCaptureImage\",true);\n startActivity(intent);\n }", "public void run(ImageProcessor ip) {\r\n\t\tImagePlus TheOriginal = WindowManager.getCurrentImage();\r\n\t\timp.unlock();\t//Unlock the image for processing\t\r\n\t\tfilename = imp.getTitle(); \t//Get file name\r\n\t\tfilename = filename.substring(0, filename.indexOf('.')); //Remove .tif from end\r\n\t\tFileInfo filedata = TheOriginal.getOriginalFileInfo();\r\n\t\ttheparentDirectory = filedata.directory; //Get File Path\r\n\t\t\r\n\t\t\r\n\t\tint numslices = TheOriginal.getNFrames(); //Get number of slices in image\r\n\t\tif (numslices == 1){\r\n\t\t\tnumslices = TheOriginal.getNSlices();\r\n\t\t}\r\n\t\t//Set Measurements\r\n\t\tIJ.run(\"Set Measurements...\", \"area centroid center bounding feret's redirect=None decimal=3\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Set Threshold levels and threshold original image using a size limit to exclude\r\n\t\t * doublets and cell fragments\r\n\t\t */\r\n\t\tIJ.run(\"Threshold...\",\"method='Default'\");\r\n\t\tnew WaitForUserDialog(\"Threshold\", \"Threshold Image to select whole yeast cell, then click OK.\").show();\r\n\t\tthreshMinLevel = TheOriginal.getProcessor().getMinThreshold(); \r\n\t\tthreshMaxLevel = TheOriginal.getProcessor().getMaxThreshold(); \r\n\t\tIJ.run(TheOriginal, \"Analyze Particles...\", \"size=1500-4500 pixel circularity=0.00-1.00 show=Nothing clear include add\");\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Loop for user to Select Cells to Measure. There\r\n\t\t * is a maximum limit of 50 cells per image.\t\t\r\n\t\t */\r\n\t\tString DoAnother = JOptionPane.showInputDialog(\"Do you want to select a cell y/n: \");\r\n\t\tint b = 1;\r\n\t\tint[] dupCellID = new int[50]; \r\n\t\twhile(DoAnother.equals(\"y\")){\r\n\t\t\tnew WaitForUserDialog(\"Selection\", \"Select Cell.\").show();\r\n\t\t\tImagePlus dupCell = new Duplicator().run(TheOriginal, 1, numslices);\r\n\t\t\tdupCell.show();\r\n\t\t\tdupCellID[b]=dupCell.getID();\r\n\t\t\tDoAnother = JOptionPane.showInputDialog(\"Do you want to select a cell y/n: \");\r\n\t\t\tb = b + 1;\r\n\t\t}\r\n\t\t\r\n\t\tCalculateAngles(dupCellID, b); //Method to orientate cells along long axis\r\n\t\t\r\n\t\tMeasureMovement(dupCellID, numslices, b); //Measure the selected cells\r\n\t\t\r\n\t\tnew WaitForUserDialog(\"Finished\", \"Plugin Has Finished.\").show();\r\n\t\tTheOriginal.changes = false;\t\r\n\t\tTheOriginal.close();\r\n\t}", "private void fuzPixel(int rPix, int cPix, ImageArray iCopy){\n \n /*int rgb= currentIm.getPixel(rPix,cPix);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);*/\n \n int rgb = 0;\n double red = 0.0;\n double blue = 0.0;\n double green = 0.0;\n int alpha = 0;\n \n for(int rr = rPix-1; rr < rPix+2; rr++){\n \n for(int cc = cPix-1; cc <cPix+2; cc++){\n rgb = currentIm.getPixel(rr,cc);\n red = red + DM.getRed(rgb);\n blue = blue + DM.getBlue(rgb);\n green = green + DM.getGreen(rgb);\n alpha= alpha + DM.getAlpha(rgb);\n \n }\n \n }\n \n red = red/9;\n blue = blue/9;\n green = green/9;\n \n iCopy.setPixel(rPix, cPix,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }", "@Test\n public void testGray8BitIntoRGB() {\n BufferedImage im8bit = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_GRAY);\n WritableRaster raster8bit = im8bit.getRaster();\n int[] fill = new int[50 * 100];\n Arrays.fill(fill, 10);\n raster8bit.setSamples(0, 0, 50, 100, 0, fill);\n Arrays.fill(fill, 50);\n raster8bit.setSamples(50, 0, 50, 100, 0, fill);\n\n BufferedImage yellow = buildBGR(Color.YELLOW);\n\n // mosaic setting the nodata\n Range noData10 = RangeFactory.create((byte) 10, (byte) 10);\n RenderedOp mosaic = MosaicDescriptor.create(new RenderedImage[] { im8bit, yellow },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n new double[] { 0 }, new Range[] { noData10, null }, null);\n\n assertRGB(mosaic, false);\n\n // check top left quadrant, should be yellow\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check top right quadrant, should be 50 expanded to RGB\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 50, 50, 50 }, pixel);\n // check bottom left quadrant, should be yellow\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom right quadrant, should be 50 expanded to RGB\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 50, 50, 50 }, pixel);\n }", "void process(Mat image);", "public Image getCrotchetUp();", "private void createPieces() {\n\t\t// Create and fill up the array, iterating by piece row and piece column.\n\t\tpieces = new ArrayList<CvMat>();\n\t\tfor (int pi = 0; pi < prows; pi++) {\n\t\t\tfor (int pj = 0; pj < pcols; pj++) {\n\t\t\t\tCvMat piece = CvMat.create(pieceHeight, pieceWidth, image.type());\n\t\t\t\tpieces.add(piece);\n\t\t\t\t// Copy pixels from image to piece (as usual, do it by hand rather than OpenCV).\n\t\t\t\tfor (int i = 0; i < pieceHeight; i++) {\n\t\t\t\t\tfor (int j = 0; j < pieceWidth; j++) {\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\t\tpiece.put(i, j, c, image.get(i + pi * pieceHeight, j + pj * pieceWidth, c));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private ArrayList<Point> extractCC(Point r, Image img)\r\n/* 55: */ {\r\n/* 56: 58 */ this.s.clear();\r\n/* 57: 59 */ this.s.add(r);\r\n/* 58: 60 */ this.temp.setXYBoolean(r.x, r.y, true);\r\n/* 59: 61 */ this.list2.add(r);\r\n/* 60: */ \r\n/* 61: 63 */ Point[] N = { new Point(1, 0), new Point(0, 1), new Point(-1, 0), new Point(0, -1), \r\n/* 62: 64 */ new Point(1, 1), new Point(-1, -1), new Point(-1, 1), new Point(1, -1) };\r\n/* 63: */ \r\n/* 64: 66 */ ArrayList<Point> pixels = new ArrayList();\r\n/* 65: */ int x;\r\n/* 66: */ int i;\r\n/* 67: 68 */ for (; !this.s.isEmpty(); i < N.length)\r\n/* 68: */ {\r\n/* 69: 70 */ Point tmp = (Point)this.s.pop();\r\n/* 70: */ \r\n/* 71: 72 */ x = tmp.x;\r\n/* 72: 73 */ int y = tmp.y;\r\n/* 73: 74 */ pixels.add(tmp);\r\n/* 74: */ \r\n/* 75: 76 */ this.temp2.setXYBoolean(x, y, true);\r\n/* 76: */ \r\n/* 77: 78 */ i = 0; continue;\r\n/* 78: 79 */ int _x = x + N[i].x;\r\n/* 79: 80 */ int _y = y + N[i].y;\r\n/* 80: 82 */ if ((_x >= 0) && (_x < this.xdim) && (_y >= 0) && (_y < this.ydim)) {\r\n/* 81: 84 */ if (!this.temp.getXYBoolean(_x, _y))\r\n/* 82: */ {\r\n/* 83: 86 */ boolean q = img.getXYBoolean(_x, _y);\r\n/* 84: 88 */ if (q)\r\n/* 85: */ {\r\n/* 86: 90 */ Point t = new Point(_x, _y);\r\n/* 87: 91 */ this.s.add(t);\r\n/* 88: */ \r\n/* 89: 93 */ this.temp.setXYBoolean(t.x, t.y, true);\r\n/* 90: 94 */ this.list2.add(t);\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94: 78 */ i++;\r\n/* 95: */ }\r\n/* 96: 99 */ for (Point t : this.list2) {\r\n/* 97:100 */ this.temp.setXYBoolean(t.x, t.y, false);\r\n/* 98: */ }\r\n/* 99:101 */ this.list2.clear();\r\n/* 100: */ \r\n/* 101:103 */ return pixels;\r\n/* 102: */ }", "public native MagickImage enhanceImage() throws MagickException;", "public Image getCrotchetDown();", "private void startCropImage() {\n }", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "public void invertImage()\r\n {\r\n BufferedImage toInvert;\r\n if (isChanged || isBlured )\r\n {\r\n toInvert = cropedEdited;\r\n }\r\n else\r\n {\r\n toInvert = cropedPart;\r\n }\r\n for (int x = 0; x < toInvert.getWidth(); x++) {\r\n for (int y = 0; y < toInvert.getHeight(); y++) {\r\n int rgba = toInvert.getRGB(x, y);\r\n Color col = new Color(rgba, true);\r\n col = new Color(255 - col.getRed(),\r\n 255 - col.getGreen(),\r\n 255 - col.getBlue());\r\n toInvert.setRGB(x, y, col.getRGB());\r\n }\r\n }\r\n repaint();\r\n }", "public static void lukisImej(BufferedImage image_dest) {\n int w = image_dest.getWidth();\n int h = image_dest.getHeight();\n\n//\t\tfor(int y=0; y<h;y++)\n//\t\t{\n//\t\t\tfor(int x =0 ; x<w; x++)\n//\t\t\t{\n//\t\t\t\tif(image_dest.getRGB(x, y)==-1)\n//\t\t\t\t\tSystem.out.print(\"1\");\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\t//System.err.print(\"X\"+x+\" Y : \"+y);\n//\t\t\t\t\t//return;\n//\t\t\t\t\tSystem.out.print(\"0\");\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tSystem.out.println(\"\");\n//\t\t}\n\n }", "public native boolean compositeImage(int compOp, MagickImage compImage,\n\t\t\tint xOff, int yOff) throws MagickException;", "public double calcAvgHOverlapCharHeight(ImageChop chopOverlap, double dAvgStrokeWidth) {\n ImageChops imgChops = ExprSeperator.extractConnectedPieces(this);\n ImageChops imgChopsOverlap = ExprSeperator.extractConnectedPieces(chopOverlap);\n \n double dAvgHeight = 0;\n int nNumOfCntedChars = 0;\n for (int idx = 0; idx < imgChops.mlistChops.size(); idx ++) {\n byte[][] barrayThis = imgChops.mlistChops.get(idx).mbarrayImg;\n int nThisLeft = imgChops.mlistChops.get(idx).mnLeft;\n int nThisTop = imgChops.mlistChops.get(idx).mnTop;\n int nThisWidth = imgChops.mlistChops.get(idx).mnWidth;\n int nThisHeight = imgChops.mlistChops.get(idx).mnHeight;\n double dThisCharHeight = nThisHeight;\n if (nThisWidth != 0 && nThisHeight != 0) {\n boolean bOverlapped = false;\n for (int idx3 = 0; idx3 < imgChopsOverlap.mlistChops.size(); idx3 ++) {\n int nLeftThresh = imgChopsOverlap.mlistChops.get(idx3).getLeftInOriginalImg();\n int nRightP1Thresh = imgChopsOverlap.mlistChops.get(idx3).getRightP1InOriginalImg();\n if (imgChops.mlistChops.get(idx).mnLeft < mapOriginalXIdx2This(nRightP1Thresh)\n || imgChops.mlistChops.get(idx).getRightPlus1() > mapOriginalXIdx2This(nLeftThresh)) {\n bOverlapped = true;\n break;\n }\n }\n if (!bOverlapped) { // not overlap, go to see the next one.\n continue;\n }\n \n double dMaxCutHeight = 0;\n int nLastAllThroughDivIdx = nThisTop - 1;\n int idx2 = nThisTop;\n for (; idx2 < imgChops.mlistChops.get(idx).getBottomPlus1(); idx2 ++) {\n boolean bIsAllThroughLn = true;\n for (int idx1 = nThisLeft; idx1 < imgChops.mlistChops.get(idx).getRightPlus1(); idx1 ++) {\n if (barrayThis[idx1][idx2] == 0) {\n bIsAllThroughLn = false;\n break;\n }\n }\n if (bIsAllThroughLn && (idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n }\n if ((idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n dThisCharHeight = dMaxCutHeight;\n }\n if (dThisCharHeight >= ConstantsMgr.msnMinCharHeightInUnit && dThisCharHeight > dAvgStrokeWidth) {\n // a seperated point or a disconnected stroke may significantly drag down dAvgHeight value.\n dAvgHeight += dThisCharHeight;\n nNumOfCntedChars ++;\n }\n }\n if (nNumOfCntedChars != 0) {\n dAvgHeight /= nNumOfCntedChars;\n\n }\n return Math.max(dAvgHeight, Math.max(ConstantsMgr.msnMinCharHeightInUnit, dAvgStrokeWidth));\n }", "public abstract BufferedImage applyTo(BufferedImage image);", "public static boolean[][] apply(BufferedImage img){\n int largura = img.getWidth();\r\n int altura = img.getHeight();\r\n \r\n //Imagem de saida\r\n BufferedImage outImage = new BufferedImage(largura, altura, BufferedImage.TYPE_3BYTE_BGR);\r\n \r\n //matriz de saida\r\n boolean[][] output = new boolean[largura][altura];\r\n \r\n //calculando os valores do CIVE\r\n for (int x = 0; x < largura; x++) {\r\n for (int y = 0; y < altura; y++) {\r\n double red = Color.getColor(\"red\", img.getRGB(x, y)).getRed();\r\n double green = Color.getColor(\"green\", img.getRGB(x, y)).getGreen();\r\n \r\n if (green > red ) {\r\n output[x][y] = true;\r\n } else {\r\n output[x][y] = false;\r\n }\r\n \r\n }\r\n }\r\n\r\n return output;\r\n }", "public void filterImage() {\n\n if (opIndex == lastOp) {\n return;\n }\n\n lastOp = opIndex;\n switch (opIndex) {\n case 0:\n biFiltered = bi; /* original */\n return;\n case 1:\n biFiltered = ImageNegative(bi); /* Image Negative */\n return;\n\n case 2:\n biFiltered = RescaleImage(bi);\n return;\n\n case 3:\n biFiltered = ShiftImage(bi);\n return;\n\n case 4:\n biFiltered = RescaleShiftImage(bi);\n return;\n\n case 5:\n biFiltered = Add(bi, bi1);\n return;\n\n case 6:\n biFiltered = Subtract(bi, bi1);\n return;\n\n case 7:\n biFiltered = Multiply(bi, bi1);\n return;\n\n case 8:\n biFiltered = Divide(bi, bi1);\n return;\n\n case 9:\n biFiltered = NOT(bi);\n return;\n\n case 10:\n biFiltered = AND(bi, bi1);\n return;\n\n case 11:\n biFiltered = OR(bi, bi1);\n return;\n\n case 12:\n biFiltered = XOR(bi, bi1);\n return;\n\n case 13:\n biFiltered = ROI(bi);\n return;\n\n case 14:\n biFiltered = Negative_Linear(bi);\n return;\n\n case 15:\n biFiltered= Logarithmic_function(bi);\n return;\n\n case 16:\n biFiltered = Power_Law(bi);\n return;\n\n case 17:\n biFiltered = LUT(bi);\n return;\n\n case 18:\n biFiltered = Bit_planeSlicing(bi);\n return;\n\n case 19:\n biFiltered = Histogram(bi1,bi2);\n return;\n\n case 20:\n biFiltered = HistogramEqualisation(bi,bi3);\n return;\n\n case 21:\n biFiltered = Averaging(bi1);\n return;\n\n case 22:\n biFiltered = WeightedAveraging(bi1);\n return;\n\n case 23:\n biFiltered = fourNeighbourLaplacian(bi1);\n return;\n\n case 24:\n biFiltered= eightNeighbourLaplacian(bi1);\n return;\n\n case 25:\n biFiltered = fourNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 26:\n biFiltered = eightNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 27:\n biFiltered = Roberts(bi1);\n return;\n\n case 28:\n biFiltered = SobelX(bi1);\n return;\n\n case 29:\n biFiltered = SobelY(bi1);\n return;\n\n case 30:\n biFiltered = Gaussian(bi1);\n return;\n\n case 31:\n biFiltered = LoG (bi1);\n return;\n\n case 32:\n biFiltered = saltnpepper(bi4);\n return;\n\n case 33:\n biFiltered = minFiltering(bi4);\n return;\n\n case 34:\n biFiltered = maxFiltering(bi4);\n return;\n\n case 35:\n biFiltered = maidpointFiltering(bi4);\n return;\n\n case 36:\n biFiltered = medianFiltering(bi4);\n return;\n\n case 37:\n biFiltered = simpleThresholding(bi5);\n return;\n\n case 38:\n biFiltered = automatedThresholding(bi6);\n return;\n\n case 39:\n biFiltered = adaptiveThresholding(bi7);\n return;\n }\n }", "public static BufferedImage[] createCodedImg(BufferedImage frameI, BufferedImage frameP, int thrs, int tileSize, int seekRange, int comparator) {\n //Compute the tiles of the image\n ArrayList<Tile> tilesP = doTiles(frameP,tileSize);\n //Lists that contains the important data of every tile\n ArrayList<Integer> bestTilesX = new ArrayList<>();\n ArrayList<Integer> bestTilesY = new ArrayList<>();\n ArrayList<Integer> bestOriginX = new ArrayList<>();\n ArrayList<Integer> bestOriginY = new ArrayList<>();\n int tileWidth = tileSize;\n int tileHeight = tileSize;\n \n int[] colorsTileX;\n int[] colors;\n //3-position array where we will store the mean value of every pixel of every channel\n int[] meanColorTileX = new int[3];\n int[] meanColor = new int[3];\n //mean values for every channel\n double meanRed=0, meanGreen=0, meanBlue =0;\n double meanRedX, meanGreenX, meanBlueX;\n \n double nPixels;\n double compareValue;\n \n WritableRaster bitmap = (WritableRaster) frameP.getData();\n WritableRaster bitmap2 = (WritableRaster) frameP.getData();\n WritableRaster frameP_mod = bitmap.createWritableChild(frameP.getMinX(), frameP.getMinY(), frameP.getWidth(), frameP.getHeight(), 0,0, null);\n WritableRaster ref_P = bitmap2.createWritableChild(frameP.getMinX(), frameP.getMinY(), frameP.getWidth(), frameP.getHeight(), 0,0, null);\n\n //For every tile\n for (Tile tile: tilesP) {\n\n double bestValue = 9999;\n int bestX = -1, bestY = -1;\n Tile bestTile = null;\n nPixels = tile.getImg().getWidth() * tile.getImg().getHeight();\n int red = 0, green=0, blue = 0;\n //Get the mean of every channel of every pixel of every tile\n for (int tileX = 0; tileX < tile.getImg().getWidth(); tileX++) {\n for (int tileY = 0; tileY < tile.getImg().getHeight(); tileY++) {\n colorsTileX = getPixelColor(tile.getImg(),tileX,tileY);\n red += colorsTileX[0];\n green += colorsTileX[1];\n blue += colorsTileX[2];\n }\n }\n meanRedX = (double) red / nPixels;\n meanGreenX = (double) green / nPixels;\n meanBlueX = (double) blue / nPixels;\n \t//2 fors to iterate through the tile size + seekRange\n for (int seekX = tile.getX() - seekRange; seekX < tile.getX()+ seekRange; seekX++) {\n for (int seekY = tile.getY() - seekRange; seekY < tile.getY()+ seekRange; seekY++) {\n \t//those if's correct the possible out of bounds coordinates\n if (seekY < 0){\n seekY = 0;\n }\n if (seekY > frameI.getHeight()){\n seekY = frameI.getHeight();\n }\n if (seekX < 0){\n seekX = 0;\n }\n if (seekX > frameI.getWidth()){\n seekX = frameI.getWidth();\n }\n red = 0;\n green = 0;\n blue = 0;\n //2 fors that can be understand like a window that goes through the tile size + seekRange\n //Getting the values of every channel of every pixel so we can later compute the mean of every each of them\n for (int f = seekX; f < seekX + tileSize; f++) {\n for (int k = seekY; k < seekY + tileSize; k++) {\n if((f < frameP.getWidth()) && (k < frameP.getHeight()) && (f >= 0) && (k >= 0)){\n colors = getPixelColor(frameI,f,k);\n red += colors[0];\n green += colors[1];\n blue += colors[2];\n }\n }\n }\n meanRed = (double) red / nPixels;\n meanGreen = (double) green / nPixels;\n meanBlue = (double) blue / nPixels;\n\n //Now that we have the 2 means, get the correlation factor\n compareValue = compareSelector(comparator,meanRedX,meanGreenX,meanBlueX,meanRed,meanGreen,meanBlue);\n\n //If this value is over a treshold, replace the tile with the n-1 frame pixels\n if ( compareValue < thrs && seekY <= frameP.getHeight() - tileSize && seekX <= frameP.getWidth() - tileSize) {\n //Maybe there's more than one 'window' that gets over the treshold\n //Get the best one!\n if(compareValue < bestValue){\n bestValue = compareValue;\n bestTile = tile;\n bestX = seekX;\n bestY = seekY;\n }\n }\n\n }\n }\n \t//Now that we have the tile info,\n if(bestTile != null){\n \t//Iterate through it\n for (int temp_tileX = tile.getX(); temp_tileX < tile.getImg().getWidth() + tile.getX(); temp_tileX++) {\n for (int temp_tileY = tile.getY(); temp_tileY < tile.getImg().getHeight() + tile.getY(); temp_tileY++) {\n \t//(Using the same array, but we decided to put the black color so we put zero in every pixel channel)\n meanColor[0] = (int) 0;//meanRedX;\n meanColor[1] = (int) 0;//meanGreenX;\n meanColor[2] = (int) 0;//meanBlueX;\n \n //Replace the pixels of the tile with black color for the 'coded' image\n frameP_mod.setPixel(temp_tileX,temp_tileY,meanColor);\n \n //And to the new 'frame I' image that were gonna use in the next iteration, replace the tile with the colors of the frame I image (the previous one)\n colors = getPixelColor(frameI, bestX + (temp_tileX - tile.getX()), bestY+(temp_tileY - tile.getY()));\n ref_P.setPixel(temp_tileX, temp_tileY, colors);\n \n }\n }\n //Add the info of the tiles for the decode\n bestTilesX.add(bestTile.getX());\n bestTilesY.add(bestTile.getY());\n bestOriginX.add(bestX);\n bestOriginY.add(bestY);\n }\n }\n //Create the codedData object with all the info of every tile\n CodedData codedData = new CodedData(bestTilesX, bestTilesY, bestOriginX, bestOriginY, tileWidth, tileHeight);\n dataList.add(codedData); //add it to the list\n //Create the images and return it!\n BufferedImage frameP_new = new BufferedImage(frameP.getColorModel(),frameP_mod,frameP.isAlphaPremultiplied(),null);\n BufferedImage ref_buf = new BufferedImage(frameP.getColorModel(),ref_P,frameP.isAlphaPremultiplied(),null);\n BufferedImage[] result = new BufferedImage[2];\n result[0] = frameP_new;\n result[1] = ref_buf;\n return result;\n }", "@Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();", "private void recompose(int[][] array,int[][] red,int[][] green,int[][] blue){\n\t\tfor(int i=0;i<array.length;i++){\n\t\t\tfor(int j=0;j<array[0].length;j++){\n\t\t\t\tarray[i][j]=GImage.createRGBPixel(red[i][j],green[i][j],blue[i][j]);\n\t\t\t}\n\t\t}\n\t\t//Your code ends here\n\t}", "public native MagickImage flopImage() throws MagickException;", "private static void normalizeColor(BufferedImage image) {\n\t\tHashMap<Integer, Integer> counts = colorHistogram(image);\r\n\t\tInteger[] a=sortmap(counts); // sorting the map\r\n\t\tInteger minFreq = 1000;\r\n\t\tfor (Integer i: counts.keySet()) {\r\n\t\t\tif (counts.get(i) < minFreq) {\r\n\t\t\t\tminFreq = counts.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/*\r\n\t\t*\r\n\t\t*Main logic to normalise the code\r\n\t\t* Assumption: all the colors which start from edges are the noise to the captcha or background.\r\n\t\t*/\r\n\t\tArrayList<Integer> topValues = new ArrayList<>();\r\n\t\tfor (Integer i: counts.keySet()) {\r\n\t\t\ttopValues.add(i); // adding all the colors into the the array list topValues without any condition\r\n\t\t}\r\n\t\tInteger[] out=findEdgecolors(image); // findEdgecolors function returns the array of RGB values of colors which are at the edges of the picture\r\n\t\tfor(int i=0;i<out.length;i++)\r\n\t\t{\r\n\t\t\tif(out[i]!=null)\r\n\t\t\t\ttopValues.remove(out[i]); // remove the colours from topValues list if the color exist in the array returned by the findEdgecolors funciton (removing the colors which start from edges)\r\n\t\t}\r\n\t\t/*\r\n\t\t*Now topvalues consists of colors which are not in the edges of the clipped image\r\n\t\t*/\r\n\t\tint white_rgb = Color.YELLOW.getRGB();\r\n\t\tint black_rgb = Color.BLACK.getRGB();\r\n\r\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\tif (!topValues.contains(pixelVal)) {\r\n\t\t\t\t\timage.setRGB(x, y, white_rgb); //replacing the colors in topvalue with black\r\n\t\t\t\t} else {\r\n\t\t\t\t\timage.setRGB(x, y, black_rgb); // rest is colored with yellow (background)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"colorNormalized.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "private void updateImage() {\r\n \tfor(int i=0;i<rows;i++){\r\n for(int j=0;j<cols;j++){\r\n if(complexArray[i][j].escapeTime(RADIUS, maxIterations)!=-1){//the complex escaped\r\n mandelbrotColor[i][j]=new RGBColor(palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)]);\r\n }\r\n else{\r\n mandelbrotColor[i][j]=palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)+1];//the complex didnt escaped\r\n }\r\n }\r\n }\r\n }", "public static BufferedImage sharpenByMatrix3(BufferedImage img) {\n\t\tint width = img.getWidth();\n\t\tint height = img.getHeight();\n\t\tint[] pixels = new int[width*height];\n\t\timg.getRGB(0, 0, width, height, pixels, 0, width);\n\t\tint[][] pixelArr = quantize.changeDimension2(pixels, width);\n\t\tint[][] newArr = new int[height][width];\n\t\tfor (int i = 0 ;i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tnewArr[j][i] = getNewData(pixelArr, coefficient9, i, j);\n\t\t\t}\n\t\t}\n\t\tBufferedImage image = new BufferedImage(width, height, img.getType());\n\t\timage.setRGB(0, 0, width, height, quantize.changeDimension1(newArr), 0, width);\n\t\treturn image;\n\t}", "public void targetCrochet() {\n\t\twhile(true) {\n\t\t\tm_camera.read(m_originalImage);\n\t\t\ttry {\n\t\t\t\tThread.sleep(0);\n\t\t\t}\n\t\t\tcatch (java.lang.InterruptedException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (m_originalImage.cols() != 0)\n\t\t\t\t\tbreak;\n\t\t}\n\t\tm_srcImage = m_originalImage.clone();\n\t\tm_hsvImage = m_srcImage.clone();\n\t\tMat backupImage = m_originalImage.clone();\n\t\tImgproc.cvtColor(m_srcImage, m_hsvImage, Imgproc.COLOR_BGR2HSV);\n\t\t\n\t\t/*\n\t\t * Permet de faire le choix de l'intervale de couleur\n\t\t * \n\t\t * Param1 = source, Param2 = 3 valeur minimum HSV, Param3 = 3 valeur maximum HSV, Param 4 = destination\n\t\t *\n\t\t */\n\t\tCore.inRange(m_hsvImage, m_minHSV , m_maxHSV, m_hsvOverlay); // Valeur pour le tape\n\n\t\t//Core.multiply(m_hsvOverlay, new Scalar(0.75, 0.75, 0.75), m_hsvOverlay);\n\t\t//Core.multiply(m_hsvOverlay, new Scalar(0.3, 1, 1), m_hsvOverlay);\n\n\t\t//Nous allons utiliser le maintenant inutile hsvImage comme Mat de swap...\n\t\tImgproc.cvtColor(m_hsvOverlay, m_hsvImage, Imgproc.COLOR_GRAY2BGR);\n\t\t\n\t\t\n\t\t/*\n\t\t * findContour va trouver les contours des objets de l'image\n\t\t * \n\t\t */\n\t\tList<MatOfPoint> contours = new ArrayList<MatOfPoint>();\n\t\tImgproc.findContours(m_hsvOverlay, contours, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE);\n\n\t\t//Core.multiply(srcImage, new ScacurrentFPSlar(0,0,0), srcImage);\n\n\t\t//Appliquer le masque...\n\n\t\t//Imgproc.cvtColor(m_hsvOverlay, m_hsvOverlay, Imgproc.COLOR_GRAY2BGR);\n\t\t//Core.bitwise_and(srcImage, m_hsvOverlay, srcImage);\n\n\t\tList<MatOfInt> convexhulls = new ArrayList<MatOfInt>(contours.size());\n\t\tList<MatOfPoint> targetHulls = new ArrayList<>();\n\t\tList<RotatedRect> rRects = new ArrayList<>();\n\t\tList<Double> orientations = new ArrayList<Double>();\n//\t\t//Dessiner les rectangles\n\t\tList<RotatedRect> selectedRect = new ArrayList<>();\n\t\tRotatedRect biggestRect = new RotatedRect();\n\t\tRotatedRect second = new RotatedRect();\n\t\tdouble biggestArea = 0;\n\t\tdouble secondBiggest = 0;\n\t\tPoint crochetPos = new Point();\n\t\tfor (int i = 0; i < contours.size(); i++)\n\t\t{\n//\t\t\t//Trier les contours qui ont une bounding box\n\t\t\tconvexhulls.add(i, new MatOfInt(6));\n\t\t\tdouble tempArea = Imgproc.contourArea(contours.get(i));\n\t\t\tif (tempArea > 100)\n\t\t\t{\n\t\t\t\tImgproc.convexHull(contours.get(i), convexhulls.get(i));\n\t\t\t\t//double contourSolidity = Imgproc.contourArea(contours.get(i))/Imgproc.contourArea(convexhulls.get(i));\n\t\t\t\t//Imgproc.drawContours(m_srcImage, contours, i, new Scalar(255, 255, 255), -1);\n\t\t\t\tMatOfPoint2f points = new MatOfPoint2f(contours.get(i).toArray());\n\t\t\t\tRotatedRect rRect = Imgproc.minAreaRect(points);\n\t\t\t\tMatOfPoint2f approx = new MatOfPoint2f();\n\t\t\t\tdouble epsilon = 0.012*Math.pow(Imgproc.arcLength(new MatOfPoint2f(contours.get(i).toArray()),true), 1.3);\n\t\t\t\tImgproc.approxPolyDP(new MatOfPoint2f(contours.get(i).toArray()),approx,epsilon,true);\n\t\t\t\tdouble convexArea = Imgproc.contourArea(approx);\n\t\t\t\tdouble ratio = rRect.size.area() / convexArea;\n\t\t\t\tImgproc.putText(m_srcImage, String.valueOf(ratio), new Point(30, i*70), 1, 1, new Scalar(255, 20, 20));\n\t\t\t\tImgproc.putText(m_srcImage, \"angle :\" + String.valueOf(Math.abs(rRect.angle%90)), rRect.center, 1, 1, new Scalar(155, 120, 20));\n\t\t\t\tMatOfPoint approxpoints = new MatOfPoint();\n\t\t\t\tapprox.convertTo(approxpoints, CvType.CV_32S);\n\t\t\t\tList<MatOfPoint> matofapprox = new ArrayList<>();\n\t\t\t\tmatofapprox.add(approxpoints);\n\t\t\t\tImgproc.drawContours(m_srcImage, matofapprox, 0, new Scalar(20, 25, 200), 5);\n\n\t\t\t\t//If its a tetragon, (ex, rectangle, trapezoid), add the convex hulls to the list\n\t\t\t\tif(approx.rows()==4) {\n\t\t\t\t\ttargetHulls.add(approxpoints);\n\t\t\t\t\trRects.add(rRect);\n\t\t\t\t}\n\t\t\t\tif (tempArea > biggestArea)\n\t\t\t\t{\n\t\t\t\t\tbiggestRect = rRect;\n\t\t\t\t\tbiggestArea = tempArea;\n\t\t\t\t}\n\t\t\t\tPoint[] vertices = new Point[4];\n\t\t\t\trRect.points(vertices);\n\t\t\t\tdouble Center_Y = rRect.center.y;\n\t\t\t\tdouble Center_X = rRect.center.x;\n\n\t\t\t\tScalar color = new Scalar(255, 0, 0);\n\n\t\t\t\tImgproc.line(m_srcImage, new Point(Center_X, Center_Y - 50), new Point(Center_X, Center_Y + 50), color, 2);\n\t\t\t\t//System.out.println(contourSolidity);\n\t\t\t}\n\t\t}\n\n\t\tArrayList<Tuple<Target, Target>> ListOfPairs = new ArrayList<>();\n\t\t//We need to make pairs of targets for further calculation\n\t\t//First we should sort the targetHulls by position along x\n\t\tArrayList<Target> ListOfTargets = new ArrayList<>();\n\t\tfor(int i = 0; i < targetHulls.size(); i++){\n\t\t\tListOfTargets.add(new Target(rRects.get(i), targetHulls.get(i)));\n\t\t}\n\n\t\tCollections.sort(ListOfTargets, new Comparator<Target>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Target o1, Target o2) {\n\t\t\t\treturn o1.rect.center.x < o2.rect.center.x ? -1 : o1.rect.center.x == o2.rect.center.x ? 0:1;\n\t\t\t}\n\t\t});\n\n\t\tBoolean skip = false;\n\t\tfor(int i = 0; i < ListOfTargets.size(); i++){\n\t\t\tdouble angle = Math.abs(ListOfTargets.get(i).rect.angle%90);\n\t\t\tif(skip){\n\t\t\t\tskip = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(angle > 60 && angle < 90 && i+1<targetHulls.size()) {\n\t\t\t\tListOfPairs.add(new Tuple(ListOfTargets.get(i), ListOfTargets.get(i+1)));\n\t\t\t\tskip = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tdouble highestDistance = 0;\n\t\tint chosenIndex = 0;\n\t\tfor(int i = 0; i<ListOfPairs.size(); i++){\n\t\t\tTuple<Target, Target> tempTarget = ListOfPairs.get(i);\n\t\t\t//Calculate mean point:\n\t\t\tPoint mean = new Point((tempTarget.x.rect.center.x + tempTarget.y.rect.center.x)/2, (tempTarget.x.rect.center.y + tempTarget.y.rect.center.y)/2);\n\t\t\t//Calcualte distance\n\t\t\tdouble distance = Math.sqrt(Math.pow((tempTarget.x.rect.center.x - tempTarget.y.rect.center.x),2) + Math.pow(tempTarget.x.rect.center.y = tempTarget.y.rect.center.y, 2));\n\t\t\t//calculate angle of mean point\n\t\t\tdouble degree = Math.atan(((mean.x-CENTRE_IMAGE_X)*CONV_PIXEL2CM)/FOV_LENGHT)*2;\n\t\t\tdegree = Math.toDegrees(degree);\n\t\t\tif(distance > highestDistance) {\n\t\t\t\tchosenIndex = i;\n\t\t\t\tm_degree = degree;\n\t\t\t\ttables.setAngle(degree, 0);\n\t\t\t\tSystem.out.println(degree);\n\t\t\t}\n\t\t\tMatOfPoint combinedPoints = new MatOfPoint();\n\t\t\tArrayList<Mat> concatList = new ArrayList<>();\n\t\t\tconcatList.add(tempTarget.x.hull);\n\t\t\tconcatList.add(tempTarget.y.hull);\n\t\t\tCore.vconcat(concatList, combinedPoints);\n\t\t\tArrayList<MatOfPoint> pointsList = new ArrayList<>();\n\t\t\tpointsList.add(combinedPoints);\n\t\t\tRect boundingRect = Imgproc.boundingRect(combinedPoints);\n\t\t\tPoint[] vertices = new Point[4];\n\t\t\tRotatedRect rRect = new RotatedRect();\n\t\t\trRect.angle = 0;\n\t\t\trRect.size = boundingRect.size();\n\t\t\trRect.center = new Point(boundingRect.x + (boundingRect.size().width/2), boundingRect.y + (boundingRect.size().height/2));\n\t\t\trRect.points(vertices);\n\t\t\tfor (int j = 0; j < 4; j++) //Dessiner un rectangle avec rotation\n\t\t\t{\n\t\t\t\tImgproc.line(m_srcImage, vertices[j], vertices[(j+1)%4], new Scalar(20,200,40), 5);\n\t\t\t}\n\t\t\tImgproc.drawMarker(m_srcImage, mean, new Scalar(40, 200, 200), Imgproc.MARKER_CROSS, 40, 1, Imgproc.LINE_AA);\n\t\t}\n\n\t\tCore.add(m_srcImage, backupImage, m_srcImage);\n\t}", "ImagePlus doStackOperation(ImagePlus img1, ImagePlus img2) {\n ImagePlus img3 = null;\n int size1 = img1.getStackSize();\n int size2 = img2.getStackSize();\n if (size1 > 1 && size2 > 1 && size1 != size2) {\n IJ.error(\"Image Calculator\", \"'Image1' and 'image2' must be stacks with the same\\nnumber of slices, or 'image2' must be a single image.\");\n return null;\n }\n if (createWindow) {\n img1 = duplicateStack(img1);\n if (img1 == null) {\n IJ.error(\"Calculator\", \"Out of memory\");\n return null;\n }\n img3 = img1;\n }\n int mode = getBlitterMode();\n ImageWindow win = img1.getWindow();\n if (win != null)\n WindowManager.setCurrentWindow(win);\n else if (Interpreter.isBatchMode() && !createWindow && WindowManager.getImage(img1.getID()) != null)\n IJ.selectWindow(img1.getID());\n Undo.reset();\n ImageStack stack1 = img1.getStack();\n StackProcessor sp = new StackProcessor(stack1, img1.getProcessor());\n try {\n if (size2 == 1)\n sp.copyBits(img2.getProcessor(), 0, 0, mode);\n else\n sp.copyBits(img2.getStack(), 0, 0, mode);\n } catch (IllegalArgumentException e) {\n IJ.error(\"\\\"\" + img1.getTitle() + \"\\\": \" + e.getMessage());\n return null;\n }\n img1.setStack(null, stack1);\n if (img1.getType() != ImagePlus.GRAY8) {\n img1.getProcessor().resetMinAndMax();\n }\n if (img3 == null)\n img1.updateAndDraw();\n return img3;\n }", "@Override\n\tpublic void run(ImageProcessor ip) {\n\t\twidth = ip.getWidth();\n\t\theight = ip.getHeight();\n\n\t\tbyte[] pixels = (byte[]) ip.getPixels();\n\t\tij.gui.Roi[] rois = new ij.gui.Roi[0];\n\t\tbyte[] output = trimSperm(pixels, width, height, rois);\n\n\t\tByteProcessor bp = new ByteProcessor(width, height, output);\n\t\tip.copyBits(bp, 0, 0, Blitter.COPY);\n\t\timage.show();\n\t\timage.updateAndDraw();\n\t}", "public abstract void overlayGUI(ImageRepresentation[][] mainImRepMatrix);", "public void blurImage()\r\n {\r\n if (!isChanged && !isBlured )\r\n {\r\n cropedEdited = cropedPart;\r\n }\r\n\t float[] elements = {1/9f, 1/9f, 1/9f, 1/9f,1/9f,1/9f,1/9f,1/9f,1/9f,1/9f}; \r\n\t Kernel kernel = new Kernel(3, 3, elements); \r\n\t BufferedImageOp blur = new ConvolveOp(kernel); \r\n\t cropedEdited = blur.filter(cropedEdited, null);\r\n repaint();\r\n }", "private void rebuildImageIfNeeded() {\n Rectangle origRect = this.getBounds(); //g.getClipBounds();\n// System.out.println(\"origRect \" + origRect.x + \" \" + origRect.y + \" \" + origRect.width + \" \" + origRect.height);\n\n backBuffer = createImage(origRect.width, origRect.height);\n// System.out.println(\"Image w \" + backBuffer.getWidth(null) + \", h\" + backBuffer.getHeight(null));\n Graphics backGC = backBuffer.getGraphics();\n backGC.setColor(Color.BLACK);\n backGC.fillRect(0, 0, origRect.width, origRect.height);\n// updateCSysEntList(combinedRotatingMatrix);\n paintWorld(backGC);\n }", "public static Mat[] split(Mat m, int size) {\n Mat cArr[] = new Mat[3];\n Mat c1 = new Mat(), c2 = new Mat(), c3 = new Mat();\n Mat c1TempDest = new Mat(),c1TempDest2 = new Mat(), c2TempDest = new Mat();\n Mat max=new Mat(size, size, CvType.CV_8UC1, new Scalar(255));\n List<Mat> lRgb = new ArrayList<Mat>(3);\n\n Core.split(m, lRgb);\n Mat R = lRgb.get(0);\n Mat G = lRgb.get(1);\n Mat B = lRgb.get(2);\n\n //C1\n Core.add(R,G,c1TempDest);\n Core.add(c1TempDest, B, c1TempDest2);\n Core.divide(c1TempDest2,new Scalar(3),c1);\n cArr[0] = c1;\n\n //C2\n Mat maxMinusB = new Mat(), maxMinusBPlusR= new Mat();\n Core.subtract(max,B,maxMinusB);\n Core.add(maxMinusB,R,maxMinusBPlusR);\n Core.divide(maxMinusBPlusR,new Scalar(2),c2);\n cArr[1] = c2;\n\n //C3\n Mat maxMinusG = new Mat() , maxMinusGTimes2 = new Mat(), maxMinusGTimes2PlusR = new Mat(), maxMinusGTimes2PlusRPlusB = new Mat();\n Core.subtract(max,G, maxMinusG);\n Core.multiply(maxMinusG, new Scalar(2), maxMinusGTimes2);\n Core.add(maxMinusGTimes2, R, maxMinusGTimes2PlusR);\n Core.add(maxMinusGTimes2PlusR, B, maxMinusGTimes2PlusRPlusB);\n Core.divide(maxMinusGTimes2PlusRPlusB, new Scalar(4), c3);\n cArr[2] = c3;\n return cArr;\n }", "private void paintOriginalImage() {\r\n Graphics g = originalImage.getGraphics();\r\n // Erase to black\r\n g.setColor(Color.BLACK);\r\n g.fillRect(0, 0, FULL_SIZE, FULL_SIZE);\r\n \r\n // RGB quadrant\r\n for (int i = 0; i < QUAD_SIZE; i += 3) {\r\n int x = i;\r\n g.setColor(Color.RED);\r\n g.drawLine(x, 0, x, QUAD_SIZE);\r\n x++;\r\n g.setColor(Color.GREEN);\r\n g.drawLine(x, 0, x, QUAD_SIZE);\r\n x++;\r\n g.setColor(Color.BLUE);\r\n g.drawLine(x, 0, x, QUAD_SIZE);\r\n }\r\n \r\n // Picture quadrant\r\n try {\r\n URL url = getClass().getResource(\"images/BBGrayscale.png\");\r\n BufferedImage picture = ImageIO.read(url);\r\n // Center picture in quadrant area\r\n int xDiff = QUAD_SIZE - picture.getWidth();\r\n int yDiff = QUAD_SIZE - picture.getHeight();\r\n g.drawImage(picture, QUAD_SIZE + xDiff/2, yDiff/2, null);\r\n } catch (Exception e) {\r\n System.out.println(\"Problem reading image file: \" + e);\r\n }\r\n \r\n // Vector drawing quadrant\r\n g.setColor(Color.WHITE);\r\n g.fillRect(0, QUAD_SIZE, QUAD_SIZE, QUAD_SIZE);\r\n g.setColor(Color.BLACK);\r\n g.drawOval(2, QUAD_SIZE + 2, QUAD_SIZE-4, QUAD_SIZE-4);\r\n g.drawArc(20, QUAD_SIZE + 20, (QUAD_SIZE - 40), QUAD_SIZE - 40, \r\n 190, 160);\r\n int eyeSize = 7;\r\n int eyePos = 30 - (eyeSize / 2);\r\n g.fillOval(eyePos, QUAD_SIZE + eyePos, eyeSize, eyeSize);\r\n g.fillOval(QUAD_SIZE - eyePos - eyeSize, QUAD_SIZE + eyePos, \r\n eyeSize, eyeSize);\r\n \r\n // B&W grid\r\n g.setColor(Color.WHITE);\r\n g.fillRect(QUAD_SIZE + 1, QUAD_SIZE + 1, QUAD_SIZE, QUAD_SIZE);\r\n g.setColor(Color.BLACK);\r\n for (int i = 0; i < QUAD_SIZE; i += 4) {\r\n int pos = QUAD_SIZE + i;\r\n g.drawLine(pos, QUAD_SIZE + 1, pos, FULL_SIZE);\r\n g.drawLine(QUAD_SIZE + 1, pos, FULL_SIZE, pos);\r\n }\r\n \r\n originalImagePainted = true;\r\n }", "private TailoredImage doProcess(BufferedImage sourceImg) throws IOException {\n\t\tint width = sourceImg.getWidth();\n\t\tint height = sourceImg.getHeight();\n\t\t// Check maximum effective width height\n\t\tisTrue((width <= sourceMaxWidth && height <= sourceMaxHeight),\n\t\t\t\tString.format(\"Source image is too big, max limits: %d*%d\", sourceMaxWidth, sourceMaxHeight));\n\t\tisTrue((width >= sourceMinWidth && height >= sourceMinHeight),\n\t\t\t\tString.format(\"Source image is too small, min limits: %d*%d\", sourceMinWidth, sourceMinHeight));\n\n\t\t// 创建背景图,TYPE_4BYTE_ABGR表示具有8位RGBA颜色分量的图像(支持透明的BufferedImage),正常取bufImg.getType()\n\t\tBufferedImage primaryImg = new BufferedImage(sourceImg.getWidth(), sourceImg.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);\n\t\t// 创建滑块图\n\t\tBufferedImage blockImg = new BufferedImage(sourceImg.getWidth(), sourceImg.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);\n\t\t// 随机截取的坐标\n\t\tint maxX0 = width - blockWidth - (circleR + circleOffset);\n\t\tint maxY0 = height - blockHeight;\n\t\tint blockX0 = current().nextInt((int) (maxX0 * 0.25), maxX0); // *0.25防止x坐标太靠左\n\t\tint blockY0 = current().nextInt(circleR, maxY0); // 从circleR开始是为了防止上边的耳朵显示不全\n\t\t// Setup block borders position.\n\t\tinitBorderPositions(blockX0, blockY0, blockWidth, blockHeight);\n\n\t\t// 绘制生成新图(图片大小是固定,位置是随机)\n\t\tdrawing(sourceImg, blockImg, primaryImg, blockX0, blockY0, blockWidth, blockHeight);\n\t\t// 裁剪可用区\n\t\tint cutX0 = blockX0;\n\t\tint cutY0 = Math.max((blockY0 - circleR - circleOffset), 0);\n\t\tint cutWidth = blockWidth + circleR + circleOffset;\n\t\tint cutHeight = blockHeight + circleR + circleOffset;\n\t\tblockImg = blockImg.getSubimage(cutX0, cutY0, cutWidth, cutHeight);\n\n\t\t// Add watermark string.\n\t\taddWatermarkIfNecessary(primaryImg);\n\n\t\t// 输出图像数据\n\t\tTailoredImage img = new TailoredImage();\n\t\t// Primary image.\n\t\tByteArrayOutputStream primaryData = new ByteArrayOutputStream();\n\t\tImageIO.write(primaryImg, \"PNG\", primaryData);\n\t\timg.setPrimaryImg(primaryData.toByteArray());\n\n\t\t// Block image.\n\t\tByteArrayOutputStream blockData = new ByteArrayOutputStream();\n\t\tImageIO.write(blockImg, \"PNG\", blockData);\n\t\timg.setBlockImg(blockData.toByteArray());\n\n\t\t// Position\n\t\timg.setX(blockX0);\n\t\timg.setY(blockY0 - circleR >= 0 ? blockY0 - circleR : 0);\n\t\treturn img;\n\t}", "private Image getScaledImage(Image sourceImage)\n {\n //create storage for the new image\n BufferedImage resizedImage = new BufferedImage(50, 50,\n BufferedImage.TYPE_INT_ARGB);\n\n //create a graphic from the image\n Graphics2D g2 = resizedImage.createGraphics();\n\n //sets the rendering options\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n //copies the source image into the new image\n g2.drawImage(sourceImage, 0, 0, 50, 50, null);\n\n //clean up\n g2.dispose();\n\n //return 50 x 50 image\n return resizedImage;\n }", "public void UndoRedoAction()\r\n {\r\n BufferedImage[] tempImages = new BufferedImage[4];\r\n Boolean[] tempStates = new Boolean[7];\r\n \r\n tempImages[0] = bufferedImage;\r\n tempImages[1] = edited;\r\n tempImages[2] = cropedPart;\r\n tempImages[3] = bufferedImage;\r\n\r\n tempStates[0] = isBlured;\r\n tempStates[1] = isReadyToSave;\r\n tempStates[2] = isChanged;\r\n tempStates[3] = isInverted;\r\n tempStates[4] = isRectangularCrop;\r\n tempStates[5] = isCircularCrop;\r\n tempStates[6] = isImageLoaded;\r\n \r\n changeAction();\r\n \r\n imageCopy[0] = tempImages[0];\r\n imageCopy[1] = tempImages[1];\r\n imageCopy[2] = tempImages[2];\r\n imageCopy[3] = tempImages[3];\r\n\r\n statesCopy[0] = tempStates[0];\r\n statesCopy[1] = tempStates[1];\r\n statesCopy[2] = tempStates[2];\r\n statesCopy[3] = tempStates[3];\r\n statesCopy[4] = tempStates[4];\r\n statesCopy[5] = tempStates[5];\r\n statesCopy[6] = tempStates[6];\r\n \r\n repaint();\r\n \r\n }", "public void setPreviewCanvas()\n {\n if(grayImgToFit!=null)\n {\n canvas.beginDraw();\n for(int i = 0; i < xTiles+3; i++)\n {\n for(int j = 0; j < yTiles+1; j++)\n {\n //if(i<verticalFlip[0].length && j<verticalFlip.length)\n //{\n //if(!notShow[i][j])\n //{\n // even or odd row shift\n if(j%2 == 0)\n {\n if(verticalFlip[i][j] && ! horizontalFlip[i][j])\n {\n canvas.image(tileMiniaturesV[getTileIntensityAtIndex(i,j)],i * tileMiniaturesV[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && !verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesH[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesVH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesVH[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else\n {\n canvas.image(tileMiniatures[getTileIntensityAtIndex(i,j)],i * tileMiniatures[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n }\n else\n {\n if(verticalFlip[i][j] && ! horizontalFlip[i][j])\n {\n canvas.image(tileMiniaturesV[getTileIntensityAtIndex(i,j)],i * tileMiniaturesV[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && !verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesH[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesVH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesVH[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else\n {\n canvas.image(tileMiniatures[getTileIntensityAtIndex(i,j)],i * tileMiniatures[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n }\n //}\n //else\n //{\n // canvas.fill(255,255,255);\n // canvas.noStroke();\n // if(hoverIndex[1]%2 == 0)\n // canvas.rect(i * tileMiniatures[0].width + evenRowShift,j * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n // else\n // canvas.rect(i * tileMiniatures[0].width + oddRowShift,j * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n //}\n //}\n }\n }\n \n canvas.fill(0,255,0,100);\n canvas.noStroke();\n if(hoverIndex[1]%2 == 0)\n {\n canvas.rect(hoverIndex[0] * tileMiniatures[0].width + evenRowShift,hoverIndex[1] * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n }\n else\n {\n canvas.rect(hoverIndex[0] * tileMiniatures[0].width + oddRowShift,hoverIndex[1] * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n }\n canvas.endDraw();\n }\n }", "public double calcAvgSeperatedCharHeight(int nLeftThresh, int nTopThresh, int nRightP1Thresh, int nBottomP1Thresh, double dAvgStrokeWidth) {\n ImageChops imgChops = ExprSeperator.extractConnectedPieces(this);\n double dAvgHeight = 0;\n int nNumOfCntedChars = 0;\n for (int idx = 0; idx < imgChops.mlistChops.size(); idx ++) {\n byte[][] barrayThis = imgChops.mlistChops.get(idx).mbarrayImg;\n int nThisLeft = imgChops.mlistChops.get(idx).mnLeft;\n int nThisTop = imgChops.mlistChops.get(idx).mnTop;\n int nThisWidth = imgChops.mlistChops.get(idx).mnWidth;\n int nThisHeight = imgChops.mlistChops.get(idx).mnHeight;\n double dThisCharHeight = nThisHeight;\n if (nThisWidth != 0 && nThisHeight != 0\n && (imgChops.mlistChops.get(idx).mnLeft < mapOriginalXIdx2This(nRightP1Thresh)\n || imgChops.mlistChops.get(idx).getRightPlus1() > mapOriginalXIdx2This(nLeftThresh))\n && (imgChops.mlistChops.get(idx).mnTop < mapOriginalXIdx2This(nBottomP1Thresh)\n || imgChops.mlistChops.get(idx).getBottomPlus1() > mapOriginalXIdx2This(nTopThresh))) {\n double dMaxCutHeight = 0;\n int nLastAllThroughDivIdx = nThisTop - 1;\n int idx2 = nThisTop;\n for (; idx2 < imgChops.mlistChops.get(idx).getBottomPlus1(); idx2 ++) {\n boolean bIsAllThroughLn = true;\n for (int idx1 = nThisLeft; idx1 < imgChops.mlistChops.get(idx).getRightPlus1(); idx1 ++) {\n if (barrayThis[idx1][idx2] == 0) {\n bIsAllThroughLn = false;\n break;\n }\n }\n if (bIsAllThroughLn && (idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n }\n if ((idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n dThisCharHeight = dMaxCutHeight;\n }\n if (dThisCharHeight >= ConstantsMgr.msnMinCharHeightInUnit && dThisCharHeight > dAvgStrokeWidth) {\n // a seperated point or a disconnected stroke may significantly drag down dAvgHeight value.\n dAvgHeight += dThisCharHeight;\n nNumOfCntedChars ++;\n }\n }\n if (nNumOfCntedChars != 0) {\n dAvgHeight /= nNumOfCntedChars;\n\n }\n return Math.max(dAvgHeight, Math.max(ConstantsMgr.msnMinCharHeightInUnit, dAvgStrokeWidth));\n }", "public Mat cameraFrame(Mat mat) {\n frame.empty(); hsv.empty(); hsv2.empty(); hierarchy.empty(); contours.clear();\n //Converts the RGB frame to the HSV frame\n Imgproc.cvtColor(mat, hsv, Imgproc.COLOR_BGR2HSV);\n // Blur image\n //Imgproc.medianBlur(frame, frame, 9);\n //Color ranges for in the Workshop\n //Core.inRange(hsv, new Scalar(55, 40, 125), new Scalar(70, 255, 255), frame);\n //Core.inRange(hsv, new Scalar(45, 100, 100), new Scalar(70, 200, 200), frame);\n //Color ranges for in the PAST Foundation\n if (Math.abs(System.currentTimeMillis()-oldMillis) > 1000 && thresholSet < 5) {\n oldMillis = System.currentTimeMillis();\n thresholSet++;\n } else if (Math.abs(System.currentTimeMillis()-oldMillis) > 1000){\n oldMillis = System.currentTimeMillis();\n thresholSet = 0;\n }\n //Blurs the black and white image to eliminate all noise\n //Imgproc.bilateralFilter(hsv, hsv, 5, 200, 200);\n hsv.copyTo(hsv2);\n Imgproc.bilateralFilter(hsv, hsv2, 3, 10, 10);\n Imgproc.medianBlur(hsv, hsv, 3);\n Mat element = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(5, 5));\n Imgproc.erode(hsv, hsv, element);\n Imgproc.dilate(hsv, hsv, element);\n Core.inRange(hsv, new Scalar(45, 100, 150), new Scalar(70, 255, 255), frame);\n\n //System.out.println(thresholSet);\n //Core.inRange(hsv, new Scalar(48, 152, 122), new Scalar(70, 255, 255), frame);\n //Core.inRange(hsv, new Scalar(46, 112, 100), new Scalar(70, 255, 255), frame);\n //Bilatersl FIltering\n //mat.copyTo(biMat);\n //Copies the black and white image to a new frame to prevent messing up the original\n frame.copyTo(contourFrame);\n //Finds the contours in the thresholded frame\n Imgproc.findContours(contourFrame, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);\n //Draws the contours found on the original camera feed\n Imgproc.drawContours(mat, contours, -2, new Scalar(0, 0, 255), 5, 8, hierarchy, Imgproc.INTER_MAX, offset);\n //Draws circle at the center of the feed\n Imgproc.circle(mat, new Point((mat.size().width) / 2, (mat.size().height) / 2), 5, new Scalar(255, 255, 0), 15, Imgproc.LINE_8, 0);\n try {\n //Creates the max variable\n int max = 0;\n //Sets up loop to go through all contuors\n for (int a=0;a<contours.size();a++){\n //Gets the area of all of the contours\n double s2 = Imgproc.contourArea(contours.get(a));\n //Checks the area against the other areas of the contours to find out which is largest\n if (s2 > Imgproc.contourArea(contours.get(max))) {\n //Sets largest contour equal to max variable\n max = a;\n }\n }\n\n try{\n //Gets the minimum area vertical(non titlted) rectangle that outlines the contour\n Rect place = Imgproc.boundingRect(contours.get(max));\n //Creates variable for center point\n Point center = new Point();\n //Sets variale fpr screen center so now we adjust the X and Y axis\n Point screenCenter = new Point();\n //Creates top left point variable\n Point topleft = place.tl();\n //Cerates bottom right point variable\n Point bottomright = place.br();\n //Finds the width of rectangle\n double width = (bottomright.x - topleft.x);\n if (width < 90){\n //Tells Rio to move further away during Targeting modes\n status = 1;\n }\n else if (width > 110){\n // Tells Rio to move robot closer during Targeting modes\n status = -1;\n }\n else{\n //Tell Rio not to move robot during Targeting modes\n status = 0;\n }\n //Finding the middle of the countoured area on the screen\n center.x = (topleft.x+bottomright.x)/2;\n center.y = (topleft.y+bottomright.y)/2;\n //Draws the circle at center of contoured object\n Imgproc.circle(mat, center, 5, new Scalar(255, 0, 255), 5, Imgproc.LINE_8, 0);\n //Draws rectangle around the recognized contour\n Imgproc.rectangle(mat, place.tl(), place.br(), new Scalar(255, 0, 0), 10, Imgproc.LINE_8, 0);\n System.out.println(\"X Away: \" + Math.abs((mat.size().width / 2) - center.x));\n System.out.println(\"Y Away: \" + Math.abs((mat.size().height / 2) - center.y));\n }\n catch(Exception e) {\n //This is\n status = 2;\n }\n }\n catch (Exception e) {\n //In case no contours are found\n }\n //Returns the original image with drawn contours and shape identifiers\n return mat;\n }", "public void run(String[] args) {\n if (args.length == 0){\n System.out.println(\"Not enough parameters!\");\n System.out.println(\"Program Arguments: [image_path]\");\n System.exit(-1);\n }\n\n // Load the image\n Mat src = Imgcodecs.imread(args[0]);\n\n // Check if image is loaded fine\n if( src.empty() ) {\n System.out.println(\"Error opening image: \" + args[0]);\n System.exit(-1);\n }\n\n // Show source image\n HighGui.imshow(\"src\", src);\n //! [load_image]\n\n //! [gray]\n // Transform source image to gray if it is not already\n Mat gray = new Mat();\n\n if (src.channels() == 3)\n {\n Imgproc.cvtColor(src, gray, Imgproc.COLOR_BGR2GRAY);\n }\n else\n {\n gray = src;\n }\n\n // Show gray image\n showWaitDestroy(\"gray\" , gray);\n //! [gray]\n\n //! [bin]\n // Apply adaptiveThreshold at the bitwise_not of gray\n Mat bw = new Mat();\n Core.bitwise_not(gray, gray);\n Imgproc.adaptiveThreshold(gray, bw, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 15, -2);\n\n // Show binary image\n showWaitDestroy(\"binary\" , bw);\n //! [bin]\n\n //! [init]\n // Create the images that will use to extract the horizontal and vertical lines\n Mat horizontal = bw.clone();\n Mat vertical = bw.clone();\n //! [init]\n\n //! [horiz]\n // Specify size on horizontal axis\n int horizontal_size = horizontal.cols() / 30;\n\n // Create structure element for extracting horizontal lines through morphology operations\n Mat horizontalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(horizontal_size,1));\n\n // Apply morphology operations\n Imgproc.erode(horizontal, horizontal, horizontalStructure);\n Imgproc.dilate(horizontal, horizontal, horizontalStructure);\n\n // Show extracted horizontal lines\n showWaitDestroy(\"horizontal\" , horizontal);\n //! [horiz]\n\n //! [vert]\n // Specify size on vertical axis\n int vertical_size = vertical.rows() / 30;\n\n // Create structure element for extracting vertical lines through morphology operations\n Mat verticalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size( 1,vertical_size));\n\n // Apply morphology operations\n Imgproc.erode(vertical, vertical, verticalStructure);\n Imgproc.dilate(vertical, vertical, verticalStructure);\n\n // Show extracted vertical lines\n showWaitDestroy(\"vertical\", vertical);\n //! [vert]\n\n //! [smooth]\n // Inverse vertical image\n Core.bitwise_not(vertical, vertical);\n showWaitDestroy(\"vertical_bit\" , vertical);\n\n // Extract edges and smooth image according to the logic\n // 1. extract edges\n // 2. dilate(edges)\n // 3. src.copyTo(smooth)\n // 4. blur smooth img\n // 5. smooth.copyTo(src, edges)\n\n // Step 1\n Mat edges = new Mat();\n Imgproc.adaptiveThreshold(vertical, edges, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 3, -2);\n showWaitDestroy(\"edges\", edges);\n\n // Step 2\n Mat kernel = Mat.ones(2, 2, CvType.CV_8UC1);\n Imgproc.dilate(edges, edges, kernel);\n showWaitDestroy(\"dilate\", edges);\n\n // Step 3\n Mat smooth = new Mat();\n vertical.copyTo(smooth);\n\n // Step 4\n Imgproc.blur(smooth, smooth, new Size(2, 2));\n\n // Step 5\n smooth.copyTo(vertical, edges);\n\n // Show final result\n showWaitDestroy(\"smooth - final\", vertical);\n //! [smooth]\n\n System.exit(0);\n }", "@Test\n\tpublic void testGetNChannels() {\n\t\tip = new ImagePlus(\"Groening\", (Image)null);\n\t\tst = new ImageStack(2,3);\n\t\tst.addSlice(\"silly\",new byte[] {1,2,3,4,5,6});\n\t\tip.setStack(\"AyeCarumba\",st);\n\t\tip.setDimensions(1,1,3);\n\t\tassertEquals(1,ip.getNChannels());\n\t\tip.setDimensions(1,3,1);\n\t\tassertEquals(1,ip.getNChannels());\n\t\tip.setDimensions(3,1,1);\n\t\tassertEquals(1,ip.getNChannels());\n\n\t\t// stack matches dimensions\n\t\tip = new ImagePlus(\"Agent007\", (Image)null);\n\t\tst = new ImageStack(2,3);\n\t\tst.addSlice(\"suave\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"debonair\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"sophisticated\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"handsome\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"humorous\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"aloof\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"calm\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"composed\",new byte[] {1,2,3,4,5,6});\n\t\tip.setStack(\"MoneyPenny\", st);\n\n\t\t// one dim > 1\n\t\tip.setDimensions(1,1,8);\n\t\tassertEquals(1,ip.getNChannels());\n\t\tip.setDimensions(1,8,1);\n\t\tassertEquals(1,ip.getNChannels());\n\t\tip.setDimensions(8,1,1);\n\t\tassertEquals(8,ip.getNChannels());\n\n\t\t// two dims > 1\n\t\tip.setDimensions(1,2,4);\n\t\tassertEquals(1,ip.getNChannels());\n\t\tip.setDimensions(1,4,2);\n\t\tassertEquals(1,ip.getNChannels());\n\t\tip.setDimensions(2,1,4);\n\t\tassertEquals(2,ip.getNChannels());\n\t\tip.setDimensions(2,4,1);\n\t\tassertEquals(2,ip.getNChannels());\n\t\tip.setDimensions(4,1,2);\n\t\tassertEquals(4,ip.getNChannels());\n\t\tip.setDimensions(4,2,1);\n\t\tassertEquals(4,ip.getNChannels());\n\n\t\t// three dims > 1\n\t\tip.setDimensions(2,2,2);\n\t\tassertEquals(2,ip.getNChannels());\n\t}", "public static void main(String[]args){\n Scanner reader = new Scanner(System.in);\n System.out.print(\"Enter an image file name: \");\n String fileName = reader.nextLine();\n APImage theOriginal = new APImage(fileName);\n theOriginal.draw();\n\n // Create a copy of the image to blur\n APImage newImage = theOriginal.clone();\n\n // Visit all pixels except for those on the perimeter\n for (int y = 1; y < theOriginal.getHeight() - 1; y++)\n for (int x = 1; x < theOriginal.getWidth() - 1; x++){\n\n // Obtain info from the old pixel and its neighbors\n Pixel old = theOriginal.getPixel(x, y);\n Pixel left = theOriginal.getPixel(x - 1, y);\n Pixel right = theOriginal.getPixel(x + 1, y);\n Pixel top = theOriginal.getPixel(x, y - 1);\n Pixel bottom = theOriginal.getPixel(x, y + 1);\n int redAve = (old.getRed() + left.getRed() + right.getRed() + \n top.getRed() + bottom.getRed()) / 5;\n int greenAve = (old.getGreen() + left.getGreen() + right.getGreen() + \n top.getGreen() + bottom.getGreen()) / 5;\n int blueAve = (old.getBlue() + left.getBlue() + right.getBlue() + \n top.getBlue() + bottom.getBlue()) / 5;\n\n // Reset new pixel to that info\n Pixel newPixel = newImage.getPixel(x, y);\n newPixel.setRed(redAve);\n newPixel.setGreen(greenAve);\n newPixel.setBlue(blueAve);\n }\n System.out.print(\"Press return to continue:\");\n reader.nextLine();\n newImage.draw();\n }", "public void run(ImageProcessor ip) {\n ImagePlus impDark = WindowManager.getImage(DarkiD);\n ImageStack DarkStack = impDark.getStack();\n int width = DarkStack.getProcessor(1).getWidth();\n int height = DarkStack.getProcessor(1).getHeight();\n int dim = width * height;\n \n // Let's assign & declare all the local variables. \n //The pix-by-pix sum of the stack\n double[] sum;\n sum = new double[dim];\n \n //The pix-by-pix average of the stack\n double[] average;\n average = new double[dim];\n \n //The DARK signal pixel array\n double[] DARKpixels;\n DARKpixels = new double[dim];\n \n /* Scan the stack to weed out pics w/ pixel > saturation, then sum \n pix-by-pix through the stack. */\n int k = 0;\n for(int i=1; i<=DarkStack.getSize(); i++){\n double imgMax = DarkStack.getProcessor(i).getStatistics().max;\n if (imgMax < saturation){\n short[] pixels = (short[]) (DarkStack.getPixels(i));\n for (int j=0; j<dim; j++){\n sum[j] += (double)(pixels[j] & 0xffff);\n }\n } else \n k++;\n } \n \n // Average pix-by-pix\n for(int i=0; i<dim; i++){\n average[i] = (double) (sum[i]/(DarkStack.getSize() - k ));\n }\n \n /* Subtract off READ signal and normalize per exposure time. If \n a pixel has a value less than 0, then set it to zero.\n */\n ImagePlus impREAD = WindowManager.getImage(READiD);\n ImageProcessor READ_ip = impREAD.getProcessor();\n float[] READpixels = (float[]) ( READ_ip.getPixels() ); \n for(int i =0; i<dim; i++){\n DARKpixels[i] = (double)( (average[i] - READpixels[i])\n /(DarkTime - READTime) );\n if (DARKpixels[i]< 0)\n DARKpixels[i]=0; \n }\n \n // Make DARK image from pixels then show it. \n ImageProcessor DARK_ip = new FloatProcessor(width, \n height,DARKpixels); \n ImagePlus impDARK = new ImagePlus(\"DARK\",DARK_ip);\n impDARK.show();\n impDARK.draw();\n IJ.run(impDARK, \"Enhance Contrast\", \"saturated=0.35\");\n \n //Print out specs of the DARK image.\n ResultsTable rt = new ResultsTable();\n rt.incrementCounter();\n rt.addValue(\"Mean\",DARK_ip.getStatistics().mean);\n rt.addValue(\"Max\",DARK_ip.getStatistics().max);\n rt.addValue(\"Min\",DARK_ip.getStatistics().min);\n rt.addValue(\"Std.Dev.\",DARK_ip.getStatistics().stdDev);\n rt.showRowNumbers(false);\n rt.show(\"Results\");\n \n\t}", "public interface ImageOperation {\n\tpublic Color[][] doOperation(Color[][] imageArray);\n}", "private javaxt.io.Image _transform_simple(javaxt.io.Image src_img, \n double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n double[] src_quad = new double[]{0, 0, src_img.getWidth(), src_img.getHeight()};\n SRS.transf to_src_px =SRS.make_lin_transf(src_bbox, src_quad);\n\n //minx, miny = to_src_px((dst_bbox[0], dst_bbox[3]));\n double[] min = to_src_px.transf(dst_bbox[0], dst_bbox[3]);\n double minx = min[0];\n double miny = min[1];\n\n //maxx, maxy = to_src_px((dst_bbox[2], dst_bbox[1]));\n double[] max = to_src_px.transf(dst_bbox[2], dst_bbox[1]);\n double maxx = max[0];\n double maxy = max[1];\n\n double src_res = (src_bbox[0]-src_bbox[2])/src_img.getWidth();\n double dst_res = (dst_bbox[0]-dst_bbox[2])/dst_size[0];\n\n double tenth_px_res = Math.abs(dst_res/(dst_size[0]*10));\n javaxt.io.Image img = new javaxt.io.Image(src_img.getBufferedImage());\n if (Math.abs(src_res-dst_res) < tenth_px_res){\n img.crop(cint(minx), cint(miny), dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(minx)+dst_size[0], cint(miny)+dst_size[1]);\n return img; //src_img;\n }\n else{\n img.crop(cint(minx), cint(miny), cint(maxx)-cint(minx), cint(maxy)-cint(miny));\n img.resize(dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(maxx), cint(maxy));\n //src_img.resize(dst_size[0], dst_size[1]);\n return img; //src_img;\n }\n //ImageSource(result, size=dst_size, transparent=src_img.transparent)\n }", "@Override\n public void setColor(Color newColor) {\n BufferedImage bufferedImage;\n try {\n bufferedImage = ImageIO.read(new URL(this.pieceType.getFileName2D()));\n BufferedImage coloredImage = colorImage(bufferedImage,newColor);\n Image image = SwingFXUtils.toFXImage(coloredImage, null);\n view = new ImageView(image);\n\n //these are temporary\n view.setFitHeight(80);\n view.setFitWidth(80);\n\n } catch (IOException e) {\n System.err.println(\"Error with creating the buffered image\");\n e.printStackTrace();\n }\n }", "public static void main(String[] args) \n\t{\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME );\n\t\tMatToBufferedImage M2B = new MatToBufferedImage();\n \tMat mat = Highgui.imread(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\Projects\\\\OpenCV\\\\image6.png\",Highgui.CV_LOAD_IMAGE_COLOR);\n \tMat newMat = new Mat(mat.rows(), mat.cols(), mat.type());\n \tmat.convertTo(mat, CvType.CV_64FC3); //CV_64FC3 it can use double[] instead of byte[] \n \t//Mat newMat = mat.clone();\n \n \t//byte buff[] = new byte[(int) (mat.total() * mat.channels())];\n \tdouble buff[] = new double[(int) (mat.total() * mat.channels())];\n \n\t\tdouble alpha = 2.2;\n \tint beta = 50; \n \n \tSystem.out.println(mat.type());\n \n \tmat.get(0, 0, buff);\n \n \tImageShow imshow = new ImageShow(M2B.getBufferedImage(mat));\n \n \tfor( int i = 0; i<buff.length; i++)\n \t{\n \t\tbuff[i] = (alpha*buff[i]+beta);\n \t}\n \n \tnewMat.put(0, 0, buff);\n \n\t\tImageShow imshow1 = new ImageShow(M2B.getBufferedImage(newMat));\n \n\n\t}", "private void performCrop(Uri img) {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(img, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n // cropIntent.putExtra(\"aspectX\", 1);\r\n //cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n // cropIntent.putExtra(\"outputX\", 256);\r\n // cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning in onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }", "public void compose() {\n\t\tg2d.setBackground(bgColor);\n\t\tg2d.clearRect(0, 0, width, height);\n\t\tboolean drawed=g2d.drawImage(gridImg, gridImgX, gridImgY, null);\n\t\tdrawed=g2d.drawImage(colorCodeImg, colorCodeImgX, colorCodeImgY, null);\n\t\tdrawed=g2d.drawImage(celestialObjectTextImg, celestialObjectTextImgX, celestialObjectTextImgY, null);\n\t\tdrawed=g2d.drawImage(observationTextImg, observationTextImgX, observationTextImgY, null);\n\t\tdrawed=g2d.drawImage(maserImg, maserImgX, maserImgY, null);\n\t}", "void deriveImage()\n\t{\n\n\t\t//img = new BufferedImage(dimx, dimy, BufferedImage.TYPE_INT_ARGB);\n\t\timg = null;\n\t\ttry{\n\t\t\timg = ImageIO.read(new File(\"src/input/World.png\"));\n\n\t\t}catch (IOException e){\n\t\t\tSystem.out.println(\"world image file error\");\n\t\t}\n\t\t//System.out.println(img.getHeight());\n\t\t//System.out.println(img.getWidth());\n//\t\tfloat maxh = -10000.0f, minh = 10000.0f;\n//\n//\t\t// determine range of tempVals s\n//\t\tfor(int x=0; x < dimx; x++)\n//\t\t\tfor(int y=0; y < dimy; y++) {\n//\t\t\t\tfloat h = tempVals [x][y];\n//\t\t\t\tif(h > maxh)\n//\t\t\t\t\tmaxh = h;\n//\t\t\t\tif(h < minh)\n//\t\t\t\t\tminh = h;\n//\t\t\t}\n\t\t\n\t\tfor(int x=0; x < dimx; x++)\n\t\t\tfor(int y=0; y < dimy; y++) {\n\t\t\t\t \t\n\t\t\t\t// find normalized tempVals value in range\n\t\t\t\t//float val = (tempVals [x][y] - minh) / (maxh - minh);\n\t\t\t\tfloat val = tempVals[x][y];\n\n\t\t\t\t//System.out.println(val);\n\n\t\t\t\tColor c = new Color(img.getRGB(x,y));\n\n\t\t\t\tif((c.getRed() > 50 && c.getGreen() > 100 && c.getBlue() < 200)) {\n\n\t\t\t\t\tif (val != 0.0f) {\n\t\t\t\t\t\tColor col = new Color(val, 0, 0);\n\t\t\t\t\t\timg.setRGB(x, y, col.getRGB());\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\t\n\t}", "public void filter(Mat image){\n\n int totalBytes = (int)(image.total() * image.elemSize()); // Number of bytes in the image\n byte[] buffer = new byte[totalBytes];\n image.get(0,0,buffer); // Copy the matrix contents in byte array buffer\n for (int i=0; i<totalBytes; i++){\n if (i%3==0) // Refers to the blue channel\n buffer[i] = 0;\n }\n image.put(0,0,buffer); // Copy the byte array to native storage\n }", "public native void transformImage(String cropGeometry, String imageGeometry)\n\t\t\tthrows MagickException;", "public void updateImage(final Image image) { //The Reason that we have Set the Image to final over here is because once we fetch the Image from the AbsolutePath then after scaling this should be the Final Image in which we detect the Faces \n\t\timagelabel.setIcon(new ImageIcon(scaleImage(image))); \n\t}", "void draw() {\n\n // SeamInfo lowestSeam = this.lowestSeamVert();\n // lowestSeam.changeColor();\n\n ComputedPixelImage seamRemovedImg = new ComputedPixelImage(this.newImg.width,\n this.newImg.height);\n int countRow = 0;\n int countCol = 0;\n\n Pixel current = this.curPixel;\n Pixel temp;\n\n while (current.down != null) {\n temp = current.down;\n while (current.right != null) {\n Color c = Color.MAGENTA;\n if (current.highlighted) {\n c = Color.RED;\n }\n else {\n c = current.color;\n }\n if (this.showType.equals(\"e\")) {\n int energy = (int) (current.energy * 100);\n if (energy > 255) {\n System.out.println(\"energy: \" + energy + \" to 255\");\n energy = 255;\n }\n c = new Color(energy, energy, energy);\n }\n else if (this.showType.equals(\"w\")) {\n int weight = (int) (current.seam.totalWeight);\n if (weight > 255) {\n System.out.println(\"weight: \" + weight + \" to 255\");\n weight = 255;\n }\n c = new Color(weight, weight, weight);\n }\n\n seamRemovedImg.setColorAt(countCol, countRow, c);\n countCol += 1;\n current = current.right;\n }\n countCol = 0;\n countRow += 1;\n current = temp;\n }\n countCol = 0;\n\n this.newImg = seamRemovedImg;\n\n }", "int[][][] mosaicingImage(int[][][] imageArray, int height, int width, int seedNum);", "public void transform(View view) {\n DrawRect.getCoord(1);\n\n // block to get coord os ROI\n ArrayList<Integer> full_x_ROIcoord = new ArrayList<>();\n ArrayList<Integer> full_y_ROIcoord = new ArrayList<>();\n\n if (xRed < 0 || xRed > 750 || yRed < 0 || yRed > 1000 ||\n xOrg < 0 || xOrg > 750 || yOrg < 0 || yOrg > 1000 ||\n xYell < 0 || xYell > 750 || yYell < 0 || yYell > 1000 ||\n xGreen < 0 || xGreen > 750 || yGreen < 0 || yGreen > 1000) {\n return;\n } else {\n // clear situation with x<= xYell\n for (int x = xRed; x < xYell; x++) {\n for (int y = yRed; y < yYell; y++) {\n full_x_ROIcoord.add(x);\n full_y_ROIcoord.add(y);\n }\n }\n }\n // end block\n\n // block get contour via CannyFilter\n Mat sMat = oImage.submat(yRed, yGreen, xRed, xOrg);\n Imgproc.Canny(sMat, sMat, 25, 100 * 2);\n ArrayList<Double> subMatValue = new ArrayList<>();\n\n for (int x = 0; x < sMat.cols(); x++) {\n for (int y = 0; y < sMat.rows(); y++) {\n double[] ft2 = sMat.get(y, x);\n subMatValue.add(ft2[0]);\n }\n }\n int count = 0;\n for (int x = xRed; x < xYell; x++) {\n for (int y = yRed; y < yYell; y++) {\n oImage.put(y, x, subMatValue.get(count));\n count++;\n }\n }\n // end block\n\n displayImage(oImage);\n }", "public void fromRGBImage(RGBImage image)\r\n {\r\n\tshort[][] red = image.getRed();\r\n\tshort[][] green = image.getGreen();\r\n\tshort[][] blue = image.getBlue();\r\n\r\n\tint rows = image.getHeight();\r\n\tint cols = image.getWidth();\r\n\r\n\tthis.hue = new short[rows][cols];\r\n\tthis.saturation = new short[rows][cols];\r\n\tthis.intensity = new short[rows][cols];\r\n \r\n\t@SuppressWarnings(\"unused\")\r\n\tdouble H, S, I;\r\n\t@SuppressWarnings(\"unused\")\r\n\tshort sector, r, g, b, h, t;\r\n\tdouble sum, t1, t2, theta, minrgb;\r\n\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\t\tr = red[row][col];\r\n\t\tg = green[row][col];\r\n\t\tb = blue[row][col];\r\n\t\tsum = r + g + b;\r\n\r\n\t\tif (r == g && r == b)\r\n\t\t{\r\n\t\t // black, gray or white\r\n\t\t hue[row][col] = (short)0;\r\n\t\t saturation[row][col] = (short)0;\r\n\t\t intensity[row][col] = (short)((r + g + b)/3);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n \r\n\t\t if (g == 0 && b == 0)\r\n\t\t {\r\n\t\t\t// only red\r\n\t\t\tt = 0;\r\n\t\t }\r\n\t\t else if ((r == 0 && b == 0) || (b == 0 && g == 0))\r\n\t\t {\r\n\t\t\t// only green or blue\r\n\t\t\tt = (L-1)/3;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\tt1 = 0.5 * ((r-g) + (r-b));\r\n\t\t\tt2 = Math.sqrt((r-g)*(r-g) + (r-b)*(g-b));\r\n\t\t\ttheta = Math.acos (t1/t2);\r\n\t\t\tt = (short)((L-1) * theta/(2*Math.PI));\r\n\t\t }\r\n\r\n\t\t if (b <= g)\r\n\t\t\thue[row][col] = t;\r\n\t\t else\r\n\t\t\thue[row][col] = (short)((L-1) - t);\r\n\r\n\t\t minrgb = r;\r\n\t\t if (g < minrgb)\r\n\t\t\tminrgb = g;\r\n\t\t if (b < minrgb)\r\n\t\t\tminrgb = b;\r\n \r\n\t\t saturation[row][col] = (short)\r\n\t\t\t((L-1)*(1 - minrgb*3.0/sum));\r\n\t\t intensity[row][col] = (short)(sum / 3.0);\r\n\t\t}\r\n\t }\r\n\t}\r\n\r\n }", "static ArrayList<Piece> createPieces (Bitmap image) {\n\t\tint[] picSize = InitDisplay.getPicDimensions();\n\t\tint[] pieceSize = InitDisplay.getPieceDimensions();\n\t\t\n\t\t/* Scale the image to the dynamically calculated values */\n\t\tBitmap imageScaled = Bitmap.createScaledBitmap(image, picSize[WIDTH], picSize[HEIGHT], false);\n\t\t\n\t\t/* The imageScaled bitmap now contains the given image in scaled bitmap form. Break it and\n\t\t * assign it to [rows*cols] small Jigsaw pieces after randomizing their positions and orientations\n\t\t * The image is being broken into a 3x3 grid. i represents rows while j represents columns */\n\t\t\n\t\tArrayList<Piece> pieces = new ArrayList<Piece>(Play.NUM[TOTAL]);\n\t\tBitmap imgPiece = null;\n\t\tint offsetX = 0, offsetY = 0;\n\t\tint pos = 0;\n\t\t\n\t\tfor (int i=0; i<Play.NUM[COLS]; i++) {\n\t\t\t/* offsetX represents the x coordinate while offsetY represents the y coordinate */\n\t\t\toffsetX = 0; //start from (0,0)\n\t\t\tfor (int j=0; j<Play.NUM[ROWS]; j++) {\n\t\t\t\t/* Extract a specific area of the imageScaled bitmap and store it in imgPiece.\n\t\t\t\t * Coordinates for the extraction are specified using offsetX and offsetY */\n\t\t\t\timgPiece = Bitmap.createBitmap\n\t\t\t\t\t\t(imageScaled, offsetX, offsetY, pieceSize[WIDTH], pieceSize[HEIGHT]);\n\t\t\t\t\n\t\t\t\t/* Create a Jigsaw piece and add it to the pieces array */\n\t\t\t\tPiece piece = new Piece (imgPiece); //create a new piece with the extracted bitmap image\n\t\t\t\tpieces.add(pos, piece); //add the piece to the pieces array\n\t\t\t\t\n\t\t\t\toffsetX += pieceSize[WIDTH]; //move to the next x coordinate\n\t\t\t\tpos++;\n\t\t\t}\n\t\t\toffsetY += pieceSize[HEIGHT]; //move to the next y coordinate\n\t\t}\n\t\t\n\t\treturn pieces;\n\t}", "public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }", "public static Bitmap cropImageVer2(Bitmap img, Bitmap templateImage, int width, int height) {\n // Merge two images together.\n int x=5,y=5;\n Bitmap bm = Bitmap.createBitmap(img.getWidth(), img.getHeight(), Bitmap.Config.ARGB_8888);\n Canvas combineImg = new Canvas(bm);\n combineImg.drawBitmap(img, 0f, 0f, null);\n combineImg.drawBitmap(templateImage, 0f, 0f, null);\n \n // Create new blank ARGB bitmap.\n Bitmap finalBm = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n \n // Get the coordinates for the middle of bm.\n int hMid = bm.getHeight() / 2;\n int wMid = bm.getWidth() / 2;\n int hfMid = finalBm.getHeight() / 2;\n int wfMid = finalBm.getWidth() / 2;\n\n int y2 = hfMid;\n int x2 = wfMid;\n\n for ( y = hMid; y >= 0; y--) {\n // Check Upper-left section of combineImg.\n for ( x = wMid; x >= 0; x--) {\n if (x2 < 0) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the left side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2--;\n }\n \n // Check upper-right section of combineImage.\n x2 = wfMid;\n for (x = wMid; x < bm.getWidth(); x++) {\n if (x2 >= finalBm.getWidth()) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the right side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2++;\n }\n \n // Get out of loop once it hits top most part of the template.\n int px = bm.getPixel(wMid, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } \n x2 = wfMid;\n y2--;\n }\n\n x2 = wfMid;\n y2 = hfMid;\n for (y = hMid; y <= bm.getHeight(); y++) {\n // Check bottom-left section of combineImage.\n for ( x = wMid; x >= 0; x--) {\n if (x2 < 0) {\n break;\n }\n\n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the left side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2--;\n }\n\n // Check bottom-right section of combineImage.\n x2 = wfMid;\n for (x = wMid; x < bm.getWidth(); x++) {\n if (x2 >= finalBm.getWidth()) {\n break;\n }\n \n int px = bm.getPixel(x, y);\n // Get out of loop once it hits the right side of the template.\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } else {\n finalBm.setPixel(x2, y2, px);\n }\n x2++;\n }\n \n // Get out of loop once it hits bottom most part of the template.\n int px = bm.getPixel(wMid, y);\n if (Color.red(px) == 234 && Color.green(px) == 157 && Color.blue(px) == 33) {\n break;\n } \n x2 = wfMid;\n y2++;\n }\n \n // Get rid of images that we finished with to save memory.\n img.recycle();\n templateImage.recycle();\n bm.recycle();\n return finalBm;\n }", "public static Mat invert(JPEGCategory[] input) {\n\t\tdouble[] data = new double[64];\n\t\tint k = 0;\n\t\t\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tdouble[] subArr = convertToDouble(input[i]);\n\t\t\tfor (int j = 0; j < subArr.length; j++) {\n\t\t\t\tdata[k] = subArr[j];\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdouble[] newData = { \n\t\t\t data[0], data[1], data[5], data[6], data[14], data[15], data[27], data[28], \n\t\t\t data[2], data[4], data[7], data[13], data[16], data[26], data[29], data[42], \n\t\t\t data[3], data[8], data[12], data[17], data[25], data[30], data[41], data[43], \n\t\t\t data[9], data[11], data[18], data[24], data[31], data[40], data[44], data[53], \n\t\t\tdata[10], data[19], data[23], data[32], data[39], data[45], data[52], data[54], \n\t\t\tdata[20], data[22], data[33], data[38], data[46], data[51], data[55], data[60], \n\t\t\tdata[21], data[34], data[37], data[47], data[50], data[56], data[59], data[61], \n\t\t\tdata[35], data[36], data[48], data[49], data[57], data[58], data[62], data[63] \n\t\t};\n\n\t\tMat result = new Mat(8, 8, CvType.CV_64FC1);\n\t\tresult.put(0, 0, newData);\n\t\treturn result;\n\t}", "private static BufferedImage transformImage(BufferedImage image) {\n // Scale image to desired dimension (28 x 28)\n Image tmp = image.getScaledInstance(28, 28, Image.SCALE_SMOOTH);\n BufferedImage scaledImage = new BufferedImage(28, 28, BufferedImage.TYPE_INT_ARGB);\n\n Graphics2D g2d = scaledImage.createGraphics();\n g2d.drawImage(tmp, 0, 0, null);\n\n // Loop through each pixel of the new image\n for (int x = 0; x < 28; x++) {\n for (int y = 0; y < 28; y++) {\n // Get original color\n Color color = new Color(scaledImage.getRGB(x, y));\n\n // Ignore white values\n if (color.getRGB() == -1) {\n continue;\n }\n\n // 'Boost' the grey values so they become more black\n float[] hsv = new float[3];\n Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), hsv);\n hsv[2] = (float) 0.5 * hsv[2];\n int newColor = Color.HSBtoRGB(hsv[0], hsv[1], hsv[2]);\n\n // Save new color\n scaledImage.setRGB(x, y, newColor);\n }\n }\n\n // Free resources\n g2d.dispose();\n\n return scaledImage;\n }", "protected void reduceBitmapMode(BufferedImage img, int xoffs, int yoffs) {\n \t\t@SuppressWarnings(\"unchecked\")\n \t\tMap<Integer, Integer>[] histograms = new Map[(img.getWidth() + 7) / 8];\n \t\t@SuppressWarnings(\"unchecked\")\n \t\tMap<Integer, Integer>[] histogramSides = new Map[(img.getWidth() + 7) / 8];\n \t\t\n \t\t// be sure we select the 8 pixel groups sensibly\n \t\tif ((xoffs & 7) > 3)\n \t\t\txoffs = (xoffs + 7) & ~7;\n \t\telse\n \t\t\txoffs = xoffs & ~7;\n \t\t\n \t\tint width = img.getWidth();\n \t\tfor (int y = 0; y < img.getHeight(); y++) {\n \t\t\t// first scan: get histogram for each range\n \t\t\t\n \t\t\tfor (int x = 0; x < width; x += 8) {\n \t\t\t\tMap<Integer, Integer> histogram = new HashMap<Integer, Integer>();\n \t\t\t\tMap<Integer, Integer> histogramSide = new HashMap<Integer, Integer>();\n \t\t\t\t\n \t\t\t\thistograms[x / 8] = histogram;\n \t\t\t\thistogramSides[x / 8] = histogramSide;\n \t\t\t\t\n \t\t\t\tint maxx = x + 8 < width ? x + 8 : width;\n \t\t\t\t\n \t\t\t\tint scmx;\n \t\t\t\tint scmn;\n \t\t\t\t\n \t\t\t\t// scan outside the 8 pixels to get a broader\n \t\t\t\t// idea of what colors are important\n \t\t\t\tscmn = Math.max(0, x - 4);\n \t\t\t\tscmx = Math.min(width, maxx + 4);\n \t\t\t\t\n \t\t\t\tint pixel = 0;\n \t\t\t\tfor (int xd = scmn; xd < scmx; xd++) {\n \t\t\t\t\tif (xd < width)\n \t\t\t\t\t\tpixel = img.getRGB(xd, y);\n \t\t\t\t\t\n \t\t\t\t\tMap<Integer, Integer> hist = (xd >= x && xd < maxx) ? histogram : histogramSide;\n \t\t\t\t\t\n \t\t\t\t\tInteger cnt = hist.get(pixel);\n \t\t\t\t\tif (cnt == null)\n \t\t\t\t\t\tcnt = 1;\n \t\t\t\t\telse\n \t\t\t\t\t\tcnt++;\n \t\t\t\t\t\n \t\t\t\t\thist.put(pixel, cnt);\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\n \t\t\tfor (int x = 0; x < width; x += 8) {\n \t\t\t\tMap<Integer, Integer> histogram = histograms[x / 8];\n \t\t\t\tMap<Integer, Integer> histogramSide = histogramSides[x / 8];\n \t\t\t\t\n \t\t\t\tint maxx = x + 8 < width ? x + 8 : width;\n \t\t\t\t\n \t\t\t\t// get prominent colors, weighing colors that also\n \t\t\t\t// appear in surrounding pixels higher \n \t\t\t\tList<Pair<Integer, Integer>> sorted = new ArrayList<Pair<Integer,Integer>>();\n \t\t\t\tfor (Map.Entry<Integer, Integer> entry : histogram.entrySet()) {\n \t\t\t\t\tInteger c = entry.getKey();\n \t\t\t\t\tint cnt = entry.getValue() * 2;\n \t\t\t\t\tInteger scnt = histogramSide.get(c);\n \t\t\t\t\tif (scnt != null)\n \t\t\t\t\t\tcnt += scnt;\n \t\t\t\t\tsorted.add(new Pair<Integer, Integer>(c, cnt));\n \t\t\t\t}\n \t\t\t\tCollections.sort(sorted, new Comparator<Pair<Integer, Integer>>() {\n \t\n \t\t\t\t\t@Override\n \t\t\t\t\tpublic int compare(Pair<Integer, Integer> o1,\n \t\t\t\t\t\t\tPair<Integer, Integer> o2) {\n \t\t\t\t\t\treturn o2.second - o1.second;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t});\n \t\n \t\t\t\tint fpixel, bpixel;\n \t\t\t\tif (sorted.size() >= 2) {\n \t\t\t\t\tfpixel = sorted.get(0).first;\n \t\t\t\t\tbpixel = sorted.get(1).first;\n \t\t\t\t} else {\n \t\t\t\t\tfpixel = bpixel = sorted.get(0).first;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tint newPixel = 0;\n \t\t\t\tfor (int xd = x; xd < maxx; xd++) {\n \t\t\t\t\tif (xd < width)\n \t\t\t\t\t\tnewPixel = img.getRGB(xd, y);\n \t\t\t\t\t\n \t\t\t\t\tif (newPixel != fpixel && newPixel != bpixel) {\n \t\t\t\t\t\tif (fpixel < bpixel) {\n \t\t\t\t\t\t\tnewPixel = newPixel <= fpixel ? fpixel : bpixel;\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tnewPixel = newPixel < bpixel ? fpixel : bpixel;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\timageData.setPixel(xd + xoffs, y + yoffs, newPixel);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public void hreflect() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n int h= 0;\n int k= rows-1;\n //invariant: rows 0..h-1 and k+1.. have been inverted\n while (h < k) {\n // Swap row h with row k\n // invariant: pixels 0..c-1 of rows h and k have been swapped\n for (int c= 0; c != cols; c= c+1) {\n currentIm.swapPixels(h, c, k, c);\n }\n \n h= h+1; k= k-1;\n }\n }", "private void filter(BufferedImageOp op)\n { \n if (image == null) return;\n BufferedImage filteredImage \n = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());\n op.filter(image, filteredImage);\n image = filteredImage;\n repaint();\n }", "private int[] setMatrixConvo(int whatMask , int size) {\n int[] res = new int[size*size];\n\n // Prewitt\n if (whatMask == 3) {\n res[0] = -1;\n res[1] = -1;\n res[2] = -1;\n res[6] = 1;\n res[7] = 1;\n res[8] = 1;\n }\n\n // Gaussian\n else if (whatMask == 2) {\n int aoe = (size - 1)/2;\n for (int maskLine = 0; maskLine < size; maskLine++) {\n for (int n = 0; n < size; n++) {\n res[maskLine + size * n] = (int) gauss((Math.abs(aoe-maskLine)+Math.abs(aoe-n))/(size*size), size);\n }\n }\n }\n\n //Prewitt\n else if (whatMask == 0) {\n res[0] = -1;\n res[2] = 1;\n res[3] = -1;\n res[5] = 1;\n res[6] = -1;\n res[8] = 1;\n }\n\n //Blur by average\n else if (whatMask == 1) {\n for (int i = 0; i < size*size; i++){\n res[i] = 1;\n }\n }\n\n // Sharpening contours\n else if (whatMask == 4) {\n res[1] = -1;\n res[3] = -1;\n res[4] = 5;\n res[5] = -1;\n res[7] = -1;\n }\n return res;\n }", "@Test\n\tpublic void testPaste() {\n\t\tImagePlus.resetClipboard();\n\n\t\t// paste when nothing in clipboard\n\t\tImagePlus.resetClipboard();\n\t\tproc = new ByteProcessor(2,3,new byte[] {1,2,3,4,5,6},null);\n\t\tip = new ImagePlus(\"Paster\",proc);\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tassertFalse(ip.changes);\n\t\tassertNull(ip.getRoi());\n\t\tip.paste();\n\t\tassertFalse(ip.changes);\n\t\tassertNull(ip.getRoi());\n\n\t\t// paste with valid data (part of image)\n\t\tImagePlus.resetClipboard();\n\t\tproc = new ByteProcessor(2,3,new byte[] {1,2,3,4,5,6},null);\n\t\tip = new ImagePlus(\"Paster\",proc);\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tassertEquals(4,proc.get(1,1));\n\t\tip.setRoi(1,1,1,1);\n\t\tip.copy(true);\n\t\tassertNotNull(ImagePlus.getClipboard());\n\t\tassertFalse(ip.changes);\n\t\tassertEquals(0,proc.get(1,1));\n\t\tip.paste();\n\t\tassertTrue(ip.changes);\n\t\tassertNotNull(ip.getRoi());\n\t\t//ip.getRoi().drawPixels();\n\t\t//assertEquals(4,proc.get(1, 1));\n\n\t\t// paste with valid data (whole image)\n\t\tImagePlus.resetClipboard();\n\t\tproc = new ByteProcessor(2,3,new byte[] {1,2,3,4,5,6},null);\n\t\tip = new ImagePlus(\"Paster\",proc);\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tassertNull(ip.getRoi());\n\t\tassertEquals(4,proc.get(1,1));\n\t\tip.copy(true);\n\t\tassertNull(ImagePlus.getClipboard());\n\t\tassertFalse(ip.changes);\n\t\tassertEquals(4,proc.get(1,1));\n\t\tip.paste();\n\t\tassertFalse(ip.changes);\n\t\tassertNull(ip.getRoi());\n\t\t//ip.getRoi().drawPixels();\n\t\t//assertEquals(4,proc.get(1, 1));\n\n\t\t// reset state to keep from messing up other tests\n\t\tImagePlus.resetClipboard();\n\t}", "public @NotNull Image flipH()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n if (this.format != ColorFormat.RGBA)\n {\n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n // OPTION 1: Move pixels with memCopy()\n long src = Integer.toUnsignedLong(y * this.width + this.width - 1 - x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, bytesPerLine);\n \n // OPTION 2: Just copy data pixel by pixel\n // output.put(y * this.width + x, this.data.getBytes(y * this.width + (this.width - 1 - x)));\n }\n }\n \n this.data.free();\n \n this.data = output;\n }\n else\n {\n // OPTION 3: Faster implementation (specific for 32bit pixels)\n // NOTE: It does not require additional allocations\n IntBuffer ptr = this.data.toBuffer().asIntBuffer();\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width / 2; x++)\n {\n int backup = ptr.get(y * this.width + x);\n ptr.put(y * this.width + x, ptr.get(y * this.width + this.width - 1 - x));\n ptr.put(y * this.width + this.width - 1 - x, backup);\n }\n }\n }\n this.mipmaps = 1;\n }\n \n return this;\n }", "@Test\n public void testSharpenABlurredImage() {\n\n IImage newImage = new Blur().applyFilter(this.checkerboard);\n\n List<List<Pixel>> result = new ArrayList<>();\n List<Pixel> row1 = new ArrayList<>();\n row1.add(new Pixel(80, 80, 80, new Posn(0, 0)));\n row1.add(new Pixel(64, 64, 64, new Posn(1, 0)));\n List<Pixel> row2 = new ArrayList<>();\n row2.add(new Pixel(64, 64, 64, new Posn(0, 1)));\n row2.add(new Pixel(80, 80, 80, new Posn(1, 1)));\n result.add(row1);\n result.add(row2);\n IImage resultImage = new Image(result, 255);\n\n assertEquals(resultImage, newImage);\n\n IImage newImage2 = new Sharpen().applyFilter(newImage);\n\n List<List<Pixel>> result2 = new ArrayList<>();\n List<Pixel> row01 = new ArrayList<>();\n row01.add(new Pixel(132, 132, 132, new Posn(0, 0)));\n row01.add(new Pixel(120, 120, 120, new Posn(1, 0)));\n List<Pixel> row02 = new ArrayList<>();\n row02.add(new Pixel(120, 120, 120, new Posn(0, 1)));\n row02.add(new Pixel(132, 132, 132, new Posn(1, 1)));\n result2.add(row01);\n result2.add(row02);\n IImage resultImage2 = new Image(result2, 255);\n\n assertEquals(resultImage2, newImage2);\n\n\n\n\n }", "public void set(Image img, int line, int column, Point higher, Point lower, int size) {\n if (hasComponent(line, column)) {\n DisplayComponent dc = components[line][column];\n if (dc instanceof SpriteComponent) {\n SpriteComponent spritec = (SpriteComponent) components[line][column];\n spritec.set(img);\n } else {\n components[line][column] = new SpriteComponent(img, higher, lower, size);\n }\n } else {\n components[line][column] = new SpriteComponent(img, higher, lower, size);\n }\n\n repaint(column * fontSize, line * fontSize, size, size);\n }", "protected void isotrop()\r\n {\r\n Dimension d = getSize();\r\n int maxX = d.width - 1, maxY = d.height - 1;\r\n\tpSize = Math.max(width / maxX, height / maxY);\r\n\tcX = maxX / 2;\r\n\tcY = maxY / 2;\r\n\r\n\t// Since pixel size is max of width/height over their device sizes, one of these\r\n\t// values will actually be larger. This should be used to use all of the canvas\r\n\tactualWidth = maxX * pSize;\r\n\tactualHeight = maxY * pSize;\r\n }", "public String[] stitch() {\n String[] result = new String[image.length * image[0][0].getImageSize()];\n Arrays.fill(result, \"\");\n for (int i = 0; i < image.length; i++) {\n for (int j = 0; j < image[i].length; j++) {\n for (int k = 0; k < image[i][j].getImageSize(); k++) {\n result[i * image[i][j].getImageSize() + k] += image[i][j].getImageSlice(k);\n }\n }\n }\n return result;\n }", "public static Integer[][] preformRGBConvolutionStridedPadded(Integer[][][] img, Double[][] filter, int s, int p) {\n Integer[][][] m = new Integer[3][img[0].length][img[0][0].length];\n for (int i = 0; i < 3; i++) {\n m[i] = MatrixUtils.padMatrix(img[i], p);\n }\n img = m;\n Integer[][] r = operationConvolution(img[0], filter, s);\n Integer[][] g = operationConvolution(img[1], filter, s);\n Integer[][] b = operationConvolution(img[2], filter, s);\n Integer[][] output = new Integer[r.length][r[0].length];\n for (int y = 0; y < output.length; y++) {\n for (int x = 0; x < output[0].length; x++) {\n output[y][x] = r[y][x] + g[y][x] + b[y][x];\n }\n }\n return output;\n }", "public static Integer[][] preformRGBConvolutionStridedPadded(Integer[][][] img, Double[][][] filter, int s, int p) {\n Integer[][][] m = new Integer[3][img[0].length][img[0][0].length];\n for (int i = 0; i < 3; i++) {\n m[i] = MatrixUtils.padMatrix(img[i], p);\n }\n img = m;\n Integer[][] r = operationConvolution(img[0], filter[0], s);\n Integer[][] g = operationConvolution(img[1], filter[1], s);\n Integer[][] b = operationConvolution(img[2], filter[2], s);\n Integer[][] output = new Integer[r.length][r[0].length];\n for (int y = 0; y < output.length; y++) {\n for (int x = 0; x < output[0].length; x++) {\n output[y][x] = r[y][x] + g[y][x] + b[y][x];\n }\n }\n return output;\n }", "public ImagePlus morph(ImagePlus imp_old,int proc, int rad){\nImageProcessor img = imp_old.getProcessor();\nImagePlus morphImg;\nif (proc==0){\nImageProcessor dil = Morphology.dilation(img,Strel.Shape.OCTAGON.fromDiameter(rad));\nmorphImg = new ImagePlus(\"dilation\",dil);\nmorphImg.updateAndDraw();\nreturn morphImg;\n} else if (proc==1){\nImageProcessor dil = Morphology.erosion(img,Strel.Shape.OCTAGON.fromDiameter(rad));\nmorphImg = new ImagePlus(\"erosion\",dil);\nmorphImg.updateAndDraw();\nreturn morphImg;\n} else{\nImageProcessor dil = Morphology.closing(img,Strel.Shape.OCTAGON.fromDiameter(rad));\nmorphImg = new ImagePlus(\"closing\",dil);\nmorphImg.updateAndDraw();\nreturn morphImg;\n}\n}" ]
[ "0.64917815", "0.6021179", "0.5669204", "0.55582976", "0.5227094", "0.5218085", "0.5167076", "0.51401055", "0.5045407", "0.5033388", "0.5028747", "0.5007788", "0.49865103", "0.4976997", "0.49415338", "0.4933937", "0.49246794", "0.4922559", "0.49071658", "0.48695356", "0.48669884", "0.48566866", "0.4836325", "0.48328084", "0.48156896", "0.48067647", "0.4805062", "0.48014757", "0.47824135", "0.47745597", "0.47739938", "0.4755726", "0.47537845", "0.47296938", "0.4727384", "0.47188848", "0.4703268", "0.47023273", "0.46945363", "0.46945122", "0.4690643", "0.46856865", "0.468351", "0.46806532", "0.4677905", "0.46740884", "0.46726608", "0.4667924", "0.4661477", "0.46577126", "0.465388", "0.46520472", "0.46512178", "0.46510798", "0.4648688", "0.46333548", "0.46309155", "0.46304134", "0.46281055", "0.4621574", "0.46182236", "0.46134114", "0.46087646", "0.46018714", "0.45802337", "0.45773497", "0.45707026", "0.4567136", "0.45661357", "0.45481947", "0.45427644", "0.4542404", "0.45417252", "0.45403153", "0.45398745", "0.45223773", "0.45172784", "0.45142105", "0.45134503", "0.45119816", "0.45092863", "0.4506971", "0.4506468", "0.45010865", "0.4500699", "0.44964132", "0.4495645", "0.44893685", "0.44892502", "0.44872287", "0.44831032", "0.44790912", "0.44762892", "0.44718993", "0.446715", "0.4463057", "0.4459072", "0.44571942", "0.4450287", "0.44496375", "0.44495374" ]
0.0
-1
This function identify upper notes and lower notes if they belong to previous base or next base
public static int[] groupNotesForPrevNextBases(LinkedList<StructExprRecog> listBaseULIdentified, LinkedList<Integer> listCharLevel, int nLastBaseIdx, int nNextBaseIdx) { // assume nLastBaseIdx < nNextBaseIdx - 1 if (nLastBaseIdx < 0) { // nNextBaseIdx is the first base int[] narrayGrouped = new int[nNextBaseIdx]; for (int nElementIdx = 0; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { narrayGrouped[nElementIdx] = 1; } return narrayGrouped; } else if (nNextBaseIdx < 0 || nNextBaseIdx >= listBaseULIdentified.size()) { // nLastBaseIdx is the last base int[] narrayGrouped = new int[listBaseULIdentified.size() - 1 - nLastBaseIdx]; for (int nElementIdx = nLastBaseIdx + 1; nElementIdx < listBaseULIdentified.size(); nElementIdx ++) { narrayGrouped[nElementIdx] = 0; } return narrayGrouped; } else if (nLastBaseIdx >= nNextBaseIdx - 1) { return new int[0]; // no notes between last and next base. } else { int[] narrayGrouped = new int[nNextBaseIdx - 1 - nLastBaseIdx]; double[] darrayUpperNoteGaps = new double[nNextBaseIdx - nLastBaseIdx], darrayLowerNoteGaps = new double[nNextBaseIdx - nLastBaseIdx]; double dMaxUpperNoteGap = -1, dMaxLowerNoteGap = -1; int nMaxUpperNoteGapIdx = -1, nMaxLowerNoteGapIdx = -1; int nLastLeftForUpperNote = nLastBaseIdx, nLastLeftForLowerNote = nLastBaseIdx; double dUpperNoteFontAvgWidth = 0, dUpperNoteFontAvgHeight = 0; double dLowerNoteFontAvgWidth = 0, dLowerNoteFontAvgHeight = 0; int nUpperNoteCnt = 0, nLowerNoteCnt = 0; int nLastUpperNoteIdx = 0, nLastLowerNoteIdx = 0; for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); if (listCharLevel.get(nElementIdx) == -1) { // lower note StructExprRecog serLast = listBaseULIdentified.get(nLastLeftForLowerNote); StructExprRecog serThis = listBaseULIdentified.get(nElementIdx); dLowerNoteFontAvgWidth += serThis.mnWidth; dLowerNoteFontAvgHeight += serThis.mnHeight; nLowerNoteCnt ++; nLastLowerNoteIdx = nElementIdx; int nLastRightP1 = serLast.getRightPlus1(); int nThisLeft = serThis.mnLeft; if (nLastLeftForLowerNote > nLastBaseIdx) { double dLastHCentral = (serLast.mnTop + serLast.getBottomPlus1())/2.0; double dThisHCentral = (serThis.mnTop + serThis.getBottomPlus1())/2.0; double dHCentralGap = Math.abs(dThisHCentral - dLastHCentral); double dHTopGap = Math.abs(serThis.mnTop - serLast.mnTop); double dHBottomP1Gap = Math.abs(serThis.getBottomPlus1() - serLast.getBottomPlus1()); //darrayLowerNoteGaps[nGroupIdx] = Math.max(0, nThisLeft - nLastRightP1) + Math.abs(dThisHCentral - dLastHCentral); darrayLowerNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft - nLastRightP1), Math.min(dHCentralGap, Math.min(dHTopGap, dHBottomP1Gap))); } else { // vertical distance measure from base to note is a bit different int nLastBottomP1 = serLast.getBottomPlus1(); double dThisHCentral = (serThis.mnTop + serThis.getBottomPlus1())/2.0; //darrayLowerNoteGaps[nGroupIdx] = Math.max(0, nThisLeft - nLastRightP1) + Math.max(0, dThisHCentral - nLastBottomP1); darrayLowerNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft - nLastRightP1), Math.max(0, dThisHCentral - nLastBottomP1)); } if (darrayLowerNoteGaps[nGroupIdx] >= dMaxLowerNoteGap) { // always try to use the right most gap as max gap dMaxLowerNoteGap = darrayLowerNoteGaps[nGroupIdx]; nMaxLowerNoteGapIdx = nGroupIdx; } nLastLeftForLowerNote = nElementIdx; darrayUpperNoteGaps[nGroupIdx] = -1; } else if (listCharLevel.get(nElementIdx) == 1) { // upper note StructExprRecog serLast = listBaseULIdentified.get(nLastLeftForUpperNote); StructExprRecog serThis = listBaseULIdentified.get(nElementIdx); dUpperNoteFontAvgWidth += serThis.mnWidth; dUpperNoteFontAvgHeight += serThis.mnHeight; nUpperNoteCnt ++; nLastUpperNoteIdx = nElementIdx; int nLastRightP1 = serLast.getRightPlus1(); int nThisLeft = serThis.mnLeft; if (nLastLeftForUpperNote > nLastBaseIdx) { double dLastHCentral = (serLast.mnTop + serLast.getBottomPlus1())/2.0; double dThisHCentral = (serThis.mnTop + serThis.getBottomPlus1())/2.0; double dHCentralGap = Math.abs(dThisHCentral - dLastHCentral); double dHTopGap = Math.abs(serThis.mnTop - serLast.mnTop); double dHBottomP1Gap = Math.abs(serThis.getBottomPlus1() - serLast.getBottomPlus1()); //darrayUpperNoteGaps[nGroupIdx] = Math.max(0, nThisLeft - nLastRightP1) + Math.abs(dThisHCentral - dLastHCentral); darrayUpperNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft - nLastRightP1), Math.min(dHCentralGap, Math.min(dHTopGap, dHBottomP1Gap))); } else { // vertical distance measure from base to note is a bit different int nLastTop = serLast.mnTop; double dThisHCentral = (serThis.mnTop + serThis.getBottomPlus1())/2.0; //darrayUpperNoteGaps[nGroupIdx] = Math.max(0, nThisLeft - nLastRightP1) + Math.max(0, nLastTop - dThisHCentral); darrayUpperNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft - nLastRightP1), Math.max(0, nLastTop - dThisHCentral)); } if (darrayUpperNoteGaps[nGroupIdx] >= dMaxUpperNoteGap) { // always try to use the right most gap as max gap dMaxUpperNoteGap = darrayUpperNoteGaps[nGroupIdx]; nMaxUpperNoteGapIdx = nGroupIdx; } nLastLeftForUpperNote = nElementIdx; darrayLowerNoteGaps[nGroupIdx] = -1; } else { // base note? seems wrong. narrayGrouped[nGroupIdx] = -1; // invalid group darrayUpperNoteGaps[nGroupIdx] = -1; darrayLowerNoteGaps[nGroupIdx] = -1; } } if (nLastLeftForUpperNote != nLastBaseIdx) { StructExprRecog serLast = listBaseULIdentified.get(nLastLeftForUpperNote); StructExprRecog serThis = listBaseULIdentified.get(nNextBaseIdx); int nLastRightP1 = serLast.getRightPlus1(); int nThisLeft = serThis.mnLeft; double dLastHCentral = (serLast.mnTop + serLast.getBottomPlus1())/2.0; int nThisTop = serThis.mnTop; int nGroupIdx = nNextBaseIdx - 1 - nLastBaseIdx; //darrayUpperNoteGaps[nGroupIdx] = Math.max(0, nThisLeft - nLastRightP1) + Math.max(0, nThisTop - dLastHCentral); if (serThis.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_GETROOT && (serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SQRT_LEFT || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SQRT_LONG || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SQRT_MEDIUM || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SQRT_SHORT)) { // if next base is sqrt, the distance from last upper note to sqrt should be calculated in a different way // from other characters because sqrt's upper left part is empty so real distance from sqrt to its upper left // is actually longer than other base characters' distance to the upper left note. In general, the left tick // part of sqrt_left, sqrt_long, sqrt_medium and sqrt_short's w:h is from 1/3 to 4/5, so horizontal difference // is nThisLeft + serThis.mnHeight /2.0 - nLastRightP1 and vertical difference is dThisHCentral - dLastHCentral. double dThisHCentral = (serThis.mnTop + serThis.getBottomPlus1())/2.0; darrayUpperNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft + serThis.mnHeight /2.0 - nLastRightP1), Math.max(0, dThisHCentral - dLastHCentral)); } else if (serThis.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_GETROOT && (serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SQRT_TALL || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SQRT_VERY_TALL)) { // In general, the left tick part of sqrt_tall and sqrt_very_tall's w:h is from 1/6 to 1/3, so horizontal difference // is nThisLeft + serThis.mnHeight /2.0 - nLastRightP1. And vertical difference is measured from central of upper note // to top + height/4 of sqrt. double dThisHTopCentral = serThis.mnTop + serThis.mnHeight /4.0; darrayUpperNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft + serThis.mnHeight /4.0 - nLastRightP1), Math.max(0, dThisHTopCentral - dLastHCentral)); } else { darrayUpperNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft - nLastRightP1), Math.max(0, nThisTop - dLastHCentral)); } if (darrayUpperNoteGaps[nGroupIdx] >= dMaxUpperNoteGap) { // always try to use the right most gap as max gap dMaxUpperNoteGap = darrayUpperNoteGaps[nGroupIdx]; nMaxUpperNoteGapIdx = nGroupIdx; } } else { darrayUpperNoteGaps[nNextBaseIdx - 1 - nLastBaseIdx] = -1; // last left for upper note is last base. } if (nLastLeftForLowerNote != nLastBaseIdx) { StructExprRecog serLast = listBaseULIdentified.get(nLastLeftForLowerNote); StructExprRecog serThis = listBaseULIdentified.get(nNextBaseIdx); int nLastRightP1 = serLast.getRightPlus1(); int nThisLeft = serThis.mnLeft; double dLastHCentral = (serLast.mnTop + serLast.getBottomPlus1())/2.0; int nThisBottomP1 = serThis.getBottomPlus1(); int nGroupIdx = nNextBaseIdx - 1 - nLastBaseIdx; //darrayLowerNoteGaps[nGroupIdx] = Math.max(0, nThisLeft - nLastRightP1) + Math.max(0, dLastHCentral - nThisBottomP1); darrayLowerNoteGaps[nGroupIdx] = Math.hypot(Math.max(0, nThisLeft - nLastRightP1), Math.max(0, dLastHCentral - nThisBottomP1)); if (darrayLowerNoteGaps[nGroupIdx] >= dMaxLowerNoteGap) { // always try to use the right most gap as max gap dMaxLowerNoteGap = darrayLowerNoteGaps[nGroupIdx]; nMaxLowerNoteGapIdx = nGroupIdx; } } else { darrayLowerNoteGaps[nNextBaseIdx - 1 - nLastBaseIdx] = -1; // last left for Lower note is last base. } if (nUpperNoteCnt > 0) { StructExprRecog serLastBase = listBaseULIdentified.get(nLastBaseIdx); StructExprRecog serNextBase = listBaseULIdentified.get(nNextBaseIdx); StructExprRecog serLastUpperNote = listBaseULIdentified.get(nLastUpperNoteIdx); dUpperNoteFontAvgWidth /= nUpperNoteCnt; dUpperNoteFontAvgHeight /= nUpperNoteCnt; if (dMaxUpperNoteGap <= ConstantsMgr.msdNoteBaseMaxGap * Math.max(dUpperNoteFontAvgWidth, dUpperNoteFontAvgHeight)) { // times 2 because include vertical and horizontal // the max gap between upper notes is narrow, if (serNextBase.mnExprRecogType == EXPRRECOGTYPE_GETROOT) { // the character before sqrt should be an operator, as such the upper parts must be left note for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { if (listCharLevel.get(nElementIdx) == 1) { // upper note int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); narrayGrouped[nGroupIdx] = 1; } } } else if (((serNextBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serNextBase.mType == UnitProtoType.Type.TYPE_SMALL_C) || (serNextBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serNextBase.mType == UnitProtoType.Type.TYPE_BIG_C) || (serNextBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serNextBase.mType == UnitProtoType.Type.TYPE_BIG_F)) && (serLastUpperNote.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (serLastUpperNote.mType == UnitProtoType.Type.TYPE_ZERO || serLastUpperNote.mType == UnitProtoType.Type.TYPE_SMALL_O || serLastUpperNote.mType == UnitProtoType.Type.TYPE_BIG_O) && nLastUpperNoteIdx == nNextBaseIdx - 1 && (serNextBase.mnLeft - serLastUpperNote.mnLeft)<(2 * serLastUpperNote.mnWidth))) { // could be celcius or fahrenheit. for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { if (listCharLevel.get(nElementIdx) == 1) { // upper note int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); if (nElementIdx == nLastUpperNoteIdx) { narrayGrouped[nGroupIdx] = 1; } else { narrayGrouped[nGroupIdx] = 0; } } } } else if (((serNextBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serNextBase.mType == UnitProtoType.Type.TYPE_FORWARD_SLASH) || (serNextBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serNextBase.mType == UnitProtoType.Type.TYPE_ONE) || (serNextBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serNextBase.mType == UnitProtoType.Type.TYPE_SMALL_L)) && (serLastUpperNote.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (serLastUpperNote.mType == UnitProtoType.Type.TYPE_ZERO || serLastUpperNote.mType == UnitProtoType.Type.TYPE_SMALL_O || serLastUpperNote.mType == UnitProtoType.Type.TYPE_BIG_O) && nLastUpperNoteIdx == nNextBaseIdx - 1 && (serNextBase.mnLeft - serLastUpperNote.mnLeft)<(2 * serLastUpperNote.mnHeight)) && (listBaseULIdentified.size() > nNextBaseIdx + 1 && listCharLevel.get(nNextBaseIdx + 1) == -1 // lower note && listBaseULIdentified.get(nNextBaseIdx + 1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (listBaseULIdentified.get(nNextBaseIdx + 1).mType == UnitProtoType.Type.TYPE_ZERO || listBaseULIdentified.get(nNextBaseIdx + 1).mType == UnitProtoType.Type.TYPE_SMALL_O || listBaseULIdentified.get(nNextBaseIdx + 1).mType == UnitProtoType.Type.TYPE_BIG_O) // lower note is o. && (listBaseULIdentified.get(nNextBaseIdx + 1).mnLeft - serNextBase.getRightPlus1()) < listBaseULIdentified.get(nNextBaseIdx + 1).mnWidth)) { // could be %. for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { if (listCharLevel.get(nElementIdx) == 1) { // upper note int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); if (nElementIdx == nLastUpperNoteIdx) { narrayGrouped[nGroupIdx] = 1; } else { narrayGrouped[nGroupIdx] = 0; } } } } else { // all upper notes belong to last base. for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { if (listCharLevel.get(nElementIdx) == 1) { // upper note int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); narrayGrouped[nGroupIdx] = 0; } } } } else { // the max gap between upper notes is wide which means the upper notes may belong to different bases for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { if (listCharLevel.get(nElementIdx) == 1) { // upper note int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); if (nGroupIdx >= nMaxUpperNoteGapIdx) { narrayGrouped[nGroupIdx] = 1; // max gap right should belong to next base } else { narrayGrouped[nGroupIdx] = 0; // max gap left should belong to last base } } } } } if (nLowerNoteCnt > 0) { dLowerNoteFontAvgWidth /= nLowerNoteCnt; dLowerNoteFontAvgHeight /= nLowerNoteCnt; if (dMaxLowerNoteGap <= ConstantsMgr.msdNoteBaseMaxGap * Math.max(dLowerNoteFontAvgWidth, dLowerNoteFontAvgHeight)) { // times 2 because include vertical and horizontal // the max gap between lower notes is narrow, all lower notes belong to last base. for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { if (listCharLevel.get(nElementIdx) == -1) { // lower note int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); narrayGrouped[nGroupIdx] = 0; } } } else { // the max gap between lower notes is wide which means the lower notes may belong to different bases // here we do not worry about the second o of % because if the second o is too far away from / then // even human being cannot recognize it. for (int nElementIdx = nLastBaseIdx + 1; nElementIdx <= nNextBaseIdx - 1; nElementIdx ++) { if (listCharLevel.get(nElementIdx) == -1) { // lower note int nGroupIdx = nElementIdx - (nLastBaseIdx + 1); if (nGroupIdx >= nMaxLowerNoteGapIdx) { narrayGrouped[nGroupIdx] = 1; // max gap right should belong to next base } else { narrayGrouped[nGroupIdx] = 0; // max gap left should belong to last base } } } } } return narrayGrouped; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PatternInterface trill(Note baseNote){\r\n \treturn trill(baseNote, EFFECT_DIRECTION_UP);\r\n }", "private void updateMatchType(MidiNote note) {\n\t\tList<Beat> beats = beatState.getBeats();\n\t\tBeat startBeat = note.getOnsetBeat(beats);\n\t\tBeat endBeat = note.getOffsetBeat(beats);\n\t\t\n\t\tint tactiPerMeasure = beatState.getTactiPerMeasure();\n\t\t\n\t\tint startTactus = getTactusNormalized(tactiPerMeasure, beats.get(0), startBeat.getMeasure(), startBeat.getBeat());\n\t\tint endTactus = getTactusNormalized(tactiPerMeasure, beats.get(0), endBeat.getMeasure(), endBeat.getBeat());\n\t\t\n\t\tint noteLengthTacti = Math.max(1, endTactus - startTactus);\n\t\tstartTactus -= anacrusisLength * subBeatLength;\n\t\tendTactus = startTactus + noteLengthTacti;\n\t\t\n\t\tint prefixStart = startTactus;\n\t\tint middleStart = startTactus;\n\t\tint postfixStart = endTactus;\n\t\t\n\t\tint prefixLength = 0;\n\t\tint middleLength = noteLengthTacti;\n\t\tint postfixLength = 0;\n\t\t\n\t\tint beatLength = subBeatLength * measure.getSubBeatsPerBeat();\n\t\t\n\t\t// Reinterpret note given matched levels\n\t\tif (matches(MetricalLpcfgMatch.SUB_BEAT) && startTactus / subBeatLength != (endTactus - 1) / subBeatLength) {\n\t\t\t// Interpret note as sub beats\n\t\t\t\n\t\t\tint subBeatOffset = startTactus % subBeatLength;\n\t\t\tint subBeatEndOffset = endTactus % subBeatLength;\n\t\t\t\n\t\t\t// Prefix\n\t\t\tif (subBeatOffset != 0) {\n\t\t\t\tprefixLength = subBeatLength - subBeatOffset;\n\t\t\t}\n\t\t\t\n\t\t\t// Middle fix\n\t\t\tmiddleStart += prefixLength;\n\t\t\tmiddleLength -= prefixLength;\n\t\t\t\n\t\t\t// Postfix\n\t\t\tpostfixStart -= subBeatEndOffset;\n\t\t\tpostfixLength += subBeatEndOffset;\n\t\t\t\n\t\t\t// Middle fix\n\t\t\tmiddleLength -= postfixLength;\n\t\t\t\n\t\t} else if (matches(MetricalLpcfgMatch.BEAT) && startTactus / beatLength != (endTactus - 1) / beatLength) {\n\t\t\t// Interpret note as beats\n\t\t\t\n\t\t\t// Add up possible partial beat at the start\n\t\t\tif (anacrusisLength % measure.getSubBeatsPerBeat() != 0) {\n\t\t\t\tint diff = subBeatLength * (measure.getSubBeatsPerBeat() - (anacrusisLength % measure.getSubBeatsPerBeat()));\n\t\t\t\tstartTactus += diff;\n\t\t\t\tendTactus += diff;\n\t\t\t}\n\t\t\tint beatOffset = (startTactus + subBeatLength * (anacrusisLength % measure.getSubBeatsPerBeat())) % beatLength;\n\t\t\tint beatEndOffset = (endTactus + subBeatLength * (anacrusisLength % measure.getSubBeatsPerBeat())) % beatLength;\n\t\t\t\n\t\t\t// Prefix\n\t\t\tif (beatOffset != 0) {\n\t\t\t\tprefixLength = beatLength - beatOffset;\n\t\t\t}\n\t\t\t\n\t\t\t// Middle fix\n\t\t\tmiddleStart += prefixLength;\n\t\t\tmiddleLength -= prefixLength;\n\t\t\t\n\t\t\t// Postfix\n\t\t\tpostfixStart -= beatEndOffset;\n\t\t\tpostfixLength += beatEndOffset;\n\t\t\t\n\t\t\t// Middle fix\n\t\t\tmiddleLength -= postfixLength;\n\t\t}\n\t\t\n\t\t// Prefix checking\n\t\tif (prefixLength != 0) {\n\t\t\tupdateMatchType(prefixStart, prefixLength);\n\t\t}\n\t\t\n\t\t// Middle checking\n\t\tif (!isFullyMatched() && !isWrong() && middleLength != 0) {\n\t\t\tupdateMatchType(middleStart, middleLength);\n\t\t}\n\t\t\n\t\t// Postfix checking\n\t\tif (!isFullyMatched() && !isWrong() && postfixLength != 0) {\n\t\t\tupdateMatchType(postfixStart, postfixLength);\n\t\t}\n\t}", "private void setUpNote() {\n _noteHead = new Ellipse(Constants.NOTE_HEAD_WIDTH, Constants.NOTE_HEAD_HEIGHT);\n _noteHead.setFill(Color.WHITE);\n _noteHead.setStroke(Color.BLACK);\n _noteHead.setStrokeWidth(Constants.STROKE_WIDTH);\n _noteHead.setCenterX(Constants.NOTE_X_LOC);\n // switch statement for the note value that was passed in\n switch (_note) {\n case 0:\n _noteHead.setCenterY(Constants.C4_LOCATION);\n _ledgerLine.setStartX(Constants.NOTE_X_LOC - Constants.LEDGER_LINE_WIDTH/2);\n _ledgerLine.setEndX(Constants.NOTE_X_LOC + Constants.LEDGER_LINE_WIDTH/2);\n _ledgerLine.setStartY(Constants.C4_LOCATION);\n _ledgerLine.setEndY(Constants.C4_LOCATION);\n break;\n case 1:\n if (_accidental == 's') {\n _noteHead.setCenterY(Constants.C4_LOCATION);\n _ledgerLine.setStartX(Constants.NOTE_X_LOC - Constants.LEDGER_LINE_WIDTH/2);\n _ledgerLine.setEndX(Constants.NOTE_X_LOC + Constants.LEDGER_LINE_WIDTH/2);\n _ledgerLine.setStartY(Constants.C4_LOCATION);\n _ledgerLine.setEndY(Constants.C4_LOCATION);\n this.setUpSharp();\n break;\n }\n else {\n _noteHead.setCenterY(Constants.D4_LOCATION); \n this.setUpFlat();\n break;\n }\n case 2:\n _noteHead.setCenterY(Constants.D4_LOCATION);\n break;\n case 3: \n if (_accidental == 's') {\n _noteHead.setCenterY(Constants.D4_LOCATION);\n this.setUpSharp();\n break;\n }\n else {\n _noteHead.setCenterY(Constants.E4_LOCATION);\n _staffLine.setStartX(Constants.NOTE_X_LOC - Constants.STAFF_LINE_WIDTH/2);\n _staffLine.setEndX(Constants.NOTE_X_LOC + Constants.STAFF_LINE_WIDTH/2); \n _staffLine.setStartY(Constants.E4_LOCATION);\n _staffLine.setEndY(Constants.E4_LOCATION);\n this.setUpFlat();\n break;\n }\n case 4:\n _noteHead.setCenterY(Constants.E4_LOCATION);\n _staffLine.setStartX(Constants.NOTE_X_LOC - Constants.STAFF_LINE_WIDTH/2);\n _staffLine.setEndX(Constants.NOTE_X_LOC + Constants.STAFF_LINE_WIDTH/2); \n _staffLine.setStartY(Constants.E4_LOCATION);\n _staffLine.setEndY(Constants.E4_LOCATION);\n break;\n case 5:\n _noteHead.setCenterY(Constants.F4_LOCATION);\n break;\n case 6:\n if (_accidental == 's') {\n _noteHead.setCenterY(Constants.F4_LOCATION);\n this.setUpSharp();\n break;\n }\n else {\n _noteHead.setCenterY(Constants.G4_LOCATION);\n _staffLine.setStartX(Constants.NOTE_X_LOC - Constants.STAFF_LINE_WIDTH/2);\n _staffLine.setEndX(Constants.NOTE_X_LOC + Constants.STAFF_LINE_WIDTH/2); \n _staffLine.setStartY(Constants.G4_LOCATION);\n _staffLine.setEndY(Constants.G4_LOCATION);\n this.setUpFlat();\n break;\n }\n case 7:\n _noteHead.setCenterY(Constants.G4_LOCATION);\n _staffLine.setStartX(Constants.NOTE_X_LOC - Constants.STAFF_LINE_WIDTH/2);\n _staffLine.setEndX(Constants.NOTE_X_LOC + Constants.STAFF_LINE_WIDTH/2); \n _staffLine.setStartY(Constants.G4_LOCATION);\n _staffLine.setEndY(Constants.G4_LOCATION);\n break;\n case 8:\n if (_accidental == 's') {\n _noteHead.setCenterY(Constants.G4_LOCATION);\n this.setUpSharp();\n break;\n }\n else {\n _noteHead.setCenterY(Constants.A4_LOCATION);\n this.setUpFlat();\n break;\n } \n case 9:\n _noteHead.setCenterY(Constants.A4_LOCATION);\n break;\n case 10:\n if (_accidental == 's') {\n _noteHead.setCenterY(Constants.A4_LOCATION);\n this.setUpSharp();\n break;\n }\n else {\n _noteHead.setCenterY(Constants.B4_LOCATION);\n _staffLine.setStartX(Constants.NOTE_X_LOC - Constants.STAFF_LINE_WIDTH/2);\n _staffLine.setEndX(Constants.NOTE_X_LOC + Constants.STAFF_LINE_WIDTH/2); \n _staffLine.setStartY(Constants.B4_LOCATION);\n _staffLine.setEndY(Constants.B4_LOCATION);\n this.setUpFlat();\n break;\n } \n case 11:\n _noteHead.setCenterY(Constants.B4_LOCATION);\n _staffLine.setStartX(Constants.NOTE_X_LOC - Constants.STAFF_LINE_WIDTH/2);\n _staffLine.setEndX(Constants.NOTE_X_LOC + Constants.STAFF_LINE_WIDTH/2); \n _staffLine.setStartY(Constants.B4_LOCATION);\n _staffLine.setEndY(Constants.B4_LOCATION);\n break;\n \n }\n }", "private void computeLocations ()\r\n {\r\n // Find the note farthest from stem middle point\r\n if (!getNotes().isEmpty()) {\r\n if (stem != null) {\r\n Point middle = stem.getLocation();\r\n Note bestNote = null;\r\n int bestDy = Integer.MIN_VALUE;\r\n\r\n for (TreeNode node : getNotes()) {\r\n Note note = (Note) node;\r\n int noteY = note.getCenter().y;\r\n int dy = Math.abs(noteY - middle.y);\r\n\r\n if (dy > bestDy) {\r\n bestNote = note;\r\n bestDy = dy;\r\n }\r\n }\r\n\r\n Rectangle stemBox = stem.getBounds();\r\n\r\n if (middle.y < bestNote.getCenter().y) {\r\n // Stem is up\r\n tailLocation = new Point(\r\n stemBox.x + (stemBox.width / 2),\r\n stemBox.y);\r\n } else {\r\n // Stem is down\r\n tailLocation = new Point(\r\n stemBox.x + (stemBox.width / 2),\r\n (stemBox.y + stemBox.height));\r\n }\r\n\r\n headLocation = getHeadLocation(bestNote);\r\n } else {\r\n Note note = (Note) getNotes().get(0);\r\n headLocation = note.getCenter();\r\n tailLocation = headLocation;\r\n }\r\n } else {\r\n addError(\"No notes in chord \" + this);\r\n }\r\n }", "public static void verifySequence(double lower, double initial, double upper)\r\n/* 152: */ {\r\n/* 153:354 */ verifyInterval(lower, initial);\r\n/* 154:355 */ verifyInterval(initial, upper);\r\n/* 155: */ }", "private boolean checkConglomerateBeatMatch(LinkedList<MidiNote> voiceNotes) {\n\t\tif (voiceNotes.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tint tactiPerMeasure = beatState.getTactiPerMeasure();\n\t\tint beatLength = subBeatLength * measure.getSubBeatsPerBeat();\n\t\t\n\t\tList<Beat> beats = beatState.getBeats();\n\t\t\n\t\tBeat lastBeat = beats.get(beats.size() - 1);\n\t\tint lastBeatTactus = getTactusNormalized(tactiPerMeasure, beats.get(0), lastBeat.getMeasure(), lastBeat.getBeat());\n\t\tlastBeatTactus -= anacrusisLength * subBeatLength;\n\t\t\n\t\tif (anacrusisLength % measure.getSubBeatsPerBeat() != 0) {\n\t\t\tlastBeatTactus += subBeatLength * (measure.getSubBeatsPerBeat() - (anacrusisLength % measure.getSubBeatsPerBeat()));\n\t\t}\n\t\tint lastBeatNum = lastBeatTactus / beatLength;\n\t\t\n\t\t// First note\n\t\tIterator<MidiNote> iterator = voiceNotes.iterator();\n\t\tMidiNote firstNote = iterator.next();\n\t\titerator.remove();\n\t\t\n\t\tBeat startBeat = firstNote.getOnsetBeat(beats);\n\t\tBeat endBeat = firstNote.getOffsetBeat(beats);\n\t\t\n\t\tint startTactus = getTactusNormalized(tactiPerMeasure, beats.get(0), startBeat.getMeasure(), startBeat.getBeat());\n\t\tint endTactus = getTactusNormalized(tactiPerMeasure, beats.get(0), endBeat.getMeasure(), endBeat.getBeat());\n\t\t\n\t\tint noteLengthTacti = Math.max(1, endTactus - startTactus);\n\t\tstartTactus -= anacrusisLength * subBeatLength;\n\t\tendTactus = startTactus + noteLengthTacti;\n\t\t\n\t\t// Add up possible partial beat at the start\n\t\tif (anacrusisLength % measure.getSubBeatsPerBeat() != 0) {\n\t\t\tstartTactus += subBeatLength * (measure.getSubBeatsPerBeat() - (anacrusisLength % measure.getSubBeatsPerBeat()));\n\t\t}\n\t\tint beatOffset = startTactus % beatLength;\n\t\tint firstBeatNum = startTactus / beatLength;\n\t\t\n\t\t// First note's beat hasn't finished yet\n\t\tif (firstBeatNum == lastBeatNum) {\n\t\t\tvoiceNotes.addFirst(firstNote);\n\t\t\treturn false;\n\t\t}\n\n\t\t// First note doesn't begin on a beat\n\t\tif (beatOffset != 0) {\n\t\t\treturn iterator.hasNext();\n\t\t}\n\t\t\n\t\t// Tracking array\n\t\tMetricalLpcfgQuantum[] quantums = new MetricalLpcfgQuantum[beatLength + 1];\n\t\tArrays.fill(quantums, MetricalLpcfgQuantum.REST);\n\t\t\n\t\t// Add first note into tracking array\n\t\tquantums[beatOffset] = MetricalLpcfgQuantum.ONSET;\n\t\tfor (int tactus = beatOffset + 1; tactus < noteLengthTacti && tactus < quantums.length; tactus++) {\n\t\t\tquantums[tactus] = MetricalLpcfgQuantum.TIE;\n\t\t}\n\t\t\n\t\twhile (iterator.hasNext()) {\n\t\t\tMidiNote note = iterator.next();\n\t\t\t\n\t\t\tstartBeat = note.getOnsetBeat(beats);\n\t\t\tendBeat = note.getOffsetBeat(beats);\n\t\t\t\n\t\t\tstartTactus = getTactusNormalized(tactiPerMeasure, beats.get(0), startBeat.getMeasure(), startBeat.getBeat());\n\t\t\tendTactus = getTactusNormalized(tactiPerMeasure, beats.get(0), endBeat.getMeasure(), endBeat.getBeat());\n\t\t\t\n\t\t\tnoteLengthTacti = Math.max(1, endTactus - startTactus);\n\t\t\tstartTactus -= anacrusisLength * subBeatLength;\n\t\t\tendTactus = startTactus + noteLengthTacti;\n\t\t\t\n\t\t\t// Add up possible partial beat at the start\n\t\t\tif (anacrusisLength % measure.getSubBeatsPerBeat() != 0) {\n\t\t\t\tstartTactus += subBeatLength * (measure.getSubBeatsPerBeat() - (anacrusisLength % measure.getSubBeatsPerBeat()));\n\t\t\t}\n\t\t\tbeatOffset = startTactus % beatLength;\n\t\t\tint beatNum = startTactus / beatLength;\n\t\t\t\n\t\t\tif (beatNum != firstBeatNum) {\n\t\t\t\tif (beatOffset == 0) {\n\t\t\t\t\tquantums[beatLength] = MetricalLpcfgQuantum.ONSET;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// This note was in the same beat. Remove it.\n\t\t\titerator.remove();\n\t\t\t\n\t\t\t// Add note into tracking array\n\t\t\tquantums[beatOffset] = MetricalLpcfgQuantum.ONSET;\n\t\t\tfor (int tactus = beatOffset + 1; tactus - beatOffset < noteLengthTacti && tactus < quantums.length; tactus++) {\n\t\t\t\tquantums[tactus] = MetricalLpcfgQuantum.TIE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Some note tied over the beat boundary, no match\n\t\tif (quantums[beatLength] == MetricalLpcfgQuantum.TIE) {\n\t\t\treturn iterator.hasNext();\n\t\t}\n\t\t\n\t\t// Get the onsets of this quantum\n\t\tList<Integer> onsets = new ArrayList<Integer>();\n\t\tfor (int tactus = 0; tactus < beatLength; tactus++) {\n\t\t\tMetricalLpcfgQuantum quantum = quantums[tactus];\n\t\t\t\n\t\t\t// There's a REST in this quantum, no match\n\t\t\tif (quantum == MetricalLpcfgQuantum.REST) {\n\t\t\t\treturn iterator.hasNext();\n\t\t\t}\n\t\t\t\n\t\t\tif (quantum == MetricalLpcfgQuantum.ONSET) {\n\t\t\t\tonsets.add(tactus);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Get the lengths of the notes of this quantum\n\t\tList<Integer> lengths = new ArrayList<Integer>(onsets.size());\n\t\tfor (int i = 1; i < onsets.size(); i++) {\n\t\t\tlengths.add(onsets.get(i) - onsets.get(i - 1));\n\t\t}\n\t\tlengths.add(beatLength - onsets.get(onsets.size() - 1));\n\t\t\n\t\t// Only 1 note, no match\n\t\tif (lengths.size() == 1) {\n\t\t\treturn iterator.hasNext();\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < lengths.size(); i++) {\n\t\t\t// Some lengths are different, match\n\t\t\tif (lengths.get(i) != lengths.get(i - 1)) {\n\t\t\t\taddMatch(MetricalLpcfgMatch.BEAT);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// All note lengths were the same, no match\n\t\treturn iterator.hasNext();\n\t}", "private void calculateBaseAndHeight() {\n\n if (ribs[0].equals(ribs[1])) {\n base = ribs[2].getLength();\n height = calculateHeight(ribs[0].getLength(),base);\n } else if (ribs[1].equals(ribs[2])) {\n base = ribs[0].getLength();\n height = calculateHeight(ribs[1].getLength(),base);\n } else if (ribs[2].equals(ribs[0])) {\n base = ribs[1].getLength();\n height = calculateHeight(ribs[2].getLength(),base);\n } else {\n base = 0;\n height = 0;\n }\n\n }", "public final void borderHysteresisThreshold(\r\n\t\t\tfinal int _lower,\r\n\t\t\tfinal int _upper) {\r\n\t\t\r\n\t\tBufferedImage bi_result = new BufferedImage(bi_image.getWidth(),\r\n\t\t\t\tbi_image.getHeight(), BufferedImage.TYPE_INT_RGB);\r\n\t\t\r\n\t\tdouble[][][] borderInfo1 = new double[bi_result.getWidth()][bi_result.getHeight()][2];\r\n\t\t\r\n\t\t/*\r\n\t\t * Step 1: Detection of border pixel.\r\n\t\t */\r\n\t\t\r\n\t\tfor (int x = 1; x < bi_image.getWidth() - 1; x++) {\r\n\t\t\tfor (int y = 1; y < bi_image.getHeight() - 1; y++) {\r\n\t\t\t\t\r\n\t\t\t\t//fold with \r\n\t\t\t\t//\r\n\t\t\t\t//\t-1/4\t0\t1/4\r\n\t\t\t\t//\t-2/4\t0\t2/4\r\n\t\t\t\t//\t-1/4\t0\t1/4\r\n\t\t\t\tint magnX = (\r\n\t\t\t\t\t\t-bi_image.getGrayifiedValue(x - 1, y - 1) / 3 \r\n\t\t\t\t\t\t- bi_image.getGrayifiedValue(x - 1, y) / 3 \r\n\t\t\t\t\t\t- bi_image.getGrayifiedValue(x - 1, y + 1) / 3 \r\n\r\n\t\t\t\t\t\t+ bi_image.getGrayifiedValue(x + 1, y - 1) / 3 \r\n\t\t\t\t\t\t+ bi_image.getGrayifiedValue(x + 1, y) / 3\r\n\t\t\t\t\t\t+ bi_image.getGrayifiedValue(x + 1, y + 1) / 3);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\tint magnY = (\r\n\t\t\t\t\t\t-bi_image.getGrayifiedValue(x - 1, y - 1) / 3 \r\n\t\t\t\t\t\t- bi_image.getGrayifiedValue(x - 1, y) / 3 \r\n\t\t\t\t\t\t- bi_image.getGrayifiedValue(x - 1, y + 1) / 3 \r\n\r\n\t\t\t\t\t\t+ bi_image.getGrayifiedValue(x + 1, y - 1) / 3 \r\n\t\t\t\t\t\t+ bi_image.getGrayifiedValue(x + 1, y) / 3\r\n\t\t\t\t\t\t+ bi_image.getGrayifiedValue(x + 1, y + 1) / 3);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//direction\r\n\t\t\t\tdouble direction;\r\n\t\t\t\tif (magnY != 0 && magnX != 0) {\r\n\t\t\t\t\tdirection = Math.atan(magnX / magnY);\r\n\t\t\t\t} else if (magnY == 0) {\r\n\t\t\t\t\tdirection = Math.atan(magnX / 0.01);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdirection = Math.atan(0);\r\n\t\t\t\t}\r\n\t\t\t\tdouble magnitude = Math.sqrt(magnX * magnX + magnY * magnY);\r\n\t\t\t\t\r\n\t\t\t\tmagnY = Math.abs(magnY);\r\n\t\t\t\tmagnX = Math.abs(magnX);\r\n\r\n\t\t\t\tborderInfo1[x][y][0] = magnitude;\r\n\t\t\t\tborderInfo1[x][y][1] = direction;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//non-maximum-suppression\r\n\r\n\t\tdouble[][][] borderInfo2 = new double[bi_result.getWidth()][bi_result.getHeight()][2];\r\n\r\n\t\tfor (int x = 1; x < bi_image.getWidth() - 1; x++) {\r\n\t\t\tfor (int y = 1; y < bi_image.getHeight() - 1; y++) {\r\n\t\t\t\t//nY\r\n\t\t\t\t// \r\n\t\t\t\t// |alpha\r\n\t\t\t\t// |\r\n\t\t\t\t// --------->nX\r\n\t\t\t\t// arctan(nX / ny) = Winkel(alpha). gegenkathete / ankathete\r\n\t\t\t\t//find neighbors of the pixel (x, y) by direction:\r\n\t\t\t\tdouble direction = borderInfo1[x][y][1];\r\n\r\n\t\t\t\tint nX = 1;\r\n\t\t\t\tint nY = 1;\r\n\t\t\t\tif (direction < 0)\r\n\t\t\t\t\tnX = -1;\r\n\t\t\t\telse if (direction > 0)\r\n\t\t\t\t\tnX = 1;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (direction >= 0 && direction <= Math.PI / 4) {\r\n\t\t\t\t\tnX = 1;\r\n\t\t\t\t\tnY = 0;\r\n\t\t\t\t} else if (direction >= Math.PI / 4 && direction <= Math.PI * 2 / 4) {\r\n\t\t\t\t\tnX = 1;\r\n\t\t\t\t\tnY = 1;\r\n\t\t\t\t} else if (direction >= -Math.PI / 4 && direction <= 0) {\r\n\t\t\t\t\tnX = 0; \r\n\t\t\t\t\tnY = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t// - pi / 2 ; + pi / 2\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\t\r\n\t\t\t\tif (Math.abs(borderInfo1[x][y][0]) >= Math.abs(borderInfo1[x + nX][y + nY][0])\r\n\t\t\t\t\t\t&& Math.abs(borderInfo1[x][y][0]) >= Math.abs(borderInfo1[x + nX][y + nY][0])) {\r\n\t\t\t\t\tborderInfo2[x][y][0] = borderInfo1[x][y][0];\r\n\t\t\t\t\tborderInfo2[x][y][1] = borderInfo1[x][y][1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//hysteresis-threshold\r\n\t\tfor (int x = 1; x < bi_image.getWidth() - 1; x++) {\r\n\t\t\tfor (int y = 1; y < bi_image.getHeight() - 1; y++) {\r\n\t\t\t\tif (borderInfo1[x][y][0] >= _lower){\r\n\t\t\t\t\tbi_result.setRGB(x, y, rgb_potential);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbi_result.setRGB(x, y, rgb_noBorder);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (int x = 1; x < bi_image.getWidth() - 1; x++) {\r\n\t\t\tfor (int y = 1; y < bi_image.getHeight() - 1; y++) {\r\n\t\t\t\tif (borderInfo1[x][y][0] >= _upper){\r\n\t\t\t\t\tfollowEdge(x, y, bi_result);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int x = 1; x < bi_image.getWidth() - 1; x++) {\r\n\t\t\tfor (int y = 1; y < bi_image.getHeight() - 1; y++) {\r\n\t\t\t\tif (bi_result.getRGB(x, y) == rgb_potential){\r\n\t\t\t\t\tbi_result.setRGB(x, y, rgb_noBorder);\r\n\t\t\t\t} else if (bi_result.getRGB(x, y) == rgb_border) {\r\n\t\t\t\t\tbi_result.setRGB(x, y, bi_image.getContent().getRGB(x, y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tBufferedViewer.show(bi_result);\r\n\t\tBufferedViewer.getInstance().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t}", "public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}", "private static void reorderLine(Bidi bidi, byte minLevel, int maxLevel) {\n if (maxLevel > (minLevel | 1)) {\n int minLevel2 = (byte) (minLevel + 1);\n BidiRun[] runs = bidi.runs;\n byte[] levels = bidi.levels;\n int runCount = bidi.runCount;\n if (bidi.trailingWSStart < bidi.length) {\n runCount--;\n }\n while (true) {\n maxLevel = (byte) (maxLevel - 1);\n if (maxLevel < minLevel2) {\n break;\n }\n int firstRun = 0;\n while (true) {\n if (firstRun < runCount && levels[runs[firstRun].start] < maxLevel) {\n firstRun++;\n } else if (firstRun >= runCount) {\n break;\n } else {\n int limitRun = firstRun;\n do {\n limitRun++;\n if (limitRun >= runCount) {\n break;\n }\n } while (levels[runs[limitRun].start] >= maxLevel);\n for (int endRun = limitRun - 1; firstRun < endRun; endRun--) {\n BidiRun tempRun = runs[firstRun];\n runs[firstRun] = runs[endRun];\n runs[endRun] = tempRun;\n firstRun++;\n }\n if (limitRun == runCount) {\n break;\n }\n firstRun = limitRun + 1;\n }\n }\n }\n if ((minLevel2 & 1) == 0) {\n int firstRun2 = 0;\n if (bidi.trailingWSStart == bidi.length) {\n runCount--;\n }\n while (firstRun2 < runCount) {\n BidiRun tempRun2 = runs[firstRun2];\n runs[firstRun2] = runs[runCount];\n runs[runCount] = tempRun2;\n firstRun2++;\n runCount--;\n }\n }\n }\n }", "private Point getHeadLocation (Note note)\r\n {\r\n return new Point(tailLocation.x, note.getReferencePoint().y);\r\n }", "private void checkBaselineHints() {\n onView(withId(R.id.upperThresh)).check(matches(withHint(topHint)));\n onView(withId(R.id.upperThresh)).perform(typeText(\"2.00\"), closeSoftKeyboard());\n onView(withId(R.id.lowerThresh)).check(matches(withHint(botHint)));\n onView(withId(R.id.lowerThresh)).perform(typeText(\"1.00\"), closeSoftKeyboard());\n }", "public static PatternInterface trill(Note baseNote, char trillDirection, double singleSoundDuration){\r\n \r\n \tStringBuilder musicStringBuilder = new StringBuilder();\r\n \r\n \tdouble totalDuration = baseNote.getDecimalDuration();\r\n double actualDuration = 0.0d;\r\n \r\n byte secondNote = baseNote.getValue();\r\n \r\n if(trillDirection == EFFECT_DIRECTION_UP){\r\n \tsecondNote++;\r\n } else if(trillDirection == EFFECT_DIRECTION_DOWN){\r\n \tsecondNote--;\r\n }\r\n \r\n double remainingDuration = totalDuration - (2*singleSoundDuration);\r\n if(remainingDuration > 0.0d){\r\n \t\r\n \tappendNoteValueAndDuration(musicStringBuilder, baseNote.getValue(), singleSoundDuration);\r\n \tactualDuration+=singleSoundDuration;\r\n \t\r\n \twhile(actualDuration < totalDuration){\r\n \t\tif(actualDuration + (2*singleSoundDuration) < totalDuration){\r\n \t\t\tappendNoteValueAndDuration(musicStringBuilder, secondNote, singleSoundDuration);\r\n \t\t\tactualDuration += singleSoundDuration;\r\n \t\t\tappendNoteValueAndDuration(musicStringBuilder, baseNote.getValue(), singleSoundDuration);\r\n \t\t\tactualDuration += singleSoundDuration;\r\n \t\t} else if(actualDuration + singleSoundDuration > totalDuration){\r\n \t\t\tdouble gapDuration = totalDuration - actualDuration;\r\n \t\t\tappendNoteValueAndDuration(musicStringBuilder, baseNote.getValue(), gapDuration);\r\n \t\t\tactualDuration+=gapDuration;\r\n \t\t} else {\r\n \t\t\tappendNoteValueAndDuration(musicStringBuilder, baseNote.getValue(), singleSoundDuration);\r\n \t\t\tactualDuration+=singleSoundDuration;\r\n \t\t}\r\n \t}\r\n \treturn new Pattern(musicStringBuilder.toString().trim());\r\n } else {\r\n \treturn new Pattern(baseNote.getMusicString());\r\n }\r\n }", "public List<String> findMissingRanges(int[] nums, int lower, int upper) {\n List<String> res = new ArrayList<>();\n if (nums == null || nums.length == 0) {\n if (lower == upper) {\n res.add(\"\" + lower);\n } else {\n res.add(lower + \"->\" + upper);\n }\n return res;\n }\n\n if (nums[0] > lower) {\n if (nums[0] - 1 == lower) {\n res.add(\"\" + lower);\n } else {\n res.add(lower + \"->\" + (nums[0] - 1));\n }\n }\n\n for (int i = 0; i < nums.length - 1; i++) {\n if ((nums[i + 1] == nums[i] + 1) || nums[i] == nums[i + 1]) {\n continue;\n }\n if (nums[i + 1] - nums[i] == 2) {\n res.add(\"\" + (nums[i] + 1));\n } else {\n res.add((nums[i] + 1) + \"->\" + (nums[i + 1] - 1));\n }\n }\n\n if (nums[nums.length - 1] < upper) {\n if (upper - 1 == nums[nums.length - 1]) {\n res.add(\"\" + upper);\n } else {\n res.add((nums[nums.length - 1] + 1) + \"->\" + upper);\n }\n }\n\n return res;\n\n }", "boolean hasMid();", "boolean hasMid();", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n if (this.high.compareTo(low) == -1) {\n return \"\";\n }\n Note temLow = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low.getIsHead(),\n this.low.getInstrument(), this.low.getVolume());\n builder.append(\" \");\n for (int i = 0; this.high.compareTo(temLow) != -1; i++) {\n if (temLow.toString().length() == 3) {\n builder.append(temLow.toString());\n } else {\n builder.append(\" \" + temLow.toString());\n }\n temLow.up();\n }\n builder.append(\"\\n\");\n\n for (int i = 0; i < this.sheet.size(); i++) {\n if (i < 10) {\n builder.append(i + \" \");\n } else {\n builder.append(i);\n }\n List<Note> list = new ArrayList<Note>(this.sheet.get(i));\n Collections.sort(list);\n int listIndex = 0;\n Note comparator = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low.getIsHead(),\n this.low.getInstrument(), this.low.getVolume());\n\n // when the measure is empty.\n if (list.size() == 0) {\n builder.append(\" \");\n }\n for (int j = 0; listIndex < list.size() && j <= this.high.howFarUp(this.low); j++) {\n if (list.get(listIndex).compareTo(comparator) == 0) {\n if (list.get(listIndex).getIsHead()) {\n builder.append(\" X \");\n listIndex++;\n } else {\n builder.append(\" | \");\n listIndex++;\n }\n } else {\n builder.append(\" \");\n }\n comparator.up();\n }\n builder.append(\"\\n\");\n }\n return builder.toString();\n }", "private void resetToBase(){\n\t\t//find number of markers after base\n\t\tSystem.out.println(\"here is the base: \" + base);\n\t\tint numMarkers = 0;\n\n\t\tfor(int i=base+1; i<indices.length; i++){\n\t\t\tif(indices[i]==1){\n\t\t\t\tindices[i] = 0;\n\t\t\t\tnumMarkers++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=base; i<base+numMarkers; i++){\n\t\t\tindices[i+1] = 1;\n\t\t}\n\t}", "private List<MetricalLpcfgMetricalModelState> getAllFirstStepBranches() {\n\t\tList<MetricalLpcfgMetricalModelState> newStates = new ArrayList<MetricalLpcfgMetricalModelState>();\n\t\t\n\t\tlong lastTime = notesToCheck.peek().getOffsetTime();\n\t\tlong lastBeatTime = beatState.getBeats().get(beatState.getBeats().size() - 1).getTime();\n\t\t\n\t\t// No notes have finished yet, we must still wait\n\t\tif (lastBeatTime < lastTime) {\n\t\t\tnewStates.add(this);\n\t\t\treturn newStates;\n\t\t}\n\t\t\n\t\t// A note has finished, add measure hypotheses\n\t\tfor (int subBeatLength = 1; subBeatLength <= 1; subBeatLength++) {\n\t\t\t\n\t\t\tfor (Measure measure : grammar.getMeasures()) {\n\t\t\t\t\n\t\t\t\tint subBeatsPerMeasure = measure.getBeatsPerMeasure() * measure.getSubBeatsPerBeat();\n\t\t\t\tfor (int anacrusisLength = 0; anacrusisLength < subBeatsPerMeasure; anacrusisLength++) {\n\t\t\t\t\t\n\t\t\t\t\tMetricalLpcfgMetricalModelState newState =\n\t\t\t\t\t\t\tnew MetricalLpcfgMetricalModelState(this, grammar, measure, subBeatLength, anacrusisLength);\n\t\t\t\t\tnewState.updateMatchType();\n\t\t\t\t\t\n\t\t\t\t\t// This hypothesis could match the first note\n\t\t\t\t\tif (!newState.isWrong()) {\n\t\t\t\t\t\tnewStates.add(newState);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Main.VERBOSE) {\n\t\t\t\t\t\t\tSystem.out.println(\"Adding \" + newState);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newStates;\n\t}", "public MainNoteComponent[] convertApproachTonesToNotes(MainNoteComponent[] partiallyCompletedNotes, List<Tone> toneList){\n\t\tChromaticNoteGenerator generator = new ChromaticNoteGenerator();\n\t\tMainNoteComponent[] fullyCompletedNotes = partiallyCompletedNotes.clone();\n\t\t\n\t\tfor (int i = 0; i < fullyCompletedNotes.length; i++) {\n\t\t\tTone tone = toneList.get(i);\n\t\t\tif (tone instanceof ApproachTone) {\n\t\t\t\tMainNoteComponent approachNote;\n\t\t\t\tif (i == fullyCompletedNotes.length-1){ \n\t\t\t\t\t//if the approach tone is at the end of a phrase then we use the previous note to work out the \n\t\t\t\t\t//next approach tone\n\t\t\t\t\t//this may be a rest tone in fact, which causes errors as we can't get approach tones for rest notes\n\t\t\t\t\tint indexDec = 1;\n\t\t\t\t\tMainNoteComponent previousNote = fullyCompletedNotes[i-indexDec];\n\t\t\t\t\twhile(previousNote.getBasicNote().equals(BasicNote.rest())){\n\t\t\t\t\t\tindexDec++;\n\t\t\t\t\t\tpreviousNote = fullyCompletedNotes[i-indexDec];\n\t\t\t\t\t}\n\t\t\t\t\tList<MainNoteComponent> approachNotes = generator.getChromaticUpAndDown(previousNote);\n\t\t\t\t\tint randIndex = RandomListIndexPicker.pickRandomIndex(approachNotes);\n\t\t\t\t\tapproachNote = approachNotes.get(randIndex);\n\t\t\t\t}\n\t\t\t\telse if (i == 0) {\n\t\t\t\t\t//if the approach tone is at the beginning, then we can only use the next note\n\t\t\t\t\tMainNoteComponent nextNote = fullyCompletedNotes[i+1];\n\t\t\t\t\tList<MainNoteComponent> approachNotes = generator.getChromaticUpAndDown(nextNote);\n\t\t\t\t\tint randIndex = RandomListIndexPicker.pickRandomIndex(approachNotes);\n\t\t\t\t\tapproachNote = approachNotes.get(randIndex);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//else we look at the next note always, but we can use the previous note to decided where we want to approach from\n\t\t\t\t\tMainNoteComponent previousNote = fullyCompletedNotes[i-1];\n\t\t\t\t\tMainNoteComponent nextNote = fullyCompletedNotes[i+1];\n\t\t\t\t\tif (previousNote.isLowerThan(nextNote)){\n\t\t\t\t\t\tapproachNote = generator.getOneChromaticNoteDown(nextNote);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tapproachNote = generator.getOneChromaticNoteUp(nextNote);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfullyCompletedNotes[i] = approachNote;\n\t\t\t}\n\t\t}\n\t\treturn fullyCompletedNotes;\n\t}", "public void mainDecoder(int b, Integer[] playedChord){\n\n while(beatCounter<b){\n for(int i =0; i < rhytm.get(beatCounter).length;i++)\n {\n if(rhytm.get(beatCounter)[i]!=null) {\n if ((!rhytm.get(beatCounter)[i].equals(\"Ri\")) && (!rhytm.get(beatCounter)[i].equals(\"Rs\"))) {\n\n //TODO DECODE HARMONIC NOTE AT EVERY FIRST AND THIRD BEAT AT FIRST NOTE PLAYED\n if (beatCounter % 2 == 0 && i == 0) {\n for (int j = 0; j < playedChord.length; j++) {\n if (playedChord[j] == melody.get(melodyCounter)) {\n if(j<2){\n binaryOutput+=\"0\";\n binaryOutput+=Integer.toBinaryString(j);\n }else{\n binaryOutput+=Integer.toBinaryString(j);\n }\n //todo SAVE FOR LATER COMPARISON\n if(beatCounter==0)\n firstChordNote=melody.get(melodyCounter);\n if(beatCounter==16)\n secondChordNote=melody.get(melodyCounter);\n\n previousNote = melody.get(melodyCounter);\n melodyCounter++;\n break;\n }\n }\n //TODO DECODE EVERY OTHER NOTE, ENCODED WITH AUTOMATON\n } else {\n //// TODO WAS MELODY ASCENDING OR DESCENDING\n if (previousNote >= 55 && previousNote <= 79)\n if (previousNote < melody.get(melodyCounter))\n binaryOutput+=\"1\";\n else\n binaryOutput+=\"0\";\n\n //todo WAS IT STEP OR LEAP\n for (int j = 0; j < melodyNotes.length; j++) {\n if (melodyNotes[j].equals(previousNote)) {\n previousNotePosition = j;\n break;\n }\n }\n for (int j = 0; j < melodyNotes.length; j++) {\n if (melodyNotes[j].equals(melody.get(melodyCounter))) {\n previousNote=melodyNotes[j];\n int difference = abs(j - previousNotePosition);\n if (difference > 1) {\n binaryOutput+=\"1\";\n binaryOutput+=new Integer(difference - 2).toString();\n } else\n binaryOutput+=\"0\";\n break;\n }\n }\n melodyCounter++;\n }\n }\n }\n }\n beatCounter++;\n }\n\n }", "private void printNotes(AbstractInscription... inscs) {\n\t\tfor (AbstractInscription insc : inscs) {\n\t\t\tSystem.out.println(String.format(\n\t\t\t\t\t\"Inscription '%s' : note min = %s, note max = %s, note objectif = %s, note réelle = %s, acquis réel = %s\\r\\n\",\n\t\t\t\t\tinsc, insc.getCalculateur().getNoteMin(), insc.getCalculateur().getNoteMax(),\n\t\t\t\t\tinsc.getCalculateur().getNoteObjectif(), insc.getCalculateur().getNoteReelle(),\n\t\t\t\t\tinsc.getCalculateur().getAcquisReel()));\n\t\t}\n\t}", "private Pair Flats(double[] notes){\n\t\t//Bb (at 10) is the first one\n\t\t//Also, Cb = B and Fb = E\n\t\tdouble error = 0;\n\t\tint bestkey = 7;\n\t\t//First check for the keys with Cb and Fb\n\t\tint[] drkeys = new int[]{1, 6, 8};\n\t\tfor(int i: drkeys){\n\t\t\terror += notes[i+1];\n\t\t}\n\t\terror += notes[0];\n\t\tif (notes[5]<notes[4]){\n\t\t\terror+=notes[5];\n\t\t}\n\t\telse{\n\t\t\terror+=notes[4];\n\t\t\tbestkey = 6;\n\t\t}\n\t\tfor(int i=0; i<6; i++){\n\t\t\tdouble tp = flatsError(notes, i);\n\t\t\tif (tp < error){\n\t\t\t\terror = tp;\n\t\t\t\tbestkey =i;\n\t\t\t}\n\t\t}\n\t\treturn new Pair(error, bestkey);\n\t}", "public boolean arrowScroll(int r7) {\n /*\n r6 = this;\n android.view.View r0 = r6.findFocus()\n r1 = 1\n r2 = 0\n r3 = 0\n if (r0 != r6) goto L_0x000a\n goto L_0x005d\n L_0x000a:\n if (r0 == 0) goto L_0x005c\n android.view.ViewParent r4 = r0.getParent()\n L_0x0010:\n boolean r5 = r4 instanceof android.view.ViewGroup\n if (r5 == 0) goto L_0x001d\n if (r4 != r6) goto L_0x0018\n r4 = 1\n goto L_0x001e\n L_0x0018:\n android.view.ViewParent r4 = r4.getParent()\n goto L_0x0010\n L_0x001d:\n r4 = 0\n L_0x001e:\n if (r4 != 0) goto L_0x005c\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n java.lang.Class r5 = r0.getClass()\n java.lang.String r5 = r5.getSimpleName()\n r4.append(r5)\n android.view.ViewParent r0 = r0.getParent()\n L_0x0034:\n boolean r5 = r0 instanceof android.view.ViewGroup\n if (r5 == 0) goto L_0x004d\n java.lang.String r5 = \" => \"\n r4.append(r5)\n java.lang.Class r5 = r0.getClass()\n java.lang.String r5 = r5.getSimpleName()\n r4.append(r5)\n android.view.ViewParent r0 = r0.getParent()\n goto L_0x0034\n L_0x004d:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.String r5 = \"arrowScroll tried to find focus based on non-child current focused view \"\n r0.<init>(r5)\n java.lang.String r4 = r4.toString()\n r0.append(r4)\n goto L_0x005d\n L_0x005c:\n r3 = r0\n L_0x005d:\n android.view.FocusFinder r0 = android.view.FocusFinder.getInstance()\n android.view.View r0 = r0.findNextFocus(r6, r3, r7)\n r4 = 66\n r5 = 17\n if (r0 == 0) goto L_0x00a8\n if (r0 == r3) goto L_0x00a8\n if (r7 != r5) goto L_0x008d\n android.graphics.Rect r1 = r6.mTempRect\n android.graphics.Rect r1 = r6.getChildRectInPagerCoordinates(r1, r0)\n int r1 = r1.left\n android.graphics.Rect r2 = r6.mTempRect\n android.graphics.Rect r2 = r6.getChildRectInPagerCoordinates(r2, r3)\n int r2 = r2.left\n if (r3 == 0) goto L_0x0088\n if (r1 < r2) goto L_0x0088\n boolean r2 = r6.pageLeft()\n goto L_0x00bb\n L_0x0088:\n boolean r2 = r0.requestFocus()\n goto L_0x00bb\n L_0x008d:\n if (r7 != r4) goto L_0x00bb\n android.graphics.Rect r1 = r6.mTempRect\n android.graphics.Rect r1 = r6.getChildRectInPagerCoordinates(r1, r0)\n int r1 = r1.left\n android.graphics.Rect r2 = r6.mTempRect\n android.graphics.Rect r2 = r6.getChildRectInPagerCoordinates(r2, r3)\n int r2 = r2.left\n if (r3 == 0) goto L_0x00a3\n if (r1 <= r2) goto L_0x00b2\n L_0x00a3:\n boolean r2 = r0.requestFocus()\n goto L_0x00bb\n L_0x00a8:\n if (r7 == r5) goto L_0x00b7\n if (r7 != r1) goto L_0x00ad\n goto L_0x00b7\n L_0x00ad:\n if (r7 == r4) goto L_0x00b2\n r0 = 2\n if (r7 != r0) goto L_0x00bb\n L_0x00b2:\n boolean r2 = r6.pageRight()\n goto L_0x00bb\n L_0x00b7:\n boolean r2 = r6.pageLeft()\n L_0x00bb:\n if (r2 == 0) goto L_0x00c4\n int r7 = android.view.SoundEffectConstants.getContantForFocusDirection(r7)\n r6.playSoundEffect(r7)\n L_0x00c4:\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.map.widget.RecyclableViewPager.arrowScroll(int):boolean\");\n }", "void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }", "@SuppressWarnings(\"static-method\")\n\tprotected String transformInformationNotes(String text) {\n\t\tfinal String info = Strings.emptyIfNull(System.getProperty(INFO_NOTE_PATTERN_PROPERTY));\n\t\tfinal String warning = Strings.emptyIfNull(System.getProperty(WARNING_NOTE_PATTERN_PROPERTY));\n\t\tfinal String danger = Strings.emptyIfNull(System.getProperty(DANGER_NOTE_PATTERN_PROPERTY));\n\t\tif (Strings.isEmpty(info) && Strings.isEmpty(warning) && Strings.isEmpty(danger)) {\n\t\t\treturn text;\n\t\t}\n\n\t\tfinal Pattern startPattern = Pattern.compile(MARKDOWN_INFORMATION_NOTE_PATTERN1);\n\t\tfinal Pattern continuePattern = Pattern.compile(MARKDOWN_INFORMATION_NOTE_PATTERN2);\n\t\tfinal StringBuilder result = new StringBuilder();\n\t\tString currentName = null;\n\t\tStringBuilder currentNote = null;\n\t\tfor (final String line : text.split(\"\\r*\\n\\r*\")) {\n\t\t\tString newLine = null;\n\t\t\tif (currentName == null) {\n\t\t\t\tfinal Matcher matcher = startPattern.matcher(line);\n\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\tcurrentName = matcher.group(1).trim();\n\t\t\t\t\tcurrentNote = new StringBuilder(matcher.group(2).trim());\n\t\t\t\t} else {\n\t\t\t\t\tcurrentName = null;\n\t\t\t\t\tcurrentNote = null;\n\t\t\t\t\tnewLine = line;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfinal Matcher matcher = continuePattern.matcher(line);\n\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\tassert currentNote != null;\n\t\t\t\t\tcurrentNote.append(\" \").append(matcher.group(1).trim());\n\t\t\t\t} else {\n\t\t\t\t\tupdateBuffer(result, currentName, currentNote, info, warning, danger);\n\t\t\t\t\tcurrentName = null;\n\t\t\t\t\tcurrentNote = null;\n\t\t\t\t\tnewLine = line;\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdateBuffer(result, newLine);\n\t\t}\n\t\tupdateBuffer(result, currentName, currentNote, info, warning, danger);\n\t\treturn result.toString();\n\t}", "private static void findPart(char[][] a, char[][] b, char[][] sup, int r1, int r2, int c1, int c2)\n\t{\n\t\t\n\t\tif (r2 - r1 > 1)\n\t\t{\n\t\t\tfor (int r = r1+1; r < r2; r++)\n\t\t\t{\n\t\t\t\tboolean part = true;\n\t\t\t\tfor (int c = c1+1; c < c2; c+=2)\n\t\t\t\t{\n\t\t\t\t\tif (a[r][c] == ' ' || b[r][c] == ' ')\n\t\t\t\t\t{\n\t\t\t\t\t\tpart = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (part)\n\t\t\t\t{\n\t\t\t\t\tfor (int c = c1+1; c < c2; c+=2)\n\t\t\t\t\t{\n\t\t\t\t\t\tsup[r][c] = '_';\n\t\t\t\t\t}\n\t\t\t\t\tfindPart(a, b, sup, r1, r, c1, c2);\n\t\t\t\t\tfindPart(a, b, sup, r, r2, c1, c2);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (c2 - c1 > 2)\n\t\t{\n\t\t\tfor (int c = c1+2; c < c2; c+=2)\n\t\t\t{\n\t\t\t\tboolean part = true;\n\t\t\t\tfor (int r = r1+1; r <= r2; r++)\n\t\t\t\t{\n\t\t\t\t\tif (a[r][c] == ' ' || b[r][c] == ' ')\n\t\t\t\t\t{\n\t\t\t\t\t\tpart = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (part)\n\t\t\t\t{\n\t\t\t\t\tfor (int r = r1+1; r <= r2; r++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsup[r][c] = '|';\n\t\t\t\t\t}\n\t\t\t\t\tfindPart(a, b, sup, r1, r2, c1, c);\n\t\t\t\t\tfindPart(a, b, sup, r1, r2, c, c2);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "String notes();", "public void testPrev() {\n test1.prev();\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.prev();\n test1.moveToPos(8);\n assertTrue(test1.getValue().inRange(8));\n }", "private static String recoverParent(BabelSynset bs) throws IOException {\n\t\tif(bs.getEdges(BabelPointer.ANY_HYPERNYM).size() == 0) {\n\t\t\tif(bs.getEdges(BabelPointer.DERIVATIONALLY_RELATED).size() > 0) {\n\t\t\t\tString tag = bs.getEdges(BabelPointer.DERIVATIONALLY_RELATED).get(0).getTarget();\n\t\t\t\tif(tag != null) \n\t\t\t\t\treturn tag;\n\t\t\t}\n\t\t}\n\t\treturn findHighParent_A(bs);\n\t}", "void extractBed(Variant seqChange) {\n\t\tfor (int start = seqChange.getStart(); start <= (seqChange.getEnd() - minBases); start++) {\n\t\t\t// Find best interval starting at 'start'\n\t\t\tVariant sc = extractBed(seqChange, start);\n\t\t\tif (sc == null) continue; // Nothing found\n\n\t\t\t// Show interval\n\t\t\tprintBed(sc, score(sc));\n\n\t\t\tstart = sc.getEnd() + 1; // Move after interval's end\n\t\t}\n\t}", "private static void verifyAnkiNotesIntegrity() throws ClassNotFoundException {\n List<AnkiNote> notesWithoutPron = new AnkiDatabase().getNotesWithoutPron();\n for (AnkiNote note : notesWithoutPron) {\n String deutsch = note.getDeutsch();\n String tags = note.getTags();\n String articleError = \"Note has flag %s, but does not start with %s: %s%n\";\n //Notes with tag Femininum must have german field starting with e or r/e\n if (tags.contains(\"Femininum\") && !(deutsch.startsWith(\"e \") || deutsch.startsWith(\"r/e \"))) {\n System.err.printf(articleError, \"Femininum\", \"e or r/e\", note);\n }\n\n //Notes with tag Maskulinum must start with r or r/e or r/s\n if (tags.contains(\"Maskulinum\")\n && !(deutsch.startsWith(\"r \") || deutsch.startsWith(\"r/e \")\n || deutsch.startsWith(\"r/s \"))) {\n System.err.printf(articleError, \"Maskulinum\", \"r or r/e\", note);\n }\n\n //Notes with tag Neutrum must start with s or (s)\n if (tags.contains(\"Neutrum\")\n && !(deutsch.startsWith(\"s \") || deutsch.startsWith(\"(s) \")\n || deutsch.startsWith(\"r/s \"))) {\n System.err.printf(articleError, \"Neutrum\", \"s or (s)\", note);\n }\n\n //No nbsp; in notes!\n if (note.getFlds().contains(\"nbsp;\")) {\n System.err.printf(\"Note contains nbsp; :%s%n\", note);\n }\n\n //No special characters in words!\n String word = note.getWord();\n if (word != null && (word.contains(\"<\") || word.contains(\" \") || word.contains(\">\") || word.contains(\"­\"))) {\n System.err.printf(\"Note contains one of characters <, ,>,-: %s%n\", note);\n }\n\n //When note has Maskulinum, Femininum or Neutrum, then it must have wort\n if ((tags.contains(\"Maskulinum\") || tags.contains(\"Femininum\") || tags.contains(\"Neutrum\"))\n && !tags.contains(\"wort\")) {\n System.err.printf(\"Note has Maskulinu, Femininum or Neutrum, but doesn't have wort: %s%n\", note);\n }\n }\n }", "public int getTestNotePitch()\n {\n return super.getTestNotePitch();\n }", "private void updateMatchType(int startTactus, int noteLengthTacti) {\n\t\tint beatLength = subBeatLength * measure.getSubBeatsPerBeat();\n\t\tint measureLength = beatLength * measure.getBeatsPerMeasure();\n\t\t\n\t\tint subBeatOffset = startTactus % subBeatLength;\n\t\tint beatOffset = startTactus % beatLength;\n\t\tint measureOffset = startTactus % measureLength;\n\t\t\n\t\tif (matches(MetricalLpcfgMatch.SUB_BEAT)) {\n\t\t\t// Matches sub beat (and not beat)\n\t\t\t\n\t\t\tif (noteLengthTacti < subBeatLength) {\n\t\t\t\t// Note is shorter than a sub beat\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti == subBeatLength) {\n\t\t\t\t// Note is exactly a sub beat\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti < beatLength) {\n\t\t\t\t// Note is between a sub beat and a beat in length\n\t\t\t\t\n\t\t\t\t// Can only happen when the beat is divided in 3, but this is 2 sub beats\n\t\t\t\taddMatch(MetricalLpcfgMatch.WRONG);\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti == beatLength) {\n\t\t\t\t// Note is exactly a beat in length\n\t\t\t\t\n\t\t\t\t// Must match exactly\n\t\t\t\taddMatch(beatOffset == 0 ? MetricalLpcfgMatch.BEAT : MetricalLpcfgMatch.WRONG);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Note is greater than a beat in length\n\t\t\t\t\n\t\t\t\tif (noteLengthTacti % beatLength != 0) {\n\t\t\t\t\t// Not some multiple of the beat length\n\t\t\t\t\taddMatch(MetricalLpcfgMatch.WRONG);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else if (matches(MetricalLpcfgMatch.BEAT)) {\n\t\t\t// Matches beat (and not sub beat)\n\t\t\t\n\t\t\tif (noteLengthTacti < subBeatLength) {\n\t\t\t\t// Note is shorter than a sub beat\n\t\t\t\t\n\t\t\t\tif (subBeatLength % noteLengthTacti != 0 || subBeatOffset % noteLengthTacti != 0) {\n\t\t\t\t\t// Note doesn't divide sub beat evenly\n\t\t\t\t\taddMatch(MetricalLpcfgMatch.WRONG);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti == subBeatLength) {\n\t\t\t\t// Note is exactly a sub beat\n\t\t\t\t\n\t\t\t\t// Must match sub beat exactly\n\t\t\t\taddMatch(subBeatOffset == 0 ? MetricalLpcfgMatch.SUB_BEAT : MetricalLpcfgMatch.WRONG);\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti < beatLength) {\n\t\t\t\t// Note is between a sub beat and a beat in length\n\t\t\t\t\n\t\t\t\t// Wrong if not aligned with beat at onset or offset\n\t\t\t\tif (beatOffset != 0 && beatOffset + noteLengthTacti != beatLength) {\n\t\t\t\t\taddMatch(MetricalLpcfgMatch.WRONG);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti == beatLength) {\n\t\t\t\t// Note is exactly a beat in length\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Note is longer than a beat in length\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t// Matches neither sub beat nor beat\n\t\t\t\n\t\t\tif (noteLengthTacti < subBeatLength) {\n\t\t\t\t// Note is shorter than a sub beat\n\t\t\t\t\n\t\t\t\tif (subBeatLength % noteLengthTacti != 0 || subBeatOffset % noteLengthTacti != 0) {\n\t\t\t\t\t// Note doesn't divide sub beat evenly\n\t\t\t\t\taddMatch(MetricalLpcfgMatch.WRONG);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti == subBeatLength) {\n\t\t\t\t// Note is exactly a sub beat\n\t\t\t\t\n\t\t\t\t// Must match sub beat exactly\n\t\t\t\taddMatch(subBeatOffset == 0 ? MetricalLpcfgMatch.SUB_BEAT : MetricalLpcfgMatch.WRONG);\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti < beatLength) {\n\t\t\t\t// Note is between a sub beat and a beat in length\n\t\t\t\t\n\t\t\t\t// Wrong if not aligned with beat at onset or offset\n\t\t\t\tif (beatOffset != 0 && beatOffset + noteLengthTacti != beatLength) {\n\t\t\t\t\taddMatch(MetricalLpcfgMatch.WRONG);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (noteLengthTacti == beatLength) {\n\t\t\t\t// Note is exactly a beat in length\n\t\t\t\t\n\t\t\t\t// Must match beat exactly\n\t\t\t\taddMatch(beatOffset == 0 ? MetricalLpcfgMatch.BEAT : MetricalLpcfgMatch.WRONG);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Note is greater than a beat in length\n\t\t\t\t\n\t\t\t\tif (measureLength % noteLengthTacti != 0 || measureOffset % noteLengthTacti != 0 ||\n\t\t\t\t\t\tbeatOffset != 0 || noteLengthTacti % beatLength != 0) {\n\t\t\t\t\t// Note doesn't divide measure evenly, or doesn't match a beat\n\t\t\t\t\taddMatch(MetricalLpcfgMatch.WRONG);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private Rectangle getRoi (Measure firstMeasure)\r\n {\r\n ScoreSystem system = firstMeasure.getSystem();\r\n int left = 0; // Min\r\n int right = system.getTopLeft().x\r\n + system.getDimension().width; // Max\r\n\r\n for (Staff.SystemIterator sit = new Staff.SystemIterator(firstMeasure);\r\n sit.hasNext();) {\r\n Staff staff = sit.next();\r\n\r\n if (staff.isDummy()) {\r\n continue;\r\n }\r\n\r\n int staffId = staff.getId();\r\n Measure measure = sit.getMeasure();\r\n\r\n // Before: clef? + key signature?\r\n KeySignature keySig = measure.getFirstMeasureKey(staffId);\r\n\r\n if (keySig != null) {\r\n Rectangle kBox = keySig.getBox();\r\n left = Math.max(left, kBox.x + kBox.width);\r\n } else {\r\n Clef clef = measure.getFirstMeasureClef(staffId);\r\n\r\n if (clef != null) {\r\n Rectangle cBox = clef.getBox();\r\n left = Math.max(left, cBox.x + cBox.width);\r\n }\r\n }\r\n\r\n // After: alteration? + chord?\r\n Chord chord = measure.getClosestChord(new Point(0, 0));\r\n\r\n if (chord != null) {\r\n for (TreeNode tn : chord.getNotes()) {\r\n Note note = (Note) tn;\r\n Glyph accid = note.getAccidental();\r\n\r\n if (accid != null) {\r\n right = Math.min(right, accid.getBounds().x);\r\n } else {\r\n right = Math.min(right, note.getBox().x);\r\n }\r\n }\r\n }\r\n\r\n // Limit right to the abscissa of the measure ending barline\r\n if (measure.getRightX() != null) {\r\n right = Math.min(right, measure.getRightX());\r\n }\r\n\r\n logger.debug(\"Staff:{} left:{} right:{}\", staffId, left, right);\r\n }\r\n\r\n return new Rectangle(left, 0, right - left, 0);\r\n }", "public static int findInDictR(String note){\n\t\tint pos = -1;\n\t\tString altNote = note.substring(1, note.length()) + note.substring(0,1);\n\n\t\tfor(int x = noteDictionary.length - 1; x > 0; x--){\n\t\t\tif(note.equals(noteDictionary[x])\n\t\t\t\t|| altNote.equals(noteDictionary[x])){\n\t\t\t\tpos = x;\n\t\t\t\tx = 0;\n\t\t\t}\n\t\t}\n\t\treturn pos;\n\t}", "private int previousSpecialPrefix(RuleBasedCollator collator, int ce)\n {\n backupInternalState(m_utilSpecialBackUp_);\n while (true) {\n // position ourselves at the begining of contraction sequence\n int offset = getContractionOffset(collator, ce);\n int entryoffset = offset;\n if (isBackwardsStart()) {\n ce = collator.m_contractionCE_[offset];\n break;\n }\n char prevch = (char)previousChar();\n while (prevch > collator.m_contractionIndex_[offset]) {\n // since contraction codepoints are ordered, we skip all that\n // are smaller\n offset ++;\n }\n if (prevch == collator.m_contractionIndex_[offset]) {\n ce = collator.m_contractionCE_[offset];\n }\n else {\n // if there is a completely ignorable code point in the middle\n // of a prefix, we need to act as if it's not there assumption:\n // 'real' noncharacters (*fffe, *ffff, fdd0-fdef are set to\n // zero)\n // lone surrogates cannot be set to zero as it would break\n // other processing\n int isZeroCE = collator.m_trie_.getLeadValue(prevch);\n // it's easy for BMP code points\n if (isZeroCE == 0) {\n continue;\n }\n else if (UTF16.isTrailSurrogate(prevch)\n || UTF16.isLeadSurrogate(prevch)) {\n // for supplementary code points, we have to check the next one\n // situations where we are going to ignore\n // 1. beginning of the string: schar is a lone surrogate\n // 2. schar is a lone surrogate\n // 3. schar is a trail surrogate in a valid surrogate\n // sequence that is explicitly set to zero.\n if (!isBackwardsStart()) {\n char lead = (char)previousChar();\n if (UTF16.isLeadSurrogate(lead)) {\n isZeroCE = collator.m_trie_.getLeadValue(lead);\n if (RuleBasedCollator.getTag(isZeroCE)\n == RuleBasedCollator.CE_SURROGATE_TAG_) {\n int finalCE = collator.m_trie_.getTrailValue(\n isZeroCE,\n prevch);\n if (finalCE == 0) {\n // this is a real, assigned completely\n // ignorable code point\n continue;\n }\n }\n }\n else {\n nextChar(); // revert to original offset\n // lone surrogate, completely ignorable\n continue;\n }\n nextChar(); // revert to original offset\n }\n else {\n // lone surrogate at the beggining, completely ignorable\n continue;\n }\n }\n\n // char was not in the table. prefix not found\n ce = collator.m_contractionCE_[entryoffset];\n }\n\n if (!isSpecialPrefixTag(ce)) {\n // char was in the contraction table, and the corresponding ce\n // is not a prefix ce. We found the prefix, break out of loop,\n // this ce will end up being returned.\n break;\n }\n }\n updateInternalState(m_utilSpecialBackUp_);\n return ce;\n }", "public void frameNoteDecoder(Integer[] frameNotes){\n //for(int i = 0;i<1;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n //}\n\n if(beatCounter==15) {\n for (int i = 0; i < frameNotes.length; i++) {\n if (melody.get(melodyCounter) == frameNotes[i]) {\n if (i < 2) {\n binaryOutput += \"0\";\n binaryOutput += Integer.toBinaryString(i);\n } else {\n binaryOutput += Integer.toBinaryString(i);\n }\n }\n }\n }\n if(beatCounter==31) {\n for (int i = 0; i < frameNotes.length; i++) {\n if (melody.get(melodyCounter) == frameNotes[i]) {\n binaryOutput += Integer.toBinaryString(i);\n }\n }\n }\n beatCounter++;\n melodyCounter++;\n\n\n}", "protected void whatColorOfArrows()\n\t{\n\t}", "public static Integer getPitchClass(String inputNote)\r\n {\r\n //System.out.println(\"Inside getPitchClass inputNote: \" + inputNote);\r\n \r\n Integer pitchClassValue = -1;\r\n ArrayList<String> pitch0 = new ArrayList<>(Arrays.asList(\"C\",\"B#\",\"Dbb\"));\r\n ArrayList<String> pitch1 = new ArrayList<>(Arrays.asList(\"C#\",\"Db\",\"B##\"));\r\n ArrayList<String> pitch2 = new ArrayList<>(Arrays.asList(\"D\",\"C##\",\"Ebb\"));\r\n ArrayList<String> pitch3 = new ArrayList<>(Arrays.asList(\"D#\",\"Eb\",\"Fbb\"));\r\n ArrayList<String> pitch4 = new ArrayList<>(Arrays.asList(\"E\",\"D##\",\"Fb\"));\r\n ArrayList<String> pitch5 = new ArrayList<>(Arrays.asList(\"F\",\"E#\",\"Gbb\"));\r\n ArrayList<String> pitch6 = new ArrayList<>(Arrays.asList(\"F#\",\"Gb\",\"E#\"));\r\n ArrayList<String> pitch7 = new ArrayList<>(Arrays.asList(\"G\",\"F##\",\"Abb\"));\r\n ArrayList<String> pitch8 = new ArrayList<>(Arrays.asList(\"G#\",\"Ab\"));\r\n ArrayList<String> pitch9 = new ArrayList<>(Arrays.asList(\"A\",\"G##\",\"Bbb\"));\r\n ArrayList<String> pitch10 = new ArrayList<>(Arrays.asList(\"A#\",\"Bb\",\"Cbb\"));\r\n ArrayList<String> pitch11 = new ArrayList<>(Arrays.asList(\"B\",\"A##\",\"Cb\"));\r\n \r\n TreeMap<Integer, ArrayList<String>> pitchClassMap = new TreeMap<>();\r\n pitchClassMap.put(0, pitch0);\r\n pitchClassMap.put(1, pitch1);\r\n pitchClassMap.put(2, pitch2);\r\n pitchClassMap.put(3, pitch3);\r\n pitchClassMap.put(4, pitch4);\r\n pitchClassMap.put(5, pitch5);\r\n pitchClassMap.put(6, pitch6);\r\n pitchClassMap.put(7, pitch7);\r\n pitchClassMap.put(8, pitch8);\r\n pitchClassMap.put(9, pitch9);\r\n pitchClassMap.put(10, pitch10);\r\n pitchClassMap.put(11, pitch11);\r\n \r\n for(Integer index : pitchClassMap.keySet())\r\n {\r\n if(pitchClassMap.get(index).contains(inputNote))\r\n pitchClassValue = index;\r\n }\r\n //System.out.println(\"Inside getPitchClass pitchClassValue: \" + pitchClassValue);\r\n return pitchClassValue;\r\n }", "private final void step3() { if (k == 0) return; /* For Bug 1 */ switch (b[k-1])\n\t {\n\t case 'a': if (ends(\"ational\")) { r(\"ate\"); break; }\n\t if (ends(\"tional\")) { r(\"tion\"); break; }\n\t break;\n\t case 'c': if (ends(\"enci\")) { r(\"ence\"); break; }\n\t if (ends(\"anci\")) { r(\"ance\"); break; }\n\t break;\n\t case 'e': if (ends(\"izer\")) { r(\"ize\"); break; }\n\t break;\n\t case 'l': if (ends(\"bli\")) { r(\"ble\"); break; }\n\t if (ends(\"alli\")) { r(\"al\"); break; }\n\t if (ends(\"entli\")) { r(\"ent\"); break; }\n\t if (ends(\"eli\")) { r(\"e\"); break; }\n\t if (ends(\"ousli\")) { r(\"ous\"); break; }\n\t break;\n\t case 'o': if (ends(\"ization\")) { r(\"ize\"); break; }\n\t if (ends(\"ation\")) { r(\"ate\"); break; }\n\t if (ends(\"ator\")) { r(\"ate\"); break; }\n\t break;\n\t case 's': if (ends(\"alism\")) { r(\"al\"); break; }\n\t if (ends(\"iveness\")) { r(\"ive\"); break; }\n\t if (ends(\"fulness\")) { r(\"ful\"); break; }\n\t if (ends(\"ousness\")) { r(\"ous\"); break; }\n\t break;\n\t case 't': if (ends(\"aliti\")) { r(\"al\"); break; }\n\t if (ends(\"iviti\")) { r(\"ive\"); break; }\n\t if (ends(\"biliti\")) { r(\"ble\"); break; }\n\t break;\n\t case 'g': if (ends(\"logi\")) { r(\"log\"); break; }\n\t } }", "private void drawtab(Graphics g1, int startoffset, int endoffset, boolean isUpwardTab, String text, Color color, String flag){\n\n // ~~~~ 1 ~~~~ revursive for one situation that this annotation are \n // layout on more than one line\n try{\n \n // ~~~~ 1.1 ~~~~ get rectangle of the annotation\n Rectangle rect1 = this.getUI().modelToView(this, startoffset);\n int y1 = rect1.y; // get the Y coordinate of the upper-left corner of the Rectangle.\n Rectangle rect2 = this.getUI().modelToView(this, endoffset);\n int y2 = rect2.y; // get the Y coordinate of the upper-left corner of the Rectangle.\n \n // ~~~~ 1.2 ~~~~ get \n // this annotation are layout on more than one line, if the span \n // start and the span end have different Y coordinate of their \n // upper-left corner of the their rectangle.\n if( y1!=y2){\n for( int i=startoffset; i<=endoffset;i++){\n Rectangle recttemp = this.getUI().modelToView(this, i);\n int ytemp = recttemp.y;\n if( ytemp == y1 )\n continue;\n else{\n //System.out.println(\"i=\"+i+\", start = \" + startoffset + \", endoffset = \"+ endoffset);\n drawtab(g1, startoffset, i-1, isUpwardTab, text.substring(0, i-1-startoffset), color, flag);//\n drawtab(g1, i, endoffset, isUpwardTab, text.substring(i-startoffset, text.length()), color, \"dead\");//\n return;\n }\n\n }\n }\n\n }catch(Exception ex){\n log.LoggingToFile.log( Level.SEVERE, ex.getMessage() );\n }\n\n \n // ~~~~ 2 ~~~~\n // This part is used to draw the rectangle area of a tab \n try {\n // color for line\n //Color linecolor_outer = new Color(153,153,102);\n Color linecolor;\n \n if(( flag!=null)&&(flag.equals(\"father\")))\n linecolor = new Color(204,0,0);\n else\n linecolor = new Color(0,0,204);\n \n Color linecolor_outer = linecolor;\n Color linecolor_inner = new Color(204,204,204);\n \n\n // get rectangle of the annotation\n Rectangle re = this.getUI().modelToView(this, startoffset);\n\n // coordinates (x1,y1) of the upper left point of the rectangle\n // view to this caret point\n int rect_upperleftX = re.x, rect_upperleftY = re.y;\n int rect_height = re.height;\n // coordinates (x2,y2) of the upper right point of the rectangle\n // view to this caret point\n re = this.getUI().modelToView(this, endoffset);\n int rect_upperrightX = re.x, rect_upperrightY = re.y;\n\n int extraheight = 3;\n\n // dirction of tab's head: to top or to bottom\n if( isUpwardTab ){\n\n Color fillcolor;\n fillcolor = ( color==null? new Color(204,204,204) : color);\n \n //g1.setColor( new Color(204,204,204) );\n //g1.fillRect(rect_upperleftX+3, rect_upperleftY-extraheight+3, \n // Math.abs(rect_upperrightX - rect_upperleftX)-3,\n // rect_height+extraheight-3);\n\n //g1.setColor(fillcolor);\n //g1.fillRect(rect_upperleftX, rect_upperleftY - extraheight , rect_upperrightX - rect_upperleftX + 2, extraheight+4);\n\n //g1.setColor(linecolor_outer);\n //g1.drawRect(rect_upperleftX, rect_upperleftY - extraheight-1, rect_upperrightX - rect_upperleftX, rect_height+extraheight+2);\n \n g1.setColor( Color.WHITE ); \n g1.fillRect(rect_upperleftX, rect_upperleftY - extraheight , rect_upperrightX - rect_upperleftX + 2, re.height + 2);\n g1.setColor( linecolor );\n //g1.fillRoundRect(re.x, re.y, re.width, re.height, 10, 10);\n g1.fillRect(rect_upperleftX, rect_upperleftY - extraheight , rect_upperrightX - rect_upperleftX + 2, re.height + 2 );\n g1.setColor( color );\n g1.fillRect(rect_upperleftX+2, rect_upperleftY - extraheight + 2 , rect_upperrightX - rect_upperleftX -2, re.height - 2 );\n //g1.drawRect(+1, rect_upperleftY - extraheight, rect_upperrightX - rect_upperleftX-2, rect_height+extraheight-0);\n //.setColor(linecolor_inner);\n //g1.drawRect(rect_upperleftX+2, rect_upperleftY - extraheight+1, rect_upperrightX - rect_upperleftX-4, rect_height+extraheight-2);\n\n g1.setColor(Color.black);\n\n // draw point\n if(( flag!=null)&&(flag.equals(\"dead\"))){\n \n } else {\n\n int cx = rect_upperleftX+2;\n int cy = rect_upperleftY - extraheight+2;\n g1.fillOval( cx, cy, 10, 10);\n\n if(( flag!=null)&&(flag.equals(\"father\")))\n g1.setColor( Color.red );\n else\n g1.setColor( new Color(255,153,0) );\n \n g1.fillOval( cx, cy, 8, 8);\n }\n\n g1.setColor(Color.black);\n int elementindex = this.getDocument().getDefaultRootElement().getElementIndex(startoffset);\n Element e = this.getDocument().getDefaultRootElement().getElement(elementindex);\n Font font = this.getStyledDocument().getFont( e.getAttributes() );\n\n int r = color.getAlpha();\n int b = color.getBlue();\n int gg = color.getGreen();\n double grayLevel = r * 0.299 + gg * 0.587 + b * 0.114;\n Color textcolor = grayLevel > 192 ? Color.BLACK : Color.white;\n \n g1.setFont( font );\n g1.setColor( textcolor );\n // draw text\n if((text!=null)&&(text.length()>0))\n //g1.drawString(text, rect_upperleftX+2, rect_upperleftY + rect_height-2);\n g1.drawString(text, rect_upperleftX, rect_upperleftY + re.height - 7 );\n \n // opinion1: draw rect\n /*\n\n // lining: lowerleft - lowerright\n g1.drawLine(rect_upperleftX+i, rect_upperleftY-i+rect_height, rect_upperrightX - i,\n rect_upperleftY - i+rect_height );\n\n // lining: topleft - lowerleft\n g1.drawLine(rect_upperleftX+i, rect_upperleftY+i, rect_upperleftX+i,\n rect_upperleftY - i + rect_height );\n\n // lining: topright - lowerright\n g1.drawLine(rect_upperrightX - i, rect_upperrightY + i, rect_upperrightX - i,\n rect_upperrightY - i + rect_height );\n */\n\n }\n\n\n\n //System.out.println(\"start startOffset = \" + re2.startOffset + \", endOffset = \" + re2.endOffset + \"; width = \"+re2.width + \", height = \" + re2.height);\n\n } catch (Exception ex) {\n log.LoggingToFile.log( Level.SEVERE, \"Error 1010140012:: fail to draw tab\" + ex.toString());\n }\n }", "private static boolean isKonAfterVerb(AnalyzedTokenReadings[] tokens, int start, int end) {\n if(tokens[start].matchesPosTagRegex(\"VER:(MOD|AUX).*\") && tokens[start + 1].matchesPosTagRegex(\"(KON|PRP).*\")) {\n if(start + 3 == end) {\n return true;\n }\n for(int i = start + 2; i < end; i++) {\n if(tokens[i].matchesPosTagRegex(\"(SUB|PRO:PER).*\")) {\n return true;\n }\n }\n }\n return false;\n }", "private boolean siteOverlapsPrevious(RegionSequenceData track, int start, int motiflength) {\n ArrayList<Region> regions=track.getOriginalRegions();\n int end=start+motiflength-1;\n if (regions.isEmpty()) return false;\n for (Region r:regions) {\n if (end<r.getRelativeStart() || start>r.getRelativeEnd()) continue;\n else return true; // overlaps with this region\n }\n return false;\n }", "int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }", "String[] fixBases() {\r\n\t\tString[] bases = null;\r\n\t\tint numbases = 1;\r\n\t\tif (useNumbers.isChecked())\r\n\t\t\tnumbases++;\r\n\t\tif (useLetters.isChecked())\r\n\t\t\tnumbases++;\r\n\t\tif (useSentences.isChecked())\r\n\t\t\tnumbases++;\r\n\r\n\t\t// default if no check\r\n\t\tif (numbases == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tbases = new String[numbases];\r\n\r\n\t\tint idx = 0;\r\n\t\tbases[idx] = SDCARD + \"/cakadidi\" + \"/hmm0\";\r\n\t\tidx++;\r\n\t\tif (useNumbers.isChecked()) {\r\n\t\t\tbases[idx] = SDCARD + \"/cakadidi\" + \"/hmm1\";\r\n\t\t\tidx++;\r\n\t\t}\r\n\r\n\t\tif (useLetters.isChecked()) {\r\n\t\t\tbases[idx] = SDCARD + \"/cakadidi\" + \"/hmm2\";\r\n\t\t\tidx++;\r\n\t\t}\r\n\r\n\t\tif (useSentences.isChecked()) {\r\n\t\t\tbases[idx] = SDCARD + \"/cakadidi\" + \"/hmm3\";\r\n\t\t\tidx++;\r\n\t\t}\r\n\r\n\t\treturn bases;\r\n\r\n\t}", "public void setArrowTail(int baseX, int baseY, int tipX, int tipY);", "public static PatternInterface trill(Note baseNote, char trillDirection){\r\n \treturn trill(baseNote, trillDirection, THIRTY_SECOND);\r\n }", "private void layoutArrow(Word words[]) {\n\t\tarrows = new Arrow[words.length];\n\t\tarrowNum = 0;\n\n\t\tfor (int i = 0; i < words.length; ++i) {\n\t\t\tif (words[i].getParent() == Constants.PARENT_EOS) {\n\t\t\t\tarrows[arrowNum] = new Arrow(this, tokens[words[i].getId()],\n\t\t\t\t\t\ttokens[words.length]);\n\t\t\t\tarrows[arrowNum].draw();\n\t\t\t\t++arrowNum;\n\t\t\t} else if (words[i].getParent() != Constants.PARENT_NULL) {\n\t\t\t\tarrows[arrowNum] = new Arrow(this, tokens[words[i].getId()],\n\t\t\t\t\t\ttokens[words[i].getParent()]);\n\t\t\t\tarrows[arrowNum].draw();\n\t\t\t\t++arrowNum;\n\t\t\t}\n\n\t\t}\n\n\t}", "public static String BiPol(String input) {\n ArrayList<String> out = new ArrayList<>();\n String OnePreviousState = \"DOWN\";\n for (int i = 0; i < input.length(); i++) {\n if ((Character.toString(input.charAt(i))).equals(\"0\")) {\n out.add(\"MIDDLE\");\n } else {\n out.add(inverse(OnePreviousState));\n OnePreviousState = inverse(OnePreviousState);\n }\n }\n String output = ArraytoString(out);\n return output;\n }", "private boolean isBankNote(double value) {\n\t\tdouble[] possibleBankNote = { 20, 50, 100, 500, 1000};\n\t\tfor (double bankNoteValue : possibleBankNote) {\n\t\t\tif (value == bankNoteValue) return true;\n\t\t}\n\t\treturn false;\n\t}", "private String getTileOriententation(int marker) { return (marker>CONCEALED && marker<CONCEALED_END)? \" concealed\" : \"\"; }", "@Override\n void assignAffValueAndParent(int northWest, int current) {\n List<Integer> parent = new ArrayList<>();\n int n = table[0].length;\n Character seq1Char = seq1.charAt(seq1position(current));\n Character seq2Char = seq2.charAt(seq2position(current));\n Double comparisonValue = substMatrix.score(seq1Char, seq2Char);\n double northWestValue = tableValue(northWest) + comparisonValue;\n double endValue = northWestValue;\n double leftValueCandidate = tableValue(current - 1) - gapPenalty.countAffine(1);\n List<Integer> leftParentCandidate = new ArrayList<>();\n leftParentCandidate.add(current - 1);\n for (int i = 2; i < current % n; i++) {\n if (tableValue(current - i) - gapPenalty.countAffine(i) > leftValueCandidate) {\n leftValueCandidate = tableValue(current - i) - gapPenalty.countAffine(i);\n leftParentCandidate.clear();\n leftParentCandidate.add(current - i);\n }\n else if (tableValue(current - i) - gapPenalty.countAffine(i) == leftValueCandidate) {\n leftParentCandidate.add(current - i);\n }\n }\n double upValueCandidate = tableValue(current - n) - gapPenalty.countAffine(1);\n List<Integer> upParentCandidate = new ArrayList<>();\n upParentCandidate.add(current - n);\n for (int i = 2; i < current / n; i++) {\n if (tableValue(current - (n * i)) - gapPenalty.countAffine(i) > upValueCandidate) {\n upValueCandidate = tableValue(current - (n * i)) - gapPenalty.countAffine(i);\n upParentCandidate.clear();\n upParentCandidate.add(current - (n * i));\n }\n else if (tableValue(current - (n * i)) - gapPenalty.countAffine(i) == upValueCandidate) {\n upParentCandidate.add(current - (n * i));\n }\n }\n if (northWestValue >= upValueCandidate && northWestValue >= leftValueCandidate) {\n parent.add(northWest);\n }\n if (leftValueCandidate >= northWestValue && leftValueCandidate >= upValueCandidate) {\n parent.addAll(leftParentCandidate);\n endValue = leftValueCandidate;\n }\n if (upValueCandidate >= northWestValue && upValueCandidate >= leftValueCandidate) {\n parent.addAll(upParentCandidate);\n endValue = upValueCandidate;\n }\n table[current / n][current % n] = endValue;\n parents.put(current, parent);\n }", "private static double ribbonPresent(int l, int w, int h) {\n int[] sides = {l, w, h};\n Arrays.sort(sides);\n return sides[0] + sides[0] + sides[1] + sides[1];\n }", "private static String[] BackSub(Matrix REF){\r\n\t\t// Start at bottom right of Matrix -1 to offset starting from index 0\r\n\t\t// Track two index\r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] < (rowPoint, augmentY)\r\n\t\t//\t\t ^\r\n\t\t//(rowPoint, colPoint)\r\n\t\t//\t REF.col\r\n\t\t// ------------\r\n\t\t// [ ] |\r\n\t\t// [ ] | REF.row\r\n\t\t// [ ] |\r\n\t\tint rowPoint = REF.row() - 1;\r\n\t\tint colPoint = REF.col() - 2;\r\n\t\tint augmentY = REF.col() - 1;\r\n\t\tDouble[][] REFval = REF.getAll();\r\n\t\t// if matrix inconsistent the last rows will look like [0,...,0| 1]\r\n\t\tif (REFval[rowPoint][colPoint] == 0 && REFval[rowPoint][augmentY] != 0) {\r\n\t\t\treturn null;\r\n\t\t}else {\r\n\t\t\tString[] Solution = new String[REF.col - 1];\r\n\t\t\t// find first pivot\r\n\t\t\t// we now have form ax + b + .. + c = d\r\n\t\t\t// x = (d - b - .. - c)/a\r\n\t\t\twhile (rowPoint >= 0) {\r\n\t\t\t\tDouble[] row = REFval[rowPoint];\r\n\t\t\t\tMatrix.processRow(Solution, row);\r\n\t\t\t\trowPoint--;\r\n\t\t\t}\r\n\t\t\treturn Solution;\r\n\t\t}\r\n\t}", "public void findUpperAndLowerEdge() throws NoSudokuFoundException{\n int bestUpperHit = 0;\n int bestLowerHit = 0;\n double t = INTERSECT_TOLERANCE;\n for (int h=0; h<nextH; h++) {\n int upperHit = 0;\n int lowerHit = 0;\n // for every horizontal line, check if vertical edge points A and B \n // are on that line.\n double[] hline = horizontalLines[h];\n double hy1 = hline[1],\n hy2 = hline[3];\n for (int v=0; v<nextV; v++){\n double[] vec = verticalLines[v];\n double ay = vec[1],\n by = vec[3];\n // if they are, count them\n if(ay < by) { // A is above B\n if ((hy1<=ay+t && ay<=hy2+t) || (hy1+t>=ay && ay+t>=hy2)){\n // A is between the left and right edge point.\n // only count it if it is above the screen center.\n if(hy1 < centerY && hy2 < centerY) {\n upperHit++;\n }\n } else if ((hy1<=by+t && by<=hy2+t) || (hy1+t>=by && by+t>=hy2)) {\n if(hy1 > centerY && hy2 > centerY) {\n lowerHit++;\n }\n }\n } else { // B is above A\n if ((hy1<=by+t && by<=hy2+t) || (hy1+t>=by && by+t>=hy2)) {\n if(hy1 < centerY && hy2 < centerY) {\n upperHit++;\n }\n } else if ((hy1<=ay+t && ay<=hy2+t) || (hy1+t>=ay && ay+t>=hy2)) {\n if(hy1 > centerY && hy2 > centerY) {\n lowerHit++;\n }\n } \n }\n }\n // take the lines with the highest counts\n if(upperHit > bestUpperHit) {\n edges[0] = horizontalLines[h];\n bestUpperHit = upperHit;\n } else if (lowerHit > bestLowerHit){\n edges[2] = horizontalLines[h];\n bestLowerHit = lowerHit;\n }\n }\n if(bestUpperHit < LINE_THRESHOLD || bestLowerHit < LINE_THRESHOLD){\n throw new NoSudokuFoundException(\"Number of upper (\"+bestUpperHit+\") or lower (\"+bestLowerHit+\") line ends below threshold. h\");\n }\n // Log.v(TAG, \"Best upper hit: \" + bestUpperHit + \", best lower: \" + bestLowerHit);\n }", "@Override\n\tpublic Annotation build() {\n\n\t\tif (!transcript.isCoding())\n\t\t\treturn buildNonCodingAnnotation();\n\n\t\t// We have the base left and/or right of the insertion to determine the cases.\n\t\tfinal GenomePosition pos = change.getGenomePos();\n\t\tfinal GenomePosition lPos = change.getGenomePos().shifted(-1);\n\t\tif ((so.liesInCDSExon(lPos) && so.liesInCDSExon(pos)) && so.liesInCDS(lPos) && so.liesInCDS(pos))\n\t\t\treturn buildCDSExonicAnnotation(); // can affect amino acids\n\t\telse if ((so.liesInCDSIntron(lPos) || so.liesInCDSIntron(pos)) && so.liesInCDS(lPos) && so.liesInCDS(pos))\n\t\t\treturn buildIntronicAnnotation(); // intron but no exon => intronic variant\n\t\telse if (so.liesInFivePrimeUTR(lPos) || so.liesInThreePrimeUTR(pos))\n\t\t\treturn buildUTRAnnotation();\n\t\telse if (so.liesInUpstreamRegion(lPos) || so.liesInDownstreamRegion(pos))\n\t\t\treturn buildUpOrDownstreamAnnotation();\n\t\telse\n\t\t\treturn buildIntergenicAnnotation();\n\t}", "private void findIternary(Map<String, String> dataSet) {\n\t\tMap<String, String> reverseMap = new HashMap<String, String>();\n\t\tfor (Map.Entry<String, String> entry : dataSet.entrySet())\n\t\t\treverseMap.put(entry.getValue(), entry.getKey());\n\t\tString start = null;\n\t\tfor (Map.Entry<String, String> entry : dataSet.entrySet()) {\n\t\t\tif (!reverseMap.containsKey(entry.getKey())) {\n\t\t\t\tstart = entry.getKey();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (start == null) {\n\t\t\tSystem.out.println(\"Invalid Input\");\n\t\t\treturn;\n\t\t}\n\t\tString to = dataSet.get(start);\n\t\twhile (to != null)\n\n\t\t{\n\t\t\tSystem.out.print(start + \"->\" + to + \",\");\n\t\t\tstart = to;\n\t\t\tto = dataSet.get(to);\n\t\t}\n\n\t}", "public void visiualizeLastSearch(){\r\n\t\tint number=0;\r\n\t\tNode dummy;\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\tString seperator=\"-\";\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t\r\n\t\t\t\tif(i<sl.height() && sl.getVisited()[i+1].getKey()!=sl.getVisited()[i].getKey() && number>sl.getVisited()[i+1].getKey() && number<=sl.getVisited()[i].getKey())\r\n\t\t\t\t\tseperator = \"*\";\r\n\t\t\t\telse\r\n\t\t\t\t\tseperator = \"-\";\r\n\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(repeatStr(seperator,3)+\"inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(seperator,2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(seperator,4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public boolean isBaseline();", "protected boolean checkStandardArrow() {\n\t\tboolean passed = true;\n\t\tStroke last = m_subStrokes.get(m_subStrokes.size() - 1);\n\t\tStroke secondLast = m_subStrokes.get(m_subStrokes.size() - 2);\n\t\tStroke thirdLast = m_subStrokes.get(m_subStrokes.size() - 3);\n\t\tStroke fourthLast = m_subStrokes.get(m_subStrokes.size() - 4);\n\t\tdouble lastLength = StrokeFeatures.getStrokeLength(last);\n\t\tdouble secondLastLength = StrokeFeatures.getStrokeLength(secondLast);\n\t\tdouble thirdLastLength = StrokeFeatures.getStrokeLength(thirdLast);\n\n\t\t// test 1: last two sub-strokes must be close in size\n\t\tm_lastTwoDiff = Math.abs(lastLength - secondLastLength)\n\t\t\t\t/ (lastLength + secondLastLength);\n\t\tif (m_lastTwoDiff > 0.5)\n\t\t\tpassed = false;\n\n\t\t// test 2: two points at the \"head\" of the arrow should be close\n\t\tm_headDistance = last.getFirstPoint().distance(\n\t\t\t\tthirdLast.getFirstPoint())\n\t\t\t\t/ m_features.getStrokeLength();\n\t\tif (m_headDistance > 0.11)\n\t\t\tpassed = false;\n\t\tm_standardSum = m_headDistance;\n\n\t\t// test 3: line connecting tips of arrow head should intersect shaft of\n\t\t// arrow\n\t\tLine2D.Double line1 = new Line2D.Double(\n\t\t\t\tthirdLast.getLastPoint().getX(), thirdLast.getLastPoint()\n\t\t\t\t\t\t.getY(), last.getLastPoint().getX(), last\n\t\t\t\t\t\t.getLastPoint().getY());\n\t\tArrayList<Point2D> intersect = StrokeFeatures.getIntersection(\n\t\t\t\tfourthLast, line1);\n\t\tm_numIntersect = intersect.size();\n\t\tif (m_numIntersect <= 0)\n\t\t\tpassed = false;\n\t\t// Line2D.Double line2 = new Line2D.Double(fourthLast.getPoints().get(\n\t\t// fourthLast.getNumPoints() / 2).getX(), fourthLast.getPoints()\n\t\t// .get(fourthLast.getNumPoints() / 2).getY(), fourthLast\n\t\t// .getLastPoint().getX(), fourthLast.getLastPoint().getY());\n\t\t// double perpDiff = Math.abs(getSlope(line1) - (1.0 /\n\t\t// getSlope(line2)));\n\t\t// if (perpDiff > 5)\n\t\t// passed = false;\n\n\t\t// if passed make a beautified standard arrow\n\t\tif (passed) {\n\n\t\t\tm_arrowType = Type.STANDARD;\n\t\t\t\n\t\t\tGeneralPath arrowPath = new GeneralPath();\n\n\t\t\t// generate beginning path of stroke;\n\t\t\tif (m_subStrokes.size() == 4) {\n\n\t\t\t\tm_linear = true;\n\n\t\t\t\t// we have a linear arrow so beautify accordingly\n\t\t\t\tarrowPath.moveTo(fourthLast.getFirstPoint()\n\t\t\t\t\t\t.getX(), fourthLast.getFirstPoint().getY());\n\t\t\t\tarrowPath.lineTo(\n\t\t\t\t\t\tfourthLast.getLastPoint().getX(), fourthLast\n\t\t\t\t\t\t\t\t.getLastPoint().getY());\n\t\t\t} else {\n\n\t\t\t\tm_linear = false;\n\n\t\t\t\t// we have some other general arrow path\n\t\t\t\tfor (int i = 0; i < m_subStrokes.size() - 3; i++) {\n\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\tarrowPath.moveTo(m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getFirstPoint().getX(), m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getFirstPoint().getY());\n\t\t\t\t\tfor (int j = 0; j < m_subStrokes.get(i).getNumPoints(); j++)\n\t\t\t\t\t\tarrowPath.lineTo(m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getPoint(j).getX(), m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getPoint(j).getY());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// compute and generate ideal head of arrow\n\t\t\tdouble size = (thirdLastLength + secondLastLength + lastLength) / 3;\n\t\t\tdouble angle = 0;\n\n\t\t\t// if linear, the angle of the shaft is the angle of the first line\n\t\t\tif (m_linear) {\n\t\t\t\tangle = Math.atan2(fourthLast.getFirstPoint().getY()\n\t\t\t\t\t\t- fourthLast.getLastPoint().getY(), fourthLast\n\t\t\t\t\t\t.getFirstPoint().getX()\n\t\t\t\t\t\t- fourthLast.getLastPoint().getX());\n\t\t\t}\n\n\t\t\t// compute angle of \"curved\" shaft as the line between the midpoint\n\t\t\t// and the last point of the segment before the arrow head\n\t\t\telse {\n\t\t\t\tangle = Math.atan2(\n\t\t\t\t\t\tfourthLast.getPoints()\n\t\t\t\t\t\t\t\t.get(fourthLast.getNumPoints() / 2).getY()\n\t\t\t\t\t\t\t\t- fourthLast.getLastPoint().getY(), fourthLast\n\t\t\t\t\t\t\t\t.getPoints().get(fourthLast.getNumPoints() / 2)\n\t\t\t\t\t\t\t\t.getX()\n\t\t\t\t\t\t\t\t- fourthLast.getLastPoint().getX());\n\t\t\t}\n\n\t\t\t// make arrow heads be 45 degree angles when beautified\n\t\t\tdouble deltaAngle = Math.PI / 4.0;\n\n\t\t\t// make beautified arrow head\n\t\t\tPoint2D.Double p1 = new Point2D.Double(fourthLast.getLastPoint()\n\t\t\t\t\t.getX() - Math.sin(angle - deltaAngle) * size, fourthLast\n\t\t\t\t\t.getLastPoint().getY()\n\t\t\t\t\t+ Math.cos(angle - deltaAngle)\n\t\t\t\t\t* size);\n\t\t\tPoint2D.Double p2 = new Point2D.Double(fourthLast.getLastPoint()\n\t\t\t\t\t.getX() + Math.sin(angle + deltaAngle) * size, fourthLast\n\t\t\t\t\t.getLastPoint().getY()\n\t\t\t\t\t- Math.cos(angle + deltaAngle)\n\t\t\t\t\t* size);\n\t\t\tarrowPath.lineTo(p1.getX(), p1.getY());\n\t\t\tarrowPath.lineTo(fourthLast.getLastPoint().getX(),\n\t\t\t\t\tfourthLast.getLastPoint().getY());\n\t\t\tarrowPath.lineTo(p2.getX(), p2.getY());\n\t\t\t\n\t\t\tm_shape = new SVGPath(arrowPath);\n\t\t}\n\n\t\t/*\n\t\t * System.out.println(\"StandardArrow: passed = \" + passed + \" diff = \" +\n\t\t * diff + \" dis = \" + dis + \" intersect = \" + intersect.size() +\n\t\t * \" perp diff = \" + perpDiff);\n\t\t */\n\n\t\treturn passed;\n\t}", "void transform() {\n\t\tint oldline, newline;\n\t\tint oldmax = oldinfo.maxLine + 2; /* Count pseudolines at */\n\t\tint newmax = newinfo.maxLine + 2; /* ..front and rear of file */\n\n\t\tfor (oldline = 0; oldline < oldmax; oldline++)\n\t\t\toldinfo.other[oldline] = -1;\n\t\tfor (newline = 0; newline < newmax; newline++)\n\t\t\tnewinfo.other[newline] = -1;\n\n\t\tscanunique(); /* scan for lines used once in both files */\n\t\tscanafter(); /* scan past sure-matches for non-unique blocks */\n\t\tscanbefore(); /* scan backwards from sure-matches */\n\t\tscanblocks(); /* find the fronts and lengths of blocks */\n\t}", "private void shapeToArabicDigitsWithContext(char[] dest,\n int start,\n int length,\n char digitBase,\n boolean lastStrongWasAL) {\n UBiDiProps bdp=UBiDiProps.INSTANCE;\n digitBase -= '0'; // move common adjustment out of loop\n\n for(int i = start + length; --i >= start;) {\n char ch = dest[i];\n switch (bdp.getClass(ch)) {\n case UCharacterDirection.LEFT_TO_RIGHT:\n case UCharacterDirection.RIGHT_TO_LEFT:\n lastStrongWasAL = false;\n break;\n case UCharacterDirection.RIGHT_TO_LEFT_ARABIC:\n lastStrongWasAL = true;\n break;\n case UCharacterDirection.EUROPEAN_NUMBER:\n if (lastStrongWasAL && ch <= '\\u0039') {\n dest[i] = (char)(ch + digitBase);\n }\n break;\n default:\n break;\n }\n }\n }", "public void rectifyMisRecogChars2ndRnd() {\n if (mnExprRecogType == EXPRRECOGTYPE_VBLANKCUT) {\n LinkedList<StructExprRecog> listBoundingChars = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listBoundingCharIndices = new LinkedList<Integer>();\n LinkedList<StructExprRecog> listVLnChars = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listVLnCharIndices = new LinkedList<Integer>();\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx).getPrincipleSER(4);\n // now deal with the brackets, square brackets and braces.\n if (serThisChild.isBoundChar()) {\n if (serThisChild.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE) {\n if (idx > 0 && idx < mlistChildren.size() - 1\n && (mlistChildren.get(idx - 1).isNumericChar() || mlistChildren.get(idx - 1).isLetterChar()) // dot is allowed here because it must be decimal point not times (times has been converted to *)\n && (mlistChildren.get(idx + 1).isNumericChar() || mlistChildren.get(idx + 1).isLetterChar() // dot is allowed here.\n || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES)) {\n // this must be a 1 if the left and right are both letter or numeric char\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (idx > 0 && !mlistChildren.get(idx - 1).isChildListType() && !mlistChildren.get(idx - 1).isNumberChar() && !mlistChildren.get(idx - 1).isLetterChar()\n && !mlistChildren.get(idx - 1).isPostUnOptChar() && !mlistChildren.get(idx - 1).isBiOptChar() && !mlistChildren.get(idx - 1).isCloseBoundChar()) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // left char is not left char of v-line\n } else if (idx < mlistChildren.size() - 1 && !mlistChildren.get(idx + 1).isChildListType() && !mlistChildren.get(idx + 1).isNumberChar()\n && !mlistChildren.get(idx + 1).isLetterChar() && !mlistChildren.get(idx + 1).isPreUnOptChar() && !mlistChildren.get(idx + 1).isBiOptChar()\n && !mlistChildren.get(idx + 1).isBoundChar()) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // left char is not left char of v-line\n } else {\n listVLnChars.add(serThisChild);\n listVLnCharIndices.add(idx);\n }\n } else if (serThisChild.mType != UnitProtoType.Type.TYPE_BRACE\n || (serThisChild.mType == UnitProtoType.Type.TYPE_BRACE && idx == mlistChildren.size() - 1)\n || (serThisChild.mType == UnitProtoType.Type.TYPE_BRACE && idx < mlistChildren.size() - 1\n && mlistChildren.getLast().mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS)) {\n listBoundingChars.add(serThisChild);\n listBoundingCharIndices.add(idx);\n }\n } else if (serThisChild.isCloseBoundChar()) {\n if (serThisChild.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE) {\n boolean bFoundOpenBounding = false;\n for (int idx1 = listBoundingChars.size() - 1; idx1 >= 0; idx1 --) {\n if ((serThisChild.getBottomPlus1() - listBoundingChars.get(idx1).mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serThisChild.mnHeight\n && (listBoundingChars.get(idx1).getBottomPlus1() - serThisChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serThisChild.mnHeight\n && serThisChild.mnHeight > ConstantsMgr.msdOpenCloseBracketHeightRatio * listBoundingChars.get(idx1).mnHeight // must have similar height as the start character\n && serThisChild.mnHeight < 1/ConstantsMgr.msdOpenCloseBracketHeightRatio * listBoundingChars.get(idx1).mnHeight) {\n for (int idx2 = listBoundingChars.size() - 1; idx2 > idx1; idx2 --) {\n // allow to change all the ( or [ between () or [] pairs coz here ( and [ must not have pair and must be misrecognized.\n //StructExprRecog serB4BndChar = listBoundingCharIndices.get(idx2) > 0?mlistChildren.get(listBoundingCharIndices.get(idx2) - 1):null;\n //StructExprRecog serAfterBndChar = listBoundingCharIndices.get(idx2) < mlistChildren.size() - 1?mlistChildren.get(listBoundingCharIndices.get(idx2) + 1):null;\n if (listBoundingChars.get(idx2).mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && (double)listBoundingChars.get(idx2).mnWidth/(double)listBoundingChars.get(idx2).mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_ONE; // change to 1, do not use b4 and after char to adjust because not accurate.\n } else if (listBoundingChars.get(idx2).mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && (double)listBoundingChars.get(idx2).mnWidth/(double)listBoundingChars.get(idx2).mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_ONE; // change to 1, do not use b4 and after char to adjust because not accurate.\n } else {\n listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_SMALL_T; // all the no-close-bounding chars are changed to small t.\n }\n listBoundingChars.removeLast();\n listBoundingCharIndices.removeLast();\n }\n listBoundingChars.get(idx1).mType = UnitProtoType.Type.TYPE_ROUND_BRACKET;\n serThisChild.mType = UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET;\n listBoundingChars.remove(idx1);\n listBoundingCharIndices.remove(idx1);\n bFoundOpenBounding = true;\n break;\n }\n }\n if (!bFoundOpenBounding) {\n // cannot find open bounding character, change the close bounding character to 1.\n //StructExprRecog serB4BndChar = idx > 0?mlistChildren.get(idx - 1):null;\n //StructExprRecog serAfterBndChar = idx < mlistChildren.size() - 1?mlistChildren.get(idx + 1):null;\n if (serThisChild.mType == UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET\n && (double)serThisChild.mnWidth/(double)serThisChild.mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after char to adjust because not accurate (considering - or [1/2]...)\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET\n && (double)serThisChild.mnWidth/(double)serThisChild.mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n }\n }\n }\n } else if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_O || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_O)) {\n // now deal with all o or Os. do not put this in the first round because the condition to change o or O to 0 is more relax.\n if (mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) {\n // if it has upper or lower note.\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n } else if (idx > 0 && (!mlistChildren.get(idx - 1).isLetterChar() || (mlistChildren.get(idx - 1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (mlistChildren.get(idx - 1).mType == UnitProtoType.Type.TYPE_SMALL_O || mlistChildren.get(idx - 1).mType == UnitProtoType.Type.TYPE_BIG_O)))) {\n // if left character is not a letter char or is o or O\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n } else if (idx < (mlistChildren.size() - 1) && (!mlistChildren.get(idx + 1).isLetterChar() || (mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (mlistChildren.get(idx + 1).mType == UnitProtoType.Type.TYPE_SMALL_O || mlistChildren.get(idx + 1).mType == UnitProtoType.Type.TYPE_BIG_O)))) {\n // if right character is not a letter char or is o or O\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n }\n }\n }\n \n if (listVLnChars.size() == 1) {\n listVLnChars.getFirst().mType = UnitProtoType.Type.TYPE_ONE; // all the no-paired vline chars are changed to 1.\n } else {\n while (listVLnChars.size() > 0) {\n int nIdx1st = listVLnCharIndices.getFirst();\n if (mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) {\n listVLnChars.getFirst().mType = UnitProtoType.Type.TYPE_ONE; // 1st | cannot have upper note or low note .\n listVLnCharIndices.removeFirst();\n listVLnChars.removeFirst();\n } else {\n break;\n }\n }\n for (int idx = listVLnChars.size() - 1; idx >= 0 ; idx --) {\n StructExprRecog serOneChild = listVLnChars.get(idx);\n int idx1 = listVLnChars.size() - 1;\n for (; idx1 >= 0; idx1 --) {\n if (idx1 == idx) {\n continue;\n }\n StructExprRecog serTheOtherChild = listVLnChars.get(idx1);\n if ((serOneChild.getBottomPlus1() - serTheOtherChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serOneChild.mnHeight\n && (serTheOtherChild.getBottomPlus1() - serOneChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serOneChild.mnHeight\n && serOneChild.mnHeight > ConstantsMgr.msdOpenCloseBracketHeightRatio * serTheOtherChild.mnHeight // must have similar height as the start character\n && serOneChild.mnHeight < 1/ConstantsMgr.msdOpenCloseBracketHeightRatio * serTheOtherChild.mnHeight) {\n // has corresponding v-line.\n break;\n }\n }\n if (idx1 == -1) {\n // doesn't have corresponding v-line..\n serOneChild.mType = UnitProtoType.Type.TYPE_ONE; // all the no-paired vline chars are changed to 1.\n }\n }\n // recheck the new first VLnChars.\n for (int idx = 0; idx < listVLnChars.size(); idx ++) {\n int nIdxInList = listVLnCharIndices.get(idx);\n if (listVLnChars.get(idx).mType == UnitProtoType.Type.TYPE_ONE) {\n continue;\n } else if (mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) {\n listVLnChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // 1st | cannot have upper note or low note .\n } else {\n break;\n }\n }\n }\n \n if (listBoundingChars.size() > 0 && listBoundingChars.getLast() == mlistChildren.getLast()) {\n // change the last unpaired ( or [ to t or 1 if necessary.\n //StructExprRecog serB4BndChar = mlistChildren.size() > 1?mlistChildren.get(mlistChildren.size() - 2):null;\n if (listBoundingChars.getLast().mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && (double)listBoundingChars.getLast().mnWidth/(double)listBoundingChars.getLast().mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after chars to adjust [ coz not accurate.\n } else if (listBoundingChars.getLast().mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && (double)listBoundingChars.getLast().mnWidth/(double)listBoundingChars.getLast().mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after chars to adjust [ coz not accurate.\n } else {\n listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_SMALL_T; // if the last unpaired ( or [ is the last char, very likely it is a t.\n }\n }\n for (int idx = 0; idx < listBoundingChars.size(); idx ++) {\n //StructExprRecog serB4BndChar = listBoundingCharIndices.get(idx) > 0?mlistChildren.get(listBoundingCharIndices.get(idx) - 1):null;\n //StructExprRecog serAfterBndChar = listBoundingCharIndices.get(idx) < mlistChildren.size() - 1?mlistChildren.get(listBoundingCharIndices.get(idx) + 1):null;\n if (listBoundingChars.get(idx).mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && (double)listBoundingChars.get(idx).mnWidth/(double)listBoundingChars.get(idx).mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n listBoundingChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // change to 1. do not use pre or next char height to adjust coz not accurate.\n }else if (listBoundingChars.get(idx).mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && (double)listBoundingChars.get(idx).mnWidth/(double)listBoundingChars.get(idx).mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n listBoundingChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // change to 1. do not use pre or next char height to adjust coz not accurate.\n }\n // do not change other unmatched ( or [ to t or 1 because this makes things worse.\n }\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n serThisChild.rectifyMisRecogChars2ndRnd();\n } \n } else if (isChildListType()) {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) {\n if (serThisChild.isBoundChar()) {\n if (serThisChild.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE\n && (idx != 0 || mnExprRecogType != EXPRRECOGTYPE_VCUTUPPERNOTE)) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // if it is |**(something), it could still be valid for |...|**(something). But shouldn't have foot notes.\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && serThisChild.mnWidth/serThisChild.mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n // if it is [ and it is very thing, very likely it is a 1.\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && serThisChild.mnWidth/serThisChild.mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n // if it is ( and it is very thing, very likely it is a 1.\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (serThisChild.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE) { // if child is single char, very likely it is not a ( or [ but a t.\n serThisChild.mType = UnitProtoType.Type.TYPE_SMALL_T;\n }\n } else if (serThisChild.isCloseBoundChar() && (idx != 0\n || (mnExprRecogType != EXPRRECOGTYPE_VCUTUPPERNOTE\n && mnExprRecogType != EXPRRECOGTYPE_VCUTLOWERNOTE\n && mnExprRecogType != EXPRRECOGTYPE_VCUTLUNOTES))) {\n // a close bound char can have upper and/or lower notes. but if the upper note or lower note is close bound char, still need to convert it to 1.\n // here still convert to 1 because upper lower note can be mis-recognized.\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_O || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_O) {\n // still convert to 0 even if it has lower or upper notes.\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n }\n } else {\n serThisChild.rectifyMisRecogChars2ndRnd(); \n }\n }\n }\n }", "void base_case() {\n down_angle=Math.abs(down_angle);\n up_angle=Math.abs(up_angle);\n distance_from_object = human_length / Math.tan(Math.toRadians(down_angle));\n length_of_object = human_length + Math.tan(Math.toRadians(up_angle)) * distance_from_object;\n if(length_of_object/100>0) {\n ORI.setText(\"length_of_object :\\n\" + String.valueOf(String.format(\"%.2f\", (length_of_object / 100)) + \" M\" +\n \"\\n\" + \"distance_from_object :\\n\" + String.valueOf(String.format(\"%.2f\", (distance_from_object / 100))) + \" M\"));\n ORI.setVisibility(View.VISIBLE);\n }\n else {\n Toast.makeText(Online.this, \"Move Forward\", Toast.LENGTH_LONG).show();\n down_angle = 0;\n up_angle = 0;\n touch_ground_switch.setVisibility(View.VISIBLE);\n }\n\n\n }", "public static void checkMagazine(List<String> magazine, List<String> note) {\n Map<String, Integer> magazineMap = new HashMap<>();\n for (String m : magazine) {\n if (magazineMap.containsKey(m)) {\n int val = magazineMap.get(m);\n magazineMap.put(m, ++val);\n }\n else {\n magazineMap.put(m, 1);\n }\n }\n\n for (String n : note) {\n //check if the value exists and is false\n if (magazineMap.containsKey(n) && magazineMap.get(n) > 0) {\n // passes\n int val = magazineMap.get(n);\n magazineMap.put(n, --val);\n }\n else {\n System.out.println(\"No\");\n return;\n }\n }\n\n System.out.println(\"Yes\");\n\n }", "private void markbases(Set<GdlSentence> contents){\r\n\t\tMap<GdlSentence, Proposition> props = propNet.getBasePropositions();\r\n\t\tfor (GdlSentence p : contents) {\r\n\t\t\tprops.get(p).setValue(true);\r\n\t\t}\r\n }", "public void showBeforeAfterLocation() {\n\t\tfor (Integer key : afterLoc.keySet()) {\n\t\t\tdouble[] ary = afterLoc.get(key);\n\n\t\t\tString locationA = \"\";\n\t\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t\tlocationA += Config.roundTwoDecimals(ary[i]) + \"\\t\";\n\t\t\t}\n\n\t\t\tdouble[] ary2 = beforeLoc.get(key);\n\n\t\t\tString locationB = \"\";\n\t\t\tfor (int i = 0; i < ary2.length; i++) {\n\t\t\t\tlocationB += Config.roundTwoDecimals(ary2[i]) + \"\\t\";\n\t\t\t}\n\t\t\tCaller.log(\" AFTER: \" + key + \" | \" + locationA + \"\\t|\" + attractors.get(key).count);\n\t\t}\n\t}", "public static boolean isStringInterleafing(String a, String b, String inter) {\n\t\tchar[] ca = a.toCharArray();\r\n\t\tchar[] cb = b.toCharArray();\r\n\t\t\r\n\t\tchar[] ic = inter.toCharArray();\r\n\t\t\r\n\t\t\r\n\t\tboolean DP[][] = new boolean[ca.length+1][cb.length+1];\r\n\t\t\r\n\t\t// initialize the table:\r\n\t\tDP[0][0] = true;\r\n\t\tfor(int i = 1; i < ca.length; i++) {\r\n\t\t\tDP[i][0] = (ic[i-1] == ca[i-1] && DP[i-1][0] == true) ? true : false;\r\n\t\t}\r\n\r\n\t\tfor(int j = 1; j < cb.length; j++) {\r\n\t\t\tDP[0][j] = (ic[j-1] == cb[j-1] && DP[0][j-1] == true) ? true : false;\r\n\t\t}\r\n\t\t\r\n\t\t// now we can fill the table\r\n\t\tfor(int i = 1; i <= ca.length; i++) {\r\n\t\t\tfor(int j = 1; j <= cb.length; j++) {\r\n\t\t\t\tboolean canTakeFromAbove = ic[i+j-1] == ca[i-1] && DP[i-1][j];\r\n\t\t\t\tboolean canTakeFromLeft = ic[i+j-1] == cb[j-1] && DP[i][j-1];\r\n\t\t\t\tDP[i][j] = canTakeFromAbove || canTakeFromLeft;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn DP[ca.length][cb.length];\r\n\t}", "public String b4OrAfter();", "private static int missedCommaBehind(AnalyzedTokenReadings[] tokens, int inFront, int start, int end) {\n for (int i = start; i < end; i++) {\n if(isPronoun(tokens, i)) {\n List<Integer> verbs = verbPos(tokens, i, end);\n if(verbs.size() > 0) {\n String gender = getGender(tokens[i]);\n if(gender != null && !isAnyVerb(tokens, i + 1)\n && matchesGender(gender, tokens, inFront, i - 1) && !isArticle(gender, tokens, i, verbs.get(verbs.size() - 1))) {\n return getCommaBehind(tokens, verbs, i, end);\n }\n }\n }\n }\n return -1;\n }", "private void getSeqHelper(BinaryNode current, int min, int max) {\n\n if (current == null) {\n return;\n }\n getSeqHelper(current.getLeft(), min, max);\n\n if (((int) current.getWert() >= min) & ((int) current.getWert() <= max)) {\n setSeqSumme(getSeqSumme() + (int) current.getWert());\n System.out.println(\"Current Node Key: \" + current.getSchluessel());\n System.out.println(\"Current Node Wert: \" + current.getWert());\n System.out.println(\"Subtree wert: \" + current.getWertDesSubtrees());\n System.out.println(\"Summe: \" + seqSumme);\n System.out.println(\"\");\n }\n getSeqHelper(current.getRight(), min, max);\n }", "protected boolean checkTriangleArrow() {\n\t\tboolean passed = true;\n\t\tStroke last = m_subStrokes.get(m_subStrokes.size() - 1);\n\t\tStroke secondLast = m_subStrokes.get(m_subStrokes.size() - 2);\n\t\tStroke thirdLast = m_subStrokes.get(m_subStrokes.size() - 3);\n\t\tStroke fourthLast = m_subStrokes.get(m_subStrokes.size() - 4);\n\t\tdouble lastLength = StrokeFeatures.getStrokeLength(last);\n\t\tdouble secondLastLength = StrokeFeatures.getStrokeLength(secondLast);\n\t\tdouble thirdLastLength = StrokeFeatures.getStrokeLength(thirdLast);\n\t\tdouble fourthLastLength = StrokeFeatures.getStrokeLength(fourthLast);\n\n\t\t// test 1: last stroke and third to last stroke should be same size\n\t\tdouble diff = Math.abs(lastLength - thirdLastLength)\n\t\t\t\t/ (lastLength + thirdLastLength);\n\t\tif (diff > 0.5)\n\t\t\tpassed = false;\n\n\t\t// test 2: two points at the \"head\" of the arrow should be close\n\t\tdouble dis = last.getLastPoint().distance(thirdLast.getFirstPoint())\n\t\t\t\t/ m_features.getStrokeLength();\n\t\tif (dis > 0.25)\n\t\t\tpassed = false;\n\n\t\t// test 3: triangle arrow should be better fit than standard arrow\n\t\tif (m_standardPassed && dis > m_standardSum)\n\t\t\tpassed = false;\n\n\t\t// test 4: second to last line of arrow head should intersect shaft of\n\t\t// arrow\n\t\tLine2D.Double line1 = new Line2D.Double(secondLast.getFirstPoint()\n\t\t\t\t.getX(), secondLast.getFirstPoint().getY(), secondLast\n\t\t\t\t.getLastPoint().getX(), secondLast.getLastPoint().getY());\n\t\tArrayList<Point2D> intersect = StrokeFeatures.getIntersection(\n\t\t\t\tm_subStrokes.get(m_subStrokes.size() - 4), line1);\n\t\tif (intersect.size() <= 0)\n\t\t\tpassed = false;\n\t\tLine2D.Double line2 = new Line2D.Double(fourthLast.getPoints()\n\t\t\t\t.get(fourthLast.getNumPoints() / 2).getX(), fourthLast\n\t\t\t\t.getPoints().get(fourthLast.getNumPoints() / 2).getY(),\n\t\t\t\tfourthLast.getLastPoint().getX(), fourthLast.getLastPoint()\n\t\t\t\t\t\t.getY());\n\t\tdouble perpDiff = Math.abs(getSlope(line1) - (1.0 / getSlope(line2)));\n\t\tif (perpDiff > 5)\n\t\t\tpassed = false;\n\n\t\t// sometimes the last line of the arrow is broken incorrectly;\n\t\t// try combining last two strokes and repeat test\n\t\tif (!passed && m_subStrokes.size() >= 5) {\n\t\t\tpassed = true;\n\n\t\t\t// test 1: last stroke and third to last stroke should be same size\n\t\t\tdiff = Math.abs(lastLength + secondLastLength - fourthLastLength)\n\t\t\t\t\t/ (lastLength + secondLastLength + thirdLastLength);\n\t\t\tif (diff > 0.5)\n\t\t\t\tpassed = false;\n\n\t\t\t// test 2: two points at the \"head\" of the arrow should be close\n\t\t\tdis = last.getLastPoint().distance(fourthLast.getFirstPoint())\n\t\t\t\t\t/ m_features.getStrokeLength();\n\t\t\tif (dis > 0.25)\n\t\t\t\tpassed = false;\n\n\t\t\t// test 3: triangle arrow should be better fit than standard arrow\n\t\t\tif (m_standardPassed && dis > m_standardSum)\n\t\t\t\tpassed = false;\n\n\t\t\t// test 4: line connecting tips of arrow head should be close to\n\t\t\t// perpendicular to the line it would intersect\n\t\t\tline1 = new Line2D.Double(thirdLast.getFirstPoint().getX(),\n\t\t\t\t\tthirdLast.getFirstPoint().getY(), thirdLast.getLastPoint()\n\t\t\t\t\t\t\t.getX(), thirdLast.getLastPoint().getY());\n\t\t\tStroke fifthLast = m_subStrokes.get(m_subStrokes.size() - 5);\n\t\t\tintersect = StrokeFeatures.getIntersection(fifthLast, line1);\n\t\t\tif (intersect.size() <= 0)\n\t\t\t\tpassed = false;\n\t\t\tline2 = new Line2D.Double(fifthLast.getPoints()\n\t\t\t\t\t.get(fifthLast.getNumPoints() / 2).getX(), fifthLast\n\t\t\t\t\t.getPoints().get(fifthLast.getNumPoints() / 2).getY(),\n\t\t\t\t\tfifthLast.getLastPoint().getX(), fifthLast.getLastPoint()\n\t\t\t\t\t\t\t.getY());\n\t\t\tperpDiff = Math.abs(getSlope(line1) - (1.0 / getSlope(line2)));\n\t\t\tif (perpDiff > 5)\n\t\t\t\tpassed = false;\n\n\t\t}\n\n\t\t// if passed make a beautified standard arrow\n\t\tif (passed) {\n\n\t\t\tm_arrowType = Type.TRIANGLE;\n\n\t\t\t// TODO\n\t\t\t// create shape/beautified object\n\t\t\t/*\n\t\t\t * m_shape = new GeneralPath(); try { computeBeautified(); } catch\n\t\t\t * (Exception e) { log.error(\"Could not create shape object: \" +\n\t\t\t * e.getMessage()); }\n\t\t\t */\n\t\t}\n\n\t\tSystem.out.println(\"TriangleArrow: passed = \" + passed + \" diff = \"\n\t\t\t\t+ diff + \" dis = \" + dis + \" intersect = \" + intersect.size()\n\t\t\t\t+ \" num substrokes = \" + m_subStrokes.size() + \" perp diff = \"\n\t\t\t\t+ perpDiff);\n\t\tSystem.out.print(\"sizes: \");\n\t\tfor (int i = 0; i < m_subStrokes.size(); i++)\n\t\t\tSystem.out.print(m_subStrokes.get(i).getNumPoints() + \" \");\n\t\tSystem.out.println(\"\");\n\n\t\treturn passed;\n\t}", "private void checkPreviousSquare(){\n\t\t\n\t\tif(!frontIsClear()){\n\t\t\tfaceBackwards();\n\t\t\tmove();\n\t\t\tif(!beepersPresent()){\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t\tputBeeper();\n\t\t\t} else {\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t}\n\t\t}\n\t}", "private int countReadjusting(int pos, int l){\n\t\treturn (yb[pos] + l * (int)pow(2,k));\n\t}", "@NonNull\n public static String getDiff(@NonNull String[] before, @NonNull String[] after) {\n StringBuilder sb = new StringBuilder();\n\n int n = before.length;\n int m = after.length;\n\n // Compute longest common subsequence of x[i..m] and y[j..n] bottom up\n int[][] lcs = new int[n + 1][m + 1];\n for (int i = n - 1; i >= 0; i--) {\n for (int j = m - 1; j >= 0; j--) {\n if (before[i].equals(after[j])) {\n lcs[i][j] = lcs[i + 1][j + 1] + 1;\n } else {\n lcs[i][j] = Math.max(lcs[i + 1][j], lcs[i][j + 1]);\n }\n }\n }\n\n int i = 0;\n int j = 0;\n while ((i < n) && (j < m)) {\n if (before[i].equals(after[j])) {\n i++;\n j++;\n } else {\n sb.append(\"@@ -\");\n sb.append(Integer.toString(i + 1));\n sb.append(\" +\");\n sb.append(Integer.toString(j + 1));\n sb.append('\\n');\n while (i < n && j < m && !before[i].equals(after[j])) {\n if (lcs[i + 1][j] >= lcs[i][j + 1]) {\n sb.append('-');\n if (!before[i].trim().isEmpty()) {\n sb.append(' ');\n }\n sb.append(before[i]);\n sb.append('\\n');\n i++;\n } else {\n sb.append('+');\n if (!after[j].trim().isEmpty()) {\n sb.append(' ');\n }\n sb.append(after[j]);\n sb.append('\\n');\n j++;\n }\n }\n }\n }\n\n if (i < n || j < m) {\n assert i == n || j == m;\n sb.append(\"@@ -\");\n sb.append(Integer.toString(i + 1));\n sb.append(\" +\");\n sb.append(Integer.toString(j + 1));\n sb.append('\\n');\n for (; i < n; i++) {\n sb.append('-');\n if (!before[i].trim().isEmpty()) {\n sb.append(' ');\n }\n sb.append(before[i]);\n sb.append('\\n');\n }\n for (; j < m; j++) {\n sb.append('+');\n if (!after[j].trim().isEmpty()) {\n sb.append(' ');\n }\n sb.append(after[j]);\n sb.append('\\n');\n }\n }\n\n return sb.toString();\n }", "private boolean calculateMaximumLengthBitonicSubarray() {\n\n boolean found = false; // does any BSA found\n\n boolean directionChange = false; //does direction numberOfWays increase to decrease\n\n int countOfChange = 0;\n\n int i = 0;\n directionChange = false;\n int start = i;\n i++;\n for (; i < input.length; i++) {\n if (countOfChange != 0 && countOfChange % 2 == 0) {\n if (this.length < (i - 2 - start + 1)) {\n this.i = start;\n this.j = i - 2;\n this.length = this.j - this.i + 1;\n }\n start = i - 2;\n countOfChange = 0;\n }\n\n if (input[i] > input[i - 1]) {\n if (directionChange == true) {\n countOfChange++;\n }\n directionChange = false;\n }\n if (input[i] < input[i - 1]) {\n if (directionChange == false) {\n countOfChange++;\n }\n directionChange = true;\n }\n\n\n }\n\n if (directionChange == true) {\n if (this.length < (i - 1 - start + 1)) {\n this.i = start;\n this.j = i - 1;\n this.length = this.j - this.i + 1;\n }\n }\n return directionChange;\n }", "private int previousSpecial(RuleBasedCollator collator, int ce, char ch)\n {\n while(true) {\n // the only ces that loops are thai, special prefix and\n // contractions\n switch (RuleBasedCollator.getTag(ce)) {\n case CE_NOT_FOUND_TAG_: // this tag always returns\n return ce;\n case RuleBasedCollator.CE_SURROGATE_TAG_: // unpaired lead surrogate\n return CE_NOT_FOUND_;\n case CE_SPEC_PROC_TAG_:\n ce = previousSpecialPrefix(collator, ce);\n break;\n case CE_CONTRACTION_TAG_:\n // may loop for first character e.g. \"0x0f71\" for english\n if (isBackwardsStart()) {\n // start of string or this is not the end of any contraction\n ce = collator.m_contractionCE_[\n getContractionOffset(collator, ce)];\n break;\n }\n return previousContraction(collator, ce, ch); // else\n case CE_LONG_PRIMARY_TAG_:\n return previousLongPrimary(ce);\n case CE_EXPANSION_TAG_: // always returns\n return previousExpansion(collator, ce);\n case CE_DIGIT_TAG_:\n ce = previousDigit(collator, ce, ch);\n break;\n case CE_HANGUL_SYLLABLE_TAG_: // AC00-D7AF\n return previousHangul(collator, ch);\n case CE_LEAD_SURROGATE_TAG_: // D800-DBFF\n return CE_NOT_FOUND_; // broken surrogate sequence, treat like unassigned\n case CE_TRAIL_SURROGATE_TAG_: // DC00-DFFF\n return previousSurrogate(ch);\n case CE_CJK_IMPLICIT_TAG_:\n // 0x3400-0x4DB5, 0x4E00-0x9FA5, 0xF900-0xFA2D\n return previousImplicit(ch);\n case CE_IMPLICIT_TAG_: // everything that is not defined\n // UCA is filled with these. Tailorings are NOT_FOUND\n return previousImplicit(ch);\n case CE_CHARSET_TAG_: // this tag always returns\n return CE_NOT_FOUND_;\n default: // this tag always returns\n ce = IGNORABLE;\n }\n if (!RuleBasedCollator.isSpecial(ce)) {\n break;\n }\n }\n return ce;\n }", "@Override\n\tpublic void measures() {\n\t\t\n\t\tsetTempo(240);\n\t\t\n\t\tkey = \"G\";\n\t\t\n\t\tmeasure(0);\n\t\t\n\t\taddNote(\"D5q\",A,T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(1);\n\t\t\n\t\taddNotes(\"G5q G5i A5i G5i F5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"B3q G4q\",B);\n\t\t\n\t\tmeasure(2);\n\t\t\n\t\taddNotes(\"E5q E5q E5q\",T);\n\t\t\n\t\taddNotes(\"C4h+E4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(3);\n\t\t\n\t\taddNotes(\"A5q A5i B5i A5i G5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"C#4q A4q\",B);\n\t\t\n\t\tmeasure(4);\n\t\t\n\t\taddNotes(\"F5q D5q D5q\",T);\n\t\t\n\t\taddNotes(\"D4h+F4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(5);\n\t\t\n\t\taddNotes(\"B5q B5i C6i B5i A5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"G4q D5q\",B);\n\t\t\n\t\tmeasure(6);\n\t\t\n\t\taddNotes(\"G5q E5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"C5h+E5h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(7);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(8);\n\t\t\n\t\taddNotes(\"G5h D5q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(9);\n\t\t\n\t\taddNotes(\"G5q G5q G5q\",T);\n\t\t\n\t\taddNote(\"B4h.\",A,B);\n\t\t\n\t\tmeasure(10);\n\t\t\n\t\taddNotes(\"F5h F5q\",T);\n\t\t\n\t\taddNotes(\"A4h A4q\",B);\n\t\t\n\t\tmeasure(11);\n\t\t\n\t\taddNotes(\"G5q F5q E5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(12);\n\t\t\n\t\taddNotes(\"D5h A5q\",T);\n\t\t\n\t\taddNotes(\"F4h A4q\",B);\n\t\t\n\t\tmeasure(13);\n\t\t\n\t\taddNotes(\"B5q A5q G5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(14);\n\t\t\n\t\taddNotes(\"D6q D5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"D5q D4q\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(15);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(16);\n\t\t\n\t\taddNote(\"G5h\",A,T);\n\t\taddRest(\"q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(17);\n\t}", "static void getRuns(Bidi bidi) {\n Bidi bidi2 = bidi;\n if (bidi2.runCount < 0) {\n if (bidi2.direction != 2) {\n getSingleRun(bidi2, bidi2.paraLevel);\n } else {\n int length = bidi2.length;\n byte[] levels = bidi2.levels;\n int limit = bidi2.trailingWSStart;\n int runCount = 0;\n int level = -1;\n for (int i = 0; i < limit; i++) {\n if (levels[i] != level) {\n runCount++;\n level = levels[i];\n }\n }\n if (runCount == 1 && limit == length) {\n getSingleRun(bidi2, levels[0]);\n } else {\n byte minLevel = Bidi.LEVEL_DEFAULT_LTR;\n byte maxLevel = 0;\n if (limit < length) {\n runCount++;\n }\n bidi2.getRunsMemory(runCount);\n BidiRun[] runs = bidi2.runsMemory;\n int runIndex = 0;\n int i2 = 0;\n do {\n int start = i2;\n byte level2 = levels[i2];\n if (level2 < minLevel) {\n minLevel = level2;\n }\n if (level2 > maxLevel) {\n maxLevel = level2;\n }\n do {\n i2++;\n if (i2 >= limit) {\n break;\n }\n } while (levels[i2] == level2);\n runs[runIndex] = new BidiRun(start, i2 - start, level2);\n runIndex++;\n } while (i2 < limit);\n if (limit < length) {\n runs[runIndex] = new BidiRun(limit, length - limit, bidi2.paraLevel);\n if (bidi2.paraLevel < minLevel) {\n minLevel = bidi2.paraLevel;\n }\n }\n bidi2.runs = runs;\n bidi2.runCount = runCount;\n reorderLine(bidi2, minLevel, maxLevel);\n int limit2 = 0;\n for (int i3 = 0; i3 < runCount; i3++) {\n runs[i3].level = levels[runs[i3].start];\n BidiRun bidiRun = runs[i3];\n int i4 = bidiRun.limit + limit2;\n bidiRun.limit = i4;\n limit2 = i4;\n }\n if (runIndex < runCount) {\n runs[(bidi2.paraLevel & 1) != 0 ? 0 : runIndex].level = bidi2.paraLevel;\n }\n }\n }\n if (bidi2.insertPoints.size > 0) {\n for (int ip = 0; ip < bidi2.insertPoints.size; ip++) {\n Bidi.Point point = bidi2.insertPoints.points[ip];\n bidi2.runs[getRunFromLogicalIndex(bidi2, point.pos)].insertRemove |= point.flag;\n }\n }\n if (bidi2.controlCount > 0) {\n int ic = 0;\n while (true) {\n int ic2 = ic;\n if (ic2 >= bidi2.length) {\n break;\n }\n if (Bidi.IsBidiControlChar(bidi2.text[ic2])) {\n bidi2.runs[getRunFromLogicalIndex(bidi2, ic2)].insertRemove--;\n }\n ic = ic2 + 1;\n }\n }\n }\n }", "@Override\n public void nextOrPrev(int detailsPos)\n {\n if(detailsPos < startPos && (startPos - offsetCheck) >= 0)\n {\n presenter.addDetailLeft(startPos - offsetCheck);\n startPos--;\n }\n else if(detailsPos > startPos && (startPos + offsetCheck) <= totalTiles)\n {\n presenter.addDetailRight(startPos + offsetCheck);\n startPos++;\n }\n }", "public void RBFixup(Node n) {\r\n\t\twhile(n.parent.color == 0) {\r\n\t\t\tif(n.parent == n.parent.parent.left) {\r\n\t\t\t\tNode y = n.parent.parent.right;\r\n\t\t\t\tif(y.color == 0) {\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\ty.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\tn = n.parent.parent;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(n == n.parent.right) {\r\n\t\t\t\t\t\tn = n.parent;\r\n\t\t\t\t\t\tleftRotate(n);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\t//mark n and n's grandparent, because in the end these two nodes will be the children\r\n\t\t\t\t\t//marking will be handled in recUpdateNode\r\n\t\t\t\t\tn.marked = true;\r\n\t\t\t\t\tn.parent.parent.marked = true;\r\n\t\t\t\t\trightRotate(n.parent.parent);\r\n\t\t\t\t\tif(hFlag == 1)\r\n\t\t\t\t\t\theight--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tNode y = n.parent.parent.left;\r\n\t\t\t\tif(y.color == 0) {\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\ty.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\tn = n.parent.parent;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(n == n.parent.left) {\r\n\t\t\t\t\t\tn = n.parent;\r\n\t\t\t\t\t\trightRotate(n);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\t//mark n and n's grandparent, because in the end these two nodes will be the children\r\n\t\t\t\t\t//marking will be handled in recUpdateNode\r\n\t\t\t\t\tn.marked = true;\r\n\t\t\t\t\tn.parent.parent.marked = true;\r\n\t\t\t\t\tleftRotate(n.parent.parent);\r\n\t\t\t\t\tif(hFlag == 1)\r\n\t\t\t\t\t\theight--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\troot.color = 1;\r\n\t}", "public String scoreTo8BitsStringNotes(){\n\t\tString str = \"\", placeholder = \"00\",seperator = \" \";\n\t\tfor(StdNote tNote : musicTrack.get(0).noteTrack){\n\n\t\t\tstr += String.format(\"%03d\",tNote.absolutePosition)\n\t\t\t\t+ tNote.downFlatSharp\n\t\t\t\t+ tNote.octave\n\t\t\t\t+ tNote.dot\n\t\t\t\t+ placeholder\n\t\t\t\t+ seperator;\n\t\t\t//这里要这样写么??\n\t\t\tif(tNote.barPoint == 1) str += ',';\n\t\t}\n\t\treturn str.trim();//去掉前后空格\n\t}", "public static String convertNotation(String note){\n\t\tif(note.length() != 1){\n\t\t\tString temp = note.substring(0,1);\n\t\t\tif(note.substring(1, 2).equals(\"#\")){\n\t\t\t\tnote = noteDictionary[findInDict(temp) + 1];\n\t\t\t}\n\t\t\telse if(note.substring(1, 2).equals(\"b\")){\n\t\t\t\tnote = noteDictionary[findInDict(temp) - 1];\n\t\t\t}\n\t\t}\n\t\treturn note;\n\t}", "private static boolean generatePreviousWord(List<String> verse, String[] syllablesPattern, int count,\n List<String> tagsPatterns, String tagsPattern, String nextWord){\n if (!reversedBigrams.containsKey(nextWord))\n return false;\n if (count==syllablesPattern.length){\n return true;\n }\n Map<String,Integer> followers = reversedBigrams.get(nextWord).entrySet().stream()\n .filter(e->{\n return !e.getKey().equals(\"<BOS>\")&&Integer.parseInt(syllablesPattern[syllablesPattern.length-count-1])==syllables.get(e.getKey())\n && filterPatterns(tagsPatterns,supertags.get(e.getKey())+\" \"+tagsPattern).size()>0;\n }\n )\n .collect(Collectors.toMap(Map.Entry::getKey,Map.Entry::getValue));\n //if there are no suitable folowers return false\n if (followers.isEmpty())\n return false;\n String follower=null;\n //as long as there are followers that we havent already checked\n while (!followers.isEmpty()){\n follower=getRandomKey(followers);\n //remove to avoid infinite loop\n followers.remove(follower);\n String nTagsPattern = supertags.get(follower)+\" \"+tagsPattern;\n List<String> nTagsPatterns = filterPatterns(tagsPatterns,nTagsPattern);\n List<String> nVerse = new ArrayList<>(verse);\n nVerse.add(0,follower);\n if (generatePreviousWord(nVerse, syllablesPattern, count+1,nTagsPatterns,nTagsPattern,follower)){\n verse.clear();\n verse.addAll(nVerse);\n return true;\n }\n }\n return false;\n }", "public void setArrowHead(int baseX, int baseY, int tipX, int tipY);", "void scanafter() {\n\t\tint oldline, newline;\n\n\t\tfor (newline = 0; newline <= newinfo.maxLine; newline++) {\n\t\t\toldline = newinfo.other[newline];\n\t\t\tif (oldline >= 0) { /* is unique in old & new */\n\t\t\t\tfor (;;) { /* scan after there in both files */\n\t\t\t\t\tif (++oldline > oldinfo.maxLine)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (oldinfo.other[oldline] >= 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (++newline > newinfo.maxLine)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (newinfo.other[newline] >= 0)\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t/*\n\t\t\t\t\t * oldline & newline exist, and aren't already matched\n\t\t\t\t\t */\n\n\t\t\t\t\tif (newinfo.symbol[newline] != oldinfo.symbol[oldline])\n\t\t\t\t\t\tbreak; // not same\n\n\t\t\t\t\tnewinfo.other[newline] = oldline; // record a match\n\t\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void testfindNote() {\n System.out.println(\"findNote\");\n net.sharedmemory.tuner.Note instance = new net.sharedmemory.tuner.Note();\n\n double frequency = 441.123;\n java.lang.String expectedResult = \"A4\";\n java.lang.String result = instance.findNote(frequency);\n assertEquals(expectedResult, result);\n \n frequency = 523.25;\n expectedResult = \"C5\";\n result = instance.findNote(frequency);\n assertEquals(expectedResult, result);\n \n frequency = 417.96875;\n expectedResult = \"G#4\";\n result = instance.findNote(frequency);\n assertEquals(expectedResult, result);\n \n frequency = 1316.40625;\n expectedResult = \"B5\";\n result = instance.findNote(frequency);\n assertEquals(expectedResult, result);\n }", "public static void deselNotes() {\r\n List<MeasureLine> selection = DataClipboard.getSelection();\r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n if (selection.get(i).size() > 0) {\r\n selection.get(i).clear();\r\n }\r\n if(selection.get(i).getVolume() < 0) {\r\n selection.set(i, null);\r\n }\r\n }\r\n }\r\n \r\n //find new line begin \r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineBegin(i);\r\n break;\r\n }\r\n }\r\n \r\n //find new line end \r\n for(int i = DataClipboard.getSelectionLineEnd(); i > DataClipboard.getSelectionLineBegin() - 1; i--){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineEnd(i);\r\n break;\r\n }\r\n }\r\n }", "boolean validConsecutiveMotion(IMotion m1);", "private void fixInnerParent(BaleElement be)\n{\n BaleAstNode sn = getAstChild(be);\n while (cur_parent != cur_line && sn == null) {\n cur_parent = cur_parent.getBaleParent();\n cur_ast = cur_parent.getAstNode();\n sn = getAstChild(be);\n }\n\n // now see if there are any internal elements that should be used\n while (sn != null && sn != cur_ast && sn.getLineLength() == 0) {\n BaleElement.Branch nbe = createInnerBranch(sn);\n if (nbe == null) break;\n addElementNode(nbe,0);\n nbe.setAstNode(sn);\n cur_parent = nbe;\n cur_ast = sn;\n sn = getAstChild(be);\n }\n}", "speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel getBreakLevel();", "private void findPrev() {\n \tthis.find(false);\n }", "public boolean isSelfCrossing(int[] x) {\n for(int i = 0; i <= x.length - 1; i ++){\n // Case 1 where arrow i goes across arrow i - 3\n if(i >= 3 && x[i] >= x[i - 2] && x[i - 1] <= x[i - 3]) return true;\n // Case 2 where arrow i goes across arrow i - 4\n if(i >= 4 && x[i] + x[i - 4] >= x[i - 2] && x[i - 1] == x[i - 3]) return true;\n // Case 3 where arrow goes across arrow i - 5\n if(i >= 5 && x[i - 1] + x[i - 5] >= x[i - 3] && x[i] + x[i - 4] >= x[i - 2]\n && x[i - 2] >= x[i - 4] && x[i - 1] <= x[i - 3]) return true;\n }\n return false;\n }", "public String processSeq (String seq)\n {\n\n\n unknownStatus = 0; // reinitialize this to 0\n\n // take out any spaces and numbers\n StringBuffer tempSeq = new StringBuffer(\"\");;\n for (int i = 0; i < seq.length(); i++)\n {\n if (Character.isLetter(seq.charAt(i)))\n tempSeq.append(seq.charAt(i));\n else\n continue;\n }\n seq = tempSeq.toString();\n\n if (seq.length() > 0)\n {\n\n // the three 5'3' reading frame translations\n\n String fiveThreeFrame1 = match (seq);\n String fiveThreeFrame2 = match (seq.substring(1, seq.length()));\n String fiveThreeFrame3 = match (seq.substring(2, seq.length()));\n\n \n\n // reverse and complement the string seq and rename rev\n\n String rev = \"\";\n for (int i = 0; i < seq.length(); i++)\n {\n // the unambiguous nucleotides\n if (seq.charAt(i) == 'A')\n rev = \"U\" + rev;\n else if ((seq.charAt(i) == 'U') || (seq.charAt(i) == 'T'))\n rev = \"A\" + rev;\n else if (seq.charAt(i) == 'C')\n rev = \"G\" + rev;\n else if (seq.charAt(i) == 'G')\n rev = \"C\" + rev;\n else // any other non-nucleotides\n rev = String.valueOf (seq.charAt(i)) + rev;\n }\n\n\n // the three 3'5' reading frame translations\n\n String threeFiveFrame1 = match (rev); \n String threeFiveFrame2 = match (rev.substring(1, rev.length()));\n String threeFiveFrame3 = match (rev.substring(2, rev.length()));\n\n return (\"5'3' Frame1: \" + \"<BR>\" + fiveThreeFrame1 + \n \"<BR><BR>5'3' Frame2: \" + \"<BR>\" + fiveThreeFrame2 +\n \"<BR><BR>5'3' Frame3: \" + \"<BR>\" + fiveThreeFrame3 +\n \"<BR><BR>3'5' Frame1: \" + \"<BR>\" + threeFiveFrame1 +\n \"<BR><BR>3'5' Frame2: \" + \"<BR>\" + threeFiveFrame2 +\n \"<BR><BR>3'5' Frame3: \" + \"<BR>\" + threeFiveFrame3 + \"<BR>\");\n }\n\n return \"\";\n }", "private void anyBeepersInMiddle() {\n\t\t// while (frontIsClear())\n\t\t// for (int i = 0; i < 2; i++) // This is a test\n\t\twhile (frontIsClear()) {\n\t\t\tif (beepersPresent()) {\n\t\t\t\tmove();\n\t\t\t\tmove();\n\t\t\t} else {\n\t\t\t\tcleaningBallot();\n\t\t\t}\n\t\t}\n\t}", "private int fixUp(byte[] b, int offset, int read) {\n for(int i=0; i<detect.length-1; i++) {\n int base = offset+read-1-i;\n if(base < 0) continue;\n \n boolean going = true;\n for(int j=0; j<=i && going; j++) {\n if(b[base+j] == detect[j]) {\n // Matches\n } else {\n going = false;\n }\n }\n if(going) {\n // There could be a <br> handing over the end, eg <br|\n addToSpare(b, base, i+1, true);\n read -= 1;\n read -= i;\n break;\n }\n }\n \n // Find places to fix\n ArrayList<Integer> fixAt = new ArrayList<Integer>();\n for(int i=offset; i<=offset+read-detect.length; i++) {\n boolean going = true;\n for(int j=0; j<detect.length && going; j++) {\n if(b[i+j] != detect[j]) {\n going = false;\n }\n }\n if(going) {\n fixAt.add(i);\n }\n }\n \n if(fixAt.size()==0) {\n return read;\n }\n \n // If there isn't space in the buffer to contain\n // all the fixes, then save the overshoot for next time\n int needed = offset+read+fixAt.size();\n int overshoot = needed - b.length; \n if(overshoot > 0) {\n // Make sure we don't loose part of a <br>!\n int fixes = 0;\n for(int at : fixAt) {\n if(at > offset+read-detect.length-overshoot-fixes) {\n overshoot = needed - at - 1 - fixes;\n break;\n }\n fixes++;\n }\n\n addToSpare(b, offset+read-overshoot, overshoot, false);\n read -= overshoot;\n }\n \n // Fix them, in reverse order so the\n // positions are valid\n for(int j=fixAt.size()-1; j>=0; j--) {\n int i = fixAt.get(j);\n if(i >= read+offset) {\n // This one has moved into the overshoot\n continue;\n }\n if(i > read-3) {\n // This one has moved into the overshoot\n continue;\n }\n\n byte[] tmp = new byte[read-i-3];\n System.arraycopy(b, i+3, tmp, 0, tmp.length);\n b[i+3] = (byte)'/';\n System.arraycopy(tmp, 0, b, i+4, tmp.length);\n // It got one longer\n read++;\n }\n return read;\n }", "@Override\n public void definitionFigureType() {\n if (getA() == getB() && getA() == getC())\n System.out.println(\"This triangular prism is regular.\");\n else\n System.out.println(\"This triangular prism is simple.\");\n }", "private int findStopCodon(String sequentie,int start){\n\t for(int i = start; i+3<sequentie.length();i+=3){\n\t if(sequentie.substring(i,i+3).contains(\"TAG\")||sequentie.substring(i,i+3).contains(\"TAA\")||sequentie.substring(i,i+3).contains(\"TGA\")){\n\t return i+3;\n\t }\n\t }\n\t return -1;\n }", "public int getArrowsInBody ( ) {\n\t\treturn extract ( handle -> handle.getArrowsInBody ( ) );\n\t}" ]
[ "0.5191613", "0.5147517", "0.50659925", "0.50427705", "0.49654347", "0.49451932", "0.49175325", "0.48970583", "0.48672336", "0.4864159", "0.4857664", "0.48487982", "0.48482764", "0.48468867", "0.48317683", "0.48317683", "0.4791799", "0.47881985", "0.47605756", "0.47392705", "0.47013965", "0.46883646", "0.46527952", "0.46341473", "0.46242368", "0.45718637", "0.45650938", "0.4551509", "0.4542494", "0.4541516", "0.45353147", "0.4517266", "0.45075673", "0.45037088", "0.4492146", "0.44874308", "0.44664547", "0.44663045", "0.44657996", "0.44542864", "0.44392267", "0.44302976", "0.44256896", "0.44232827", "0.44173008", "0.44166774", "0.441257", "0.44098228", "0.44077078", "0.44007942", "0.43992448", "0.43977338", "0.43944922", "0.4388749", "0.43816552", "0.43760133", "0.4364382", "0.43621174", "0.43527818", "0.43524665", "0.43427604", "0.4337386", "0.43344536", "0.43272755", "0.4322845", "0.43175843", "0.4314421", "0.4311481", "0.42990643", "0.42968327", "0.4289383", "0.42892134", "0.42860302", "0.42836726", "0.4276465", "0.42742127", "0.42735308", "0.42724758", "0.4269337", "0.42659953", "0.42650643", "0.42563838", "0.4254331", "0.42514068", "0.42502818", "0.42487827", "0.4238937", "0.4237795", "0.42337525", "0.42314643", "0.42291972", "0.4227918", "0.42192036", "0.4217997", "0.421277", "0.4211192", "0.42104188", "0.4210103", "0.42035565", "0.42025372" ]
0.6598666
0