repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1 value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1 value |
|---|---|---|---|---|---|---|---|---|---|---|---|
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.function | public static <T> Function<T, Void> function(Consumer<T> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null consumer");
return first -> {
adaptee.accept(first);
return null;
};
} | java | public static <T> Function<T, Void> function(Consumer<T> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null consumer");
return first -> {
adaptee.accept(first);
return null;
};
} | [
"public",
"static",
"<",
"T",
">",
"Function",
"<",
"T",
",",
"Void",
">",
"function",
"(",
"Consumer",
"<",
"T",
">",
"adaptee",
")",
"{",
"dbc",
".",
"precondition",
"(",
"adaptee",
"!=",
"null",
",",
"\"cannot adapt a null consumer\"",
")",
";",
"retu... | Adapts an consumer to a function.
@param <T> the consumer parameter type
@param adaptee the consumer to be adapted
@return the adapted function | [
"Adapts",
"an",
"consumer",
"to",
"a",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L616-L622 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.function | public static <T1, T2> BiFunction<T1, T2, Void> function(BiConsumer<T1, T2> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null consumer");
return (first, second) -> {
adaptee.accept(first, second);
return null;
};
} | java | public static <T1, T2> BiFunction<T1, T2, Void> function(BiConsumer<T1, T2> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null consumer");
return (first, second) -> {
adaptee.accept(first, second);
return null;
};
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"Void",
">",
"function",
"(",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"adaptee",
")",
"{",
"dbc",
".",
"precondition",
"(",
"adaptee",
"!=",
"null",
",",
"\"ca... | Adapts a binary consumer to a binary function.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param adaptee the consumer to be adapted
@return the adapted function | [
"Adapts",
"a",
"binary",
"consumer",
"to",
"a",
"binary",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L632-L638 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.function | public static <T1, T2, T3> TriFunction<T1, T2, T3, Void> function(TriConsumer<T1, T2, T3> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null consumer");
return (first, second, third) -> {
adaptee.accept(first, second, third);
return null;
};
} | java | public static <T1, T2, T3> TriFunction<T1, T2, T3, Void> function(TriConsumer<T1, T2, T3> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null consumer");
return (first, second, third) -> {
adaptee.accept(first, second, third);
return null;
};
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"Void",
">",
"function",
"(",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"adaptee",
")",
"{",
"dbc",
".",
"precondition",
"("... | Adapts a ternary consumer to a ternary function.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param <T3> the consumer third parameter type
@param adaptee the consumer to be adapted
@return the adapted function | [
"Adapts",
"a",
"ternary",
"consumer",
"to",
"a",
"ternary",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L649-L655 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.function | public static <T> Function<T, Boolean> function(Predicate<T> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null predicate");
return adaptee::test;
} | java | public static <T> Function<T, Boolean> function(Predicate<T> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null predicate");
return adaptee::test;
} | [
"public",
"static",
"<",
"T",
">",
"Function",
"<",
"T",
",",
"Boolean",
">",
"function",
"(",
"Predicate",
"<",
"T",
">",
"adaptee",
")",
"{",
"dbc",
".",
"precondition",
"(",
"adaptee",
"!=",
"null",
",",
"\"cannot adapt a null predicate\"",
")",
";",
... | Adapts a predicate to a function.
@param <T> the predicate parameter type
@param adaptee the predicate to be adapted
@return the adapted function | [
"Adapts",
"a",
"predicate",
"to",
"a",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L664-L667 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.function | public static <T1, T2> BiFunction<T1, T2, Boolean> function(BiPredicate<T1, T2> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null predicate");
return adaptee::test;
} | java | public static <T1, T2> BiFunction<T1, T2, Boolean> function(BiPredicate<T1, T2> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null predicate");
return adaptee::test;
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"Boolean",
">",
"function",
"(",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"adaptee",
")",
"{",
"dbc",
".",
"precondition",
"(",
"adaptee",
"!=",
"null",
",",
"... | Adapts a binary predicate to a binary function.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param adaptee the predicate to be adapted
@return the adapted function | [
"Adapts",
"a",
"binary",
"predicate",
"to",
"a",
"binary",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L677-L680 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.function | public static <T1, T2, T3> TriFunction<T1, T2, T3, Boolean> function(TriPredicate<T1, T2, T3> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null predicate");
return adaptee::test;
} | java | public static <T1, T2, T3> TriFunction<T1, T2, T3, Boolean> function(TriPredicate<T1, T2, T3> adaptee) {
dbc.precondition(adaptee != null, "cannot adapt a null predicate");
return adaptee::test;
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"Boolean",
">",
"function",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"adaptee",
")",
"{",
"dbc",
".",
"precondition",
... | Adapts a ternary predicate to a ternary function.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param adaptee the predicate to be adapted
@return the adapted function | [
"Adapts",
"a",
"ternary",
"predicate",
"to",
"a",
"ternary",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L691-L694 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.runnable | public static <T> Runnable runnable(Supplier<T> supplier) {
dbc.precondition(supplier != null, "cannot adapt a null supplier");
return supplier::get;
} | java | public static <T> Runnable runnable(Supplier<T> supplier) {
dbc.precondition(supplier != null, "cannot adapt a null supplier");
return supplier::get;
} | [
"public",
"static",
"<",
"T",
">",
"Runnable",
"runnable",
"(",
"Supplier",
"<",
"T",
">",
"supplier",
")",
"{",
"dbc",
".",
"precondition",
"(",
"supplier",
"!=",
"null",
",",
"\"cannot adapt a null supplier\"",
")",
";",
"return",
"supplier",
"::",
"get",
... | Adapts a supplier to a runnable.
@param <T> the supplier parameter type
@param supplier the supplier to be adapted
@return the adapted runnable | [
"Adapts",
"a",
"supplier",
"to",
"a",
"runnable",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L703-L706 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.consumer | public static <T, R> Consumer<T> consumer(Function<T, R> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | java | public static <T, R> Consumer<T> consumer(Function<T, R> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | [
"public",
"static",
"<",
"T",
",",
"R",
">",
"Consumer",
"<",
"T",
">",
"consumer",
"(",
"Function",
"<",
"T",
",",
"R",
">",
"function",
")",
"{",
"dbc",
".",
"precondition",
"(",
"function",
"!=",
"null",
",",
"\"cannot adapt a null function\"",
")",
... | Adapts a function to an consumer.
@param <T> the function parameter type
@param <R> the function return type
@param function the function to be adapted
@return the adapted consumer | [
"Adapts",
"a",
"function",
"to",
"an",
"consumer",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L716-L719 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.consumer | public static <T1, T2, R> BiConsumer<T1, T2> consumer(BiFunction<T1, T2, R> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | java | public static <T1, T2, R> BiConsumer<T1, T2> consumer(BiFunction<T1, T2, R> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"consumer",
"(",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"function",
")",
"{",
"dbc",
".",
"precondition",
"(",
"function",
"!=",
"null",
... | Adapts a binary function to a binary consumer.
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <R> the function return type
@param function the function to be adapted
@return the adapted consumer | [
"Adapts",
"a",
"binary",
"function",
"to",
"a",
"binary",
"consumer",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L730-L733 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.consumer | public static <T1, T2, T3, R> TriConsumer<T1, T2, T3> consumer(TriFunction<T1, T2, T3, R> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | java | public static <T1, T2, T3, R> TriConsumer<T1, T2, T3> consumer(TriFunction<T1, T2, T3, R> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"consumer",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"function",
")",
"{",
"dbc",
".",
"precondi... | Adapts a ternary function to a ternary consumer.
@param <R> the function return type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function to be adapted
@return the adapted consumer | [
"Adapts",
"a",
"ternary",
"function",
"to",
"a",
"ternary",
"consumer",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L745-L748 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.proposition | public static BooleanSupplier proposition(Supplier<Boolean> supplier) {
dbc.precondition(supplier != null, "cannot adapt a null supplier");
return supplier::get;
} | java | public static BooleanSupplier proposition(Supplier<Boolean> supplier) {
dbc.precondition(supplier != null, "cannot adapt a null supplier");
return supplier::get;
} | [
"public",
"static",
"BooleanSupplier",
"proposition",
"(",
"Supplier",
"<",
"Boolean",
">",
"supplier",
")",
"{",
"dbc",
".",
"precondition",
"(",
"supplier",
"!=",
"null",
",",
"\"cannot adapt a null supplier\"",
")",
";",
"return",
"supplier",
"::",
"get",
";"... | Adapts a supplier to a proposition.
@param supplier the supplier to be adapted
@return the adapted proposition | [
"Adapts",
"a",
"supplier",
"to",
"a",
"proposition",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L756-L759 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.predicate | public static <T> Predicate<T> predicate(Function<T, Boolean> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | java | public static <T> Predicate<T> predicate(Function<T, Boolean> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | [
"public",
"static",
"<",
"T",
">",
"Predicate",
"<",
"T",
">",
"predicate",
"(",
"Function",
"<",
"T",
",",
"Boolean",
">",
"function",
")",
"{",
"dbc",
".",
"precondition",
"(",
"function",
"!=",
"null",
",",
"\"cannot adapt a null function\"",
")",
";",
... | Adapts a function to a predicate.
@param <T> the function parameter type
@param function the function to be adapted
@return the adapted predicate | [
"Adapts",
"a",
"function",
"to",
"a",
"predicate",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L768-L771 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.predicate | public static <T1, T2> BiPredicate<T1, T2> predicate(BiFunction<T1, T2, Boolean> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | java | public static <T1, T2> BiPredicate<T1, T2> predicate(BiFunction<T1, T2, Boolean> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"predicate",
"(",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"Boolean",
">",
"function",
")",
"{",
"dbc",
".",
"precondition",
"(",
"function",
"!=",
"null",
",",
... | Adapts a binary function to a binary predicate
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param function the function to be adapted
@return the adapted predicate | [
"Adapts",
"a",
"binary",
"function",
"to",
"a",
"binary",
"predicate"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L781-L784 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Dispatching.java | Dispatching.predicate | public static <T1, T2, T3> TriPredicate<T1, T2, T3> predicate(TriFunction<T1, T2, T3, Boolean> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> predicate(TriFunction<T1, T2, T3, Boolean> function) {
dbc.precondition(function != null, "cannot adapt a null function");
return function::apply;
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"Boolean",
">",
"function",
")",
"{",
"dbc",
".",
"precondition",... | Adapts a ternary function to a ternary predicate.
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function to be adapted
@return the adapted predicate | [
"Adapts",
"a",
"ternary",
"function",
"to",
"a",
"ternary",
"predicate",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Dispatching.java#L795-L798 | train |
DaGeRe/KoPeMe | kopeme-core/src/main/java/de/dagere/kopeme/kieker/KiekerTraceEntry.java | KiekerTraceEntry.getFieldDescription | public static String[] getFieldDescription() {
if(FIELDS == null){
ArrayList<String> fields = new ArrayList<String>();
for(Field field : KiekerTraceEntry.class.getDeclaredFields()){
if(!Modifier.isStatic(field.getModifiers())){
fields.add(field.getName());
}
}
FIELDS = fields.toArray(new String[fields.size()]);
}
return FIELDS;
} | java | public static String[] getFieldDescription() {
if(FIELDS == null){
ArrayList<String> fields = new ArrayList<String>();
for(Field field : KiekerTraceEntry.class.getDeclaredFields()){
if(!Modifier.isStatic(field.getModifiers())){
fields.add(field.getName());
}
}
FIELDS = fields.toArray(new String[fields.size()]);
}
return FIELDS;
} | [
"public",
"static",
"String",
"[",
"]",
"getFieldDescription",
"(",
")",
"{",
"if",
"(",
"FIELDS",
"==",
"null",
")",
"{",
"ArrayList",
"<",
"String",
">",
"fields",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"Field",
"fi... | Returns a description for the Super CSV parser, how to map a column of the csv to this type.
@return array with field names representing the order in the csv | [
"Returns",
"a",
"description",
"for",
"the",
"Super",
"CSV",
"parser",
"how",
"to",
"map",
"a",
"column",
"of",
"the",
"csv",
"to",
"this",
"type",
"."
] | a4939113cba73cb20a2c7d6dc8d34d0139a3e340 | https://github.com/DaGeRe/KoPeMe/blob/a4939113cba73cb20a2c7d6dc8d34d0139a3e340/kopeme-core/src/main/java/de/dagere/kopeme/kieker/KiekerTraceEntry.java#L27-L38 | train |
DaGeRe/KoPeMe | kopeme-core/src/main/java/de/dagere/kopeme/kieker/KiekerTraceEntry.java | KiekerTraceEntry.getCellProcessors | public static CellProcessor[] getCellProcessors(){
return new CellProcessor[] {
new ParseInt(){
@Override
public Object execute(Object value, CsvContext context) {
String content = value.toString();
String[] split = content.split("\\$");
return super.execute(split[1], context);
}
},
new ParseLong(),
null,
null,
new ParseLong(),
new ParseLong(),
new ParseLong(),
null,
new ParseInt(),
new ParseInt()
};
} | java | public static CellProcessor[] getCellProcessors(){
return new CellProcessor[] {
new ParseInt(){
@Override
public Object execute(Object value, CsvContext context) {
String content = value.toString();
String[] split = content.split("\\$");
return super.execute(split[1], context);
}
},
new ParseLong(),
null,
null,
new ParseLong(),
new ParseLong(),
new ParseLong(),
null,
new ParseInt(),
new ParseInt()
};
} | [
"public",
"static",
"CellProcessor",
"[",
"]",
"getCellProcessors",
"(",
")",
"{",
"return",
"new",
"CellProcessor",
"[",
"]",
"{",
"new",
"ParseInt",
"(",
")",
"{",
"@",
"Override",
"public",
"Object",
"execute",
"(",
"Object",
"value",
",",
"CsvContext",
... | Provide this array to parse the columns of the csv into the right type using the Super CSV framework.
@return | [
"Provide",
"this",
"array",
"to",
"parse",
"the",
"columns",
"of",
"the",
"csv",
"into",
"the",
"right",
"type",
"using",
"the",
"Super",
"CSV",
"framework",
"."
] | a4939113cba73cb20a2c7d6dc8d34d0139a3e340 | https://github.com/DaGeRe/KoPeMe/blob/a4939113cba73cb20a2c7d6dc8d34d0139a3e340/kopeme-core/src/main/java/de/dagere/kopeme/kieker/KiekerTraceEntry.java#L45-L65 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/api/Router.java | Router.configureEndpoints | void configureEndpoints(Reflections reflections) {
// [Re]initialise the api:
api = new HashMap<>();
log.info("Scanning for endpoint classes..");
Set<Class<?>> endpoints = reflections.getTypesAnnotatedWith(Api.class);
// log.info(reflections.getConfiguration().getUrls());
log.info("Found {} endpoint classes.", endpoints.size());
log.info("Examining endpoint class methods:");
// Configure the classes:
for (Class<?> endpointClass : endpoints) {
Route route = getEndpoint(endpointClass);
route.endpointClass = endpointClass;
for (Method method : endpointClass.getMethods()) {
// Skip Object methods
if (method.getDeclaringClass() == Object.class) {
continue;
}
// Find public methods:
if (Modifier.isPublic(method.getModifiers())) {
// Which HTTP method(s) will this method respond to?
annotation:
for (Annotation annotation : method.getAnnotations()) {
HttpMethod httpMethod = HttpMethod.method(annotation);
if (httpMethod != null) {
log.info("Http method: {}", httpMethod);
RequestHandler requestHandler = new RequestHandler();
requestHandler.handlerMethod = method;
log.info("Java method: {}", method.getName());
// Look for an optional Json message type parameter:
for (Class<?> parameterType : method.getParameterTypes()) {
if (!HttpServletRequest.class.isAssignableFrom(parameterType)
&& !HttpServletResponse.class.isAssignableFrom(parameterType)) {
if (requestHandler.requestMessageType != null) {
log.error("Too many parameters on {} method {}. " +
"Message type already set to {} but also found a {} parameter.",
httpMethod, method.getName(),
requestHandler.requestMessageType.getSimpleName(), parameterType.getSimpleName());
break annotation;
}
requestHandler.requestMessageType = parameterType;
log.info("request Json: {}", requestHandler.requestMessageType.getSimpleName());
}
}
// Check the response Json message type:
if (method.getReturnType() != void.class) {
requestHandler.responseMessageType = method.getReturnType();
log.info("Response Json: {}", requestHandler.responseMessageType.getSimpleName());
}
route.requestHandlers.put(httpMethod, requestHandler);
}
}
}
}
}
} | java | void configureEndpoints(Reflections reflections) {
// [Re]initialise the api:
api = new HashMap<>();
log.info("Scanning for endpoint classes..");
Set<Class<?>> endpoints = reflections.getTypesAnnotatedWith(Api.class);
// log.info(reflections.getConfiguration().getUrls());
log.info("Found {} endpoint classes.", endpoints.size());
log.info("Examining endpoint class methods:");
// Configure the classes:
for (Class<?> endpointClass : endpoints) {
Route route = getEndpoint(endpointClass);
route.endpointClass = endpointClass;
for (Method method : endpointClass.getMethods()) {
// Skip Object methods
if (method.getDeclaringClass() == Object.class) {
continue;
}
// Find public methods:
if (Modifier.isPublic(method.getModifiers())) {
// Which HTTP method(s) will this method respond to?
annotation:
for (Annotation annotation : method.getAnnotations()) {
HttpMethod httpMethod = HttpMethod.method(annotation);
if (httpMethod != null) {
log.info("Http method: {}", httpMethod);
RequestHandler requestHandler = new RequestHandler();
requestHandler.handlerMethod = method;
log.info("Java method: {}", method.getName());
// Look for an optional Json message type parameter:
for (Class<?> parameterType : method.getParameterTypes()) {
if (!HttpServletRequest.class.isAssignableFrom(parameterType)
&& !HttpServletResponse.class.isAssignableFrom(parameterType)) {
if (requestHandler.requestMessageType != null) {
log.error("Too many parameters on {} method {}. " +
"Message type already set to {} but also found a {} parameter.",
httpMethod, method.getName(),
requestHandler.requestMessageType.getSimpleName(), parameterType.getSimpleName());
break annotation;
}
requestHandler.requestMessageType = parameterType;
log.info("request Json: {}", requestHandler.requestMessageType.getSimpleName());
}
}
// Check the response Json message type:
if (method.getReturnType() != void.class) {
requestHandler.responseMessageType = method.getReturnType();
log.info("Response Json: {}", requestHandler.responseMessageType.getSimpleName());
}
route.requestHandlers.put(httpMethod, requestHandler);
}
}
}
}
}
} | [
"void",
"configureEndpoints",
"(",
"Reflections",
"reflections",
")",
"{",
"// [Re]initialise the api:",
"api",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"log",
".",
"info",
"(",
"\"Scanning for endpoint classes..\"",
")",
";",
"Set",
"<",
"Class",
"<",
"?",
... | Searches for and configures all your lovely endpoints.
@param reflections The instance to use to find classes. | [
"Searches",
"for",
"and",
"configures",
"all",
"your",
"lovely",
"endpoints",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/api/Router.java#L55-L124 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/api/Router.java | Router.configureNotFound | void configureNotFound(Reflections reflections) {
log.info("Checking for a not-found endpoint..");
NotFound notFound = getEndpoint(NotFound.class, "not-found", reflections);
if (notFound == null) notFound = new DefaultNotFound();
printEndpoint(notFound, "not-found");
this.notFound = notFound;
} | java | void configureNotFound(Reflections reflections) {
log.info("Checking for a not-found endpoint..");
NotFound notFound = getEndpoint(NotFound.class, "not-found", reflections);
if (notFound == null) notFound = new DefaultNotFound();
printEndpoint(notFound, "not-found");
this.notFound = notFound;
} | [
"void",
"configureNotFound",
"(",
"Reflections",
"reflections",
")",
"{",
"log",
".",
"info",
"(",
"\"Checking for a not-found endpoint..\"",
")",
";",
"NotFound",
"notFound",
"=",
"getEndpoint",
"(",
"NotFound",
".",
"class",
",",
"\"not-found\"",
",",
"reflections... | Searches for and configures the not found endpoint.
@param reflections The instance to use to find classes. | [
"Searches",
"for",
"and",
"configures",
"the",
"not",
"found",
"endpoint",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/api/Router.java#L155-L162 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/api/Router.java | Router.configureServerError | void configureServerError(Reflections reflections) {
log.info("Checking for an error endpoint..");
ServerError serverError = getEndpoint(ServerError.class, "error", reflections);
if (serverError == null) serverError = new DefaultServerError();
printEndpoint(serverError, "error");
this.serverError = serverError;
} | java | void configureServerError(Reflections reflections) {
log.info("Checking for an error endpoint..");
ServerError serverError = getEndpoint(ServerError.class, "error", reflections);
if (serverError == null) serverError = new DefaultServerError();
printEndpoint(serverError, "error");
this.serverError = serverError;
} | [
"void",
"configureServerError",
"(",
"Reflections",
"reflections",
")",
"{",
"log",
".",
"info",
"(",
"\"Checking for an error endpoint..\"",
")",
";",
"ServerError",
"serverError",
"=",
"getEndpoint",
"(",
"ServerError",
".",
"class",
",",
"\"error\"",
",",
"reflec... | Searches for and configures the not error endpoint.
@param reflections The instance to use to find classes. | [
"Searches",
"for",
"and",
"configures",
"the",
"not",
"error",
"endpoint",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/api/Router.java#L169-L176 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/api/Router.java | Router.getEndpoint | private static <E> E getEndpoint(Class<E> type, String name, Reflections reflections) {
E result = null;
// Get concrete subclasses:
Set<Class<? extends E>> foundClasses = reflections.getSubTypesOf(type);
Set<Class<? extends E>> endpointClasses = new HashSet<>();
for (Class<? extends E> clazz : foundClasses) {
if (!Modifier.isAbstract(clazz.getModifiers())) {
endpointClasses.add(clazz);
}
}
// Filter out any default routes:
//log.info("Filtering " + type.getName());
Iterator<Class<? extends E>> iterator = endpointClasses.iterator();
while (iterator.hasNext()) {
Class<? extends E> next = iterator.next();
if (StringUtils.startsWithIgnoreCase(next.getName(), "com.github.davidcarboni.restolino.routes.")) {
//log.info("Filtered out " + next.getName());
iterator.remove();
} //else {
//log.info("Filtered in " + next.getName());
//}
}
//log.info("Filtered.");
if (endpointClasses.size() != 0) {
// Dump multiple endpoints:
if (endpointClasses.size() > 1) {
log.info("Warning: found multiple candidates for {} endpoint: {}", name, endpointClasses);
}
// Instantiate the endpoint if possible:
try {
result = endpointClasses.iterator().next().newInstance();
} catch (Exception e) {
log.info("Error: cannot instantiate {} endpoint class {}",name, endpointClasses.iterator().next());
e.printStackTrace();
}
}
return result;
} | java | private static <E> E getEndpoint(Class<E> type, String name, Reflections reflections) {
E result = null;
// Get concrete subclasses:
Set<Class<? extends E>> foundClasses = reflections.getSubTypesOf(type);
Set<Class<? extends E>> endpointClasses = new HashSet<>();
for (Class<? extends E> clazz : foundClasses) {
if (!Modifier.isAbstract(clazz.getModifiers())) {
endpointClasses.add(clazz);
}
}
// Filter out any default routes:
//log.info("Filtering " + type.getName());
Iterator<Class<? extends E>> iterator = endpointClasses.iterator();
while (iterator.hasNext()) {
Class<? extends E> next = iterator.next();
if (StringUtils.startsWithIgnoreCase(next.getName(), "com.github.davidcarboni.restolino.routes.")) {
//log.info("Filtered out " + next.getName());
iterator.remove();
} //else {
//log.info("Filtered in " + next.getName());
//}
}
//log.info("Filtered.");
if (endpointClasses.size() != 0) {
// Dump multiple endpoints:
if (endpointClasses.size() > 1) {
log.info("Warning: found multiple candidates for {} endpoint: {}", name, endpointClasses);
}
// Instantiate the endpoint if possible:
try {
result = endpointClasses.iterator().next().newInstance();
} catch (Exception e) {
log.info("Error: cannot instantiate {} endpoint class {}",name, endpointClasses.iterator().next());
e.printStackTrace();
}
}
return result;
} | [
"private",
"static",
"<",
"E",
">",
"E",
"getEndpoint",
"(",
"Class",
"<",
"E",
">",
"type",
",",
"String",
"name",
",",
"Reflections",
"reflections",
")",
"{",
"E",
"result",
"=",
"null",
";",
"// Get concrete subclasses:",
"Set",
"<",
"Class",
"<",
"?"... | Locates a single endpoint class.
@param type The type of the endpoint class.
@param name The name of the endpoint.
@param reflections The {@link Reflections} instance to use to locate the
endpoint.
@return The endpoint. | [
"Locates",
"a",
"single",
"endpoint",
"class",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/api/Router.java#L256-L299 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/api/Router.java | Router.mapRequestPath | public String mapRequestPath(HttpServletRequest request) {
String endpointName = Path.newInstance(request).firstSegment();
return StringUtils.lowerCase(endpointName);
} | java | public String mapRequestPath(HttpServletRequest request) {
String endpointName = Path.newInstance(request).firstSegment();
return StringUtils.lowerCase(endpointName);
} | [
"public",
"String",
"mapRequestPath",
"(",
"HttpServletRequest",
"request",
")",
"{",
"String",
"endpointName",
"=",
"Path",
".",
"newInstance",
"(",
"request",
")",
".",
"firstSegment",
"(",
")",
";",
"return",
"StringUtils",
".",
"lowerCase",
"(",
"endpointNam... | Determines the route name for the path of the given request.
@param request The request.
@return A matching route name, if one exists. | [
"Determines",
"the",
"route",
"name",
"for",
"the",
"path",
"of",
"the",
"given",
"request",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/api/Router.java#L410-L414 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/consumers/FirstElement.java | FirstElement.apply | @Override
public E apply(Iterator<E> consumable) {
dbc.precondition(consumable != null, "consuming a null iterator");
dbc.precondition(consumable.hasNext(), "no element to consume");
return consumable.next();
} | java | @Override
public E apply(Iterator<E> consumable) {
dbc.precondition(consumable != null, "consuming a null iterator");
dbc.precondition(consumable.hasNext(), "no element to consume");
return consumable.next();
} | [
"@",
"Override",
"public",
"E",
"apply",
"(",
"Iterator",
"<",
"E",
">",
"consumable",
")",
"{",
"dbc",
".",
"precondition",
"(",
"consumable",
"!=",
"null",
",",
"\"consuming a null iterator\"",
")",
";",
"dbc",
".",
"precondition",
"(",
"consumable",
".",
... | Consumes the first element from the passed iterator.
@param consumable the iterator to be consumed
@throws IllegalArgumentException if the passed iterator is empty
@return the consumed value | [
"Consumes",
"the",
"first",
"element",
"from",
"the",
"passed",
"iterator",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/consumers/FirstElement.java#L22-L27 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/reload/Scanner.java | Scanner.start | public static void start(Path root, WatchService watcher) {
Scanner.watcher = watcher;
Scanner.root = root;
log.info("Monitoring changes under {}", root);
Thread t = new Thread(new Scanner(), "Directory scanner");
t.setDaemon(true);
t.start();
} | java | public static void start(Path root, WatchService watcher) {
Scanner.watcher = watcher;
Scanner.root = root;
log.info("Monitoring changes under {}", root);
Thread t = new Thread(new Scanner(), "Directory scanner");
t.setDaemon(true);
t.start();
} | [
"public",
"static",
"void",
"start",
"(",
"Path",
"root",
",",
"WatchService",
"watcher",
")",
"{",
"Scanner",
".",
"watcher",
"=",
"watcher",
";",
"Scanner",
".",
"root",
"=",
"root",
";",
"log",
".",
"info",
"(",
"\"Monitoring changes under {}\"",
",",
"... | Starts the scanning thread.
@param root The directory under which to scan.
@param watcher The {@link WatchService} | [
"Starts",
"the",
"scanning",
"thread",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/reload/Scanner.java#L28-L36 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/consumers/LastElement.java | LastElement.apply | @Override
public E apply(Iterator<E> consumable) {
dbc.precondition(consumable != null, "consuming a null iterator");
dbc.precondition(consumable.hasNext(), "no element to consume");
E value = consumable.next();
while (consumable.hasNext()) {
value = consumable.next();
}
return value;
} | java | @Override
public E apply(Iterator<E> consumable) {
dbc.precondition(consumable != null, "consuming a null iterator");
dbc.precondition(consumable.hasNext(), "no element to consume");
E value = consumable.next();
while (consumable.hasNext()) {
value = consumable.next();
}
return value;
} | [
"@",
"Override",
"public",
"E",
"apply",
"(",
"Iterator",
"<",
"E",
">",
"consumable",
")",
"{",
"dbc",
".",
"precondition",
"(",
"consumable",
"!=",
"null",
",",
"\"consuming a null iterator\"",
")",
";",
"dbc",
".",
"precondition",
"(",
"consumable",
".",
... | Consumes the iterator and yields the last element contained in it.
@param consumable the iterator to be consumed
@throws IllegalArgumentException if the source iterator is empty
@return the last element | [
"Consumes",
"the",
"iterator",
"and",
"yields",
"the",
"last",
"element",
"contained",
"in",
"it",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/consumers/LastElement.java#L23-L32 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/dispatching/delegates/Flipper.java | Flipper.apply | @Override
public R apply(T former, U latter) {
return function.apply(latter, former);
} | java | @Override
public R apply(T former, U latter) {
return function.apply(latter, former);
} | [
"@",
"Override",
"public",
"R",
"apply",
"(",
"T",
"former",
",",
"U",
"latter",
")",
"{",
"return",
"function",
".",
"apply",
"(",
"latter",
",",
"former",
")",
";",
"}"
] | Performs on the nested function swapping former and latter formal
parameters.
@param former the former formal parameter used as latter in the nested
function
@param latter the latter formal parameter used as former in the nested
function
@return the result of the function | [
"Performs",
"on",
"the",
"nested",
"function",
"swapping",
"former",
"and",
"latter",
"formal",
"parameters",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/dispatching/delegates/Flipper.java#L36-L39 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/json/Serialiser.java | Serialiser.serialise | public static String serialise(Object object) {
Gson gson = getBuilder().create();
return gson.toJson(object);
} | java | public static String serialise(Object object) {
Gson gson = getBuilder().create();
return gson.toJson(object);
} | [
"public",
"static",
"String",
"serialise",
"(",
"Object",
"object",
")",
"{",
"Gson",
"gson",
"=",
"getBuilder",
"(",
")",
".",
"create",
"(",
")",
";",
"return",
"gson",
".",
"toJson",
"(",
"object",
")",
";",
"}"
] | Serialises the given object to Json.
@param object The object be serialised.
@return The Json as a String. | [
"Serialises",
"the",
"given",
"object",
"to",
"Json",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/json/Serialiser.java#L56-L59 | train |
davidcarboni/restolino | src/main/java/com/github/davidcarboni/restolino/json/Serialiser.java | Serialiser.deserialise | public static <O> O deserialise(String json, Class<O> type) {
Gson gson = getBuilder().create();
return gson.fromJson(json, type);
} | java | public static <O> O deserialise(String json, Class<O> type) {
Gson gson = getBuilder().create();
return gson.fromJson(json, type);
} | [
"public",
"static",
"<",
"O",
">",
"O",
"deserialise",
"(",
"String",
"json",
",",
"Class",
"<",
"O",
">",
"type",
")",
"{",
"Gson",
"gson",
"=",
"getBuilder",
"(",
")",
".",
"create",
"(",
")",
";",
"return",
"gson",
".",
"fromJson",
"(",
"json",
... | Deserialises the given json String.
@param json The Json to deserialise.
@param type The type to deserialise into.
@param <O> The type to deserialise to.
@return A new instance of the given type. | [
"Deserialises",
"the",
"given",
"json",
"String",
"."
] | 3f84ece1bd016fbb597c624d46fcca5a2580a33d | https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/json/Serialiser.java#L69-L72 | train |
DaGeRe/KoPeMe | kopeme-core/src/main/java/de/dagere/kopeme/PomProjectNameReader.java | PomProjectNameReader.foundPomXml | public boolean foundPomXml(final File directory, final int depth) {
LOG.debug("Directory: {}", directory);
if (depth == -1 || directory == null || !directory.isDirectory()) {
return false;
} else {
File[] pomFiles = directory.listFiles(new FileFilter() {
@Override
public boolean accept(final File pathname) {
return "pom.xml".equals(pathname.getName());
}
});
if (pomFiles.length == 1) {
pathToPomXml = pomFiles[0];
return true;
} else {
return foundPomXml(directory.getParentFile(), depth - 1);
}
}
} | java | public boolean foundPomXml(final File directory, final int depth) {
LOG.debug("Directory: {}", directory);
if (depth == -1 || directory == null || !directory.isDirectory()) {
return false;
} else {
File[] pomFiles = directory.listFiles(new FileFilter() {
@Override
public boolean accept(final File pathname) {
return "pom.xml".equals(pathname.getName());
}
});
if (pomFiles.length == 1) {
pathToPomXml = pomFiles[0];
return true;
} else {
return foundPomXml(directory.getParentFile(), depth - 1);
}
}
} | [
"public",
"boolean",
"foundPomXml",
"(",
"final",
"File",
"directory",
",",
"final",
"int",
"depth",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Directory: {}\"",
",",
"directory",
")",
";",
"if",
"(",
"depth",
"==",
"-",
"1",
"||",
"directory",
"==",
"null",... | Tries to find the pom recursively by going up in the directory tree.
@param directory The start folder where to search
@param depth how many times should we try to go up to find the pom?
@return a boolean denoting if the pom was found / side effect setting the pom file | [
"Tries",
"to",
"find",
"the",
"pom",
"recursively",
"by",
"going",
"up",
"in",
"the",
"directory",
"tree",
"."
] | a4939113cba73cb20a2c7d6dc8d34d0139a3e340 | https://github.com/DaGeRe/KoPeMe/blob/a4939113cba73cb20a2c7d6dc8d34d0139a3e340/kopeme-core/src/main/java/de/dagere/kopeme/PomProjectNameReader.java#L39-L57 | train |
kyoken74/gwt-angular | gwt-angular-user/src/main/java/com/asayama/gwt/angular/user/client/ui/directive/GwtWidget.java | GwtWidget.link | @Override
public void link(NGScope scope, JQElement element, JSON attrs) {
IsWidget widget = scope.get(getName());
String id = "gwt-widget-" + counter++;
element.attr("id", id);
RootPanel.get(id).add(widget);
} | java | @Override
public void link(NGScope scope, JQElement element, JSON attrs) {
IsWidget widget = scope.get(getName());
String id = "gwt-widget-" + counter++;
element.attr("id", id);
RootPanel.get(id).add(widget);
} | [
"@",
"Override",
"public",
"void",
"link",
"(",
"NGScope",
"scope",
",",
"JQElement",
"element",
",",
"JSON",
"attrs",
")",
"{",
"IsWidget",
"widget",
"=",
"scope",
".",
"get",
"(",
"getName",
"(",
")",
")",
";",
"String",
"id",
"=",
"\"gwt-widget-\"",
... | Replaces the element body with the GWT widget passed via gwt-widget
attribute. GWT widget must implement IsWidget interface. | [
"Replaces",
"the",
"element",
"body",
"with",
"the",
"GWT",
"widget",
"passed",
"via",
"gwt",
"-",
"widget",
"attribute",
".",
"GWT",
"widget",
"must",
"implement",
"IsWidget",
"interface",
"."
] | 99a6efa277dd4771d9cba976b25fdf0ac4fdeca2 | https://github.com/kyoken74/gwt-angular/blob/99a6efa277dd4771d9cba976b25fdf0ac4fdeca2/gwt-angular-user/src/main/java/com/asayama/gwt/angular/user/client/ui/directive/GwtWidget.java#L36-L42 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/convolutions/ZipLongestIterator.java | ZipLongestIterator.next | @Override
public Pair<Optional<E1>, Optional<E2>> next() {
return Pair.of(former.next(), latter.next());
} | java | @Override
public Pair<Optional<E1>, Optional<E2>> next() {
return Pair.of(former.next(), latter.next());
} | [
"@",
"Override",
"public",
"Pair",
"<",
"Optional",
"<",
"E1",
">",
",",
"Optional",
"<",
"E2",
">",
">",
"next",
"(",
")",
"{",
"return",
"Pair",
".",
"of",
"(",
"former",
".",
"next",
"(",
")",
",",
"latter",
".",
"next",
"(",
")",
")",
";",
... | iterating over the longest iterator gives a Pair of Optional.nothing
indefinitely "no matter how many times you try, you can't shoot the dog"
@return TODO | [
"iterating",
"over",
"the",
"longest",
"iterator",
"gives",
"a",
"Pair",
"of",
"Optional",
".",
"nothing",
"indefinitely",
"no",
"matter",
"how",
"many",
"times",
"you",
"try",
"you",
"can",
"t",
"shoot",
"the",
"dog"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/convolutions/ZipLongestIterator.java#L41-L44 | train |
DaGeRe/KoPeMe | kopeme-core/src/main/java/de/dagere/kopeme/datastorage/XMLDataStorer.java | XMLDataStorer.createXMLData | public void createXMLData(final String classname) {
data = new Kopemedata();
data.setTestcases(new Testcases());
final Testcases tc = data.getTestcases();
tc.setClazz(classname);
storeData();
} | java | public void createXMLData(final String classname) {
data = new Kopemedata();
data.setTestcases(new Testcases());
final Testcases tc = data.getTestcases();
tc.setClazz(classname);
storeData();
} | [
"public",
"void",
"createXMLData",
"(",
"final",
"String",
"classname",
")",
"{",
"data",
"=",
"new",
"Kopemedata",
"(",
")",
";",
"data",
".",
"setTestcases",
"(",
"new",
"Testcases",
"(",
")",
")",
";",
"final",
"Testcases",
"tc",
"=",
"data",
".",
"... | Initializes XML-Data.
@param classname
Name of the testclass | [
"Initializes",
"XML",
"-",
"Data",
"."
] | a4939113cba73cb20a2c7d6dc8d34d0139a3e340 | https://github.com/DaGeRe/KoPeMe/blob/a4939113cba73cb20a2c7d6dc8d34d0139a3e340/kopeme-core/src/main/java/de/dagere/kopeme/datastorage/XMLDataStorer.java#L64-L70 | train |
ansell/csvsum | src/main/java/com/github/ansell/csv/sum/JSONSummariser.java | JSONSummariser.parseFieldsMap | public static void parseFieldsMap(final Reader inputReader, final Map<String, String> defaultsMap,
final Map<String, Optional<JsonPointer>> pathsMap) throws IOException, CSVStreamException {
CSVStream.parse(inputReader, h -> {
// TODO: Validate the headers as expected
}, (h, l) -> {
defaultsMap.put(l.get(h.indexOf(FIELD)), l.get(h.indexOf(DEFAULT)));
String relativePath = l.get(h.indexOf(RELATIVE_PATH)).trim();
pathsMap.put(l.get(h.indexOf(FIELD)),
relativePath.isEmpty() ? Optional.empty() : Optional.of(JsonPointer.compile(relativePath)));
return l;
}, l -> {
}, null, CSVStream.DEFAULT_HEADER_COUNT);
} | java | public static void parseFieldsMap(final Reader inputReader, final Map<String, String> defaultsMap,
final Map<String, Optional<JsonPointer>> pathsMap) throws IOException, CSVStreamException {
CSVStream.parse(inputReader, h -> {
// TODO: Validate the headers as expected
}, (h, l) -> {
defaultsMap.put(l.get(h.indexOf(FIELD)), l.get(h.indexOf(DEFAULT)));
String relativePath = l.get(h.indexOf(RELATIVE_PATH)).trim();
pathsMap.put(l.get(h.indexOf(FIELD)),
relativePath.isEmpty() ? Optional.empty() : Optional.of(JsonPointer.compile(relativePath)));
return l;
}, l -> {
}, null, CSVStream.DEFAULT_HEADER_COUNT);
} | [
"public",
"static",
"void",
"parseFieldsMap",
"(",
"final",
"Reader",
"inputReader",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"defaultsMap",
",",
"final",
"Map",
"<",
"String",
",",
"Optional",
"<",
"JsonPointer",
">",
">",
"pathsMap",
")",
... | Parse field definitions from the input reader into the defaults map and the
paths map.
@param inputReader
The {@link Reader} containing the CSV file with the field
definitions.
@param defaultsMap
The {@link Map} to store the defaults into, keyed by field name.
@param pathsMap
The {@link Map} to store the relative {@link JsonPointer} paths
into, keyed by the field name.
@throws IOException
If there is an issue accessing the resource.
@throws CSVStreamException
If there is an issue with the CSV syntax. | [
"Parse",
"field",
"definitions",
"from",
"the",
"input",
"reader",
"into",
"the",
"defaults",
"map",
"and",
"the",
"paths",
"map",
"."
] | 6916f4d9ca48ceb940c668778626a3c9ce26587a | https://github.com/ansell/csvsum/blob/6916f4d9ca48ceb940c668778626a3c9ce26587a/src/main/java/com/github/ansell/csv/sum/JSONSummariser.java#L231-L243 | train |
ansell/csvsum | src/main/java/com/github/ansell/csv/sum/JSONSummariser.java | JSONSummariser.getSummaryFunctionWithStartTime | public static TriFunction<JsonNode, List<String>, List<String>, List<String>> getSummaryFunctionWithStartTime(
final JDefaultDict<String, AtomicInteger> emptyCounts,
final JDefaultDict<String, AtomicInteger> nonEmptyCounts,
final JDefaultDict<String, AtomicBoolean> possibleIntegerFields,
final JDefaultDict<String, AtomicBoolean> possibleDoubleFields,
final JDefaultDict<String, JDefaultDict<String, AtomicInteger>> valueCounts, final AtomicInteger rowCount,
final long startTime) {
return (node, header, line) -> {
int nextLineNumber = rowCount.incrementAndGet();
if (nextLineNumber % 10000 == 0) {
double secondsSinceStart = (System.currentTimeMillis() - startTime) / 1000.0d;
System.out.printf("%d\tSeconds since start: %f\tRecords per second: %f%n", nextLineNumber,
secondsSinceStart, nextLineNumber / secondsSinceStart);
}
for (int i = 0; i < header.size(); i++) {
if (line.get(i).trim().isEmpty()) {
emptyCounts.get(header.get(i)).incrementAndGet();
} else {
nonEmptyCounts.get(header.get(i)).incrementAndGet();
valueCounts.get(header.get(i)).get(line.get(i)).incrementAndGet();
try {
Integer.parseInt(line.get(i));
} catch (NumberFormatException nfe) {
possibleIntegerFields.get(header.get(i)).set(false);
}
try {
Double.parseDouble(line.get(i));
} catch (NumberFormatException nfe) {
possibleDoubleFields.get(header.get(i)).set(false);
}
}
}
return line;
};
} | java | public static TriFunction<JsonNode, List<String>, List<String>, List<String>> getSummaryFunctionWithStartTime(
final JDefaultDict<String, AtomicInteger> emptyCounts,
final JDefaultDict<String, AtomicInteger> nonEmptyCounts,
final JDefaultDict<String, AtomicBoolean> possibleIntegerFields,
final JDefaultDict<String, AtomicBoolean> possibleDoubleFields,
final JDefaultDict<String, JDefaultDict<String, AtomicInteger>> valueCounts, final AtomicInteger rowCount,
final long startTime) {
return (node, header, line) -> {
int nextLineNumber = rowCount.incrementAndGet();
if (nextLineNumber % 10000 == 0) {
double secondsSinceStart = (System.currentTimeMillis() - startTime) / 1000.0d;
System.out.printf("%d\tSeconds since start: %f\tRecords per second: %f%n", nextLineNumber,
secondsSinceStart, nextLineNumber / secondsSinceStart);
}
for (int i = 0; i < header.size(); i++) {
if (line.get(i).trim().isEmpty()) {
emptyCounts.get(header.get(i)).incrementAndGet();
} else {
nonEmptyCounts.get(header.get(i)).incrementAndGet();
valueCounts.get(header.get(i)).get(line.get(i)).incrementAndGet();
try {
Integer.parseInt(line.get(i));
} catch (NumberFormatException nfe) {
possibleIntegerFields.get(header.get(i)).set(false);
}
try {
Double.parseDouble(line.get(i));
} catch (NumberFormatException nfe) {
possibleDoubleFields.get(header.get(i)).set(false);
}
}
}
return line;
};
} | [
"public",
"static",
"TriFunction",
"<",
"JsonNode",
",",
"List",
"<",
"String",
">",
",",
"List",
"<",
"String",
">",
",",
"List",
"<",
"String",
">",
">",
"getSummaryFunctionWithStartTime",
"(",
"final",
"JDefaultDict",
"<",
"String",
",",
"AtomicInteger",
... | Returns a function that can be used as a summary function, using the given
start time for timing analysis.
@param emptyCounts
A {@link JDefaultDict} used to store counts of non-empty fields,
based on {@link String#trim()} and {@link String#isEmpty()}.
@param nonEmptyCounts
A {@link JDefaultDict} used to store counts of non-empty fields,
based on {@link String#trim()} and {@link String#isEmpty()}.
@param possibleIntegerFields
A {@link JDefaultDict} used to store possible integer fields
@param possibleDoubleFields
A {@link JDefaultDict} used to store possible double fields
@param valueCounts
A {@link JDefaultDict} used to store value counts
@param rowCount
The row count variable
@param startTime
The start time reference, obtained using
{@link System#currentTimeMillis()}, for the timing analysis.
@return A function which can be passed to
{@link #parseForSummarise(Reader, ObjectMapper, JDefaultDict, JDefaultDict, JDefaultDict, JDefaultDict, JDefaultDict, AtomicInteger, Map, JsonPointer, Map)} | [
"Returns",
"a",
"function",
"that",
"can",
"be",
"used",
"as",
"a",
"summary",
"function",
"using",
"the",
"given",
"start",
"time",
"for",
"timing",
"analysis",
"."
] | 6916f4d9ca48ceb940c668778626a3c9ce26587a | https://github.com/ansell/csvsum/blob/6916f4d9ca48ceb940c668778626a3c9ce26587a/src/main/java/com/github/ansell/csv/sum/JSONSummariser.java#L399-L433 | train |
oboehm/jfachwert | src/main/java/de/jfachwert/net/ChatAccount.java | ChatAccount.toMap | @Override
public Map<String, Object> toMap() {
Map<String, Object> map = new HashMap<>();
map.put("chatDienst", getChatDienst());
map.put("dienstName", getDienstName());
map.put("account", getAccount());
return map;
} | java | @Override
public Map<String, Object> toMap() {
Map<String, Object> map = new HashMap<>();
map.put("chatDienst", getChatDienst());
map.put("dienstName", getDienstName());
map.put("account", getAccount());
return map;
} | [
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"toMap",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"chatDienst\"",
",",
"getChatDienst",
... | Liefert die einzelnen Attribute eines ChatAccounts als Map.
@return Attribute als Map | [
"Liefert",
"die",
"einzelnen",
"Attribute",
"eines",
"ChatAccounts",
"als",
"Map",
"."
] | 67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b | https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/net/ChatAccount.java#L206-L213 | train |
hdbeukel/james-extensions | src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java | AnalysisResults.merge | public AnalysisResults<SolutionType> merge(AnalysisResults<SolutionType> otherResults){
otherResults.results.keySet().forEach(problemID -> {
otherResults.results.get(problemID).keySet().forEach(searchID -> {
List<SearchRunResults<SolutionType>> runs = otherResults.results.get(problemID).get(searchID);
runs.forEach(run -> {
// deep copy run
SearchRunResults<SolutionType> runCopy = new SearchRunResults<>(run);
// register in this results object
registerSearchRun(problemID, searchID, runCopy);
});
});
});
return this;
} | java | public AnalysisResults<SolutionType> merge(AnalysisResults<SolutionType> otherResults){
otherResults.results.keySet().forEach(problemID -> {
otherResults.results.get(problemID).keySet().forEach(searchID -> {
List<SearchRunResults<SolutionType>> runs = otherResults.results.get(problemID).get(searchID);
runs.forEach(run -> {
// deep copy run
SearchRunResults<SolutionType> runCopy = new SearchRunResults<>(run);
// register in this results object
registerSearchRun(problemID, searchID, runCopy);
});
});
});
return this;
} | [
"public",
"AnalysisResults",
"<",
"SolutionType",
">",
"merge",
"(",
"AnalysisResults",
"<",
"SolutionType",
">",
"otherResults",
")",
"{",
"otherResults",
".",
"results",
".",
"keySet",
"(",
")",
".",
"forEach",
"(",
"problemID",
"->",
"{",
"otherResults",
".... | Merge the given results into this results object. A copy of the newly added search
runs is made.
@param otherResults other results to be merged into this results object
@return a reference to the updated results object | [
"Merge",
"the",
"given",
"results",
"into",
"this",
"results",
"object",
".",
"A",
"copy",
"of",
"the",
"newly",
"added",
"search",
"runs",
"is",
"made",
"."
] | 37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2 | https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java#L58-L71 | train |
hdbeukel/james-extensions | src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java | AnalysisResults.registerSearchRun | public void registerSearchRun(String problemID, String searchID, SearchRunResults<SolutionType> run){
if(!results.containsKey(problemID)){
results.put(problemID, new HashMap<>());
}
if(!results.get(problemID).containsKey(searchID)){
results.get(problemID).put(searchID, new ArrayList<>());
}
results.get(problemID).get(searchID).add(run);
} | java | public void registerSearchRun(String problemID, String searchID, SearchRunResults<SolutionType> run){
if(!results.containsKey(problemID)){
results.put(problemID, new HashMap<>());
}
if(!results.get(problemID).containsKey(searchID)){
results.get(problemID).put(searchID, new ArrayList<>());
}
results.get(problemID).get(searchID).add(run);
} | [
"public",
"void",
"registerSearchRun",
"(",
"String",
"problemID",
",",
"String",
"searchID",
",",
"SearchRunResults",
"<",
"SolutionType",
">",
"run",
")",
"{",
"if",
"(",
"!",
"results",
".",
"containsKey",
"(",
"problemID",
")",
")",
"{",
"results",
".",
... | Register results of a search run, specifying the IDs of the problem being solved and the applied search.
If no runs have been registered before for this combination of problem and search, new entries are created.
Else, this run is appended to the existing runs.
@param problemID ID of the problem being solved
@param searchID ID of the applied search
@param run results of the search run | [
"Register",
"results",
"of",
"a",
"search",
"run",
"specifying",
"the",
"IDs",
"of",
"the",
"problem",
"being",
"solved",
"and",
"the",
"applied",
"search",
".",
"If",
"no",
"runs",
"have",
"been",
"registered",
"before",
"for",
"this",
"combination",
"of",
... | 37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2 | https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java#L82-L90 | train |
hdbeukel/james-extensions | src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java | AnalysisResults.getNumSearches | public int getNumSearches(String problemID){
if(!results.containsKey(problemID)){
throw new UnknownIDException("Unknown problem ID " + problemID + ".");
}
return results.get(problemID).size();
} | java | public int getNumSearches(String problemID){
if(!results.containsKey(problemID)){
throw new UnknownIDException("Unknown problem ID " + problemID + ".");
}
return results.get(problemID).size();
} | [
"public",
"int",
"getNumSearches",
"(",
"String",
"problemID",
")",
"{",
"if",
"(",
"!",
"results",
".",
"containsKey",
"(",
"problemID",
")",
")",
"{",
"throw",
"new",
"UnknownIDException",
"(",
"\"Unknown problem ID \"",
"+",
"problemID",
"+",
"\".\"",
")",
... | Get the number of different searches that have been applied to solve the problem with the given ID.
@param problemID ID of the problem
@return number of different searches applied to solve the problem
@throws UnknownIDException if an unknown problem ID is given | [
"Get",
"the",
"number",
"of",
"different",
"searches",
"that",
"have",
"been",
"applied",
"to",
"solve",
"the",
"problem",
"with",
"the",
"given",
"ID",
"."
] | 37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2 | https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java#L117-L122 | train |
hdbeukel/james-extensions | src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java | AnalysisResults.getNumRuns | public int getNumRuns(String problemID, String searchID){
if(!results.containsKey(problemID)){
throw new UnknownIDException("Unknown problem ID " + problemID + ".");
}
if(!results.get(problemID).containsKey(searchID)){
throw new UnknownIDException("Unknown search ID " + searchID + " for problem " + problemID + ".");
}
return results.get(problemID).get(searchID).size();
} | java | public int getNumRuns(String problemID, String searchID){
if(!results.containsKey(problemID)){
throw new UnknownIDException("Unknown problem ID " + problemID + ".");
}
if(!results.get(problemID).containsKey(searchID)){
throw new UnknownIDException("Unknown search ID " + searchID + " for problem " + problemID + ".");
}
return results.get(problemID).get(searchID).size();
} | [
"public",
"int",
"getNumRuns",
"(",
"String",
"problemID",
",",
"String",
"searchID",
")",
"{",
"if",
"(",
"!",
"results",
".",
"containsKey",
"(",
"problemID",
")",
")",
"{",
"throw",
"new",
"UnknownIDException",
"(",
"\"Unknown problem ID \"",
"+",
"problemI... | Get the number of performed runs of the given search when solving the given problem.
@param problemID ID of the problem
@param searchID ID of the applied search
@return number of performed runs of the given search when solving the given problem
@throws UnknownIDException if an unknown problem or search ID is given | [
"Get",
"the",
"number",
"of",
"performed",
"runs",
"of",
"the",
"given",
"search",
"when",
"solving",
"the",
"given",
"problem",
"."
] | 37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2 | https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java#L147-L155 | train |
hdbeukel/james-extensions | src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java | AnalysisResults.getRun | public SearchRunResults<SolutionType> getRun(String problemID, String searchID, int i){
if(!results.containsKey(problemID)){
throw new UnknownIDException("Unknown problem ID " + problemID + ".");
}
if(!results.get(problemID).containsKey(searchID)){
throw new UnknownIDException("Unknown search ID " + searchID + " for problem " + problemID + ".");
}
return results.get(problemID).get(searchID).get(i);
} | java | public SearchRunResults<SolutionType> getRun(String problemID, String searchID, int i){
if(!results.containsKey(problemID)){
throw new UnknownIDException("Unknown problem ID " + problemID + ".");
}
if(!results.get(problemID).containsKey(searchID)){
throw new UnknownIDException("Unknown search ID " + searchID + " for problem " + problemID + ".");
}
return results.get(problemID).get(searchID).get(i);
} | [
"public",
"SearchRunResults",
"<",
"SolutionType",
">",
"getRun",
"(",
"String",
"problemID",
",",
"String",
"searchID",
",",
"int",
"i",
")",
"{",
"if",
"(",
"!",
"results",
".",
"containsKey",
"(",
"problemID",
")",
")",
"{",
"throw",
"new",
"UnknownIDEx... | Get the results of the i-th performed run of the given search when solving the given problem.
@param problemID ID of the problem
@param searchID ID of the applied search
@param i search run index
@return results of i-th run of the given search when solving the given problem
@throws UnknownIDException if an unknown problem or search ID is given
@throws IndexOutOfBoundsException if there is no i-th run for this search and problem | [
"Get",
"the",
"results",
"of",
"the",
"i",
"-",
"th",
"performed",
"run",
"of",
"the",
"given",
"search",
"when",
"solving",
"the",
"given",
"problem",
"."
] | 37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2 | https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/analysis/AnalysisResults.java#L167-L175 | train |
eduarddrenth/ConfigurableReports | src/main/java/com/vectorprint/report/itext/mappingconfig/AbstractDatamappingProcessor.java | AbstractDatamappingProcessor.addToContainer | @Override
public void addToContainer(Element container, Element element) throws DocumentException, VectorPrintException {
if (container instanceof TextElementArray) {
if (element instanceof Image) {
((TextElementArray) container).add(new Chunk((Image) element, 0, 0, true));
} else {
((TextElementArray) container).add(element);
}
} else if (container instanceof PdfPTable) {
if (element instanceof PdfPCell) {
((PdfPTable) container).addCell((PdfPCell) element);
} else if (element instanceof Phrase) {
((PdfPTable) container).addCell((Phrase) element);
} else if (element instanceof PdfPTable) {
((PdfPTable) container).addCell((PdfPTable) element);
} else if (element instanceof Image) {
((PdfPTable) container).addCell((Image) element);
} else {
throw new VectorPrintException(String.format("don't know how to add %s to %s", (element == null) ? "null" : element.getClass().getName(), (container == null) ? "null" : container.getClass().getName()));
}
} else if (container instanceof PdfPCell) {
if (element instanceof PdfPTable) {
throw new VectorPrintException(String.format("use %s.%s if you want to nest tables", CONTAINER_ELEMENT.class.getName(), CONTAINER_ELEMENT.NESTED_TABLE));
}
((PdfPCell) container).addElement(element);
} else if (container instanceof ColumnText) {
((ColumnText) container).addElement(element);
} else {
throw new VectorPrintException(String.format("don't know how to add %s to %s", (element == null) ? "null" : element.getClass().getName(), (container == null) ? "null" : container.getClass().getName()));
}
} | java | @Override
public void addToContainer(Element container, Element element) throws DocumentException, VectorPrintException {
if (container instanceof TextElementArray) {
if (element instanceof Image) {
((TextElementArray) container).add(new Chunk((Image) element, 0, 0, true));
} else {
((TextElementArray) container).add(element);
}
} else if (container instanceof PdfPTable) {
if (element instanceof PdfPCell) {
((PdfPTable) container).addCell((PdfPCell) element);
} else if (element instanceof Phrase) {
((PdfPTable) container).addCell((Phrase) element);
} else if (element instanceof PdfPTable) {
((PdfPTable) container).addCell((PdfPTable) element);
} else if (element instanceof Image) {
((PdfPTable) container).addCell((Image) element);
} else {
throw new VectorPrintException(String.format("don't know how to add %s to %s", (element == null) ? "null" : element.getClass().getName(), (container == null) ? "null" : container.getClass().getName()));
}
} else if (container instanceof PdfPCell) {
if (element instanceof PdfPTable) {
throw new VectorPrintException(String.format("use %s.%s if you want to nest tables", CONTAINER_ELEMENT.class.getName(), CONTAINER_ELEMENT.NESTED_TABLE));
}
((PdfPCell) container).addElement(element);
} else if (container instanceof ColumnText) {
((ColumnText) container).addElement(element);
} else {
throw new VectorPrintException(String.format("don't know how to add %s to %s", (element == null) ? "null" : element.getClass().getName(), (container == null) ? "null" : container.getClass().getName()));
}
} | [
"@",
"Override",
"public",
"void",
"addToContainer",
"(",
"Element",
"container",
",",
"Element",
"element",
")",
"throws",
"DocumentException",
",",
"VectorPrintException",
"{",
"if",
"(",
"container",
"instanceof",
"TextElementArray",
")",
"{",
"if",
"(",
"eleme... | attempts to add an element to a container
@param container
@param element
@throws DocumentException | [
"attempts",
"to",
"add",
"an",
"element",
"to",
"a",
"container"
] | b5fb7a89e16d9b35f557f3bf620594f821fa1552 | https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/mappingconfig/AbstractDatamappingProcessor.java#L222-L252 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static BooleanSupplier spy(BooleanSupplier proposition, Box<Boolean> result) {
return new CapturingProposition(proposition, result);
} | java | public static BooleanSupplier spy(BooleanSupplier proposition, Box<Boolean> result) {
return new CapturingProposition(proposition, result);
} | [
"public",
"static",
"BooleanSupplier",
"spy",
"(",
"BooleanSupplier",
"proposition",
",",
"Box",
"<",
"Boolean",
">",
"result",
")",
"{",
"return",
"new",
"CapturingProposition",
"(",
"proposition",
",",
"result",
")",
";",
"}"
] | Proxies a proposition, spying for result.
@param proposition the proposition to be spied
@param result a box that will be containing spied result
@return the proxied proposition | [
"Proxies",
"a",
"proposition",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L32-L34 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <R> Supplier<R> spy(Supplier<R> supplier, Box<R> result) {
return new CapturingSupplier<R>(supplier, result);
} | java | public static <R> Supplier<R> spy(Supplier<R> supplier, Box<R> result) {
return new CapturingSupplier<R>(supplier, result);
} | [
"public",
"static",
"<",
"R",
">",
"Supplier",
"<",
"R",
">",
"spy",
"(",
"Supplier",
"<",
"R",
">",
"supplier",
",",
"Box",
"<",
"R",
">",
"result",
")",
"{",
"return",
"new",
"CapturingSupplier",
"<",
"R",
">",
"(",
"supplier",
",",
"result",
")"... | Proxies a supplier, spying for result.
@param <R> the supplier result type
@param supplier the supplier to be spied
@param result a box that will be containing spied result
@return the proxied supplier | [
"Proxies",
"a",
"supplier",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L44-L46 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T, R> Function<T, R> spy(Function<T, R> function, Box<R> result, Box<T> param) {
return new CapturingFunction<>(function, result, param);
} | java | public static <T, R> Function<T, R> spy(Function<T, R> function, Box<R> result, Box<T> param) {
return new CapturingFunction<>(function, result, param);
} | [
"public",
"static",
"<",
"T",
",",
"R",
">",
"Function",
"<",
"T",
",",
"R",
">",
"spy",
"(",
"Function",
"<",
"T",
",",
"R",
">",
"function",
",",
"Box",
"<",
"R",
">",
"result",
",",
"Box",
"<",
"T",
">",
"param",
")",
"{",
"return",
"new",... | Proxies a function spying for result and parameter.
@param <T> the function parameter type
@param <R> the function result type
@param function the function to be spied
@param result a box that will be containing spied result
@param param a box that will be containing spied param
@return the proxied function | [
"Proxies",
"a",
"function",
"spying",
"for",
"result",
"and",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L58-L60 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T1, T2, R> BiFunction<T1, T2, R> spy(BiFunction<T1, T2, R> function, Box<R> result, Box<T1> param1, Box<T2> param2) {
return new BinaryCapturingFunction<>(function, result, param1, param2);
} | java | public static <T1, T2, R> BiFunction<T1, T2, R> spy(BiFunction<T1, T2, R> function, Box<R> result, Box<T1> param1, Box<T2> param2) {
return new BinaryCapturingFunction<>(function, result, param1, param2);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"spy",
"(",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"function",
",",
"Box",
"<",
"R",
">",
"result",
",",
"Box",
"<",
"T1",... | Proxies a binary function spying for result and parameters.
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <R> the function result type
@param function the function to be spied
@param result a box that will be containing spied result
@param param1 a box that will be containing the first spied parameter
@param param2 a box that will be containing the second spied parameter
@return the proxied function | [
"Proxies",
"a",
"binary",
"function",
"spying",
"for",
"result",
"and",
"parameters",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L74-L76 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy(TriFunction<T1, T2, T3, R> function, Box<R> result, Box<T1> param1, Box<T2> param2, Box<T3> param3) {
return new TernaryCapturingFunction<T1, T2, T3, R>(function, result, param1, param2, param3);
} | java | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy(TriFunction<T1, T2, T3, R> function, Box<R> result, Box<T1> param1, Box<T2> param2, Box<T3> param3) {
return new TernaryCapturingFunction<T1, T2, T3, R>(function, result, param1, param2, param3);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"spy",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"function",
",",
"Box",
"<",
"R",
... | Proxies a ternary function spying for result and parameters.
@param <R> the function result type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function to be spied
@param result a box that will be containing spied result
@param param1 a box that will be containing the first spied parameter
@param param2 a box that will be containing the second spied parameter
@param param3 a box that will be containing the third spied parameter
@return the proxied function | [
"Proxies",
"a",
"ternary",
"function",
"spying",
"for",
"result",
"and",
"parameters",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L92-L94 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T> Predicate<T> spy(Predicate<T> predicate, Box<Boolean> result, Box<T> param) {
return new CapturingPredicate<T>(predicate, result, param);
} | java | public static <T> Predicate<T> spy(Predicate<T> predicate, Box<Boolean> result, Box<T> param) {
return new CapturingPredicate<T>(predicate, result, param);
} | [
"public",
"static",
"<",
"T",
">",
"Predicate",
"<",
"T",
">",
"spy",
"(",
"Predicate",
"<",
"T",
">",
"predicate",
",",
"Box",
"<",
"Boolean",
">",
"result",
",",
"Box",
"<",
"T",
">",
"param",
")",
"{",
"return",
"new",
"CapturingPredicate",
"<",
... | Proxies a predicate spying for result and parameter.
@param <T> the predicate parameter type
@param predicate the predicateto be spied
@param result a box that will be containing spied result
@param param a box that will be containing the spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"predicate",
"spying",
"for",
"result",
"and",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L105-L107 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T1, T2> BiPredicate<T1, T2> spy(BiPredicate<T1, T2> predicate, Box<Boolean> result, Box<T1> param1, Box<T2> param2) {
return new BinaryCapturingPredicate<T1, T2>(predicate, result, param1, param2);
} | java | public static <T1, T2> BiPredicate<T1, T2> spy(BiPredicate<T1, T2> predicate, Box<Boolean> result, Box<T1> param1, Box<T2> param2) {
return new BinaryCapturingPredicate<T1, T2>(predicate, result, param1, param2);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"spy",
"(",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"predicate",
",",
"Box",
"<",
"Boolean",
">",
"result",
",",
"Box",
"<",
"T1",
">",
"param1",
",",
"Box... | Proxies a binary predicate spying for result and parameters.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param predicate the predicate to be spied
@param result a box that will be containing spied result
@param param1 a box that will be containing the first spied parameter
@param param2 a box that will be containing the second spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"binary",
"predicate",
"spying",
"for",
"result",
"and",
"parameters",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L120-L122 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy(TriPredicate<T1, T2, T3> predicate, Box<Boolean> result, Box<T1> param1, Box<T2> param2, Box<T3> param3) {
return new TernaryCapturingPredicate<T1, T2, T3>(predicate, result, param1, param2, param3);
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy(TriPredicate<T1, T2, T3> predicate, Box<Boolean> result, Box<T1> param1, Box<T2> param2, Box<T3> param3) {
return new TernaryCapturingPredicate<T1, T2, T3>(predicate, result, param1, param2, param3);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
",",
"Box",
"<",
"Boolean",
">",
"result",
",",
"Box",
... | Proxies a ternary predicate spying for result and parameters.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param predicate the predicate to be spied
@param result a box that will be containing spied result
@param param1 a box that will be containing the first spied parameter
@param param2 a box that will be containing the second spied parameter
@param param3 a box that will be containing the third spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"ternary",
"predicate",
"spying",
"for",
"result",
"and",
"parameters",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L137-L139 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T> Consumer<T> spy(Consumer<T> consumer, Box<T> param) {
return new CapturingConsumer<T>(consumer, param);
} | java | public static <T> Consumer<T> spy(Consumer<T> consumer, Box<T> param) {
return new CapturingConsumer<T>(consumer, param);
} | [
"public",
"static",
"<",
"T",
">",
"Consumer",
"<",
"T",
">",
"spy",
"(",
"Consumer",
"<",
"T",
">",
"consumer",
",",
"Box",
"<",
"T",
">",
"param",
")",
"{",
"return",
"new",
"CapturingConsumer",
"<",
"T",
">",
"(",
"consumer",
",",
"param",
")",
... | Proxies an consumer spying for parameter.
@param <T> the consumer parameter type
@param consumer the consumer to be spied
@param param a box that will be containing the spied parameter
@return the proxied consumer | [
"Proxies",
"an",
"consumer",
"spying",
"for",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L149-L151 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T1, T2> BiConsumer<T1, T2> spy(BiConsumer<T1, T2> consumer, Box<T1> param1, Box<T2> param2) {
return new BinaryCapturingConsumer<T1, T2>(consumer, param1, param2);
} | java | public static <T1, T2> BiConsumer<T1, T2> spy(BiConsumer<T1, T2> consumer, Box<T1> param1, Box<T2> param2) {
return new BinaryCapturingConsumer<T1, T2>(consumer, param1, param2);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"spy",
"(",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"consumer",
",",
"Box",
"<",
"T1",
">",
"param1",
",",
"Box",
"<",
"T2",
">",
"param2",
")",
"{",
"retu... | Proxies a binary consumer spying for parameters.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param consumer the consumer that will be spied
@param param1 a box that will be containing the first spied parameter
@param param2 a box that will be containing the second spied parameter
@return the proxied consumer | [
"Proxies",
"a",
"binary",
"consumer",
"spying",
"for",
"parameters",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L163-L165 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy(TriConsumer<T1, T2, T3> consumer, Box<T1> param1, Box<T2> param2, Box<T3> param3) {
return new TernaryCapturingConsumer<T1, T2, T3>(consumer, param1, param2, param3);
} | java | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy(TriConsumer<T1, T2, T3> consumer, Box<T1> param1, Box<T2> param2, Box<T3> param3) {
return new TernaryCapturingConsumer<T1, T2, T3>(consumer, param1, param2, param3);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy",
"(",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"consumer",
",",
"Box",
"<",
"T1",
">",
"param1",
",",
"Box",
"<",
... | Proxies a ternary consumer spying for parameters.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param <T3> the consumer third parameter type
@param consumer the consumer that will be spied
@param param1 a box that will be containing the first spied parameter
@param param2 a box that will be containing the second spied parameter
@param param3 a box that will be containing the third spied parameter
@return the proxied consumer | [
"Proxies",
"a",
"ternary",
"consumer",
"spying",
"for",
"parameters",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L179-L181 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spyRes | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spyRes(TriFunction<T1, T2, T3, R> function, Box<R> result) {
return spy(function, result, Box.<T1>empty(), Box.<T2>empty(), Box.<T3>empty());
} | java | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spyRes(TriFunction<T1, T2, T3, R> function, Box<R> result) {
return spy(function, result, Box.<T1>empty(), Box.<T2>empty(), Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"spyRes",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"function",
",",
"Box",
"<",
"R",... | Proxies a ternary function spying for result.
@param <R> the function result type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function that will be spied
@param result a box that will be containing spied result
@return the proxied function | [
"Proxies",
"a",
"ternary",
"function",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L194-L196 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy1st | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy1st(TriFunction<T1, T2, T3, R> function, Box<T1> param1) {
return spy(function, Box.<R>empty(), param1, Box.<T2>empty(), Box.<T3>empty());
} | java | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy1st(TriFunction<T1, T2, T3, R> function, Box<T1> param1) {
return spy(function, Box.<R>empty(), param1, Box.<T2>empty(), Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"spy1st",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"function",
",",
"Box",
"<",
"T1"... | Proxies a ternary function spying for first parameter.
@param <R> the function result type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function that will be spied
@param param1 a box that will be containing the first spied parameter
@return the proxied function | [
"Proxies",
"a",
"ternary",
"function",
"spying",
"for",
"first",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L209-L211 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy2nd | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy2nd(TriFunction<T1, T2, T3, R> function, Box<T2> param2) {
return spy(function, Box.<R>empty(), Box.<T1>empty(), param2, Box.<T3>empty());
} | java | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy2nd(TriFunction<T1, T2, T3, R> function, Box<T2> param2) {
return spy(function, Box.<R>empty(), Box.<T1>empty(), param2, Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"spy2nd",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"function",
",",
"Box",
"<",
"T2"... | Proxies a ternary function spying for second parameter
@param <R> the function result type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function that will be spied
@param param2 a box that will be containing the second spied parameter
@return the proxied function | [
"Proxies",
"a",
"ternary",
"function",
"spying",
"for",
"second",
"parameter"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L224-L226 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy3rd | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy3rd(TriFunction<T1, T2, T3, R> function, Box<T3> param3) {
return spy(function, Box.<R>empty(), Box.<T1>empty(), Box.<T2>empty(), param3);
} | java | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> spy3rd(TriFunction<T1, T2, T3, R> function, Box<T3> param3) {
return spy(function, Box.<R>empty(), Box.<T1>empty(), Box.<T2>empty(), param3);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"spy3rd",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"function",
",",
"Box",
"<",
"T3"... | Proxies a ternary function spying for third parameter.
@param <R> the function result type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function that will be spied
@param param3 a box that will be containing the third spied parameter
@return the proxied function | [
"Proxies",
"a",
"ternary",
"function",
"spying",
"for",
"third",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L239-L241 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spyRes | public static <T1, T2, R> BiFunction<T1, T2, R> spyRes(BiFunction<T1, T2, R> function, Box<R> result) {
return spy(function, result, Box.<T1>empty(), Box.<T2>empty());
} | java | public static <T1, T2, R> BiFunction<T1, T2, R> spyRes(BiFunction<T1, T2, R> function, Box<R> result) {
return spy(function, result, Box.<T1>empty(), Box.<T2>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"spyRes",
"(",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"function",
",",
"Box",
"<",
"R",
">",
"result",
")",
"{",
"return",
... | Proxies a binary function spying for result.
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <R> the function result type
@param function the function that will be spied
@param result a box that will be containing spied result
@return the proxied function | [
"Proxies",
"a",
"binary",
"function",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L253-L255 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy1st | public static <T1, T2, R> BiFunction<T1, T2, R> spy1st(BiFunction<T1, T2, R> function, Box<T1> param1) {
return spy(function, Box.<R>empty(), param1, Box.<T2>empty());
} | java | public static <T1, T2, R> BiFunction<T1, T2, R> spy1st(BiFunction<T1, T2, R> function, Box<T1> param1) {
return spy(function, Box.<R>empty(), param1, Box.<T2>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"spy1st",
"(",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"function",
",",
"Box",
"<",
"T1",
">",
"param1",
")",
"{",
"return",
... | Proxies a binary function spying for first parameter.
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <R> the function result type
@param function the function that will be spied
@param param1 a box that will be containing the first spied parameter
@return the proxied function | [
"Proxies",
"a",
"binary",
"function",
"spying",
"for",
"first",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L267-L269 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy2nd | public static <T1, T2, R> BiFunction<T1, T2, R> spy2nd(BiFunction<T1, T2, R> function, Box<T2> param2) {
return spy(function, Box.<R>empty(), Box.<T1>empty(), param2);
} | java | public static <T1, T2, R> BiFunction<T1, T2, R> spy2nd(BiFunction<T1, T2, R> function, Box<T2> param2) {
return spy(function, Box.<R>empty(), Box.<T1>empty(), param2);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"spy2nd",
"(",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"function",
",",
"Box",
"<",
"T2",
">",
"param2",
")",
"{",
"return",
... | Proxies a binary function spying for second parameter.
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <R> the function result type
@param function the function that will be spied
@param param2 a box that will be containing the second spied parameter
@return the proxied function | [
"Proxies",
"a",
"binary",
"function",
"spying",
"for",
"second",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L281-L283 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spyRes | public static <R, T> Function<T, R> spyRes(Function<T, R> function, Box<R> result) {
return spy(function, result, Box.<T>empty());
} | java | public static <R, T> Function<T, R> spyRes(Function<T, R> function, Box<R> result) {
return spy(function, result, Box.<T>empty());
} | [
"public",
"static",
"<",
"R",
",",
"T",
">",
"Function",
"<",
"T",
",",
"R",
">",
"spyRes",
"(",
"Function",
"<",
"T",
",",
"R",
">",
"function",
",",
"Box",
"<",
"R",
">",
"result",
")",
"{",
"return",
"spy",
"(",
"function",
",",
"result",
",... | Proxies a function spying for result.
@param <R> the function result type
@param <T> the function parameter type
@param function the function that will be spied
@param result a box that will be containing spied result
@return the proxied function | [
"Proxies",
"a",
"function",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L294-L296 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy1st | public static <R, T> Function<T, R> spy1st(Function<T, R> function, Box<T> param) {
return spy(function, Box.<R>empty(), param);
} | java | public static <R, T> Function<T, R> spy1st(Function<T, R> function, Box<T> param) {
return spy(function, Box.<R>empty(), param);
} | [
"public",
"static",
"<",
"R",
",",
"T",
">",
"Function",
"<",
"T",
",",
"R",
">",
"spy1st",
"(",
"Function",
"<",
"T",
",",
"R",
">",
"function",
",",
"Box",
"<",
"T",
">",
"param",
")",
"{",
"return",
"spy",
"(",
"function",
",",
"Box",
".",
... | Proxies a function spying for parameter.
@param <R> the function result type
@param <T> the function parameter type
@param function the function that will be spied
@param param a box that will be containing spied parameter
@return the proxied function | [
"Proxies",
"a",
"function",
"spying",
"for",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L307-L309 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy1st | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy1st(TriConsumer<T1, T2, T3> consumer, Box<T1> param1) {
return spy(consumer, param1, Box.<T2>empty(), Box.<T3>empty());
} | java | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy1st(TriConsumer<T1, T2, T3> consumer, Box<T1> param1) {
return spy(consumer, param1, Box.<T2>empty(), Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy1st",
"(",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"consumer",
",",
"Box",
"<",
"T1",
">",
"param1",
")",
"{",
"retu... | Proxies a ternary consumer spying for first parameter.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param <T3> the consumer third parameter type
@param consumer the consumer that will be spied
@param param1 a box that will be containing the first spied parameter
@return the proxied consumer | [
"Proxies",
"a",
"ternary",
"consumer",
"spying",
"for",
"first",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L321-L323 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy2nd | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy2nd(TriConsumer<T1, T2, T3> consumer, Box<T2> param2) {
return spy(consumer, Box.<T1>empty(), param2, Box.<T3>empty());
} | java | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy2nd(TriConsumer<T1, T2, T3> consumer, Box<T2> param2) {
return spy(consumer, Box.<T1>empty(), param2, Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy2nd",
"(",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"consumer",
",",
"Box",
"<",
"T2",
">",
"param2",
")",
"{",
"retu... | Proxies a ternary consumer spying for second parameter.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param <T3> the consumer third parameter type
@param consumer the consumer that will be spied
@param param2 a box that will be containing the second spied parameter
@return the proxied consumer | [
"Proxies",
"a",
"ternary",
"consumer",
"spying",
"for",
"second",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L335-L337 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy3rd | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy3rd(TriConsumer<T1, T2, T3> consumer, Box<T3> param3) {
return spy(consumer, Box.<T1>empty(), Box.<T2>empty(), param3);
} | java | public static <T1, T2, T3> TriConsumer<T1, T2, T3> spy3rd(TriConsumer<T1, T2, T3> consumer, Box<T3> param3) {
return spy(consumer, Box.<T1>empty(), Box.<T2>empty(), param3);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy3rd",
"(",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"consumer",
",",
"Box",
"<",
"T3",
">",
"param3",
")",
"{",
"retu... | Proxies a ternary consumer spying for third parameter.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param <T3> the consumer third parameter type
@param consumer the consumer that will be spied
@param param3 a box that will be containing the third spied parameter
@return the proxied consumer | [
"Proxies",
"a",
"ternary",
"consumer",
"spying",
"for",
"third",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L349-L351 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy2nd | public static <T1, T2> BiConsumer<T1, T2> spy2nd(BiConsumer<T1, T2> consumer, Box<T2> param2) {
return spy(consumer, Box.<T1>empty(), param2);
} | java | public static <T1, T2> BiConsumer<T1, T2> spy2nd(BiConsumer<T1, T2> consumer, Box<T2> param2) {
return spy(consumer, Box.<T1>empty(), param2);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"spy2nd",
"(",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"consumer",
",",
"Box",
"<",
"T2",
">",
"param2",
")",
"{",
"return",
"spy",
"(",
"consumer",
",",
"Bo... | Proxies a binary consumer spying for second parameter.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param consumer the consumer that will be spied
@param param2 a box that will be containing the second spied parameter
@return the proxied consumer | [
"Proxies",
"a",
"binary",
"consumer",
"spying",
"for",
"second",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L375-L377 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spyRes | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spyRes(TriPredicate<T1, T2, T3> predicate, Box<Boolean> result) {
return spy(predicate, result, Box.<T1>empty(), Box.<T2>empty(), Box.<T3>empty());
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spyRes(TriPredicate<T1, T2, T3> predicate, Box<Boolean> result) {
return spy(predicate, result, Box.<T1>empty(), Box.<T2>empty(), Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spyRes",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
",",
"Box",
"<",
"Boolean",
">",
"result",
")",
"{",... | Proxies a ternary predicate spying for result.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param predicate the predicate that will be spied
@param result a box that will be containing spied result
@return the proxied predicate | [
"Proxies",
"a",
"ternary",
"predicate",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L401-L403 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy1st | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy1st(TriPredicate<T1, T2, T3> predicate, Box<T1> param1) {
return spy(predicate, Box.<Boolean>empty(), param1, Box.<T2>empty(), Box.<T3>empty());
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy1st(TriPredicate<T1, T2, T3> predicate, Box<T1> param1) {
return spy(predicate, Box.<Boolean>empty(), param1, Box.<T2>empty(), Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy1st",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
",",
"Box",
"<",
"T1",
">",
"param1",
")",
"{",
"r... | Proxies a ternary predicate spying for first parameter.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param predicate the predicate that will be spied
@param param1 a box that will be containing the first spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"ternary",
"predicate",
"spying",
"for",
"first",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L415-L417 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy2nd | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy2nd(TriPredicate<T1, T2, T3> predicate, Box<T2> param2) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), param2, Box.<T3>empty());
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy2nd(TriPredicate<T1, T2, T3> predicate, Box<T2> param2) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), param2, Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy2nd",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
",",
"Box",
"<",
"T2",
">",
"param2",
")",
"{",
"r... | Proxies a ternary predicate spying for second parameter.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param predicate the predicate that will be spied
@param param2 a box that will be containing the second spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"ternary",
"predicate",
"spying",
"for",
"second",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L429-L431 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy3rd | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy3rd(TriPredicate<T1, T2, T3> predicate, Box<T3> param3) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), Box.<T2>empty(), param3);
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy3rd(TriPredicate<T1, T2, T3> predicate, Box<T3> param3) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), Box.<T2>empty(), param3);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy3rd",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
",",
"Box",
"<",
"T3",
">",
"param3",
")",
"{",
"r... | Proxies a ternary predicate spying for third parameter.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param predicate the predicate that will be spied
@param param3 a box that will be containing the third spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"ternary",
"predicate",
"spying",
"for",
"third",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L443-L445 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spyRes | public static <T1, T2> BiPredicate<T1, T2> spyRes(BiPredicate<T1, T2> predicate, Box<Boolean> result) {
return spy(predicate, result, Box.<T1>empty(), Box.<T2>empty());
} | java | public static <T1, T2> BiPredicate<T1, T2> spyRes(BiPredicate<T1, T2> predicate, Box<Boolean> result) {
return spy(predicate, result, Box.<T1>empty(), Box.<T2>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"spyRes",
"(",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"predicate",
",",
"Box",
"<",
"Boolean",
">",
"result",
")",
"{",
"return",
"spy",
"(",
"predicate",
"... | Proxies a binary predicate spying for result.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param predicate the predicate that will be spied
@param result a box that will be containing spied result
@return the proxied predicate | [
"Proxies",
"a",
"binary",
"predicate",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L456-L458 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy1st | public static <T1, T2> BiPredicate<T1, T2> spy1st(BiPredicate<T1, T2> predicate, Box<T1> param1) {
return spy(predicate, Box.<Boolean>empty(), param1, Box.<T2>empty());
} | java | public static <T1, T2> BiPredicate<T1, T2> spy1st(BiPredicate<T1, T2> predicate, Box<T1> param1) {
return spy(predicate, Box.<Boolean>empty(), param1, Box.<T2>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"spy1st",
"(",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"predicate",
",",
"Box",
"<",
"T1",
">",
"param1",
")",
"{",
"return",
"spy",
"(",
"predicate",
",",
... | Proxies a binary predicate spying for first parameter
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param predicate the predicate that will be spied
@param param1 a box that will be containing the first spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"binary",
"predicate",
"spying",
"for",
"first",
"parameter"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L469-L471 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy2nd | public static <T1, T2> BiPredicate<T1, T2> spy2nd(BiPredicate<T1, T2> predicate, Box<T2> param2) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), param2);
} | java | public static <T1, T2> BiPredicate<T1, T2> spy2nd(BiPredicate<T1, T2> predicate, Box<T2> param2) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), param2);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"spy2nd",
"(",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"predicate",
",",
"Box",
"<",
"T2",
">",
"param2",
")",
"{",
"return",
"spy",
"(",
"predicate",
",",
... | Proxies a binary predicate spying for second parameter.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param predicate the predicate that will be spied
@param param2 a box that will be containing the second spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"binary",
"predicate",
"spying",
"for",
"second",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L482-L484 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spyRes | public static <T> Predicate<T> spyRes(Predicate<T> predicate, Box<Boolean> result) {
return spy(predicate, result, Box.<T>empty());
} | java | public static <T> Predicate<T> spyRes(Predicate<T> predicate, Box<Boolean> result) {
return spy(predicate, result, Box.<T>empty());
} | [
"public",
"static",
"<",
"T",
">",
"Predicate",
"<",
"T",
">",
"spyRes",
"(",
"Predicate",
"<",
"T",
">",
"predicate",
",",
"Box",
"<",
"Boolean",
">",
"result",
")",
"{",
"return",
"spy",
"(",
"predicate",
",",
"result",
",",
"Box",
".",
"<",
"T",... | Proxies a predicate spying for result.
@param <T> the predicate parameter type
@param predicate the predicate that will be spied
@param result a box that will be containing spied result
@return the proxied predicate | [
"Proxies",
"a",
"predicate",
"spying",
"for",
"result",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L494-L496 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy1st | public static <T> Predicate<T> spy1st(Predicate<T> predicate, Box<T> param) {
return spy(predicate, Box.<Boolean>empty(), param);
} | java | public static <T> Predicate<T> spy1st(Predicate<T> predicate, Box<T> param) {
return spy(predicate, Box.<Boolean>empty(), param);
} | [
"public",
"static",
"<",
"T",
">",
"Predicate",
"<",
"T",
">",
"spy1st",
"(",
"Predicate",
"<",
"T",
">",
"predicate",
",",
"Box",
"<",
"T",
">",
"param",
")",
"{",
"return",
"spy",
"(",
"predicate",
",",
"Box",
".",
"<",
"Boolean",
">",
"empty",
... | Proxies a predicate spying for parameter.
@param <T> the predicate parameter type
@param predicate the predicate that will be spied
@param param a box that will be containing spied parameter
@return the proxied predicate | [
"Proxies",
"a",
"predicate",
"spying",
"for",
"parameter",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L506-L508 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T> Consumer<T> monitor(Consumer<T> consumer, AtomicLong calls) {
return new MonitoringConsumer<T>(consumer, calls);
} | java | public static <T> Consumer<T> monitor(Consumer<T> consumer, AtomicLong calls) {
return new MonitoringConsumer<T>(consumer, calls);
} | [
"public",
"static",
"<",
"T",
">",
"Consumer",
"<",
"T",
">",
"monitor",
"(",
"Consumer",
"<",
"T",
">",
"consumer",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
"MonitoringConsumer",
"<",
"T",
">",
"(",
"consumer",
",",
"calls",
")",
";",
... | Monitors calls to an consumer.
@param <T> the consumer parameter type
@param consumer the consumer that will be monitored
@param calls a value holder accumulating calls
@return the proxied consumer | [
"Monitors",
"calls",
"to",
"an",
"consumer",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L518-L520 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T, R> Function<T, R> monitor(Function<T, R> function, AtomicLong calls) {
return new MonitoringFunction<>(function, calls);
} | java | public static <T, R> Function<T, R> monitor(Function<T, R> function, AtomicLong calls) {
return new MonitoringFunction<>(function, calls);
} | [
"public",
"static",
"<",
"T",
",",
"R",
">",
"Function",
"<",
"T",
",",
"R",
">",
"monitor",
"(",
"Function",
"<",
"T",
",",
"R",
">",
"function",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
"MonitoringFunction",
"<>",
"(",
"function",
","... | Monitors calls to a function.
@param <T> the function parameter type
@param <R> the function result type
@param function the function that will be monitored
@param calls a value holder accumulating calls
@return the proxied function | [
"Monitors",
"calls",
"to",
"a",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L531-L533 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T> Predicate<T> monitor(Predicate<T> predicate, AtomicLong calls) {
return new MonitoringPredicate<T>(predicate, calls);
} | java | public static <T> Predicate<T> monitor(Predicate<T> predicate, AtomicLong calls) {
return new MonitoringPredicate<T>(predicate, calls);
} | [
"public",
"static",
"<",
"T",
">",
"Predicate",
"<",
"T",
">",
"monitor",
"(",
"Predicate",
"<",
"T",
">",
"predicate",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
"MonitoringPredicate",
"<",
"T",
">",
"(",
"predicate",
",",
"calls",
")",
";... | Monitors calls to a predicate.
@param <T> the predicate parameter type
@param predicate the predicate that will be monitored
@param calls a value holder accumulating calls
@return the proxied predicate | [
"Monitors",
"calls",
"to",
"a",
"predicate",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L543-L545 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <R> Supplier<R> monitor(Supplier<R> supplier, AtomicLong calls) {
return new MonitoringSupplier<>(supplier, calls);
} | java | public static <R> Supplier<R> monitor(Supplier<R> supplier, AtomicLong calls) {
return new MonitoringSupplier<>(supplier, calls);
} | [
"public",
"static",
"<",
"R",
">",
"Supplier",
"<",
"R",
">",
"monitor",
"(",
"Supplier",
"<",
"R",
">",
"supplier",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
"MonitoringSupplier",
"<>",
"(",
"supplier",
",",
"calls",
")",
";",
"}"
] | Monitors calls to a supplier.
@param <R> the supplier result type
@param supplier the supplier that will be monitored
@param calls a value holder accumulating calls
@return the proxied supplier | [
"Monitors",
"calls",
"to",
"a",
"supplier",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L566-L568 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T1, T2> BiConsumer<T1, T2> monitor(BiConsumer<T1, T2> consumer, AtomicLong calls) {
return new BinaryMonitoringConsumer<T1, T2>(consumer, calls);
} | java | public static <T1, T2> BiConsumer<T1, T2> monitor(BiConsumer<T1, T2> consumer, AtomicLong calls) {
return new BinaryMonitoringConsumer<T1, T2>(consumer, calls);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"monitor",
"(",
"BiConsumer",
"<",
"T1",
",",
"T2",
">",
"consumer",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
"BinaryMonitoringConsumer",
"<",
"T1",
"... | Monitors calls to a binary consumer.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param consumer the consumer that will be monitored
@param calls a value holder accumulating calls
@return the proxied consumer | [
"Monitors",
"calls",
"to",
"a",
"binary",
"consumer",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L590-L592 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T1, T2, R> BiFunction<T1, T2, R> monitor(BiFunction<T1, T2, R> function, AtomicLong calls) {
return new BinaryMonitoringFunction<>(function, calls);
} | java | public static <T1, T2, R> BiFunction<T1, T2, R> monitor(BiFunction<T1, T2, R> function, AtomicLong calls) {
return new BinaryMonitoringFunction<>(function, calls);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"monitor",
"(",
"BiFunction",
"<",
"T1",
",",
"T2",
",",
"R",
">",
"function",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
"Bin... | Monitors calls to a binary function.
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <R> the function result type
@param function the function that will be monitored
@param calls a value holder accumulating calls
@return the proxied function | [
"Monitors",
"calls",
"to",
"a",
"binary",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L604-L606 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T1, T2> BiPredicate<T1, T2> monitor(BiPredicate<T1, T2> predicate, AtomicLong calls) {
return new BinaryMonitoringPredicate<T1, T2>(predicate, calls);
} | java | public static <T1, T2> BiPredicate<T1, T2> monitor(BiPredicate<T1, T2> predicate, AtomicLong calls) {
return new BinaryMonitoringPredicate<T1, T2>(predicate, calls);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"monitor",
"(",
"BiPredicate",
"<",
"T1",
",",
"T2",
">",
"predicate",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
"BinaryMonitoringPredicate",
"<",
"T1",... | Monitors calls to a binary predicate
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param predicate the predicate that will be monitored
@param calls a value holder accumulating calls
@return the proxied predicate | [
"Monitors",
"calls",
"to",
"a",
"binary",
"predicate"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L617-L619 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T1, T2, T3> TriConsumer<T1, T2, T3> monitor(TriConsumer<T1, T2, T3> consumer, AtomicLong calls) {
return new TernaryMonitoringConsumer<T1, T2, T3>(consumer, calls);
} | java | public static <T1, T2, T3> TriConsumer<T1, T2, T3> monitor(TriConsumer<T1, T2, T3> consumer, AtomicLong calls) {
return new TernaryMonitoringConsumer<T1, T2, T3>(consumer, calls);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"monitor",
"(",
"TriConsumer",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"consumer",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new",
... | Monitors calls to a ternary consumer.
@param <T1> the consumer first parameter type
@param <T2> the consumer second parameter type
@param <T3> the consumer third parameter type
@param consumer the consumer that will be monitored
@param calls a value holder accumulating calls
@return the proxied consumer | [
"Monitors",
"calls",
"to",
"a",
"ternary",
"consumer",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L631-L633 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> monitor(TriFunction<T1, T2, T3, R> function, AtomicLong calls) {
return new TernaryMonitoringFunction<T1, T2, T3, R>(function, calls);
} | java | public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> monitor(TriFunction<T1, T2, T3, R> function, AtomicLong calls) {
return new TernaryMonitoringFunction<T1, T2, T3, R>(function, calls);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"monitor",
"(",
"TriFunction",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"R",
">",
"function",
",",
"AtomicLong",
"ca... | Monitors calls to a ternary function.
@param <R> the function result type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param <T3> the function third parameter type
@param function the function that will be monitored
@param calls a value holder accumulating calls
@return the proxied function | [
"Monitors",
"calls",
"to",
"a",
"ternary",
"function",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L646-L648 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.monitor | public static <T1, T2, T3> TriPredicate<T1, T2, T3> monitor(TriPredicate<T1, T2, T3> predicate, AtomicLong calls) {
return new TernaryMonitoringPredicate<T1, T2, T3>(predicate, calls);
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> monitor(TriPredicate<T1, T2, T3> predicate, AtomicLong calls) {
return new TernaryMonitoringPredicate<T1, T2, T3>(predicate, calls);
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"monitor",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
",",
"AtomicLong",
"calls",
")",
"{",
"return",
"new"... | Monitors calls to a ternary predicate.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param predicate the predicate that will be monitored
@param calls a value holder accumulating calls
@return the proxied predicate | [
"Monitors",
"calls",
"to",
"a",
"ternary",
"predicate",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L660-L662 | train |
DaGeRe/KoPeMe | kopeme-core/src/main/java/de/dagere/kopeme/datacollection/DataCollectorList.java | DataCollectorList.addDataCollector | protected final void addDataCollector(final Class collectorName) {
if (!DataCollector.class.isAssignableFrom(collectorName)) {
throw new RuntimeException("Class must be subclass of DataCollector!");
}
collectors.add(collectorName);
} | java | protected final void addDataCollector(final Class collectorName) {
if (!DataCollector.class.isAssignableFrom(collectorName)) {
throw new RuntimeException("Class must be subclass of DataCollector!");
}
collectors.add(collectorName);
} | [
"protected",
"final",
"void",
"addDataCollector",
"(",
"final",
"Class",
"collectorName",
")",
"{",
"if",
"(",
"!",
"DataCollector",
".",
"class",
".",
"isAssignableFrom",
"(",
"collectorName",
")",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Class mus... | Adds a DataCollector to the given list.
@param collectorName The collector that should be added | [
"Adds",
"a",
"DataCollector",
"to",
"the",
"given",
"list",
"."
] | a4939113cba73cb20a2c7d6dc8d34d0139a3e340 | https://github.com/DaGeRe/KoPeMe/blob/a4939113cba73cb20a2c7d6dc8d34d0139a3e340/kopeme-core/src/main/java/de/dagere/kopeme/datacollection/DataCollectorList.java#L67-L72 | train |
DaGeRe/KoPeMe | kopeme-core/src/main/java/de/dagere/kopeme/datacollection/DataCollectorList.java | DataCollectorList.getDataCollectors | public final Map<String, DataCollector> getDataCollectors() {
final Map<String, DataCollector> collectorsRet = new HashMap<>();
for (final Class<DataCollector> c : collectors) {
DataCollector dc;
try {
dc = c.newInstance();
collectorsRet.put(dc.getName(), dc);
} catch (final InstantiationException e) {
e.printStackTrace();
} catch (final IllegalAccessException e) {
e.printStackTrace();
}
}
return collectorsRet;
} | java | public final Map<String, DataCollector> getDataCollectors() {
final Map<String, DataCollector> collectorsRet = new HashMap<>();
for (final Class<DataCollector> c : collectors) {
DataCollector dc;
try {
dc = c.newInstance();
collectorsRet.put(dc.getName(), dc);
} catch (final InstantiationException e) {
e.printStackTrace();
} catch (final IllegalAccessException e) {
e.printStackTrace();
}
}
return collectorsRet;
} | [
"public",
"final",
"Map",
"<",
"String",
",",
"DataCollector",
">",
"getDataCollectors",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"DataCollector",
">",
"collectorsRet",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"final",
"Class",
"... | Returns new DataCollectors, which are saved in the current DataCollectorList. Every time this method is called there are new DataCollectors instanciated.
@return DataCollectors, which are saved in the current DataCollectorList. | [
"Returns",
"new",
"DataCollectors",
"which",
"are",
"saved",
"in",
"the",
"current",
"DataCollectorList",
".",
"Every",
"time",
"this",
"method",
"is",
"called",
"there",
"are",
"new",
"DataCollectors",
"instanciated",
"."
] | a4939113cba73cb20a2c7d6dc8d34d0139a3e340 | https://github.com/DaGeRe/KoPeMe/blob/a4939113cba73cb20a2c7d6dc8d34d0139a3e340/kopeme-core/src/main/java/de/dagere/kopeme/datacollection/DataCollectorList.java#L79-L93 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/dispatching/composing/PipelinedConsumer.java | PipelinedConsumer.accept | @Override
public void accept(E value) {
for (Consumer<E> consumer : consumers) {
consumer.accept(value);
}
} | java | @Override
public void accept(E value) {
for (Consumer<E> consumer : consumers) {
consumer.accept(value);
}
} | [
"@",
"Override",
"public",
"void",
"accept",
"(",
"E",
"value",
")",
"{",
"for",
"(",
"Consumer",
"<",
"E",
">",
"consumer",
":",
"consumers",
")",
"{",
"consumer",
".",
"accept",
"(",
"value",
")",
";",
"}",
"}"
] | performs every composed consumer
@param value | [
"performs",
"every",
"composed",
"consumer"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/dispatching/composing/PipelinedConsumer.java#L27-L32 | train |
kyoken74/gwt-angular-site | gwt-angular-examples/Promise/src/main/java/com/asayama/gwt/angular/site/examples/client/service/GreetingService.java | GreetingService.getGreeting | public Promise<String> getGreeting() {
Promise<String> p = q.all(getSalutation(), getName())
.then(new Continue<String, JSArray<?>>() {
// Formats the greeting when salutation and name are delivered.
@Override
public String call(JSArray<?> value) {
return value.get(0) + ", " + value.get(1) + "!";
}
});
return p;
} | java | public Promise<String> getGreeting() {
Promise<String> p = q.all(getSalutation(), getName())
.then(new Continue<String, JSArray<?>>() {
// Formats the greeting when salutation and name are delivered.
@Override
public String call(JSArray<?> value) {
return value.get(0) + ", " + value.get(1) + "!";
}
});
return p;
} | [
"public",
"Promise",
"<",
"String",
">",
"getGreeting",
"(",
")",
"{",
"Promise",
"<",
"String",
">",
"p",
"=",
"q",
".",
"all",
"(",
"getSalutation",
"(",
")",
",",
"getName",
"(",
")",
")",
".",
"then",
"(",
"new",
"Continue",
"<",
"String",
",",... | Given the promises of name and salutation, returns a promise of greeting. | [
"Given",
"the",
"promises",
"of",
"name",
"and",
"salutation",
"returns",
"a",
"promise",
"of",
"greeting",
"."
] | 12134f4910abe41145d0020e886620605eb03749 | https://github.com/kyoken74/gwt-angular-site/blob/12134f4910abe41145d0020e886620605eb03749/gwt-angular-examples/Promise/src/main/java/com/asayama/gwt/angular/site/examples/client/service/GreetingService.java#L20-L31 | train |
kyoken74/gwt-angular-site | gwt-angular-examples/Promise/src/main/java/com/asayama/gwt/angular/site/examples/client/service/GreetingService.java | GreetingService.getSalutation | public Promise<String> getSalutation() {
final Deferred<String> d = q.defer();
Timer timer = new Timer() {
@Override
public void run() {
d.progress(new TimerProgress("Loaded salutation", this));
d.resolve("Hello");
}
};
d.progress(new TimerProgress("Loading salutation...", timer));
timer.schedule(1000);
return d.promise();
} | java | public Promise<String> getSalutation() {
final Deferred<String> d = q.defer();
Timer timer = new Timer() {
@Override
public void run() {
d.progress(new TimerProgress("Loaded salutation", this));
d.resolve("Hello");
}
};
d.progress(new TimerProgress("Loading salutation...", timer));
timer.schedule(1000);
return d.promise();
} | [
"public",
"Promise",
"<",
"String",
">",
"getSalutation",
"(",
")",
"{",
"final",
"Deferred",
"<",
"String",
">",
"d",
"=",
"q",
".",
"defer",
"(",
")",
";",
"Timer",
"timer",
"=",
"new",
"Timer",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"... | Returns a promise of salutation by simulating an asynchronous call with a time-out. | [
"Returns",
"a",
"promise",
"of",
"salutation",
"by",
"simulating",
"an",
"asynchronous",
"call",
"with",
"a",
"time",
"-",
"out",
"."
] | 12134f4910abe41145d0020e886620605eb03749 | https://github.com/kyoken74/gwt-angular-site/blob/12134f4910abe41145d0020e886620605eb03749/gwt-angular-examples/Promise/src/main/java/com/asayama/gwt/angular/site/examples/client/service/GreetingService.java#L34-L47 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Ranges.java | Ranges.rightHalfOpen | public Range<T> rightHalfOpen(T lower, Optional<T> upper) {
return new DenseRange<T>(sequencer, comparator, Endpoint.Include, lower, upper, Endpoint.Exclude);
} | java | public Range<T> rightHalfOpen(T lower, Optional<T> upper) {
return new DenseRange<T>(sequencer, comparator, Endpoint.Include, lower, upper, Endpoint.Exclude);
} | [
"public",
"Range",
"<",
"T",
">",
"rightHalfOpen",
"(",
"T",
"lower",
",",
"Optional",
"<",
"T",
">",
"upper",
")",
"{",
"return",
"new",
"DenseRange",
"<",
"T",
">",
"(",
"sequencer",
",",
"comparator",
",",
"Endpoint",
".",
"Include",
",",
"lower",
... | returns [ lower, upper )
@param lower
@param upper
@return [lower, upper) | [
"returns",
"[",
"lower",
"upper",
")"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Ranges.java#L48-L50 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Ranges.java | Ranges.leftHalfOpen | public Range<T> leftHalfOpen(T lower, T upper) {
return new DenseRange<T>(sequencer, comparator, Endpoint.Exclude, lower, Optional.of(upper), Endpoint.Include);
} | java | public Range<T> leftHalfOpen(T lower, T upper) {
return new DenseRange<T>(sequencer, comparator, Endpoint.Exclude, lower, Optional.of(upper), Endpoint.Include);
} | [
"public",
"Range",
"<",
"T",
">",
"leftHalfOpen",
"(",
"T",
"lower",
",",
"T",
"upper",
")",
"{",
"return",
"new",
"DenseRange",
"<",
"T",
">",
"(",
"sequencer",
",",
"comparator",
",",
"Endpoint",
".",
"Exclude",
",",
"lower",
",",
"Optional",
".",
... | returns ( lower, upper ]
@param lower
@param upper
@return (lower, upper] | [
"returns",
"(",
"lower",
"upper",
"]"
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Ranges.java#L60-L62 | train |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Boxing.java | Boxing.box | public static Boolean[] box(boolean[] array) {
dbc.precondition(array != null, "cannot box a null boolean array");
final Boolean[] result = new Boolean[array.length];
for (int i = 0; i != result.length; ++i) {
result[i] = array[i];
}
return result;
} | java | public static Boolean[] box(boolean[] array) {
dbc.precondition(array != null, "cannot box a null boolean array");
final Boolean[] result = new Boolean[array.length];
for (int i = 0; i != result.length; ++i) {
result[i] = array[i];
}
return result;
} | [
"public",
"static",
"Boolean",
"[",
"]",
"box",
"(",
"boolean",
"[",
"]",
"array",
")",
"{",
"dbc",
".",
"precondition",
"(",
"array",
"!=",
"null",
",",
"\"cannot box a null boolean array\"",
")",
";",
"final",
"Boolean",
"[",
"]",
"result",
"=",
"new",
... | Converts an array of booleans to an array of Booleans.
@param array the primitive array
@return the array of boxed objects | [
"Converts",
"an",
"array",
"of",
"booleans",
"to",
"an",
"array",
"of",
"Booleans",
"."
] | 98115a436e35335c5e8831f9fdc12f6d93d524be | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Boxing.java#L16-L23 | train |
eduarddrenth/ConfigurableReports | src/main/java/com/vectorprint/report/itext/ItextHelper.java | ItextHelper.round | public static float round(float f, int decimalPlace) {
return BigDecimal.valueOf((double) f).setScale(decimalPlace, BigDecimal.ROUND_HALF_UP).floatValue();
} | java | public static float round(float f, int decimalPlace) {
return BigDecimal.valueOf((double) f).setScale(decimalPlace, BigDecimal.ROUND_HALF_UP).floatValue();
} | [
"public",
"static",
"float",
"round",
"(",
"float",
"f",
",",
"int",
"decimalPlace",
")",
"{",
"return",
"BigDecimal",
".",
"valueOf",
"(",
"(",
"double",
")",
"f",
")",
".",
"setScale",
"(",
"decimalPlace",
",",
"BigDecimal",
".",
"ROUND_HALF_UP",
")",
... | Round to certain number of decimals
@param f
@param decimalPlace
@return | [
"Round",
"to",
"certain",
"number",
"of",
"decimals"
] | b5fb7a89e16d9b35f557f3bf620594f821fa1552 | https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/ItextHelper.java#L102-L104 | train |
eduarddrenth/ConfigurableReports | src/main/java/com/vectorprint/report/itext/style/StyleHelper.java | StyleHelper.getStylers | public static <E extends BaseStyler> List<E> getStylers(Collection<? extends BaseStyler> stylers, Class<E> clazz)
throws VectorPrintException {
List<E> st = new ArrayList<>(1);
for (BaseStyler s : stylers) {
if (clazz.isAssignableFrom(s.getClass())) {
st.add((E) s);
}
}
return st;
} | java | public static <E extends BaseStyler> List<E> getStylers(Collection<? extends BaseStyler> stylers, Class<E> clazz)
throws VectorPrintException {
List<E> st = new ArrayList<>(1);
for (BaseStyler s : stylers) {
if (clazz.isAssignableFrom(s.getClass())) {
st.add((E) s);
}
}
return st;
} | [
"public",
"static",
"<",
"E",
"extends",
"BaseStyler",
">",
"List",
"<",
"E",
">",
"getStylers",
"(",
"Collection",
"<",
"?",
"extends",
"BaseStyler",
">",
"stylers",
",",
"Class",
"<",
"E",
">",
"clazz",
")",
"throws",
"VectorPrintException",
"{",
"List",... | get stylers with a certain baseclass from a collection of stylers.
@param <E>
@param stylers
@param clazz
@return
@throws VectorPrintException | [
"get",
"stylers",
"with",
"a",
"certain",
"baseclass",
"from",
"a",
"collection",
"of",
"stylers",
"."
] | b5fb7a89e16d9b35f557f3bf620594f821fa1552 | https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/StyleHelper.java#L170-L179 | train |
eduarddrenth/ConfigurableReports | src/main/java/com/vectorprint/report/itext/style/StyleHelper.java | StyleHelper.delayedStyle | public static void delayedStyle(Chunk c, String tag, Collection<? extends Advanced> stylers, EventHelper eventHelper, Image img) {
// add to pagehelper and set generic tag
eventHelper.addDelayedStyler(tag, stylers, c, img);
c.setGenericTag(tag);
} | java | public static void delayedStyle(Chunk c, String tag, Collection<? extends Advanced> stylers, EventHelper eventHelper, Image img) {
// add to pagehelper and set generic tag
eventHelper.addDelayedStyler(tag, stylers, c, img);
c.setGenericTag(tag);
} | [
"public",
"static",
"void",
"delayedStyle",
"(",
"Chunk",
"c",
",",
"String",
"tag",
",",
"Collection",
"<",
"?",
"extends",
"Advanced",
">",
"stylers",
",",
"EventHelper",
"eventHelper",
",",
"Image",
"img",
")",
"{",
"// add to pagehelper and set generic tag",
... | register advanced stylers with the EventHelper to do the styling later
@param c
@param tag
@param stylers
@param eventHelper
@param img the value of rect
@see EventHelper#onGenericTag(com.itextpdf.text.pdf.PdfWriter, com.itextpdf.text.Document,
com.itextpdf.text.Rectangle, java.lang.String) | [
"register",
"advanced",
"stylers",
"with",
"the",
"EventHelper",
"to",
"do",
"the",
"styling",
"later"
] | b5fb7a89e16d9b35f557f3bf620594f821fa1552 | https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/StyleHelper.java#L229-L233 | train |
oboehm/jfachwert | src/main/java/de/jfachwert/net/Domainname.java | Domainname.getLevelDomain | public Domainname getLevelDomain(int level) {
String[] parts = this.getCode().split("\\.");
int firstPart = parts.length - level;
if ((firstPart < 0) || (level < 1)) {
throw new LocalizedIllegalArgumentException(level, "level", Range.between(1, parts.length));
}
StringBuilder name = new StringBuilder(parts[firstPart]);
for (int i = firstPart + 1; i < parts.length; i++) {
name.append('.');
name.append(parts[i]);
}
return new Domainname(name.toString());
} | java | public Domainname getLevelDomain(int level) {
String[] parts = this.getCode().split("\\.");
int firstPart = parts.length - level;
if ((firstPart < 0) || (level < 1)) {
throw new LocalizedIllegalArgumentException(level, "level", Range.between(1, parts.length));
}
StringBuilder name = new StringBuilder(parts[firstPart]);
for (int i = firstPart + 1; i < parts.length; i++) {
name.append('.');
name.append(parts[i]);
}
return new Domainname(name.toString());
} | [
"public",
"Domainname",
"getLevelDomain",
"(",
"int",
"level",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
"this",
".",
"getCode",
"(",
")",
".",
"split",
"(",
"\"\\\\.\"",
")",
";",
"int",
"firstPart",
"=",
"parts",
".",
"length",
"-",
"level",
";",
... | Waehrend die Top-Level-Domain die oberste Ebende wie "de" ist, ist die
2nd-Level-Domain von "www.jfachwert.de" die Domain "jfachwert.de" und
die 3rd-Level-Domain ist in diesem Beispiel die komplette Domain.
@param level z.B. 2 fuer 2nd-Level-Domain
@return z.B. "jfachwert.de" | [
"Waehrend",
"die",
"Top",
"-",
"Level",
"-",
"Domain",
"die",
"oberste",
"Ebende",
"wie",
"de",
"ist",
"ist",
"die",
"2nd",
"-",
"Level",
"-",
"Domain",
"von",
"www",
".",
"jfachwert",
".",
"de",
"die",
"Domain",
"jfachwert",
".",
"de",
"und",
"die",
... | 67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b | https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/net/Domainname.java#L107-L119 | train |
hdbeukel/james-extensions | src/main/java/org/jamesframework/ext/search/neigh/CompositeNeighbourhood.java | CompositeNeighbourhood.getAllMoves | @Override
public List<Move<? super SolutionType>> getAllMoves(SolutionType solution) {
return neighs.stream()
.flatMap(neigh -> neigh.getAllMoves(solution).stream()) // flatten to one stream of all moves
.collect(Collectors.toList()); // collect in one list
} | java | @Override
public List<Move<? super SolutionType>> getAllMoves(SolutionType solution) {
return neighs.stream()
.flatMap(neigh -> neigh.getAllMoves(solution).stream()) // flatten to one stream of all moves
.collect(Collectors.toList()); // collect in one list
} | [
"@",
"Override",
"public",
"List",
"<",
"Move",
"<",
"?",
"super",
"SolutionType",
">",
">",
"getAllMoves",
"(",
"SolutionType",
"solution",
")",
"{",
"return",
"neighs",
".",
"stream",
"(",
")",
".",
"flatMap",
"(",
"neigh",
"->",
"neigh",
".",
"getAllM... | Creates and returns the union of all moves generated by each of the contained neighbourhoods.
The returned list may be empty if none of the contained neighbourhoods can generate any move.
@param solution solution for which all moves are generated
@return union of all possible moves generated by each contained neighbourhood | [
"Creates",
"and",
"returns",
"the",
"union",
"of",
"all",
"moves",
"generated",
"by",
"each",
"of",
"the",
"contained",
"neighbourhoods",
".",
"The",
"returned",
"list",
"may",
"be",
"empty",
"if",
"none",
"of",
"the",
"contained",
"neighbourhoods",
"can",
"... | 37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2 | https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/search/neigh/CompositeNeighbourhood.java#L135-L140 | train |
oboehm/jfachwert | src/main/java/de/jfachwert/math/Bruch.java | Bruch.multiply | public AbstractNumber multiply(Bruch operand) {
BigInteger z = getZaehler().multiply(operand.getZaehler());
BigInteger n = getNenner().multiply(operand.getNenner());
return Bruch.of(z, n).kuerzen();
} | java | public AbstractNumber multiply(Bruch operand) {
BigInteger z = getZaehler().multiply(operand.getZaehler());
BigInteger n = getNenner().multiply(operand.getNenner());
return Bruch.of(z, n).kuerzen();
} | [
"public",
"AbstractNumber",
"multiply",
"(",
"Bruch",
"operand",
")",
"{",
"BigInteger",
"z",
"=",
"getZaehler",
"(",
")",
".",
"multiply",
"(",
"operand",
".",
"getZaehler",
"(",
")",
")",
";",
"BigInteger",
"n",
"=",
"getNenner",
"(",
")",
".",
"multip... | Multiplikation zweier Brueche.
@param operand der zweite Bruch, mit dem multipliziert wird.
@return mulitiplizierter Bruch, evtl. gekuerzt | [
"Multiplikation",
"zweier",
"Brueche",
"."
] | 67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b | https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/math/Bruch.java#L234-L238 | train |
oboehm/jfachwert | src/main/java/de/jfachwert/math/Bruch.java | Bruch.add | public AbstractNumber add(Bruch operand) {
BigInteger n = getNenner().multiply(operand.getNenner());
BigInteger z1 = getZaehler().multiply(operand.getNenner());
BigInteger z2 = operand.getZaehler().multiply(getNenner());
return Bruch.of(z1.add(z2), n).kuerzen();
} | java | public AbstractNumber add(Bruch operand) {
BigInteger n = getNenner().multiply(operand.getNenner());
BigInteger z1 = getZaehler().multiply(operand.getNenner());
BigInteger z2 = operand.getZaehler().multiply(getNenner());
return Bruch.of(z1.add(z2), n).kuerzen();
} | [
"public",
"AbstractNumber",
"add",
"(",
"Bruch",
"operand",
")",
"{",
"BigInteger",
"n",
"=",
"getNenner",
"(",
")",
".",
"multiply",
"(",
"operand",
".",
"getNenner",
"(",
")",
")",
";",
"BigInteger",
"z1",
"=",
"getZaehler",
"(",
")",
".",
"multiply",
... | Addition zweier Brueche.
@param operand der zweite Bruch, der addiert wird.
@return addierter Bruch, evtl. gekuerzt | [
"Addition",
"zweier",
"Brueche",
"."
] | 67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b | https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/math/Bruch.java#L258-L263 | train |
oboehm/jfachwert | src/main/java/de/jfachwert/math/Bruch.java | Bruch.compareTo | @Override
public int compareTo(Bruch other) {
BigInteger thisZaehlerErweitert = this.zaehler.multiply(other.nenner);
BigInteger otherZaehlerErweitert = other.zaehler.multiply(this.nenner);
return thisZaehlerErweitert.compareTo(otherZaehlerErweitert);
} | java | @Override
public int compareTo(Bruch other) {
BigInteger thisZaehlerErweitert = this.zaehler.multiply(other.nenner);
BigInteger otherZaehlerErweitert = other.zaehler.multiply(this.nenner);
return thisZaehlerErweitert.compareTo(otherZaehlerErweitert);
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"Bruch",
"other",
")",
"{",
"BigInteger",
"thisZaehlerErweitert",
"=",
"this",
".",
"zaehler",
".",
"multiply",
"(",
"other",
".",
"nenner",
")",
";",
"BigInteger",
"otherZaehlerErweitert",
"=",
"other",
".",... | Vergleicht den anderen Bruch mit dem aktuellen Bruch.
@param other der andere Bruch, der verglichen wird.
@return negtive Zahl, falls this < other, 0 bei Gleichheit, ansonsten
positive Zahl. | [
"Vergleicht",
"den",
"anderen",
"Bruch",
"mit",
"dem",
"aktuellen",
"Bruch",
"."
] | 67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b | https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/math/Bruch.java#L314-L319 | train |
eduarddrenth/ConfigurableReports | src/main/java/com/vectorprint/report/itext/style/stylers/AdvancedImpl.java | AdvancedImpl.getPreparedCanvas | protected final PdfContentByte getPreparedCanvas(float opacity) {
needRestore = false;
PdfContentByte canvas = (tableForeground != null) ? tableForeground : (isBg())
? getWriter().getDirectContentUnder()
: getWriter().getDirectContent();
String layerName = getLayerName();
BLENDMODE blend = getBlend();
if (getWriter().getPDFXConformance() == PdfWriter.PDFX1A2001) {
// check blend, opacity, layers
if (!PdfGState.BM_NORMAL.equals(blend.getBlend()) && !PdfGState.BM_COMPATIBLE.equals(blend.getBlend())) {
throw new VectorPrintRuntimeException("blend not supported in PDF/X-1a: " + blend);
}
if (layerName != null) {
throw new VectorPrintRuntimeException("layers not supported in PDF/X-1a: " + layerName);
}
if (opacity < 1) {
throw new VectorPrintRuntimeException("opacity not supported in PDF/X-1a: " + opacity);
}
}
if (layerName != null) {
layerManager.startLayerInGroup(layerName, canvas);
}
// pgs.setAlphaIsShape(true);
if (opacity <= 1) {
// PdfShading shading = PdfShading.simpleAxial(getWriter(), 0, 0, getDocument().right() - getDocument().getPageSize().getWidth() * 0.6f, getDocument().top() - getDocument().getPageSize().getHeight() * 0.6f, Color.green, Color.orange,true,true);
// canvas.paintShading(shading);
canvas.saveState();
needRestore = true;
PdfGState pgs = new PdfGState();
pgs.setFillOpacity(opacity);
pgs.setStrokeOpacity(opacity);
canvas.setGState(pgs);
}
if (!BLENDMODE.NORMAL.equals(blend)) {
if (!needRestore) {
canvas.saveState();
needRestore = true;
}
PdfGState pgs = new PdfGState();
pgs.setBlendMode(blend.getBlend());
canvas.setGState(pgs);
}
if (getTransform() != null && !(this instanceof Image)) {
canvas.transform(new AffineTransform(getTransform()));
}
return canvas;
} | java | protected final PdfContentByte getPreparedCanvas(float opacity) {
needRestore = false;
PdfContentByte canvas = (tableForeground != null) ? tableForeground : (isBg())
? getWriter().getDirectContentUnder()
: getWriter().getDirectContent();
String layerName = getLayerName();
BLENDMODE blend = getBlend();
if (getWriter().getPDFXConformance() == PdfWriter.PDFX1A2001) {
// check blend, opacity, layers
if (!PdfGState.BM_NORMAL.equals(blend.getBlend()) && !PdfGState.BM_COMPATIBLE.equals(blend.getBlend())) {
throw new VectorPrintRuntimeException("blend not supported in PDF/X-1a: " + blend);
}
if (layerName != null) {
throw new VectorPrintRuntimeException("layers not supported in PDF/X-1a: " + layerName);
}
if (opacity < 1) {
throw new VectorPrintRuntimeException("opacity not supported in PDF/X-1a: " + opacity);
}
}
if (layerName != null) {
layerManager.startLayerInGroup(layerName, canvas);
}
// pgs.setAlphaIsShape(true);
if (opacity <= 1) {
// PdfShading shading = PdfShading.simpleAxial(getWriter(), 0, 0, getDocument().right() - getDocument().getPageSize().getWidth() * 0.6f, getDocument().top() - getDocument().getPageSize().getHeight() * 0.6f, Color.green, Color.orange,true,true);
// canvas.paintShading(shading);
canvas.saveState();
needRestore = true;
PdfGState pgs = new PdfGState();
pgs.setFillOpacity(opacity);
pgs.setStrokeOpacity(opacity);
canvas.setGState(pgs);
}
if (!BLENDMODE.NORMAL.equals(blend)) {
if (!needRestore) {
canvas.saveState();
needRestore = true;
}
PdfGState pgs = new PdfGState();
pgs.setBlendMode(blend.getBlend());
canvas.setGState(pgs);
}
if (getTransform() != null && !(this instanceof Image)) {
canvas.transform(new AffineTransform(getTransform()));
}
return canvas;
} | [
"protected",
"final",
"PdfContentByte",
"getPreparedCanvas",
"(",
"float",
"opacity",
")",
"{",
"needRestore",
"=",
"false",
";",
"PdfContentByte",
"canvas",
"=",
"(",
"tableForeground",
"!=",
"null",
")",
"?",
"tableForeground",
":",
"(",
"isBg",
"(",
")",
")... | get a canvas for drawing, prepared according to settings
@see #draw(com.itextpdf.text.Rectangle, java.lang.String)
@return | [
"get",
"a",
"canvas",
"for",
"drawing",
"prepared",
"according",
"to",
"settings"
] | b5fb7a89e16d9b35f557f3bf620594f821fa1552 | https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/stylers/AdvancedImpl.java#L134-L180 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.