id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
109,100 | logic-ng/LogicNG | src/main/java/org/logicng/datastructures/ubtrees/UBTree.java | UBTree.firstSubset | public SortedSet<T> firstSubset(SortedSet<T> set) {
if (this.rootNodes.isEmpty() || set == null || set.isEmpty()) {
return null;
}
return firstSubset(set, this.rootNodes);
} | java | public SortedSet<T> firstSubset(SortedSet<T> set) {
if (this.rootNodes.isEmpty() || set == null || set.isEmpty()) {
return null;
}
return firstSubset(set, this.rootNodes);
} | [
"public",
"SortedSet",
"<",
"T",
">",
"firstSubset",
"(",
"SortedSet",
"<",
"T",
">",
"set",
")",
"{",
"if",
"(",
"this",
".",
"rootNodes",
".",
"isEmpty",
"(",
")",
"||",
"set",
"==",
"null",
"||",
"set",
".",
"isEmpty",
"(",
")",
")",
"{",
"ret... | Returns the first subset of a given set in this UBTree.
@param set the set to search for
@return the first subset which is found for the given set or {@code null} if there is none | [
"Returns",
"the",
"first",
"subset",
"of",
"a",
"given",
"set",
"in",
"this",
"UBTree",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/datastructures/ubtrees/UBTree.java#L54-L59 |
109,101 | logic-ng/LogicNG | src/main/java/org/logicng/datastructures/ubtrees/UBTree.java | UBTree.allSubsets | public Set<SortedSet<T>> allSubsets(final SortedSet<T> set) {
final Set<SortedSet<T>> subsets = new LinkedHashSet<>();
allSubsets(set, this.rootNodes, subsets);
return subsets;
} | java | public Set<SortedSet<T>> allSubsets(final SortedSet<T> set) {
final Set<SortedSet<T>> subsets = new LinkedHashSet<>();
allSubsets(set, this.rootNodes, subsets);
return subsets;
} | [
"public",
"Set",
"<",
"SortedSet",
"<",
"T",
">",
">",
"allSubsets",
"(",
"final",
"SortedSet",
"<",
"T",
">",
"set",
")",
"{",
"final",
"Set",
"<",
"SortedSet",
"<",
"T",
">",
">",
"subsets",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
";",
"allS... | Returns all subsets of a given set in this UBTree.
@param set the set to search for
@return all subsets of of the given set | [
"Returns",
"all",
"subsets",
"of",
"a",
"given",
"set",
"in",
"this",
"UBTree",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/datastructures/ubtrees/UBTree.java#L66-L70 |
109,102 | logic-ng/LogicNG | src/main/java/org/logicng/datastructures/ubtrees/UBTree.java | UBTree.allSupersets | public Set<SortedSet<T>> allSupersets(final SortedSet<T> set) {
final Set<SortedSet<T>> supersets = new LinkedHashSet<>();
allSupersets(set, this.rootNodes, supersets);
return supersets;
} | java | public Set<SortedSet<T>> allSupersets(final SortedSet<T> set) {
final Set<SortedSet<T>> supersets = new LinkedHashSet<>();
allSupersets(set, this.rootNodes, supersets);
return supersets;
} | [
"public",
"Set",
"<",
"SortedSet",
"<",
"T",
">",
">",
"allSupersets",
"(",
"final",
"SortedSet",
"<",
"T",
">",
"set",
")",
"{",
"final",
"Set",
"<",
"SortedSet",
"<",
"T",
">",
">",
"supersets",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
";",
"... | Returns all supersets of a given set in this UBTree.
@param set the set to search for
@return all supersets of the given set | [
"Returns",
"all",
"supersets",
"of",
"a",
"given",
"set",
"in",
"this",
"UBTree",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/datastructures/ubtrees/UBTree.java#L77-L81 |
109,103 | logic-ng/LogicNG | src/main/java/org/logicng/datastructures/ubtrees/UBTree.java | UBTree.allSets | public Set<SortedSet<T>> allSets() {
final List<UBNode<T>> allEndOfPathNodes = getAllEndOfPathNodes(this.rootNodes);
final Set<SortedSet<T>> allSets = new LinkedHashSet<>();
for (UBNode<T> endOfPathNode : allEndOfPathNodes) {
allSets.add(endOfPathNode.set());
}
return... | java | public Set<SortedSet<T>> allSets() {
final List<UBNode<T>> allEndOfPathNodes = getAllEndOfPathNodes(this.rootNodes);
final Set<SortedSet<T>> allSets = new LinkedHashSet<>();
for (UBNode<T> endOfPathNode : allEndOfPathNodes) {
allSets.add(endOfPathNode.set());
}
return... | [
"public",
"Set",
"<",
"SortedSet",
"<",
"T",
">",
">",
"allSets",
"(",
")",
"{",
"final",
"List",
"<",
"UBNode",
"<",
"T",
">",
">",
"allEndOfPathNodes",
"=",
"getAllEndOfPathNodes",
"(",
"this",
".",
"rootNodes",
")",
";",
"final",
"Set",
"<",
"Sorted... | Returns all sets in this UBTree.
@return all sets in this UBTree | [
"Returns",
"all",
"sets",
"in",
"this",
"UBTree",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/datastructures/ubtrees/UBTree.java#L87-L94 |
109,104 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.clear | public void clear() {
this.posLiterals = new HashMap<>();
this.negLiterals = new HashMap<>();
this.generatedVariables = new HashSet<>();
this.nots = new HashMap<>();
this.implications = new HashMap<>();
this.equivalences = new HashMap<>();
this.ands2 = new HashMap<>();
this.ands3 = new H... | java | public void clear() {
this.posLiterals = new HashMap<>();
this.negLiterals = new HashMap<>();
this.generatedVariables = new HashSet<>();
this.nots = new HashMap<>();
this.implications = new HashMap<>();
this.equivalences = new HashMap<>();
this.ands2 = new HashMap<>();
this.ands3 = new H... | [
"public",
"void",
"clear",
"(",
")",
"{",
"this",
".",
"posLiterals",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"this",
".",
"negLiterals",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"this",
".",
"generatedVariables",
"=",
"new",
"HashSet",
"<>",
... | Removes all formulas from the factory cache. | [
"Removes",
"all",
"formulas",
"from",
"the",
"factory",
"cache",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L174-L193 |
109,105 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.binaryOperator | public Formula binaryOperator(final FType type, final Formula left, final Formula right) {
switch (type) {
case IMPL:
return this.implication(left, right);
case EQUIV:
return this.equivalence(left, right);
default:
throw new IllegalArgumentException("Cannot create a binary ... | java | public Formula binaryOperator(final FType type, final Formula left, final Formula right) {
switch (type) {
case IMPL:
return this.implication(left, right);
case EQUIV:
return this.equivalence(left, right);
default:
throw new IllegalArgumentException("Cannot create a binary ... | [
"public",
"Formula",
"binaryOperator",
"(",
"final",
"FType",
"type",
",",
"final",
"Formula",
"left",
",",
"final",
"Formula",
"right",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"IMPL",
":",
"return",
"this",
".",
"implication",
"(",
"left",
",... | Creates a new binary operator with a given type and two operands.
@param type the type of the formula
@param left the left-hand side operand
@param right the right-hand side operand
@return the newly generated formula
@throws IllegalArgumentException if a wrong formula type is passed | [
"Creates",
"a",
"new",
"binary",
"operator",
"with",
"a",
"given",
"type",
"and",
"two",
"operands",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L253-L262 |
109,106 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.implication | public Formula implication(final Formula left, final Formula right) {
if (left.type() == FALSE || right.type() == TRUE)
return this.verum();
if (left.type() == TRUE)
return right;
if (right.type() == FALSE)
return this.not(left);
if (left.equals(right))
return this.verum();
f... | java | public Formula implication(final Formula left, final Formula right) {
if (left.type() == FALSE || right.type() == TRUE)
return this.verum();
if (left.type() == TRUE)
return right;
if (right.type() == FALSE)
return this.not(left);
if (left.equals(right))
return this.verum();
f... | [
"public",
"Formula",
"implication",
"(",
"final",
"Formula",
"left",
",",
"final",
"Formula",
"right",
")",
"{",
"if",
"(",
"left",
".",
"type",
"(",
")",
"==",
"FALSE",
"||",
"right",
".",
"type",
"(",
")",
"==",
"TRUE",
")",
"return",
"this",
".",
... | Creates a new implication.
@param left the left-hand side operand
@param right the right-hand side operand
@return a new implication | [
"Creates",
"a",
"new",
"implication",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L270-L286 |
109,107 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.equivalence | public Formula equivalence(final Formula left, final Formula right) {
if (left.type() == TRUE)
return right;
if (right.type() == TRUE)
return left;
if (left.type() == FALSE)
return this.not(right);
if (right.type() == FALSE)
return this.not(left);
if (left.equals(right))
... | java | public Formula equivalence(final Formula left, final Formula right) {
if (left.type() == TRUE)
return right;
if (right.type() == TRUE)
return left;
if (left.type() == FALSE)
return this.not(right);
if (right.type() == FALSE)
return this.not(left);
if (left.equals(right))
... | [
"public",
"Formula",
"equivalence",
"(",
"final",
"Formula",
"left",
",",
"final",
"Formula",
"right",
")",
"{",
"if",
"(",
"left",
".",
"type",
"(",
")",
"==",
"TRUE",
")",
"return",
"right",
";",
"if",
"(",
"right",
".",
"type",
"(",
")",
"==",
"... | Creates a new equivalence.
@param left the left-hand side operand
@param right the right-hand side operand
@return a new equivalence | [
"Creates",
"a",
"new",
"equivalence",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L294-L314 |
109,108 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.and | public Formula and(final Formula... operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>(operands.length);
Collections.addAll(ops, operands);
return this.constructAnd(ops);
} | java | public Formula and(final Formula... operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>(operands.length);
Collections.addAll(ops, operands);
return this.constructAnd(ops);
} | [
"public",
"Formula",
"and",
"(",
"final",
"Formula",
"...",
"operands",
")",
"{",
"final",
"LinkedHashSet",
"<",
"Formula",
">",
"ops",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
"operands",
".",
"length",
")",
";",
"Collections",
".",
"addAll",
"(",
"ops",
... | Creates a new conjunction from an array of formulas.
@param operands the vector of formulas
@return a new conjunction | [
"Creates",
"a",
"new",
"conjunction",
"from",
"an",
"array",
"of",
"formulas",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L394-L398 |
109,109 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.constructAnd | private Formula constructAnd(final LinkedHashSet<? extends Formula> operands) {
And tempAnd = null;
Map<LinkedHashSet<? extends Formula>, And> opAndMap = this.andsN;
if (operands.size() > 1) {
switch (operands.size()) {
case 2:
opAndMap = this.ands2;
break;
case 3:
... | java | private Formula constructAnd(final LinkedHashSet<? extends Formula> operands) {
And tempAnd = null;
Map<LinkedHashSet<? extends Formula>, And> opAndMap = this.andsN;
if (operands.size() > 1) {
switch (operands.size()) {
case 2:
opAndMap = this.ands2;
break;
case 3:
... | [
"private",
"Formula",
"constructAnd",
"(",
"final",
"LinkedHashSet",
"<",
"?",
"extends",
"Formula",
">",
"operands",
")",
"{",
"And",
"tempAnd",
"=",
"null",
";",
"Map",
"<",
"LinkedHashSet",
"<",
"?",
"extends",
"Formula",
">",
",",
"And",
">",
"opAndMap... | Creates a new conjunction.
@param operands the formulas
@return a new conjunction | [
"Creates",
"a",
"new",
"conjunction",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L417-L471 |
109,110 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.constructCNF | private Formula constructCNF(final LinkedHashSet<? extends Formula> clauses) {
if (clauses.isEmpty())
return this.verum();
if (clauses.size() == 1)
return clauses.iterator().next();
Map<LinkedHashSet<? extends Formula>, And> opAndMap = this.andsN;
switch (clauses.size()) {
case 2:
... | java | private Formula constructCNF(final LinkedHashSet<? extends Formula> clauses) {
if (clauses.isEmpty())
return this.verum();
if (clauses.size() == 1)
return clauses.iterator().next();
Map<LinkedHashSet<? extends Formula>, And> opAndMap = this.andsN;
switch (clauses.size()) {
case 2:
... | [
"private",
"Formula",
"constructCNF",
"(",
"final",
"LinkedHashSet",
"<",
"?",
"extends",
"Formula",
">",
"clauses",
")",
"{",
"if",
"(",
"clauses",
".",
"isEmpty",
"(",
")",
")",
"return",
"this",
".",
"verum",
"(",
")",
";",
"if",
"(",
"clauses",
"."... | Creates a new CNF.
@param clauses the clauses
@return a new CNF | [
"Creates",
"a",
"new",
"CNF",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L507-L532 |
109,111 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.or | public Formula or(final Formula... operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>(operands.length);
Collections.addAll(ops, operands);
return this.constructOr(ops);
} | java | public Formula or(final Formula... operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>(operands.length);
Collections.addAll(ops, operands);
return this.constructOr(ops);
} | [
"public",
"Formula",
"or",
"(",
"final",
"Formula",
"...",
"operands",
")",
"{",
"final",
"LinkedHashSet",
"<",
"Formula",
">",
"ops",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
"operands",
".",
"length",
")",
";",
"Collections",
".",
"addAll",
"(",
"ops",
... | Creates a new disjunction from an array of formulas.
@param operands the list of formulas
@return a new disjunction | [
"Creates",
"a",
"new",
"disjunction",
"from",
"an",
"array",
"of",
"formulas",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L539-L543 |
109,112 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.constructOr | private Formula constructOr(final LinkedHashSet<? extends Formula> operands) {
Or tempOr = null;
Map<LinkedHashSet<? extends Formula>, Or> opOrMap = this.orsN;
if (operands.size() > 1) {
switch (operands.size()) {
case 2:
opOrMap = this.ors2;
break;
case 3:
... | java | private Formula constructOr(final LinkedHashSet<? extends Formula> operands) {
Or tempOr = null;
Map<LinkedHashSet<? extends Formula>, Or> opOrMap = this.orsN;
if (operands.size() > 1) {
switch (operands.size()) {
case 2:
opOrMap = this.ors2;
break;
case 3:
... | [
"private",
"Formula",
"constructOr",
"(",
"final",
"LinkedHashSet",
"<",
"?",
"extends",
"Formula",
">",
"operands",
")",
"{",
"Or",
"tempOr",
"=",
"null",
";",
"Map",
"<",
"LinkedHashSet",
"<",
"?",
"extends",
"Formula",
">",
",",
"Or",
">",
"opOrMap",
... | Creates a new disjunction.
@param operands the formulas
@return a new disjunction | [
"Creates",
"a",
"new",
"disjunction",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L562-L616 |
109,113 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.constructClause | private Formula constructClause(final LinkedHashSet<Literal> literals) {
if (literals.isEmpty())
return this.falsum();
if (literals.size() == 1)
return literals.iterator().next();
Map<LinkedHashSet<? extends Formula>, Or> opOrMap = this.orsN;
switch (literals.size()) {
case 2:
... | java | private Formula constructClause(final LinkedHashSet<Literal> literals) {
if (literals.isEmpty())
return this.falsum();
if (literals.size() == 1)
return literals.iterator().next();
Map<LinkedHashSet<? extends Formula>, Or> opOrMap = this.orsN;
switch (literals.size()) {
case 2:
... | [
"private",
"Formula",
"constructClause",
"(",
"final",
"LinkedHashSet",
"<",
"Literal",
">",
"literals",
")",
"{",
"if",
"(",
"literals",
".",
"isEmpty",
"(",
")",
")",
"return",
"this",
".",
"falsum",
"(",
")",
";",
"if",
"(",
"literals",
".",
"size",
... | Creates a new clause.
@param literals the literals
@return a new clause | [
"Creates",
"a",
"new",
"clause",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L650-L675 |
109,114 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.variable | public Variable variable(final String name) {
Variable var = this.posLiterals.get(name);
if (var == null) {
var = new Variable(name, this);
this.posLiterals.put(name, var);
}
return var;
} | java | public Variable variable(final String name) {
Variable var = this.posLiterals.get(name);
if (var == null) {
var = new Variable(name, this);
this.posLiterals.put(name, var);
}
return var;
} | [
"public",
"Variable",
"variable",
"(",
"final",
"String",
"name",
")",
"{",
"Variable",
"var",
"=",
"this",
".",
"posLiterals",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"var",
"==",
"null",
")",
"{",
"var",
"=",
"new",
"Variable",
"(",
"name",
... | Creates a new literal instance with a given name and positive phase.
@param name the variable name
@return a new literal with the given name and positive phase | [
"Creates",
"a",
"new",
"literal",
"instance",
"with",
"a",
"given",
"name",
"and",
"positive",
"phase",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L703-L710 |
109,115 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.cc | public PBConstraint cc(final CType comparator, final int rhs, final Collection<Variable> variables) {
final int[] coefficients = new int[variables.size()];
Arrays.fill(coefficients, 1);
final Variable[] vars = new Variable[variables.size()];
int count = 0;
for (final Variable var : variables)
... | java | public PBConstraint cc(final CType comparator, final int rhs, final Collection<Variable> variables) {
final int[] coefficients = new int[variables.size()];
Arrays.fill(coefficients, 1);
final Variable[] vars = new Variable[variables.size()];
int count = 0;
for (final Variable var : variables)
... | [
"public",
"PBConstraint",
"cc",
"(",
"final",
"CType",
"comparator",
",",
"final",
"int",
"rhs",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
")",
"{",
"final",
"int",
"[",
"]",
"coefficients",
"=",
"new",
"int",
"[",
"variables",
".",
... | Creates a new cardinality constraint.
@param variables the variables of the constraint
@param comparator the comparator of the constraint
@param rhs the right-hand side of the constraint
@return the cardinality constraint
@throws IllegalArgumentException if there are negative variables | [
"Creates",
"a",
"new",
"cardinality",
"constraint",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L759-L767 |
109,116 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.condenseOperandsOr | private LinkedHashSet<Formula> condenseOperandsOr(final Collection<? extends Formula> operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>();
this.cnfCheck = true;
for (final Formula form : operands)
if (form.type() == OR) {
for (final Formula f : ((NAryOperator) form).operands) ... | java | private LinkedHashSet<Formula> condenseOperandsOr(final Collection<? extends Formula> operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>();
this.cnfCheck = true;
for (final Formula form : operands)
if (form.type() == OR) {
for (final Formula f : ((NAryOperator) form).operands) ... | [
"private",
"LinkedHashSet",
"<",
"Formula",
">",
"condenseOperandsOr",
"(",
"final",
"Collection",
"<",
"?",
"extends",
"Formula",
">",
"operands",
")",
"{",
"final",
"LinkedHashSet",
"<",
"Formula",
">",
"ops",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
"... | Returns a condensed array of operands for a given n-ary disjunction.
@param operands the formulas
@return a condensed array of operands | [
"Returns",
"a",
"condensed",
"array",
"of",
"operands",
"for",
"a",
"given",
"n",
"-",
"ary",
"disjunction",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L868-L888 |
109,117 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.condenseOperandsAnd | private LinkedHashSet<Formula> condenseOperandsAnd(final Collection<? extends Formula> operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>();
this.cnfCheck = true;
for (final Formula form : operands)
if (form.type() == AND) {
for (final Formula f : ((NAryOperator) form).operands... | java | private LinkedHashSet<Formula> condenseOperandsAnd(final Collection<? extends Formula> operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>();
this.cnfCheck = true;
for (final Formula form : operands)
if (form.type() == AND) {
for (final Formula f : ((NAryOperator) form).operands... | [
"private",
"LinkedHashSet",
"<",
"Formula",
">",
"condenseOperandsAnd",
"(",
"final",
"Collection",
"<",
"?",
"extends",
"Formula",
">",
"operands",
")",
"{",
"final",
"LinkedHashSet",
"<",
"Formula",
">",
"ops",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
... | Returns a condensed array of operands for a given n-ary conjunction.
@param operands the formulas
@return a condensed array of operands | [
"Returns",
"a",
"condensed",
"array",
"of",
"operands",
"for",
"a",
"given",
"n",
"-",
"ary",
"conjunction",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L895-L915 |
109,118 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.importFormula | public Formula importFormula(final Formula formula) {
if (this.importer == null) {
this.importer = new FormulaFactoryImporter(this);
}
final Formula imported = formula.transform(this.importer);
adjustCounters(imported);
return imported;
} | java | public Formula importFormula(final Formula formula) {
if (this.importer == null) {
this.importer = new FormulaFactoryImporter(this);
}
final Formula imported = formula.transform(this.importer);
adjustCounters(imported);
return imported;
} | [
"public",
"Formula",
"importFormula",
"(",
"final",
"Formula",
"formula",
")",
"{",
"if",
"(",
"this",
".",
"importer",
"==",
"null",
")",
"{",
"this",
".",
"importer",
"=",
"new",
"FormulaFactoryImporter",
"(",
"this",
")",
";",
"}",
"final",
"Formula",
... | Imports a formula from another formula factory into this factory and returns it. If the current factory of the
formula is already this formula factory, the same instance will be returned.
@param formula the formula to import
@return the imported formula on this factory | [
"Imports",
"a",
"formula",
"from",
"another",
"formula",
"factory",
"into",
"this",
"factory",
"and",
"returns",
"it",
".",
"If",
"the",
"current",
"factory",
"of",
"the",
"formula",
"is",
"already",
"this",
"formula",
"factory",
"the",
"same",
"instance",
"... | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L997-L1004 |
109,119 | logic-ng/LogicNG | src/main/java/org/logicng/formulas/FormulaFactory.java | FormulaFactory.statistics | public FormulaFactoryStatistics statistics() {
final FormulaFactoryStatistics statistics = new FormulaFactoryStatistics();
statistics.name = this.name;
statistics.positiveLiterals = this.posLiterals.size();
statistics.negativeLiterals = this.negLiterals.size();
statistics.negations = this.nots.size(... | java | public FormulaFactoryStatistics statistics() {
final FormulaFactoryStatistics statistics = new FormulaFactoryStatistics();
statistics.name = this.name;
statistics.positiveLiterals = this.posLiterals.size();
statistics.negativeLiterals = this.negLiterals.size();
statistics.negations = this.nots.size(... | [
"public",
"FormulaFactoryStatistics",
"statistics",
"(",
")",
"{",
"final",
"FormulaFactoryStatistics",
"statistics",
"=",
"new",
"FormulaFactoryStatistics",
"(",
")",
";",
"statistics",
".",
"name",
"=",
"this",
".",
"name",
";",
"statistics",
".",
"positiveLiteral... | Returns the statistics for this formula factory.
@return the statistics for this formula factory | [
"Returns",
"the",
"statistics",
"for",
"this",
"formula",
"factory",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/formulas/FormulaFactory.java#L1060-L1081 |
109,120 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.luby | protected static long luby(final long i) {
long res = 0;
long k;
for (k = 1; res == 0 && k < 64; k++) {
if (i == (1L << k) - 1) { res = 1L << (k - 1); }
}
k = 1;
while (res == 0) {
if ((1L << (k - 1)) <= i && i < (1L << k) - 1) { res = luby(i - (1L... | java | protected static long luby(final long i) {
long res = 0;
long k;
for (k = 1; res == 0 && k < 64; k++) {
if (i == (1L << k) - 1) { res = 1L << (k - 1); }
}
k = 1;
while (res == 0) {
if ((1L << (k - 1)) <= i && i < (1L << k) - 1) { res = luby(i - (1L... | [
"protected",
"static",
"long",
"luby",
"(",
"final",
"long",
"i",
")",
"{",
"long",
"res",
"=",
"0",
";",
"long",
"k",
";",
"for",
"(",
"k",
"=",
"1",
";",
"res",
"==",
"0",
"&&",
"k",
"<",
"64",
";",
"k",
"++",
")",
"{",
"if",
"(",
"i",
... | Returns the next number in the luby sequence.
@param i the base value
@return the next number in the luby sequence | [
"Returns",
"the",
"next",
"number",
"in",
"the",
"luby",
"sequence",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L124-L136 |
109,121 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.importLit | protected void importLit(final int lit) {
final int idx = Math.abs(lit);
assert lit != 0;
int newIdx;
while (idx >= (newIdx = this.vars.size())) {
this.vars.push(new CLVar());
this.vals.push((byte) 0);
this.phases.push((byte) 1);
this.watch... | java | protected void importLit(final int lit) {
final int idx = Math.abs(lit);
assert lit != 0;
int newIdx;
while (idx >= (newIdx = this.vars.size())) {
this.vars.push(new CLVar());
this.vals.push((byte) 0);
this.phases.push((byte) 1);
this.watch... | [
"protected",
"void",
"importLit",
"(",
"final",
"int",
"lit",
")",
"{",
"final",
"int",
"idx",
"=",
"Math",
".",
"abs",
"(",
"lit",
")",
";",
"assert",
"lit",
"!=",
"0",
";",
"int",
"newIdx",
";",
"while",
"(",
"idx",
">=",
"(",
"newIdx",
"=",
"t... | Imports a given literal.
@param lit the literal | [
"Imports",
"a",
"given",
"literal",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L206-L219 |
109,122 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.var | protected CLVar var(final int lit) {
final int idx = Math.abs(lit);
assert 0 < idx && idx < this.vars.size();
return this.vars.get(idx);
} | java | protected CLVar var(final int lit) {
final int idx = Math.abs(lit);
assert 0 < idx && idx < this.vars.size();
return this.vars.get(idx);
} | [
"protected",
"CLVar",
"var",
"(",
"final",
"int",
"lit",
")",
"{",
"final",
"int",
"idx",
"=",
"Math",
".",
"abs",
"(",
"lit",
")",
";",
"assert",
"0",
"<",
"idx",
"&&",
"idx",
"<",
"this",
".",
"vars",
".",
"size",
"(",
")",
";",
"return",
"th... | Returns the variable for a given literal.
@param lit the literal
@return the variable for the literal | [
"Returns",
"the",
"variable",
"for",
"a",
"given",
"literal",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L277-L281 |
109,123 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.val | protected byte val(final int lit) {
byte res = this.vals.get(Math.abs(lit));
if (lit < 0) { res = (byte) -res; }
return res;
} | java | protected byte val(final int lit) {
byte res = this.vals.get(Math.abs(lit));
if (lit < 0) { res = (byte) -res; }
return res;
} | [
"protected",
"byte",
"val",
"(",
"final",
"int",
"lit",
")",
"{",
"byte",
"res",
"=",
"this",
".",
"vals",
".",
"get",
"(",
"Math",
".",
"abs",
"(",
"lit",
")",
")",
";",
"if",
"(",
"lit",
"<",
"0",
")",
"{",
"res",
"=",
"(",
"byte",
")",
"... | Returns the value for a given literal.
@param lit the literal
@return the value as byte (-1 = false, 1 = true) | [
"Returns",
"the",
"value",
"for",
"a",
"given",
"literal",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L288-L292 |
109,124 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.mark | protected void mark(final int lit) {
final CLVar v = var(lit);
assert v.mark() == 0;
v.setMark(sign(lit));
this.seen.push(lit);
} | java | protected void mark(final int lit) {
final CLVar v = var(lit);
assert v.mark() == 0;
v.setMark(sign(lit));
this.seen.push(lit);
} | [
"protected",
"void",
"mark",
"(",
"final",
"int",
"lit",
")",
"{",
"final",
"CLVar",
"v",
"=",
"var",
"(",
"lit",
")",
";",
"assert",
"v",
".",
"mark",
"(",
")",
"==",
"0",
";",
"v",
".",
"setMark",
"(",
"sign",
"(",
"lit",
")",
")",
";",
"th... | Marks a given literal.
@param lit the literal | [
"Marks",
"a",
"given",
"literal",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L308-L313 |
109,125 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.unmark | protected void unmark(final int level) {
assert level <= this.seen.size();
while (level < this.seen.size()) {
final int lit = this.seen.back();
this.seen.pop();
final CLVar v = var(lit);
assert v.mark() == sign(lit);
v.setMark(0);
}
... | java | protected void unmark(final int level) {
assert level <= this.seen.size();
while (level < this.seen.size()) {
final int lit = this.seen.back();
this.seen.pop();
final CLVar v = var(lit);
assert v.mark() == sign(lit);
v.setMark(0);
}
... | [
"protected",
"void",
"unmark",
"(",
"final",
"int",
"level",
")",
"{",
"assert",
"level",
"<=",
"this",
".",
"seen",
".",
"size",
"(",
")",
";",
"while",
"(",
"level",
"<",
"this",
".",
"seen",
".",
"size",
"(",
")",
")",
"{",
"final",
"int",
"li... | Unmarks all variables up to a given level
@param level the level | [
"Unmarks",
"all",
"variables",
"up",
"to",
"a",
"given",
"level"
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L326-L335 |
109,126 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.addWatch | protected void addWatch(final int lit, final int blit, final boolean binary, final CLClause clause) {
watches(lit).push(new CLWatch(blit, binary, clause));
} | java | protected void addWatch(final int lit, final int blit, final boolean binary, final CLClause clause) {
watches(lit).push(new CLWatch(blit, binary, clause));
} | [
"protected",
"void",
"addWatch",
"(",
"final",
"int",
"lit",
",",
"final",
"int",
"blit",
",",
"final",
"boolean",
"binary",
",",
"final",
"CLClause",
"clause",
")",
"{",
"watches",
"(",
"lit",
")",
".",
"push",
"(",
"new",
"CLWatch",
"(",
"blit",
",",... | Adds a new watcher for a given literal.
@param lit the literal
@param blit the blocking literal
@param binary indicates whether it is a binary clause or not
@param clause the watched clause | [
"Adds",
"a",
"new",
"watcher",
"for",
"a",
"given",
"literal",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L353-L355 |
109,127 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.markFrame | protected boolean markFrame(final int lit) {
final int currentlevel = var(lit).level();
final CLFrame frame = this.control.get(currentlevel);
if (frame.mark()) { return false; }
frame.setMark(true);
this.frames.push(currentlevel);
return true;
} | java | protected boolean markFrame(final int lit) {
final int currentlevel = var(lit).level();
final CLFrame frame = this.control.get(currentlevel);
if (frame.mark()) { return false; }
frame.setMark(true);
this.frames.push(currentlevel);
return true;
} | [
"protected",
"boolean",
"markFrame",
"(",
"final",
"int",
"lit",
")",
"{",
"final",
"int",
"currentlevel",
"=",
"var",
"(",
"lit",
")",
".",
"level",
"(",
")",
";",
"final",
"CLFrame",
"frame",
"=",
"this",
".",
"control",
".",
"get",
"(",
"currentleve... | Marks the frame for a given literal's decision level.
@param lit the literal
@return {@code true} if the frame was newly marked, {@code false} if the frame was already marked | [
"Marks",
"the",
"frame",
"for",
"a",
"given",
"literal",
"s",
"decision",
"level",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L362-L369 |
109,128 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.unmarkFrames | protected int unmarkFrames() {
final int res = this.frames.size();
while (!this.frames.empty()) {
final CLFrame f = this.control.get(this.frames.back());
this.frames.pop();
assert f.mark();
f.setMark(false);
}
return res;
} | java | protected int unmarkFrames() {
final int res = this.frames.size();
while (!this.frames.empty()) {
final CLFrame f = this.control.get(this.frames.back());
this.frames.pop();
assert f.mark();
f.setMark(false);
}
return res;
} | [
"protected",
"int",
"unmarkFrames",
"(",
")",
"{",
"final",
"int",
"res",
"=",
"this",
".",
"frames",
".",
"size",
"(",
")",
";",
"while",
"(",
"!",
"this",
".",
"frames",
".",
"empty",
"(",
")",
")",
"{",
"final",
"CLFrame",
"f",
"=",
"this",
".... | Unmarks all frames.
@return the number of unmarked frames | [
"Unmarks",
"all",
"frames",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L375-L384 |
109,129 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.backtrack | protected void backtrack(final int newLevel) {
assert 0 <= newLevel && newLevel <= this.level;
if (newLevel == this.level) { return; }
CLFrame f = this.control.back();
while (f.level() > newLevel) {
assert f.level() == this.level;
assert f.trail() < this.trail.siz... | java | protected void backtrack(final int newLevel) {
assert 0 <= newLevel && newLevel <= this.level;
if (newLevel == this.level) { return; }
CLFrame f = this.control.back();
while (f.level() > newLevel) {
assert f.level() == this.level;
assert f.trail() < this.trail.siz... | [
"protected",
"void",
"backtrack",
"(",
"final",
"int",
"newLevel",
")",
"{",
"assert",
"0",
"<=",
"newLevel",
"&&",
"newLevel",
"<=",
"this",
".",
"level",
";",
"if",
"(",
"newLevel",
"==",
"this",
".",
"level",
")",
"{",
"return",
";",
"}",
"CLFrame",... | Backtracks to a given level
@param newLevel the level | [
"Backtracks",
"to",
"a",
"given",
"level"
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L397-L418 |
109,130 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.rescore | protected void rescore() {
double maxScore = this.scoreIncrement;
for (int idx = 1; idx < this.vars.size(); idx++) {
final double p = this.decisions.priority(idx);
if (p > maxScore) { maxScore = p; }
}
final double factor = 1 / maxScore;
this.decisions.res... | java | protected void rescore() {
double maxScore = this.scoreIncrement;
for (int idx = 1; idx < this.vars.size(); idx++) {
final double p = this.decisions.priority(idx);
if (p > maxScore) { maxScore = p; }
}
final double factor = 1 / maxScore;
this.decisions.res... | [
"protected",
"void",
"rescore",
"(",
")",
"{",
"double",
"maxScore",
"=",
"this",
".",
"scoreIncrement",
";",
"for",
"(",
"int",
"idx",
"=",
"1",
";",
"idx",
"<",
"this",
".",
"vars",
".",
"size",
"(",
")",
";",
"idx",
"++",
")",
"{",
"final",
"d... | Rescores all variables. | [
"Rescores",
"all",
"variables",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L444-L453 |
109,131 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.bumpLit | protected void bumpLit(final int lit) {
final double maxPriority = 1e300;
final int idx = Math.abs(lit);
double oldPriority;
if (this.scoreIncrement > maxPriority || (oldPriority = this.decisions.priority(idx)) > maxPriority) {
rescore();
oldPriority = this.decisi... | java | protected void bumpLit(final int lit) {
final double maxPriority = 1e300;
final int idx = Math.abs(lit);
double oldPriority;
if (this.scoreIncrement > maxPriority || (oldPriority = this.decisions.priority(idx)) > maxPriority) {
rescore();
oldPriority = this.decisi... | [
"protected",
"void",
"bumpLit",
"(",
"final",
"int",
"lit",
")",
"{",
"final",
"double",
"maxPriority",
"=",
"1e300",
";",
"final",
"int",
"idx",
"=",
"Math",
".",
"abs",
"(",
"lit",
")",
";",
"double",
"oldPriority",
";",
"if",
"(",
"this",
".",
"sc... | Bump a literal's activity.
@param lit the literal | [
"Bump",
"a",
"literal",
"s",
"activity",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L459-L469 |
109,132 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.pullLit | protected boolean pullLit(final int lit) {
if (val(lit) == VALUE_TRUE) { return false; }
if (marked(lit) != 0) { return false; }
mark(lit);
bumpLit(lit);
if (var(lit).level() == this.level) { return true; }
markFrame(lit);
this.addedlits.push(lit);
return ... | java | protected boolean pullLit(final int lit) {
if (val(lit) == VALUE_TRUE) { return false; }
if (marked(lit) != 0) { return false; }
mark(lit);
bumpLit(lit);
if (var(lit).level() == this.level) { return true; }
markFrame(lit);
this.addedlits.push(lit);
return ... | [
"protected",
"boolean",
"pullLit",
"(",
"final",
"int",
"lit",
")",
"{",
"if",
"(",
"val",
"(",
"lit",
")",
"==",
"VALUE_TRUE",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"marked",
"(",
"lit",
")",
"!=",
"0",
")",
"{",
"return",
"false",
"... | Analyzes a given literal.
@param lit the literal
@return the result of the analysis | [
"Analyzes",
"a",
"given",
"literal",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L476-L485 |
109,133 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.minimizeLit | protected boolean minimizeLit(final int root) {
assert marked(root) != 0;
CLClause reason = var(root).reason();
if (reason == null) { return false; }
final int oldSeenSize = this.seen.size();
int nextSeen = oldSeenSize;
boolean res = true;
int lit = root;
... | java | protected boolean minimizeLit(final int root) {
assert marked(root) != 0;
CLClause reason = var(root).reason();
if (reason == null) { return false; }
final int oldSeenSize = this.seen.size();
int nextSeen = oldSeenSize;
boolean res = true;
int lit = root;
... | [
"protected",
"boolean",
"minimizeLit",
"(",
"final",
"int",
"root",
")",
"{",
"assert",
"marked",
"(",
"root",
")",
"!=",
"0",
";",
"CLClause",
"reason",
"=",
"var",
"(",
"root",
")",
".",
"reason",
"(",
")",
";",
"if",
"(",
"reason",
"==",
"null",
... | Minimize the first UIP clause by trying to remove a given literal.
@param root the literal
@return {@code true} if the literal can be removed, {@code false} otherwise | [
"Minimize",
"the",
"first",
"UIP",
"clause",
"by",
"trying",
"to",
"remove",
"a",
"given",
"literal",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L492-L519 |
109,134 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.newRestartLimit | protected void newRestartLimit() {
final long newInterval = this.config.restartint * luby(this.stats.restartsCount + 1);
if (newInterval > this.limits.maxRestartInterval) { this.limits.maxRestartInterval = newInterval; }
this.limits.restart = this.stats.conflicts + newInterval;
} | java | protected void newRestartLimit() {
final long newInterval = this.config.restartint * luby(this.stats.restartsCount + 1);
if (newInterval > this.limits.maxRestartInterval) { this.limits.maxRestartInterval = newInterval; }
this.limits.restart = this.stats.conflicts + newInterval;
} | [
"protected",
"void",
"newRestartLimit",
"(",
")",
"{",
"final",
"long",
"newInterval",
"=",
"this",
".",
"config",
".",
"restartint",
"*",
"luby",
"(",
"this",
".",
"stats",
".",
"restartsCount",
"+",
"1",
")",
";",
"if",
"(",
"newInterval",
">",
"this",... | Computes a new restart limit. | [
"Computes",
"a",
"new",
"restart",
"limit",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L524-L528 |
109,135 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.assume | protected void assume(final int decision) {
assert propagated();
this.level++;
final int height = this.trail.size();
this.control.push(new CLFrame(decision, this.level, height));
assert this.level + 1 == this.control.size();
assign(decision, null);
} | java | protected void assume(final int decision) {
assert propagated();
this.level++;
final int height = this.trail.size();
this.control.push(new CLFrame(decision, this.level, height));
assert this.level + 1 == this.control.size();
assign(decision, null);
} | [
"protected",
"void",
"assume",
"(",
"final",
"int",
"decision",
")",
"{",
"assert",
"propagated",
"(",
")",
";",
"this",
".",
"level",
"++",
";",
"final",
"int",
"height",
"=",
"this",
".",
"trail",
".",
"size",
"(",
")",
";",
"this",
".",
"control",... | Assumes a given decision.
@param decision the decision | [
"Assumes",
"a",
"given",
"decision",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L534-L541 |
109,136 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.decide | protected boolean decide() {
assert propagated();
int decision = 0;
while (decision == 0 && !this.decisions.empty()) {
final int lit = this.decisions.top();
this.decisions.pop(lit);
if (val(lit) == 0) { decision = lit; }
}
if (decision == 0) { ... | java | protected boolean decide() {
assert propagated();
int decision = 0;
while (decision == 0 && !this.decisions.empty()) {
final int lit = this.decisions.top();
this.decisions.pop(lit);
if (val(lit) == 0) { decision = lit; }
}
if (decision == 0) { ... | [
"protected",
"boolean",
"decide",
"(",
")",
"{",
"assert",
"propagated",
"(",
")",
";",
"int",
"decision",
"=",
"0",
";",
"while",
"(",
"decision",
"==",
"0",
"&&",
"!",
"this",
".",
"decisions",
".",
"empty",
"(",
")",
")",
"{",
"final",
"int",
"l... | Checks if there are unassigned literals left.
@return {@code false} if all literals are assigned, {@code true} otherwise | [
"Checks",
"if",
"there",
"are",
"unassigned",
"literals",
"left",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L547-L562 |
109,137 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java | CleaneLingStyleSolver.upZeroLiterals | public LNGIntVector upZeroLiterals() {
final LNGIntVector upZeroLiterals = new LNGIntVector();
for (int i = 0; i < this.trail.size(); ++i) {
final int lit = this.trail.get(i);
if (var(lit).level() > 0) {
break;
} else {
upZeroLiterals.p... | java | public LNGIntVector upZeroLiterals() {
final LNGIntVector upZeroLiterals = new LNGIntVector();
for (int i = 0; i < this.trail.size(); ++i) {
final int lit = this.trail.get(i);
if (var(lit).level() > 0) {
break;
} else {
upZeroLiterals.p... | [
"public",
"LNGIntVector",
"upZeroLiterals",
"(",
")",
"{",
"final",
"LNGIntVector",
"upZeroLiterals",
"=",
"new",
"LNGIntVector",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"trail",
".",
"size",
"(",
")",
";",
"++",
... | Returns the unit propagated literals on level zero.
@return unit propagated literal on level zero | [
"Returns",
"the",
"unit",
"propagated",
"literals",
"on",
"level",
"zero",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingStyleSolver.java#L679-L690 |
109,138 | logic-ng/LogicNG | src/main/java/org/logicng/bdds/io/BDDDotFileWriter.java | BDDDotFileWriter.write | public static void write(final String fileName, final BDD bdd) throws IOException {
write(new File(fileName.endsWith(".dot") ? fileName : fileName + ".dot"), bdd);
} | java | public static void write(final String fileName, final BDD bdd) throws IOException {
write(new File(fileName.endsWith(".dot") ? fileName : fileName + ".dot"), bdd);
} | [
"public",
"static",
"void",
"write",
"(",
"final",
"String",
"fileName",
",",
"final",
"BDD",
"bdd",
")",
"throws",
"IOException",
"{",
"write",
"(",
"new",
"File",
"(",
"fileName",
".",
"endsWith",
"(",
"\".dot\"",
")",
"?",
"fileName",
":",
"fileName",
... | Writes a given BDD as a dot file.
@param fileName the file name of the dot file to write
@param bdd the BDD
@throws IOException if there was a problem writing the file | [
"Writes",
"a",
"given",
"BDD",
"as",
"a",
"dot",
"file",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/bdds/io/BDDDotFileWriter.java#L61-L63 |
109,139 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/maxsat/encodings/ModularTotalizer.java | ModularTotalizer.encode | public void encode(final MiniSatStyleSolver s, final LNGIntVector lits, int rhs) {
assert lits.size() > 0;
hasEncoding = false;
this.cardinalityUpoutlits.clear();
this.cardinalityLwoutlits.clear();
if (rhs == 0) {
for (int i = 0; i < lits.size(); i++)
addUnitClause(s, not(lits.get(i)))... | java | public void encode(final MiniSatStyleSolver s, final LNGIntVector lits, int rhs) {
assert lits.size() > 0;
hasEncoding = false;
this.cardinalityUpoutlits.clear();
this.cardinalityLwoutlits.clear();
if (rhs == 0) {
for (int i = 0; i < lits.size(); i++)
addUnitClause(s, not(lits.get(i)))... | [
"public",
"void",
"encode",
"(",
"final",
"MiniSatStyleSolver",
"s",
",",
"final",
"LNGIntVector",
"lits",
",",
"int",
"rhs",
")",
"{",
"assert",
"lits",
".",
"size",
"(",
")",
">",
"0",
";",
"hasEncoding",
"=",
"false",
";",
"this",
".",
"cardinalityUpo... | Encodes a cardinality constraint.
@param s the solver
@param lits the literals of the constraint
@param rhs the right hand side of the constraint | [
"Encodes",
"a",
"cardinality",
"constraint",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/maxsat/encodings/ModularTotalizer.java#L111-L147 |
109,140 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/maxsat/encodings/ModularTotalizer.java | ModularTotalizer.update | public void update(final MiniSatStyleSolver s, int rhs) {
assert this.currentCardinalityRhs != -1;
assert hasEncoding;
this.encodeOutput(s, rhs);
this.currentCardinalityRhs = rhs + 1;
} | java | public void update(final MiniSatStyleSolver s, int rhs) {
assert this.currentCardinalityRhs != -1;
assert hasEncoding;
this.encodeOutput(s, rhs);
this.currentCardinalityRhs = rhs + 1;
} | [
"public",
"void",
"update",
"(",
"final",
"MiniSatStyleSolver",
"s",
",",
"int",
"rhs",
")",
"{",
"assert",
"this",
".",
"currentCardinalityRhs",
"!=",
"-",
"1",
";",
"assert",
"hasEncoding",
";",
"this",
".",
"encodeOutput",
"(",
"s",
",",
"rhs",
")",
"... | Updates the right hand side of the current constraint.
@param s the solver
@param rhs the new right hand side | [
"Updates",
"the",
"right",
"hand",
"side",
"of",
"the",
"current",
"constraint",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/maxsat/encodings/ModularTotalizer.java#L154-L159 |
109,141 | logic-ng/LogicNG | src/main/java/org/logicng/solvers/datastructures/LNGBoundedLongQueue.java | LNGBoundedLongQueue.push | public void push(long x) {
if (this.queueSize == this.maxSize) {
assert this.last == this.first;
this.sumOfQueue -= this.elems.get(this.last);
if ((++this.last) == this.maxSize)
this.last = 0;
} else
this.queueSize++;
this.sumOfQueue += x;
this.elems.set(this.first, x);
... | java | public void push(long x) {
if (this.queueSize == this.maxSize) {
assert this.last == this.first;
this.sumOfQueue -= this.elems.get(this.last);
if ((++this.last) == this.maxSize)
this.last = 0;
} else
this.queueSize++;
this.sumOfQueue += x;
this.elems.set(this.first, x);
... | [
"public",
"void",
"push",
"(",
"long",
"x",
")",
"{",
"if",
"(",
"this",
".",
"queueSize",
"==",
"this",
".",
"maxSize",
")",
"{",
"assert",
"this",
".",
"last",
"==",
"this",
".",
"first",
";",
"this",
".",
"sumOfQueue",
"-=",
"this",
".",
"elems"... | Pushes a new element to the queue.
@param x the new element | [
"Pushes",
"a",
"new",
"element",
"to",
"the",
"queue",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/datastructures/LNGBoundedLongQueue.java#L119-L133 |
109,142 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Collection<Formula> formulas, final Collection<Variable> variables, final BackboneType type) {
solver.reset();
solver.add(formulas);
return solver.compute(variables, type);
} | java | public static Backbone compute(final Collection<Formula> formulas, final Collection<Variable> variables, final BackboneType type) {
solver.reset();
solver.add(formulas);
return solver.compute(variables, type);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
",",
"final",
"BackboneType",
"type",
")",
"{",
"solver",
".",
"reset",
"(",
")",
";",
"s... | Computes the backbone for a given collection of formulas w.r.t. a collection of variables and a backbone type.
@param formulas the given collection of formulas
@param variables the given collection of relevant variables for the backbone computation
@param type the type of backbone variables that should be compute... | [
"Computes",
"the",
"backbone",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"and",
"a",
"backbone",
"type",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L83-L87 |
109,143 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Collection<Formula> formulas, final Collection<Variable> variables) {
return compute(formulas, variables, BackboneType.POSITIVE_AND_NEGATIVE);
} | java | public static Backbone compute(final Collection<Formula> formulas, final Collection<Variable> variables) {
return compute(formulas, variables, BackboneType.POSITIVE_AND_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"variables",
",",
"BackboneType",
".",
... | Computes the complete backbone for a given collection of formulas w.r.t. a collection of variables and a backbone type.
@param formulas the given collection of formulas
@param variables the given collection of relevant variables for the backbone computation
@return the backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"complete",
"backbone",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"and",
"a",
"backbone",
"type",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L95-L97 |
109,144 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Collection<Formula> formulas, final BackboneType type) {
return compute(formulas, allVariablesInFormulas(formulas), type);
} | java | public static Backbone compute(final Collection<Formula> formulas, final BackboneType type) {
return compute(formulas, allVariablesInFormulas(formulas), type);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
",",
"final",
"BackboneType",
"type",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"allVariablesInFormulas",
"(",
"formulas",
")",
",",
"type",
")",... | Computes the backbone for a given collection of formulas w.r.t. a given backbone type.
@param formulas the given collection of formulas
@param type the type of backbone variables that should be computed
@return the backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"backbone",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"w",
".",
"r",
".",
"t",
".",
"a",
"given",
"backbone",
"type",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L105-L107 |
109,145 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.POSITIVE_AND_NEGATIVE);
} | java | public static Backbone compute(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.POSITIVE_AND_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"allVariablesInFormulas",
"(",
"formulas",
")",
",",
"BackboneType",
".",
"POSITIVE_AND_NEGATIVE",
")",
"... | Computes the complete backbone for a given collection of formulas.
@param formulas the given collection of formulas
@return the backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"complete",
"backbone",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L114-L116 |
109,146 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Formula formula, final Collection<Variable> variables, final BackboneType type) {
return compute(Collections.singletonList(formula), variables, type);
} | java | public static Backbone compute(final Formula formula, final Collection<Variable> variables, final BackboneType type) {
return compute(Collections.singletonList(formula), variables, type);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Formula",
"formula",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
",",
"final",
"BackboneType",
"type",
")",
"{",
"return",
"compute",
"(",
"Collections",
".",
"singletonList",
"(",
"f... | Computes the backbone for a given formula w.r.t. a collection of variables and a backbone type.
@param formula the given formula
@param variables the given collection of relevant variables for the backbone computation
@param type the type of backbone variables that should be computed
@return the backbone or {@co... | [
"Computes",
"the",
"backbone",
"for",
"a",
"given",
"formula",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"and",
"a",
"backbone",
"type",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L125-L127 |
109,147 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Formula formula, final Collection<Variable> variables) {
return compute(formula, variables, BackboneType.POSITIVE_AND_NEGATIVE);
} | java | public static Backbone compute(final Formula formula, final Collection<Variable> variables) {
return compute(formula, variables, BackboneType.POSITIVE_AND_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Formula",
"formula",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
")",
"{",
"return",
"compute",
"(",
"formula",
",",
"variables",
",",
"BackboneType",
".",
"POSITIVE_AND_NEGATIVE",
")",... | Computes the complete backbone for a given formula w.r.t. a collection of variables and a backbone type.
@param formula the given formula
@param variables the given collection of relevant variables for the backbone computation
@return the backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"complete",
"backbone",
"for",
"a",
"given",
"formula",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"and",
"a",
"backbone",
"type",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L135-L137 |
109,148 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Formula formula, final BackboneType type) {
return compute(formula, formula.variables(), type);
} | java | public static Backbone compute(final Formula formula, final BackboneType type) {
return compute(formula, formula.variables(), type);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Formula",
"formula",
",",
"final",
"BackboneType",
"type",
")",
"{",
"return",
"compute",
"(",
"formula",
",",
"formula",
".",
"variables",
"(",
")",
",",
"type",
")",
";",
"}"
] | Computes the backbone for a given formula w.r.t. a given backbone type.
@param formula the given formula
@param type the type of backbone variables that should be computed
@return the backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"backbone",
"for",
"a",
"given",
"formula",
"w",
".",
"r",
".",
"t",
".",
"a",
"given",
"backbone",
"type",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L145-L147 |
109,149 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Formula formula) {
return compute(formula, formula.variables(), BackboneType.POSITIVE_AND_NEGATIVE);
} | java | public static Backbone compute(final Formula formula) {
return compute(formula, formula.variables(), BackboneType.POSITIVE_AND_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Formula",
"formula",
")",
"{",
"return",
"compute",
"(",
"formula",
",",
"formula",
".",
"variables",
"(",
")",
",",
"BackboneType",
".",
"POSITIVE_AND_NEGATIVE",
")",
";",
"}"
] | Computes the complete backbone for a given formula.
@param formula the given formula
@return the backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"complete",
"backbone",
"for",
"a",
"given",
"formula",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L154-L156 |
109,150 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computePositive | public static Backbone computePositive(final Collection<Formula> formulas, final Collection<Variable> variables) {
return compute(formulas, variables, BackboneType.ONLY_POSITIVE);
} | java | public static Backbone computePositive(final Collection<Formula> formulas, final Collection<Variable> variables) {
return compute(formulas, variables, BackboneType.ONLY_POSITIVE);
} | [
"public",
"static",
"Backbone",
"computePositive",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"variables",
",",
"BackboneType",
... | Computes the positive backbone variables for a given collection of formulas w.r.t. a collection of variables.
@param formulas the given collection of formulas
@param variables the given collection of relevant variables for the backbone computation
@return the positive backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"positive",
"backbone",
"variables",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L164-L166 |
109,151 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computePositive | public static Backbone computePositive(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.ONLY_POSITIVE);
} | java | public static Backbone computePositive(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.ONLY_POSITIVE);
} | [
"public",
"static",
"Backbone",
"computePositive",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"allVariablesInFormulas",
"(",
"formulas",
")",
",",
"BackboneType",
".",
"ONLY_POSITIVE",
")",
"... | Computes the positive backbone variables for a given collection of formulas.
@param formulas the given collection of formulas
@return the positive backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"positive",
"backbone",
"variables",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L173-L175 |
109,152 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computePositive | public static Backbone computePositive(final Formula formula, final Collection<Variable> variables) {
return compute(formula, variables, BackboneType.ONLY_POSITIVE);
} | java | public static Backbone computePositive(final Formula formula, final Collection<Variable> variables) {
return compute(formula, variables, BackboneType.ONLY_POSITIVE);
} | [
"public",
"static",
"Backbone",
"computePositive",
"(",
"final",
"Formula",
"formula",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
")",
"{",
"return",
"compute",
"(",
"formula",
",",
"variables",
",",
"BackboneType",
".",
"ONLY_POSITIVE",
")",... | Computes the positive backbone allVariablesInFormulas for a given formula w.r.t. a collection of variables.
@param formula the given formula
@param variables the given collection of relevant variables for the backbone computation
@return the positive backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"positive",
"backbone",
"allVariablesInFormulas",
"for",
"a",
"given",
"formula",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L183-L185 |
109,153 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computePositive | public static Backbone computePositive(final Formula formula) {
return compute(formula, formula.variables(), BackboneType.ONLY_POSITIVE);
} | java | public static Backbone computePositive(final Formula formula) {
return compute(formula, formula.variables(), BackboneType.ONLY_POSITIVE);
} | [
"public",
"static",
"Backbone",
"computePositive",
"(",
"final",
"Formula",
"formula",
")",
"{",
"return",
"compute",
"(",
"formula",
",",
"formula",
".",
"variables",
"(",
")",
",",
"BackboneType",
".",
"ONLY_POSITIVE",
")",
";",
"}"
] | Computes the positive backbone variables for a given formula.
@param formula the given formula
@return the positive backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"positive",
"backbone",
"variables",
"for",
"a",
"given",
"formula",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L192-L194 |
109,154 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computeNegative | public static Backbone computeNegative(final Collection<Formula> formulas, final Collection<Variable> variables) {
return compute(formulas, variables, BackboneType.ONLY_NEGATIVE);
} | java | public static Backbone computeNegative(final Collection<Formula> formulas, final Collection<Variable> variables) {
return compute(formulas, variables, BackboneType.ONLY_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"computeNegative",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"variables",
",",
"BackboneType",
... | Computes the negative backbone variables for a given collection of formulas w.r.t. a collection of variables.
@param formulas the given collection of formulas
@param variables the given collection of relevant variables for the backbone computation
@return the negative backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"negative",
"backbone",
"variables",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L202-L204 |
109,155 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computeNegative | public static Backbone computeNegative(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.ONLY_NEGATIVE);
} | java | public static Backbone computeNegative(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.ONLY_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"computeNegative",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"allVariablesInFormulas",
"(",
"formulas",
")",
",",
"BackboneType",
".",
"ONLY_NEGATIVE",
")",
"... | Computes the negative backbone variables for a given collection of formulas.
@param formulas the given collection of formulas
@return the negative backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"negative",
"backbone",
"variables",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L211-L213 |
109,156 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computeNegative | public static Backbone computeNegative(final Formula formula, final Collection<Variable> variables) {
return compute(formula, variables, BackboneType.ONLY_NEGATIVE);
} | java | public static Backbone computeNegative(final Formula formula, final Collection<Variable> variables) {
return compute(formula, variables, BackboneType.ONLY_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"computeNegative",
"(",
"final",
"Formula",
"formula",
",",
"final",
"Collection",
"<",
"Variable",
">",
"variables",
")",
"{",
"return",
"compute",
"(",
"formula",
",",
"variables",
",",
"BackboneType",
".",
"ONLY_NEGATIVE",
")",... | Computes the negative backbone variables for a given formula w.r.t. a collection of variables.
@param formula the given formula
@param variables the given collection of relevant variables for the backbone computation
@return the negative backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"negative",
"backbone",
"variables",
"for",
"a",
"given",
"formula",
"w",
".",
"r",
".",
"t",
".",
"a",
"collection",
"of",
"variables",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L221-L223 |
109,157 | logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.computeNegative | public static Backbone computeNegative(final Formula formula) {
return compute(formula, formula.variables(), BackboneType.ONLY_NEGATIVE);
} | java | public static Backbone computeNegative(final Formula formula) {
return compute(formula, formula.variables(), BackboneType.ONLY_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"computeNegative",
"(",
"final",
"Formula",
"formula",
")",
"{",
"return",
"compute",
"(",
"formula",
",",
"formula",
".",
"variables",
"(",
")",
",",
"BackboneType",
".",
"ONLY_NEGATIVE",
")",
";",
"}"
] | Computes the negative backbone variables for a given formula.
@param formula the given formula
@return the negative backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"negative",
"backbone",
"variables",
"for",
"a",
"given",
"formula",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L230-L232 |
109,158 | logic-ng/LogicNG | src/main/java/org/logicng/collections/LNGVector.java | LNGVector.push | public void push(final T element) {
int newSize = this.size + 1;
this.ensure(newSize);
this.elements[this.size++] = element;
} | java | public void push(final T element) {
int newSize = this.size + 1;
this.ensure(newSize);
this.elements[this.size++] = element;
} | [
"public",
"void",
"push",
"(",
"final",
"T",
"element",
")",
"{",
"int",
"newSize",
"=",
"this",
".",
"size",
"+",
"1",
";",
"this",
".",
"ensure",
"(",
"newSize",
")",
";",
"this",
".",
"elements",
"[",
"this",
".",
"size",
"++",
"]",
"=",
"elem... | Pushes an element at the end of the vector.
@param element the element | [
"Pushes",
"an",
"element",
"at",
"the",
"end",
"of",
"the",
"vector",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGVector.java#L127-L131 |
109,159 | logic-ng/LogicNG | src/main/java/org/logicng/collections/LNGVector.java | LNGVector.shrinkTo | public void shrinkTo(int newSize) {
if (newSize < this.size) {
for (int i = this.size; i > newSize; i--)
this.elements[i - 1] = null;
this.size = newSize;
}
} | java | public void shrinkTo(int newSize) {
if (newSize < this.size) {
for (int i = this.size; i > newSize; i--)
this.elements[i - 1] = null;
this.size = newSize;
}
} | [
"public",
"void",
"shrinkTo",
"(",
"int",
"newSize",
")",
"{",
"if",
"(",
"newSize",
"<",
"this",
".",
"size",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"this",
".",
"size",
";",
"i",
">",
"newSize",
";",
"i",
"--",
")",
"this",
".",
"elements",
"... | Shrinks the vector to a given size if the new size is less then the current size. Otherwise the size remains
the same.
@param newSize the new size | [
"Shrinks",
"the",
"vector",
"to",
"a",
"given",
"size",
"if",
"the",
"new",
"size",
"is",
"less",
"then",
"the",
"current",
"size",
".",
"Otherwise",
"the",
"size",
"remains",
"the",
"same",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGVector.java#L174-L180 |
109,160 | logic-ng/LogicNG | src/main/java/org/logicng/collections/LNGVector.java | LNGVector.replaceInplace | @SuppressWarnings("unchecked")
public void replaceInplace(final LNGVector<? extends T> other) {
if (this == other)
throw new IllegalArgumentException("cannot replace a vector in-place with itself");
this.elements = (T[]) new Object[other.size()];
for (int i = 0; i < other.size(); i++)
this.ele... | java | @SuppressWarnings("unchecked")
public void replaceInplace(final LNGVector<? extends T> other) {
if (this == other)
throw new IllegalArgumentException("cannot replace a vector in-place with itself");
this.elements = (T[]) new Object[other.size()];
for (int i = 0; i < other.size(); i++)
this.ele... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"replaceInplace",
"(",
"final",
"LNGVector",
"<",
"?",
"extends",
"T",
">",
"other",
")",
"{",
"if",
"(",
"this",
"==",
"other",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"ca... | Replaces the contents of this vector with the contents of another vector in-place.
@param other the other vector
@throws IllegalArgumentException if you try to replace a vector with itself | [
"Replaces",
"the",
"contents",
"of",
"this",
"vector",
"with",
"the",
"contents",
"of",
"another",
"vector",
"in",
"-",
"place",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGVector.java#L238-L246 |
109,161 | logic-ng/LogicNG | src/main/java/org/logicng/collections/LNGVector.java | LNGVector.selectionSort | private void selectionSort(final T[] array, int start, int end, Comparator<T> lt) {
int i;
int j;
int bestI;
T tmp;
for (i = start; i < end; i++) {
bestI = i;
for (j = i + 1; j < end; j++) {
if (lt.compare(array[j], array[bestI]) < 0)
bestI = j;
}
tmp = arra... | java | private void selectionSort(final T[] array, int start, int end, Comparator<T> lt) {
int i;
int j;
int bestI;
T tmp;
for (i = start; i < end; i++) {
bestI = i;
for (j = i + 1; j < end; j++) {
if (lt.compare(array[j], array[bestI]) < 0)
bestI = j;
}
tmp = arra... | [
"private",
"void",
"selectionSort",
"(",
"final",
"T",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
",",
"Comparator",
"<",
"T",
">",
"lt",
")",
"{",
"int",
"i",
";",
"int",
"j",
";",
"int",
"bestI",
";",
"T",
"tmp",
";",
"for",
"... | Selection sort implementation for a given array.
@param array the array
@param start the start index for sorting
@param end the end index for sorting
@param lt the comparator for elements of the array | [
"Selection",
"sort",
"implementation",
"for",
"a",
"given",
"array",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGVector.java#L288-L303 |
109,162 | logic-ng/LogicNG | src/main/java/org/logicng/collections/LNGVector.java | LNGVector.sort | private void sort(final T[] array, int start, int end, Comparator<T> lt) {
if (start == end)
return;
if ((end - start) <= 15)
this.selectionSort(array, start, end, lt);
else {
final T pivot = array[start + ((end - start) / 2)];
T tmp;
int i = start - 1;
int j = end;
... | java | private void sort(final T[] array, int start, int end, Comparator<T> lt) {
if (start == end)
return;
if ((end - start) <= 15)
this.selectionSort(array, start, end, lt);
else {
final T pivot = array[start + ((end - start) / 2)];
T tmp;
int i = start - 1;
int j = end;
... | [
"private",
"void",
"sort",
"(",
"final",
"T",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
",",
"Comparator",
"<",
"T",
">",
"lt",
")",
"{",
"if",
"(",
"start",
"==",
"end",
")",
"return",
";",
"if",
"(",
"(",
"end",
"-",
"start",... | Merge sort implementation for a given array.
@param array the array
@param start the start index for sorting
@param end the end index for sorting
@param lt the comparator for elements of the array | [
"Merge",
"sort",
"implementation",
"for",
"a",
"given",
"array",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGVector.java#L312-L338 |
109,163 | logic-ng/LogicNG | src/main/java/org/logicng/collections/LNGBooleanVector.java | LNGBooleanVector.growTo | public void growTo(int size, boolean pad) {
if (this.size >= size)
return;
this.ensure(size);
for (int i = this.size; i < size; i++)
this.elements[i] = pad;
this.size = size;
} | java | public void growTo(int size, boolean pad) {
if (this.size >= size)
return;
this.ensure(size);
for (int i = this.size; i < size; i++)
this.elements[i] = pad;
this.size = size;
} | [
"public",
"void",
"growTo",
"(",
"int",
"size",
",",
"boolean",
"pad",
")",
"{",
"if",
"(",
"this",
".",
"size",
">=",
"size",
")",
"return",
";",
"this",
".",
"ensure",
"(",
"size",
")",
";",
"for",
"(",
"int",
"i",
"=",
"this",
".",
"size",
"... | Grows the vector to a new size and initializes the new elements with a given value.
@param size the new size
@param pad the value for new elements | [
"Grows",
"the",
"vector",
"to",
"a",
"new",
"size",
"and",
"initializes",
"the",
"new",
"elements",
"with",
"a",
"given",
"value",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGBooleanVector.java#L176-L183 |
109,164 | logic-ng/LogicNG | src/main/java/org/logicng/collections/LNGBooleanVector.java | LNGBooleanVector.reverseInplace | public void reverseInplace() {
for (int i = 0; i < this.size / 2; i++) {
boolean temp = this.elements[i];
this.elements[i] = this.elements[this.size - i - 1];
this.elements[this.size() - i - 1] = temp;
}
} | java | public void reverseInplace() {
for (int i = 0; i < this.size / 2; i++) {
boolean temp = this.elements[i];
this.elements[i] = this.elements[this.size - i - 1];
this.elements[this.size() - i - 1] = temp;
}
} | [
"public",
"void",
"reverseInplace",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"size",
"/",
"2",
";",
"i",
"++",
")",
"{",
"boolean",
"temp",
"=",
"this",
".",
"elements",
"[",
"i",
"]",
";",
"this",
".",
"el... | Reverses the content of this vector in-place. | [
"Reverses",
"the",
"content",
"of",
"this",
"vector",
"in",
"-",
"place",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGBooleanVector.java#L199-L205 |
109,165 | svenkubiak/embedded-mongodb | src/main/java/de/svenkubiak/embeddedmongodb/EmbeddedMongoDB.java | EmbeddedMongoDB.withVersion | public EmbeddedMongoDB withVersion(Version.Main version) {
Objects.requireNonNull(version, "version can not be null");
this.version = version;
return this;
} | java | public EmbeddedMongoDB withVersion(Version.Main version) {
Objects.requireNonNull(version, "version can not be null");
this.version = version;
return this;
} | [
"public",
"EmbeddedMongoDB",
"withVersion",
"(",
"Version",
".",
"Main",
"version",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"version",
",",
"\"version can not be null\"",
")",
";",
"this",
".",
"version",
"=",
"version",
";",
"return",
"this",
";",
"}... | Sets the version for the EmbeddedMongoDB instance
Default is Version.Main.PRODUCTION
@param version The version to set
@return EmbeddedMongoDB instance | [
"Sets",
"the",
"version",
"for",
"the",
"EmbeddedMongoDB",
"instance"
] | c4394065bdce5917491a6537efdc808675047629 | https://github.com/svenkubiak/embedded-mongodb/blob/c4394065bdce5917491a6537efdc808675047629/src/main/java/de/svenkubiak/embeddedmongodb/EmbeddedMongoDB.java#L73-L78 |
109,166 | svenkubiak/embedded-mongodb | src/main/java/de/svenkubiak/embeddedmongodb/EmbeddedMongoDB.java | EmbeddedMongoDB.start | public EmbeddedMongoDB start() {
if (!this.active) {
try {
this.mongodProcess = MongodStarter.getDefaultInstance().prepare(new MongodConfigBuilder()
.version(this.version)
.net(new Net(this.host, this.port, false))
.build()).start();
... | java | public EmbeddedMongoDB start() {
if (!this.active) {
try {
this.mongodProcess = MongodStarter.getDefaultInstance().prepare(new MongodConfigBuilder()
.version(this.version)
.net(new Net(this.host, this.port, false))
.build()).start();
... | [
"public",
"EmbeddedMongoDB",
"start",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"active",
")",
"{",
"try",
"{",
"this",
".",
"mongodProcess",
"=",
"MongodStarter",
".",
"getDefaultInstance",
"(",
")",
".",
"prepare",
"(",
"new",
"MongodConfigBuilder",
"(... | Starts the EmbeddedMongoDB instance
@return EmbeddedMongoDB instance | [
"Starts",
"the",
"EmbeddedMongoDB",
"instance"
] | c4394065bdce5917491a6537efdc808675047629 | https://github.com/svenkubiak/embedded-mongodb/blob/c4394065bdce5917491a6537efdc808675047629/src/main/java/de/svenkubiak/embeddedmongodb/EmbeddedMongoDB.java#L84-L100 |
109,167 | svenkubiak/embedded-mongodb | src/main/java/de/svenkubiak/embeddedmongodb/EmbeddedMongoDB.java | EmbeddedMongoDB.stop | public void stop() {
if (this.active) {
this.mongodProcess.stop();
this.active = false;
LOG.info("Successfully stopped EmbeddedMongoDB @ {}:{}", this.host, this.port);
}
} | java | public void stop() {
if (this.active) {
this.mongodProcess.stop();
this.active = false;
LOG.info("Successfully stopped EmbeddedMongoDB @ {}:{}", this.host, this.port);
}
} | [
"public",
"void",
"stop",
"(",
")",
"{",
"if",
"(",
"this",
".",
"active",
")",
"{",
"this",
".",
"mongodProcess",
".",
"stop",
"(",
")",
";",
"this",
".",
"active",
"=",
"false",
";",
"LOG",
".",
"info",
"(",
"\"Successfully stopped EmbeddedMongoDB @ {}... | Stops the EmbeddedMongoDB instance | [
"Stops",
"the",
"EmbeddedMongoDB",
"instance"
] | c4394065bdce5917491a6537efdc808675047629 | https://github.com/svenkubiak/embedded-mongodb/blob/c4394065bdce5917491a6537efdc808675047629/src/main/java/de/svenkubiak/embeddedmongodb/EmbeddedMongoDB.java#L105-L112 |
109,168 | TNG/property-loader | src/main/java/com/tngtech/propertyloader/Obfuscator.java | Obfuscator.encrypt | public String encrypt(String toEncrypt) {
byte[] encryptedBytes = encryptInternal(dataEncryptionSecretKeySpec, toEncrypt);
return new String(base64Encoder.encode(encryptedBytes));
} | java | public String encrypt(String toEncrypt) {
byte[] encryptedBytes = encryptInternal(dataEncryptionSecretKeySpec, toEncrypt);
return new String(base64Encoder.encode(encryptedBytes));
} | [
"public",
"String",
"encrypt",
"(",
"String",
"toEncrypt",
")",
"{",
"byte",
"[",
"]",
"encryptedBytes",
"=",
"encryptInternal",
"(",
"dataEncryptionSecretKeySpec",
",",
"toEncrypt",
")",
";",
"return",
"new",
"String",
"(",
"base64Encoder",
".",
"encode",
"(",
... | Encrypt and base64-encode a String.
@param toEncrypt - the String to encrypt.
@return the Blowfish-encrypted and base64-encoded String. | [
"Encrypt",
"and",
"base64",
"-",
"encode",
"a",
"String",
"."
] | 0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f | https://github.com/TNG/property-loader/blob/0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f/src/main/java/com/tngtech/propertyloader/Obfuscator.java#L41-L44 |
109,169 | TNG/property-loader | src/main/java/com/tngtech/propertyloader/Obfuscator.java | Obfuscator.encryptInternal | private byte[] encryptInternal(SecretKeySpec key, String toEncrypt) {
try {
Cipher cipher = Cipher.getInstance(ENCRYPTION_ALGORITHM + ENCRYPTION_ALGORITHM_MODIFIER);
cipher.init(Cipher.ENCRYPT_MODE, key);
return cipher.doFinal(toEncrypt.getBytes(ENCODING));
} catch (G... | java | private byte[] encryptInternal(SecretKeySpec key, String toEncrypt) {
try {
Cipher cipher = Cipher.getInstance(ENCRYPTION_ALGORITHM + ENCRYPTION_ALGORITHM_MODIFIER);
cipher.init(Cipher.ENCRYPT_MODE, key);
return cipher.doFinal(toEncrypt.getBytes(ENCODING));
} catch (G... | [
"private",
"byte",
"[",
"]",
"encryptInternal",
"(",
"SecretKeySpec",
"key",
",",
"String",
"toEncrypt",
")",
"{",
"try",
"{",
"Cipher",
"cipher",
"=",
"Cipher",
".",
"getInstance",
"(",
"ENCRYPTION_ALGORITHM",
"+",
"ENCRYPTION_ALGORITHM_MODIFIER",
")",
";",
"ci... | Internal Encryption method.
@param key - the SecretKeySpec used to encrypt
@param toEncrypt - the String to encrypt
@return the encrypted String (as byte[]) | [
"Internal",
"Encryption",
"method",
"."
] | 0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f | https://github.com/TNG/property-loader/blob/0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f/src/main/java/com/tngtech/propertyloader/Obfuscator.java#L53-L63 |
109,170 | TNG/property-loader | src/main/java/com/tngtech/propertyloader/Obfuscator.java | Obfuscator.decrypt | public String decrypt(String toDecrypt) {
byte[] encryptedBytes = base64Decoder.decode(toDecrypt);
return decryptInternal(dataEncryptionSecretKeySpec, encryptedBytes);
} | java | public String decrypt(String toDecrypt) {
byte[] encryptedBytes = base64Decoder.decode(toDecrypt);
return decryptInternal(dataEncryptionSecretKeySpec, encryptedBytes);
} | [
"public",
"String",
"decrypt",
"(",
"String",
"toDecrypt",
")",
"{",
"byte",
"[",
"]",
"encryptedBytes",
"=",
"base64Decoder",
".",
"decode",
"(",
"toDecrypt",
")",
";",
"return",
"decryptInternal",
"(",
"dataEncryptionSecretKeySpec",
",",
"encryptedBytes",
")",
... | Decrypt an encrypted and base64-encoded String
@param toDecrypt - the encrypted and base64-encoded String
@return the plaintext String | [
"Decrypt",
"an",
"encrypted",
"and",
"base64",
"-",
"encoded",
"String"
] | 0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f | https://github.com/TNG/property-loader/blob/0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f/src/main/java/com/tngtech/propertyloader/Obfuscator.java#L71-L74 |
109,171 | TNG/property-loader | src/main/java/com/tngtech/propertyloader/Obfuscator.java | Obfuscator.decryptInternal | private String decryptInternal(SecretKeySpec key, byte[] encryptedBytes) {
try {
Cipher cipher = Cipher.getInstance(ENCRYPTION_ALGORITHM + ENCRYPTION_ALGORITHM_MODIFIER);
cipher.init(Cipher.DECRYPT_MODE, key);
byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
... | java | private String decryptInternal(SecretKeySpec key, byte[] encryptedBytes) {
try {
Cipher cipher = Cipher.getInstance(ENCRYPTION_ALGORITHM + ENCRYPTION_ALGORITHM_MODIFIER);
cipher.init(Cipher.DECRYPT_MODE, key);
byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
... | [
"private",
"String",
"decryptInternal",
"(",
"SecretKeySpec",
"key",
",",
"byte",
"[",
"]",
"encryptedBytes",
")",
"{",
"try",
"{",
"Cipher",
"cipher",
"=",
"Cipher",
".",
"getInstance",
"(",
"ENCRYPTION_ALGORITHM",
"+",
"ENCRYPTION_ALGORITHM_MODIFIER",
")",
";",
... | Internal decryption method.
@param key - the SecretKeySpec used to decrypt
@param encryptedBytes - the byte[] to decrypt
@return the decrypted plaintext String. | [
"Internal",
"decryption",
"method",
"."
] | 0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f | https://github.com/TNG/property-loader/blob/0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f/src/main/java/com/tngtech/propertyloader/Obfuscator.java#L83-L94 |
109,172 | fcrepo4-exts/fcrepo-camel-toolbox | fcrepo-reindexing/src/main/java/org/fcrepo/camel/reindexing/RestProcessor.java | RestProcessor.process | public void process(final Exchange exchange) throws Exception {
final Message in = exchange.getIn();
final String contentType = in.getHeader(CONTENT_TYPE, "", String.class);
final String body = in.getBody(String.class);
final Set<String> endpoints = new HashSet<>();
for (final ... | java | public void process(final Exchange exchange) throws Exception {
final Message in = exchange.getIn();
final String contentType = in.getHeader(CONTENT_TYPE, "", String.class);
final String body = in.getBody(String.class);
final Set<String> endpoints = new HashSet<>();
for (final ... | [
"public",
"void",
"process",
"(",
"final",
"Exchange",
"exchange",
")",
"throws",
"Exception",
"{",
"final",
"Message",
"in",
"=",
"exchange",
".",
"getIn",
"(",
")",
";",
"final",
"String",
"contentType",
"=",
"in",
".",
"getHeader",
"(",
"CONTENT_TYPE",
... | Convert the incoming REST request into the correct
Fcrepo header fields.
@param exchange the current message exchange | [
"Convert",
"the",
"incoming",
"REST",
"request",
"into",
"the",
"correct",
"Fcrepo",
"header",
"fields",
"."
] | 9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f | https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-reindexing/src/main/java/org/fcrepo/camel/reindexing/RestProcessor.java#L62-L88 |
109,173 | fcrepo4-exts/fcrepo-camel-toolbox | fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java | AuditSparqlProcessor.process | public void process(final Exchange exchange) throws Exception {
final Message in = exchange.getIn();
final String eventURIBase = in.getHeader(AuditHeaders.EVENT_BASE_URI, String.class);
final String eventID = in.getHeader(FCREPO_EVENT_ID, String.class);
final Resource eventURI = createRe... | java | public void process(final Exchange exchange) throws Exception {
final Message in = exchange.getIn();
final String eventURIBase = in.getHeader(AuditHeaders.EVENT_BASE_URI, String.class);
final String eventID = in.getHeader(FCREPO_EVENT_ID, String.class);
final Resource eventURI = createRe... | [
"public",
"void",
"process",
"(",
"final",
"Exchange",
"exchange",
")",
"throws",
"Exception",
"{",
"final",
"Message",
"in",
"=",
"exchange",
".",
"getIn",
"(",
")",
";",
"final",
"String",
"eventURIBase",
"=",
"in",
".",
"getHeader",
"(",
"AuditHeaders",
... | Define how a message should be processed.
@param exchange the current camel message exchange | [
"Define",
"how",
"a",
"message",
"should",
"be",
"processed",
"."
] | 9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f | https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java#L86-L101 |
109,174 | fcrepo4-exts/fcrepo-camel-toolbox | fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java | AuditSparqlProcessor.serializedGraphForMessage | private static String serializedGraphForMessage(final Message message, final Resource subject) throws IOException {
// serialize triples
final ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream();
final Model model = createDefaultModel();
// get info from jms message hea... | java | private static String serializedGraphForMessage(final Message message, final Resource subject) throws IOException {
// serialize triples
final ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream();
final Model model = createDefaultModel();
// get info from jms message hea... | [
"private",
"static",
"String",
"serializedGraphForMessage",
"(",
"final",
"Message",
"message",
",",
"final",
"Resource",
"subject",
")",
"throws",
"IOException",
"{",
"// serialize triples",
"final",
"ByteArrayOutputStream",
"serializedGraph",
"=",
"new",
"ByteArrayOutpu... | Convert a Camel message to audit event description.
@param message Camel message produced by an audit event
@param subject RDF subject of the audit description | [
"Convert",
"a",
"Camel",
"message",
"to",
"audit",
"event",
"description",
"."
] | 9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f | https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java#L120-L155 |
109,175 | fcrepo4-exts/fcrepo-camel-toolbox | fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java | AuditSparqlProcessor.getAuditEventType | private static Optional<String> getAuditEventType(final List<String> eventType, final List<String> resourceType) {
// mapping event type/properties to audit event type
if (eventType.contains(EVENT_NAMESPACE + "ResourceCreation") || eventType.contains(AS_NAMESPACE + "Create")) {
if (resourceT... | java | private static Optional<String> getAuditEventType(final List<String> eventType, final List<String> resourceType) {
// mapping event type/properties to audit event type
if (eventType.contains(EVENT_NAMESPACE + "ResourceCreation") || eventType.contains(AS_NAMESPACE + "Create")) {
if (resourceT... | [
"private",
"static",
"Optional",
"<",
"String",
">",
"getAuditEventType",
"(",
"final",
"List",
"<",
"String",
">",
"eventType",
",",
"final",
"List",
"<",
"String",
">",
"resourceType",
")",
"{",
"// mapping event type/properties to audit event type",
"if",
"(",
... | Returns the Audit event type based on fedora event type and properties.
@param eventType from Fedora
@param properties associated with the Fedora event
@return Audit event | [
"Returns",
"the",
"Audit",
"event",
"type",
"based",
"on",
"fedora",
"event",
"type",
"and",
"properties",
"."
] | 9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f | https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java#L164-L188 |
109,176 | fcrepo4-exts/fcrepo-camel-toolbox | fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/LDPathWrapper.java | LDPathWrapper.programQuery | public List<Map<String, Collection<?>>> programQuery(final String uri, final InputStream program)
throws LDPathParseException {
return singletonList(ldpath.programQuery(new URIImpl(uri), new InputStreamReader(program)));
} | java | public List<Map<String, Collection<?>>> programQuery(final String uri, final InputStream program)
throws LDPathParseException {
return singletonList(ldpath.programQuery(new URIImpl(uri), new InputStreamReader(program)));
} | [
"public",
"List",
"<",
"Map",
"<",
"String",
",",
"Collection",
"<",
"?",
">",
">",
">",
"programQuery",
"(",
"final",
"String",
"uri",
",",
"final",
"InputStream",
"program",
")",
"throws",
"LDPathParseException",
"{",
"return",
"singletonList",
"(",
"ldpat... | Execute an LDPath query
@param uri the URI to query
@param program the LDPath program
@return a result object wrapped in a List
@throws LDPathParseException if the LDPath program was malformed | [
"Execute",
"an",
"LDPath",
"query"
] | 9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f | https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/LDPathWrapper.java#L102-L105 |
109,177 | fcrepo4-exts/fcrepo-camel-toolbox | fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/ClientFactory.java | ClientFactory.createClient | public static ClientConfiguration createClient(final AuthScope authScope, final Credentials credentials,
final List<Endpoint> endpoints, final List<DataProvider> providers) {
final ClientConfiguration client = new ClientConfiguration();
if (credentials != null && authScope != null) {
... | java | public static ClientConfiguration createClient(final AuthScope authScope, final Credentials credentials,
final List<Endpoint> endpoints, final List<DataProvider> providers) {
final ClientConfiguration client = new ClientConfiguration();
if (credentials != null && authScope != null) {
... | [
"public",
"static",
"ClientConfiguration",
"createClient",
"(",
"final",
"AuthScope",
"authScope",
",",
"final",
"Credentials",
"credentials",
",",
"final",
"List",
"<",
"Endpoint",
">",
"endpoints",
",",
"final",
"List",
"<",
"DataProvider",
">",
"providers",
")"... | Create a linked data client suitable for use with a Fedora Repository.
@param authScope the authentication scope
@param credentials the credentials
@param endpoints additional endpoints to enable on the client
@param providers additional providers to enable on the client
@return a configuration for use with an LDClient | [
"Create",
"a",
"linked",
"data",
"client",
"suitable",
"for",
"use",
"with",
"a",
"Fedora",
"Repository",
"."
] | 9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f | https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/ClientFactory.java#L104-L129 |
109,178 | fcrepo4-exts/fcrepo-camel-toolbox | fcrepo-serialization/src/main/java/org/fcrepo/camel/serialization/SerializationRouter.java | SerializationRouter.configure | public void configure() throws Exception {
final Namespaces ns = new Namespaces("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
.add("fedora", REPOSITORY);
/**
* A generic error handler (specific to this RouteBuilder)
*/
onException(Exception.class)
... | java | public void configure() throws Exception {
final Namespaces ns = new Namespaces("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
.add("fedora", REPOSITORY);
/**
* A generic error handler (specific to this RouteBuilder)
*/
onException(Exception.class)
... | [
"public",
"void",
"configure",
"(",
")",
"throws",
"Exception",
"{",
"final",
"Namespaces",
"ns",
"=",
"new",
"Namespaces",
"(",
"\"rdf\"",
",",
"\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"",
")",
".",
"add",
"(",
"\"fedora\"",
",",
"REPOSITORY",
")",
";",
"... | Configure the message route workflow | [
"Configure",
"the",
"message",
"route",
"workflow"
] | 9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f | https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-serialization/src/main/java/org/fcrepo/camel/serialization/SerializationRouter.java#L74-L140 |
109,179 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonPropertyMeta.java | JsonPropertyMeta.name | public JsonPropertyBuilder<T, P> name(String name) {
return new JsonPropertyBuilder<T, P>(coderClass, name, null, null);
} | java | public JsonPropertyBuilder<T, P> name(String name) {
return new JsonPropertyBuilder<T, P>(coderClass, name, null, null);
} | [
"public",
"JsonPropertyBuilder",
"<",
"T",
",",
"P",
">",
"name",
"(",
"String",
"name",
")",
"{",
"return",
"new",
"JsonPropertyBuilder",
"<",
"T",
",",
"P",
">",
"(",
"coderClass",
",",
"name",
",",
"null",
",",
"null",
")",
";",
"}"
] | Gets a new instance of property builder for the given key name.
@param name
@return a new property builder instance
@author vvakame | [
"Gets",
"a",
"new",
"instance",
"of",
"property",
"builder",
"for",
"the",
"given",
"key",
"name",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonPropertyMeta.java#L43-L45 |
109,180 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonPropertyMeta.java | JsonPropertyMeta.coder | public JsonPropertyBuilder<T, P> coder(JsonModelCoder<P> coder) {
return new JsonPropertyBuilder<T, P>(coderClass, name, coder, null);
} | java | public JsonPropertyBuilder<T, P> coder(JsonModelCoder<P> coder) {
return new JsonPropertyBuilder<T, P>(coderClass, name, coder, null);
} | [
"public",
"JsonPropertyBuilder",
"<",
"T",
",",
"P",
">",
"coder",
"(",
"JsonModelCoder",
"<",
"P",
">",
"coder",
")",
"{",
"return",
"new",
"JsonPropertyBuilder",
"<",
"T",
",",
"P",
">",
"(",
"coderClass",
",",
"name",
",",
"coder",
",",
"null",
")",... | Gets a new instance of property builder for the given value coder.
@param coder
@return a new property builder instance
@author vvakame | [
"Gets",
"a",
"new",
"instance",
"of",
"property",
"builder",
"for",
"the",
"given",
"value",
"coder",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonPropertyMeta.java#L53-L55 |
109,181 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonPropertyMeta.java | JsonPropertyMeta.router | public JsonPropertyBuilder<T, P> router(JsonCoderRouter<P> router) {
return new JsonPropertyBuilder<T, P>(coderClass, name, null, router);
} | java | public JsonPropertyBuilder<T, P> router(JsonCoderRouter<P> router) {
return new JsonPropertyBuilder<T, P>(coderClass, name, null, router);
} | [
"public",
"JsonPropertyBuilder",
"<",
"T",
",",
"P",
">",
"router",
"(",
"JsonCoderRouter",
"<",
"P",
">",
"router",
")",
"{",
"return",
"new",
"JsonPropertyBuilder",
"<",
"T",
",",
"P",
">",
"(",
"coderClass",
",",
"name",
",",
"null",
",",
"router",
... | Gets a new instance of property builder for the given coder router.
@param router
@return a new property builder instance
@author vvakame | [
"Gets",
"a",
"new",
"instance",
"of",
"property",
"builder",
"for",
"the",
"given",
"coder",
"router",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonPropertyMeta.java#L63-L65 |
109,182 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonHash.java | JsonHash.put | @Deprecated
public Object put(String key, Object value, State state) {
return put(key, value, Type.from(state));
} | java | @Deprecated
public Object put(String key, Object value, State state) {
return put(key, value, Type.from(state));
} | [
"@",
"Deprecated",
"public",
"Object",
"put",
"(",
"String",
"key",
",",
"Object",
"value",
",",
"State",
"state",
")",
"{",
"return",
"put",
"(",
"key",
",",
"value",
",",
"Type",
".",
"from",
"(",
"state",
")",
")",
";",
"}"
] | put with State.
@param key
@param value
@param state
@return The instance of the value for the given key
@deprecated {@link State} is confuse the users. replace to {@link Type} in about {@link JsonHash}. since 1.4.12. | [
"put",
"with",
"State",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonHash.java#L375-L378 |
109,183 | vvakame/JsonPullParser | jsonpullparser-apt/src/main/java/net/vvakame/util/jsonpullparser/factory/JsonModelGenerator.java | JsonModelGenerator.write | public void write() throws IOException {
{
Filer filer = processingEnv.getFiler();
String generateClassName =
jsonModel.getPackageName() + "." + jsonModel.getTarget() + postfix;
JavaFileObject fileObject = filer.createSourceFile(generateClassName, classElement);
Template.writeGen(fileObject, jsonMode... | java | public void write() throws IOException {
{
Filer filer = processingEnv.getFiler();
String generateClassName =
jsonModel.getPackageName() + "." + jsonModel.getTarget() + postfix;
JavaFileObject fileObject = filer.createSourceFile(generateClassName, classElement);
Template.writeGen(fileObject, jsonMode... | [
"public",
"void",
"write",
"(",
")",
"throws",
"IOException",
"{",
"{",
"Filer",
"filer",
"=",
"processingEnv",
".",
"getFiler",
"(",
")",
";",
"String",
"generateClassName",
"=",
"jsonModel",
".",
"getPackageName",
"(",
")",
"+",
"\".\"",
"+",
"jsonModel",
... | Generates the source code.
@throws IOException
@author vvakame | [
"Generates",
"the",
"source",
"code",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-apt/src/main/java/net/vvakame/util/jsonpullparser/factory/JsonModelGenerator.java#L124-L139 |
109,184 | vvakame/JsonPullParser | jsonpullparser-apt/src/main/java/net/vvakame/util/jsonpullparser/factory/JsonModelGenerator.java | JsonModelGenerator.getElementKeyString | String getElementKeyString(Element element) {
JsonKey key = element.getAnnotation(JsonKey.class);
JsonModel model = element.getEnclosingElement().getAnnotation(JsonModel.class);
if (!"".equals(key.value())) {
return key.value();
} else if ("".equals(key.value()) && key.decamelize()) {
return decamelize(el... | java | String getElementKeyString(Element element) {
JsonKey key = element.getAnnotation(JsonKey.class);
JsonModel model = element.getEnclosingElement().getAnnotation(JsonModel.class);
if (!"".equals(key.value())) {
return key.value();
} else if ("".equals(key.value()) && key.decamelize()) {
return decamelize(el... | [
"String",
"getElementKeyString",
"(",
"Element",
"element",
")",
"{",
"JsonKey",
"key",
"=",
"element",
".",
"getAnnotation",
"(",
"JsonKey",
".",
"class",
")",
";",
"JsonModel",
"model",
"=",
"element",
".",
"getEnclosingElement",
"(",
")",
".",
"getAnnotatio... | Get JSON key string.
@param element
@return JSON key string
@author vvakame | [
"Get",
"JSON",
"key",
"string",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-apt/src/main/java/net/vvakame/util/jsonpullparser/factory/JsonModelGenerator.java#L222-L234 |
109,185 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/Stack.java | Stack.pop | public T pop() {
final int max = stack.size() - 1;
if (max < 0) {
throw new NoSuchElementException();
}
return stack.remove(max);
} | java | public T pop() {
final int max = stack.size() - 1;
if (max < 0) {
throw new NoSuchElementException();
}
return stack.remove(max);
} | [
"public",
"T",
"pop",
"(",
")",
"{",
"final",
"int",
"max",
"=",
"stack",
".",
"size",
"(",
")",
"-",
"1",
";",
"if",
"(",
"max",
"<",
"0",
")",
"{",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"}",
"return",
"stack",
".",
"remove",
... | Pops the value from the top of stack and returns it.
@return The value has been popped.
@author vvakame | [
"Pops",
"the",
"value",
"from",
"the",
"top",
"of",
"stack",
"and",
"returns",
"it",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/Stack.java#L51-L57 |
109,186 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/Stack.java | Stack.peek | public T peek() {
final int top = stack.size() - 1;
if (top < 0) {
throw new NoSuchElementException();
}
return stack.get(top);
} | java | public T peek() {
final int top = stack.size() - 1;
if (top < 0) {
throw new NoSuchElementException();
}
return stack.get(top);
} | [
"public",
"T",
"peek",
"(",
")",
"{",
"final",
"int",
"top",
"=",
"stack",
".",
"size",
"(",
")",
"-",
"1",
";",
"if",
"(",
"top",
"<",
"0",
")",
"{",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"}",
"return",
"stack",
".",
"get",
... | Returns the value currently on the top of the stack.
@return The value on the top.
@author vvakame | [
"Returns",
"the",
"value",
"currently",
"on",
"the",
"top",
"of",
"the",
"stack",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/Stack.java#L64-L70 |
109,187 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserInteger | public static Integer parserInteger(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return (int) parser.getValueLong();
} else {
throw new IllegalS... | java | public static Integer parserInteger(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return (int) parser.getValueLong();
} else {
throw new IllegalS... | [
"public",
"static",
"Integer",
"parserInteger",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".",
... | Parses the current token as an integer.
@param parser
@return {@link Integer}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"an",
"integer",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L43-L55 |
109,188 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserLong | public static Long parserLong(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return parser.getValueLong();
} else {
throw new IllegalStateException("... | java | public static Long parserLong(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return parser.getValueLong();
} else {
throw new IllegalStateException("... | [
"public",
"static",
"Long",
"parserLong",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".",
"VALU... | Parses the current token as a long.
@param parser
@return {@link Long}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"long",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L65-L76 |
109,189 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserByte | public static Byte parserByte(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return (byte) parser.getValueLong();
} else {
throw new IllegalStateExce... | java | public static Byte parserByte(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return (byte) parser.getValueLong();
} else {
throw new IllegalStateExce... | [
"public",
"static",
"Byte",
"parserByte",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".",
"VALU... | Parses the current token as a byte.
@param parser
@return {@link Byte}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"byte",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L86-L97 |
109,190 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserShort | public static Short parserShort(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return (short) parser.getValueLong();
} else {
throw new IllegalStateE... | java | public static Short parserShort(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_LONG) {
return (short) parser.getValueLong();
} else {
throw new IllegalStateE... | [
"public",
"static",
"Short",
"parserShort",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".",
"VA... | Parses the current token as a short.
@param parser
@return {@link Short}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"short",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L107-L118 |
109,191 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserBoolean | public static Boolean parserBoolean(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_BOOLEAN) {
return parser.getValueBoolean();
} else {
throw new IllegalS... | java | public static Boolean parserBoolean(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_BOOLEAN) {
return parser.getValueBoolean();
} else {
throw new IllegalS... | [
"public",
"static",
"Boolean",
"parserBoolean",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".",
... | Parses the current token as a boolean.
@param parser
@return {@link Boolean}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"boolean",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L128-L140 |
109,192 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserCharacter | public static Character parserCharacter(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_STRING) {
String str = parser.getValueString();
if (str.length() != 1... | java | public static Character parserCharacter(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_STRING) {
String str = parser.getValueString();
if (str.length() != 1... | [
"public",
"static",
"Character",
"parserCharacter",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".... | Parses the current token as a character.
@param parser
@return {@link Character}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"character",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L150-L167 |
109,193 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserDouble | public static Double parserDouble(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_DOUBLE) {
return parser.getValueDouble();
} else {
throw new IllegalState... | java | public static Double parserDouble(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_DOUBLE) {
return parser.getValueDouble();
} else {
throw new IllegalState... | [
"public",
"static",
"Double",
"parserDouble",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".",
"... | Parses the current token as a double-precision floating point value.
@param parser
@return {@link Double}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"double",
"-",
"precision",
"floating",
"point",
"value",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L177-L189 |
109,194 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserFloat | public static Float parserFloat(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_DOUBLE) {
return (float) parser.getValueDouble();
} else {
throw new IllegalSt... | java | public static Float parserFloat(JsonPullParser parser) throws IOException, JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
} else if (eventType == State.VALUE_DOUBLE) {
return (float) parser.getValueDouble();
} else {
throw new IllegalSt... | [
"public",
"static",
"Float",
"parserFloat",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"State",
".",
"VA... | Parses the current token as a single-precision floating point value.
@param parser
@return {@link Float}
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"single",
"-",
"precision",
"floating",
"point",
"value",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L199-L210 |
109,195 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserIntegerList | public static List<Integer> parserIntegerList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
... | java | public static List<Integer> parserIntegerList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
... | [
"public",
"static",
"List",
"<",
"Integer",
">",
"parserIntegerList",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",... | Parses the current token as a list of integers.
@param parser
@return List of {@link Integer}s
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"list",
"of",
"integers",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L220-L244 |
109,196 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserBooleanList | public static List<Boolean> parserBooleanList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
... | java | public static List<Boolean> parserBooleanList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
... | [
"public",
"static",
"List",
"<",
"Boolean",
">",
"parserBooleanList",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",... | Parses the current token as a list of booleans.
@param parser
@return List of {@link Boolean}s
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"list",
"of",
"booleans",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L356-L380 |
109,197 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserCharacterList | public static List<Character> parserCharacterList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
... | java | public static List<Character> parserCharacterList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
... | [
"public",
"static",
"List",
"<",
"Character",
">",
"parserCharacterList",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventTy... | Parses the current token as a list of characters.
@param parser
@return List of {@link Character}s
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"list",
"of",
"characters",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L390-L419 |
109,198 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserDoubleList | public static List<Double> parserDoubleList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
L... | java | public static List<Double> parserDoubleList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
L... | [
"public",
"static",
"List",
"<",
"Double",
">",
"parserDoubleList",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
... | Parses the current token as a list of double-precision floating point numbers.
@param parser
@return List of {@link Double}s
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"list",
"of",
"double",
"-",
"precision",
"floating",
"point",
"numbers",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L429-L453 |
109,199 | vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java | JsonParseUtil.parserStringList | public static List<String> parserStringList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
L... | java | public static List<String> parserStringList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
throw new IllegalStateException("not started brace!");
}
L... | [
"public",
"static",
"List",
"<",
"String",
">",
"parserStringList",
"(",
"JsonPullParser",
"parser",
")",
"throws",
"IOException",
",",
"JsonFormatException",
"{",
"State",
"eventType",
"=",
"parser",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
... | Parses the current token as a list of strings.
@param parser
@return List of {@link String}s
@throws IOException
@throws JsonFormatException
@author vvakame | [
"Parses",
"the",
"current",
"token",
"as",
"a",
"list",
"of",
"strings",
"."
] | fce183ca66354723323a77f2ae8cb5222b5836bc | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonParseUtil.java#L497-L521 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.