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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
154,000 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/solver/SolverWorldConnection.java | SolverWorldConnection.expire | public boolean expire(final String identifier, final long timestamp,
final String... attributes) {
if (attributes == null || attributes.length == 0) {
return this.wmi.expireId(identifier, timestamp);
}
boolean retVal = true;
for (String attribute : attributes) {
retVal = retVal &... | java | public boolean expire(final String identifier, final long timestamp,
final String... attributes) {
if (attributes == null || attributes.length == 0) {
return this.wmi.expireId(identifier, timestamp);
}
boolean retVal = true;
for (String attribute : attributes) {
retVal = retVal &... | [
"public",
"boolean",
"expire",
"(",
"final",
"String",
"identifier",
",",
"final",
"long",
"timestamp",
",",
"final",
"String",
"...",
"attributes",
")",
"{",
"if",
"(",
"attributes",
"==",
"null",
"||",
"attributes",
".",
"length",
"==",
"0",
")",
"{",
... | Expires an Identifier, or one or more attributes of that Identifier. If
Attributes are specified, then they will be expired instead of the
Identifier.
@param identifier
the Identifier to expire, or the Identifier of the attributes to
expire.
@param timestamp
the time at which the values are expired, in milliseconds si... | [
"Expires",
"an",
"Identifier",
"or",
"one",
"or",
"more",
"attributes",
"of",
"that",
"Identifier",
".",
"If",
"Attributes",
"are",
"specified",
"then",
"they",
"will",
"be",
"expired",
"instead",
"of",
"the",
"Identifier",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/solver/SolverWorldConnection.java#L344-L356 |
154,001 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/solver/SolverWorldConnection.java | SolverWorldConnection.expire | public boolean expire(final String identifier, final String... attributes){
return this.expire(identifier, System.currentTimeMillis(),attributes);
} | java | public boolean expire(final String identifier, final String... attributes){
return this.expire(identifier, System.currentTimeMillis(),attributes);
} | [
"public",
"boolean",
"expire",
"(",
"final",
"String",
"identifier",
",",
"final",
"String",
"...",
"attributes",
")",
"{",
"return",
"this",
".",
"expire",
"(",
"identifier",
",",
"System",
".",
"currentTimeMillis",
"(",
")",
",",
"attributes",
")",
";",
... | Expires an Identifier, or one or more attributes of that Identifier. If
Attributes are specified, then they will be expired instead of the
Identifier. The expiration time will be the current local time.
@param identifier
the Identifier to expire, or the Identifier of the attributes to
expire.
@param attributes
one or ... | [
"Expires",
"an",
"Identifier",
"or",
"one",
"or",
"more",
"attributes",
"of",
"that",
"Identifier",
".",
"If",
"Attributes",
"are",
"specified",
"then",
"they",
"will",
"be",
"expired",
"instead",
"of",
"the",
"Identifier",
".",
"The",
"expiration",
"time",
... | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/solver/SolverWorldConnection.java#L370-L372 |
154,002 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/solver/SolverWorldConnection.java | SolverWorldConnection.sendBufferedValues | private void sendBufferedValues() {
ArrayList<Attribute> attributesToSend = new ArrayList<Attribute>();
int num = 0;
while (!this.attributeBuffer.isEmpty()) {
num += this.attributeBuffer.drainTo(attributesToSend);
}
if (num > 0) {
this.wmi.updateAttributes(attributesToSend);
log.in... | java | private void sendBufferedValues() {
ArrayList<Attribute> attributesToSend = new ArrayList<Attribute>();
int num = 0;
while (!this.attributeBuffer.isEmpty()) {
num += this.attributeBuffer.drainTo(attributesToSend);
}
if (num > 0) {
this.wmi.updateAttributes(attributesToSend);
log.in... | [
"private",
"void",
"sendBufferedValues",
"(",
")",
"{",
"ArrayList",
"<",
"Attribute",
">",
"attributesToSend",
"=",
"new",
"ArrayList",
"<",
"Attribute",
">",
"(",
")",
";",
"int",
"num",
"=",
"0",
";",
"while",
"(",
"!",
"this",
".",
"attributeBuffer",
... | Sends any buffered Attribute values to the world model. | [
"Sends",
"any",
"buffered",
"Attribute",
"values",
"to",
"the",
"world",
"model",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/solver/SolverWorldConnection.java#L401-L411 |
154,003 | FrodeRanders/java-vopn | src/main/java/org/gautelis/vopn/db/utils/Manager.java | Manager.execute | public void execute(String name, Reader sqlCode, PrintWriter out) throws Exception {
runScript(name, sqlCode, out);
} | java | public void execute(String name, Reader sqlCode, PrintWriter out) throws Exception {
runScript(name, sqlCode, out);
} | [
"public",
"void",
"execute",
"(",
"String",
"name",
",",
"Reader",
"sqlCode",
",",
"PrintWriter",
"out",
")",
"throws",
"Exception",
"{",
"runScript",
"(",
"name",
",",
"sqlCode",
",",
"out",
")",
";",
"}"
] | Executes any SQL script file | [
"Executes",
"any",
"SQL",
"script",
"file"
] | 4c7b2f90201327af4eaa3cd46b3fee68f864e5cc | https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/db/utils/Manager.java#L128-L130 |
154,004 | FrodeRanders/java-vopn | src/main/java/org/gautelis/vopn/db/utils/Manager.java | Manager.execute | protected void execute(String sqlStatement, PrintWriter out, boolean acceptFailure) throws Exception {
try (Connection conn = dataSource.getConnection()) {
try (Statement stmt = conn.createStatement()) {
boolean success = execute(stmt, sqlStatement, out, acceptFailure);
... | java | protected void execute(String sqlStatement, PrintWriter out, boolean acceptFailure) throws Exception {
try (Connection conn = dataSource.getConnection()) {
try (Statement stmt = conn.createStatement()) {
boolean success = execute(stmt, sqlStatement, out, acceptFailure);
... | [
"protected",
"void",
"execute",
"(",
"String",
"sqlStatement",
",",
"PrintWriter",
"out",
",",
"boolean",
"acceptFailure",
")",
"throws",
"Exception",
"{",
"try",
"(",
"Connection",
"conn",
"=",
"dataSource",
".",
"getConnection",
"(",
")",
")",
"{",
"try",
... | Executes an SQL statement.
@param sqlStatement
@throws Exception | [
"Executes",
"an",
"SQL",
"statement",
"."
] | 4c7b2f90201327af4eaa3cd46b3fee68f864e5cc | https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/db/utils/Manager.java#L175-L257 |
154,005 | microfocus-idol/java-logging | src/main/java/com/hp/autonomy/frontend/logging/LogbackMarkerFilter.java | LogbackMarkerFilter.decide | @Override
public FilterReply decide(final ILoggingEvent event) {
final Marker marker = event.getMarker();
if (marker == this.marker) {
return FilterReply.NEUTRAL;
} else {
return FilterReply.DENY;
}
} | java | @Override
public FilterReply decide(final ILoggingEvent event) {
final Marker marker = event.getMarker();
if (marker == this.marker) {
return FilterReply.NEUTRAL;
} else {
return FilterReply.DENY;
}
} | [
"@",
"Override",
"public",
"FilterReply",
"decide",
"(",
"final",
"ILoggingEvent",
"event",
")",
"{",
"final",
"Marker",
"marker",
"=",
"event",
".",
"getMarker",
"(",
")",
";",
"if",
"(",
"marker",
"==",
"this",
".",
"marker",
")",
"{",
"return",
"Filte... | Filter the logging event according to the provided marker
@param event The logging event
@return FilterReply.NEUTRAL if the event's marker is the same as the provided marker; FilterReply.DENY otherwise | [
"Filter",
"the",
"logging",
"event",
"according",
"to",
"the",
"provided",
"marker"
] | f06f8547928897d07d41e046f53abcbbc3725271 | https://github.com/microfocus-idol/java-logging/blob/f06f8547928897d07d41e046f53abcbbc3725271/src/main/java/com/hp/autonomy/frontend/logging/LogbackMarkerFilter.java#L28-L37 |
154,006 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java | ClientWorldConnection.connect | public boolean connect(long timeout) {
if (this.wmi.connect(timeout)) {
this.wmi.setStayConnected(true);
// this.isReady = true;
return true;
}
return false;
} | java | public boolean connect(long timeout) {
if (this.wmi.connect(timeout)) {
this.wmi.setStayConnected(true);
// this.isReady = true;
return true;
}
return false;
} | [
"public",
"boolean",
"connect",
"(",
"long",
"timeout",
")",
"{",
"if",
"(",
"this",
".",
"wmi",
".",
"connect",
"(",
"timeout",
")",
")",
"{",
"this",
".",
"wmi",
".",
"setStayConnected",
"(",
"true",
")",
";",
"// this.isReady = true;",
"return",
... | Connects to the world model at the configured host and port.
@param timeout
the maximum time to attempt the connection or 0 for the configured
timeout
@return {@code true} if the connection succeeds, else {@code false}. | [
"Connects",
"to",
"the",
"world",
"model",
"at",
"the",
"configured",
"host",
"and",
"port",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java#L226-L233 |
154,007 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java | ClientWorldConnection.getSnapshot | public synchronized Response getSnapshot(final String idRegex,
final long start, final long end, String... attributes) {
SnapshotRequestMessage req = new SnapshotRequestMessage();
req.setIdRegex(idRegex);
req.setBeginTimestamp(start);
req.setEndTimestamp(end);
if (attributes != null) {
r... | java | public synchronized Response getSnapshot(final String idRegex,
final long start, final long end, String... attributes) {
SnapshotRequestMessage req = new SnapshotRequestMessage();
req.setIdRegex(idRegex);
req.setBeginTimestamp(start);
req.setEndTimestamp(end);
if (attributes != null) {
r... | [
"public",
"synchronized",
"Response",
"getSnapshot",
"(",
"final",
"String",
"idRegex",
",",
"final",
"long",
"start",
",",
"final",
"long",
"end",
",",
"String",
"...",
"attributes",
")",
"{",
"SnapshotRequestMessage",
"req",
"=",
"new",
"SnapshotRequestMessage",... | Sends a snapshot request to the world model for the specified Identifier
regular expression and Attribute regular expressions, between the start and
end timestamps.
@param idRegex
regular expression for matching the identifier.
@param start
the begin time for the snapshot.
@param end
the ending time for the snapshot.
... | [
"Sends",
"a",
"snapshot",
"request",
"to",
"the",
"world",
"model",
"for",
"the",
"specified",
"Identifier",
"regular",
"expression",
"and",
"Attribute",
"regular",
"expressions",
"between",
"the",
"start",
"and",
"end",
"timestamps",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java#L282-L316 |
154,008 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java | ClientWorldConnection.getRangeRequest | public synchronized StepResponse getRangeRequest(final String idRegex,
final long start, final long end, String... attributes) {
RangeRequestMessage req = new RangeRequestMessage();
req.setIdRegex(idRegex);
req.setBeginTimestamp(start);
req.setEndTimestamp(end);
if (attributes != null) {
... | java | public synchronized StepResponse getRangeRequest(final String idRegex,
final long start, final long end, String... attributes) {
RangeRequestMessage req = new RangeRequestMessage();
req.setIdRegex(idRegex);
req.setBeginTimestamp(start);
req.setEndTimestamp(end);
if (attributes != null) {
... | [
"public",
"synchronized",
"StepResponse",
"getRangeRequest",
"(",
"final",
"String",
"idRegex",
",",
"final",
"long",
"start",
",",
"final",
"long",
"end",
",",
"String",
"...",
"attributes",
")",
"{",
"RangeRequestMessage",
"req",
"=",
"new",
"RangeRequestMessage... | Sends a range request to the world model for the specified Identifier
regular expression, Attribute regular expressions, between the start and
end times.
@param idRegex
regular expression for matching the identifier.
@param start
the beginning of the range..
@param end
the end of the range.
@param attributes
the attri... | [
"Sends",
"a",
"range",
"request",
"to",
"the",
"world",
"model",
"for",
"the",
"specified",
"Identifier",
"regular",
"expression",
"Attribute",
"regular",
"expressions",
"between",
"the",
"start",
"and",
"end",
"times",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java#L348-L379 |
154,009 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java | ClientWorldConnection.searchId | public String[] searchId(final String idRegex) {
synchronized (this.idSearchResponses) {
if (!this.wmi.searchIdRegex(idRegex)) {
log.warn("Attempted to search for a null Identifier regex. Not sending.");
return new String[] {};
}
do {
log.debug("Waiting for response.");
... | java | public String[] searchId(final String idRegex) {
synchronized (this.idSearchResponses) {
if (!this.wmi.searchIdRegex(idRegex)) {
log.warn("Attempted to search for a null Identifier regex. Not sending.");
return new String[] {};
}
do {
log.debug("Waiting for response.");
... | [
"public",
"String",
"[",
"]",
"searchId",
"(",
"final",
"String",
"idRegex",
")",
"{",
"synchronized",
"(",
"this",
".",
"idSearchResponses",
")",
"{",
"if",
"(",
"!",
"this",
".",
"wmi",
".",
"searchIdRegex",
"(",
"idRegex",
")",
")",
"{",
"log",
".",... | Searches for any Identifier values that match the provided regular
expression.
@param idRegex
a regular expression to match against Identifiers in the world
model.
@return all matching Identifiers. | [
"Searches",
"for",
"any",
"Identifier",
"values",
"that",
"match",
"the",
"provided",
"regular",
"expression",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java#L438-L456 |
154,010 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java | ClientWorldConnection.connectionInterrupted | void connectionInterrupted(ClientWorldModelInterface worldModel) {
this.isReady = false;
for (Iterator<Long> iter = this.outstandingSnapshots.keySet().iterator(); iter
.hasNext();) {
Long tix = iter.next();
Response resp = this.outstandingSnapshots.remove(tix);
resp.setError(new Runtim... | java | void connectionInterrupted(ClientWorldModelInterface worldModel) {
this.isReady = false;
for (Iterator<Long> iter = this.outstandingSnapshots.keySet().iterator(); iter
.hasNext();) {
Long tix = iter.next();
Response resp = this.outstandingSnapshots.remove(tix);
resp.setError(new Runtim... | [
"void",
"connectionInterrupted",
"(",
"ClientWorldModelInterface",
"worldModel",
")",
"{",
"this",
".",
"isReady",
"=",
"false",
";",
"for",
"(",
"Iterator",
"<",
"Long",
">",
"iter",
"=",
"this",
".",
"outstandingSnapshots",
".",
"keySet",
"(",
")",
".",
"i... | Completes any outstanding requests with errors.
@param worldModel
the source of the connection interruption. | [
"Completes",
"any",
"outstanding",
"requests",
"with",
"errors",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/ClientWorldConnection.java#L475-L500 |
154,011 | inkstand-io/scribble | scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/ContentLoader.java | ContentLoader.setContentDefinition | @RuleSetup(RequirementLevel.OPTIONAL)
public void setContentDefinition(final URL contentDef) {
assertStateBefore(State.INITIALIZED);
this.contentDef = contentDef;
} | java | @RuleSetup(RequirementLevel.OPTIONAL)
public void setContentDefinition(final URL contentDef) {
assertStateBefore(State.INITIALIZED);
this.contentDef = contentDef;
} | [
"@",
"RuleSetup",
"(",
"RequirementLevel",
".",
"OPTIONAL",
")",
"public",
"void",
"setContentDefinition",
"(",
"final",
"URL",
"contentDef",
")",
"{",
"assertStateBefore",
"(",
"State",
".",
"INITIALIZED",
")",
";",
"this",
".",
"contentDef",
"=",
"contentDef",... | Sets the locator pointing to the content definition.
@param contentDef
the url of the content definition. | [
"Sets",
"the",
"locator",
"pointing",
"to",
"the",
"content",
"definition",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/ContentLoader.java#L60-L65 |
154,012 | inkstand-io/scribble | scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/ContentLoader.java | ContentLoader.loadContent | public Node loadContent(URL contentDefinition) throws RepositoryException {
LOG.info("Loading Content");
final Session session = repository.getAdminSession();
final XMLContentLoader loader = new XMLContentLoader();
return loader.loadContent(session, contentDefinition);
} | java | public Node loadContent(URL contentDefinition) throws RepositoryException {
LOG.info("Loading Content");
final Session session = repository.getAdminSession();
final XMLContentLoader loader = new XMLContentLoader();
return loader.loadContent(session, contentDefinition);
} | [
"public",
"Node",
"loadContent",
"(",
"URL",
"contentDefinition",
")",
"throws",
"RepositoryException",
"{",
"LOG",
".",
"info",
"(",
"\"Loading Content\"",
")",
";",
"final",
"Session",
"session",
"=",
"repository",
".",
"getAdminSession",
"(",
")",
";",
"final... | Loads content from an external content definition into the underlying repository.
@param contentDefinition
URL pointing to the resource that defines the content to be loaded.
@return The root node, defined by the content's document element, is returned.
@throws RepositoryException | [
"Loads",
"content",
"from",
"an",
"external",
"content",
"definition",
"into",
"the",
"underlying",
"repository",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/ContentLoader.java#L98-L104 |
154,013 | inkstand-io/scribble | scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java | TemporaryFileBuilder.fromClasspathResource | public TemporaryFileBuilder fromClasspathResource(final String pathToResource) {
final Class<?> callerClass = getCallerClass();
this.content = getResolver().resolve(pathToResource, callerClass);
return this;
} | java | public TemporaryFileBuilder fromClasspathResource(final String pathToResource) {
final Class<?> callerClass = getCallerClass();
this.content = getResolver().resolve(pathToResource, callerClass);
return this;
} | [
"public",
"TemporaryFileBuilder",
"fromClasspathResource",
"(",
"final",
"String",
"pathToResource",
")",
"{",
"final",
"Class",
"<",
"?",
">",
"callerClass",
"=",
"getCallerClass",
"(",
")",
";",
"this",
".",
"content",
"=",
"getResolver",
"(",
")",
".",
"res... | Defines the classpath resource from where the content of the file should be retrieved
@param pathToResource
the path to the classpath resource
@return the builder | [
"Defines",
"the",
"classpath",
"resource",
"from",
"where",
"the",
"content",
"of",
"the",
"file",
"should",
"be",
"retrieved"
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java#L63-L67 |
154,014 | inkstand-io/scribble | scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java | TemporaryFileBuilder.asZip | public ZipFileBuilder asZip() {
final ZipFileBuilder zfb = new ZipFileBuilder(folder, filename);
if(this.content != null) {
zfb.addResource(getContenFileName(), this.content);
}
return zfb;
} | java | public ZipFileBuilder asZip() {
final ZipFileBuilder zfb = new ZipFileBuilder(folder, filename);
if(this.content != null) {
zfb.addResource(getContenFileName(), this.content);
}
return zfb;
} | [
"public",
"ZipFileBuilder",
"asZip",
"(",
")",
"{",
"final",
"ZipFileBuilder",
"zfb",
"=",
"new",
"ZipFileBuilder",
"(",
"folder",
",",
"filename",
")",
";",
"if",
"(",
"this",
".",
"content",
"!=",
"null",
")",
"{",
"zfb",
".",
"addResource",
"(",
"getC... | Indicates the content for the file should be zipped. If only one content reference is provided, the zip
will only contain this file.
@return
the builder | [
"Indicates",
"the",
"content",
"for",
"the",
"file",
"should",
"be",
"zipped",
".",
"If",
"only",
"one",
"content",
"reference",
"is",
"provided",
"the",
"zip",
"will",
"only",
"contain",
"this",
"file",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java#L100-L106 |
154,015 | inkstand-io/scribble | scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java | TemporaryFileBuilder.getContenFileName | private String getContenFileName() {
final String file = this.content.getPath();
if(file.indexOf('/') != -1){
return file.substring(file.lastIndexOf('/'));
}
return file;
} | java | private String getContenFileName() {
final String file = this.content.getPath();
if(file.indexOf('/') != -1){
return file.substring(file.lastIndexOf('/'));
}
return file;
} | [
"private",
"String",
"getContenFileName",
"(",
")",
"{",
"final",
"String",
"file",
"=",
"this",
".",
"content",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"file",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
")",
"{",
"return",
"file",
".",
... | Extracts the name of the resource from the url itself. The filename from the path-part of the URL is extracted.
@return
the name of the resource that provided the content | [
"Extracts",
"the",
"name",
"of",
"the",
"resource",
"from",
"the",
"url",
"itself",
".",
"The",
"filename",
"from",
"the",
"path",
"-",
"part",
"of",
"the",
"URL",
"is",
"extracted",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java#L114-L120 |
154,016 | jbundle/jbundle | base/message/service/src/main/java/org/jbundle/base/message/service/BaseServiceMessageTransport.java | BaseServiceMessageTransport.processMessage | public Object processMessage(Object message)
{
Utility.getLogger().info("processMessage called in service message");
BaseMessage msgReplyInternal = null;
try {
BaseMessage messageIn = new TreeMessage(null, null);
new ServiceTrxMessageIn(messageIn, message);
... | java | public Object processMessage(Object message)
{
Utility.getLogger().info("processMessage called in service message");
BaseMessage msgReplyInternal = null;
try {
BaseMessage messageIn = new TreeMessage(null, null);
new ServiceTrxMessageIn(messageIn, message);
... | [
"public",
"Object",
"processMessage",
"(",
"Object",
"message",
")",
"{",
"Utility",
".",
"getLogger",
"(",
")",
".",
"info",
"(",
"\"processMessage called in service message\"",
")",
";",
"BaseMessage",
"msgReplyInternal",
"=",
"null",
";",
"try",
"{",
"BaseMessa... | This is the application code for handling the message.. Once the
message is received the application can retrieve the soap part, the
attachment part if there are any, or any other information from the
message.
@param message The incoming message to process. | [
"This",
"is",
"the",
"application",
"code",
"for",
"handling",
"the",
"message",
"..",
"Once",
"the",
"message",
"is",
"received",
"the",
"application",
"can",
"retrieve",
"the",
"soap",
"part",
"the",
"attachment",
"part",
"if",
"there",
"are",
"any",
"or",... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/service/src/main/java/org/jbundle/base/message/service/BaseServiceMessageTransport.java#L63-L97 |
154,017 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.getDatabaseName | public String getDatabaseName()
{
// ****Override this****, If not, try to figure it out
if (m_vRecordList != null)
if (this.getRecordlistAt(0) != null)
return this.getRecordlistAt(0).getDatabaseName();
return DBConstants.BLANK; // Blank
} | java | public String getDatabaseName()
{
// ****Override this****, If not, try to figure it out
if (m_vRecordList != null)
if (this.getRecordlistAt(0) != null)
return this.getRecordlistAt(0).getDatabaseName();
return DBConstants.BLANK; // Blank
} | [
"public",
"String",
"getDatabaseName",
"(",
")",
"{",
"// ****Override this****, If not, try to figure it out",
"if",
"(",
"m_vRecordList",
"!=",
"null",
")",
"if",
"(",
"this",
".",
"getRecordlistAt",
"(",
"0",
")",
"!=",
"null",
")",
"return",
"this",
".",
"ge... | Get the Database Name.
Always override this method.
@return The database name. | [
"Get",
"the",
"Database",
"Name",
".",
"Always",
"override",
"this",
"method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L95-L102 |
154,018 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.getDatabaseType | public int getDatabaseType()
{
// ****Override this****, If not, try to figure it out
if (m_vRecordList != null)
if (this.getRecordlistAt(0) != null)
return this.getRecordlistAt(0).getDatabaseType() & DBConstants.TABLE_MASK; // Only type and location
return super... | java | public int getDatabaseType()
{
// ****Override this****, If not, try to figure it out
if (m_vRecordList != null)
if (this.getRecordlistAt(0) != null)
return this.getRecordlistAt(0).getDatabaseType() & DBConstants.TABLE_MASK; // Only type and location
return super... | [
"public",
"int",
"getDatabaseType",
"(",
")",
"{",
"// ****Override this****, If not, try to figure it out",
"if",
"(",
"m_vRecordList",
"!=",
"null",
")",
"if",
"(",
"this",
".",
"getRecordlistAt",
"(",
"0",
")",
"!=",
"null",
")",
"return",
"this",
".",
"getRe... | Get the database type.
Always override this method.
@return The database type (LOCAL/REMOTE/SCREEN/etc). | [
"Get",
"the",
"database",
"type",
".",
"Always",
"override",
"this",
"method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L108-L115 |
154,019 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.free | public void free()
{
super.free(); // Free first in case you have to Update() the current record!
while (m_LinkageList.size() > 0)
{
TableLink tableLink = (TableLink)m_LinkageList.elementAt(0);
tableLink.free();
}
m_LinkageList.removeAllElements();
... | java | public void free()
{
super.free(); // Free first in case you have to Update() the current record!
while (m_LinkageList.size() > 0)
{
TableLink tableLink = (TableLink)m_LinkageList.elementAt(0);
tableLink.free();
}
m_LinkageList.removeAllElements();
... | [
"public",
"void",
"free",
"(",
")",
"{",
"super",
".",
"free",
"(",
")",
";",
"// Free first in case you have to Update() the current record!",
"while",
"(",
"m_LinkageList",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"TableLink",
"tableLink",
"=",
"(",
"Table... | Free the query record. | [
"Free",
"the",
"query",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L119-L131 |
154,020 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.addSelectParams | public String addSelectParams(String seekSign, int areaDesc, boolean bAddOnlyMods, boolean bIncludeFileName, boolean bUseCurrentValues, Vector<BaseField> vParamList, boolean bForceUniqueKey, boolean bIncludeTempFields)
{
String sFilter = super.addSelectParams(seekSign, areaDesc, bAddOnlyMods, bIncludeFileNa... | java | public String addSelectParams(String seekSign, int areaDesc, boolean bAddOnlyMods, boolean bIncludeFileName, boolean bUseCurrentValues, Vector<BaseField> vParamList, boolean bForceUniqueKey, boolean bIncludeTempFields)
{
String sFilter = super.addSelectParams(seekSign, areaDesc, bAddOnlyMods, bIncludeFileNa... | [
"public",
"String",
"addSelectParams",
"(",
"String",
"seekSign",
",",
"int",
"areaDesc",
",",
"boolean",
"bAddOnlyMods",
",",
"boolean",
"bIncludeFileName",
",",
"boolean",
"bUseCurrentValues",
",",
"Vector",
"<",
"BaseField",
">",
"vParamList",
",",
"boolean",
"... | Add to this SQL Key Filter.
@param seekSign The seek sign.
@param bAddOnlyMods Add only the keys which have modified?
@param bIncludeFileName Include the file name in the string?
@param bUseCurrentValues Use current values?
@param vParamList The parameter list.
@param bForceUniqueKey If params must be unique, if they a... | [
"Add",
"to",
"this",
"SQL",
"Key",
"Filter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L191-L203 |
154,021 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.getFieldCount | public int getFieldCount()
{
int iFieldCount = 0;
for (int i = 0; i < this.getRecordlistCount(); i++)
{
iFieldCount += this.getRecordlistAt(i).getFieldCount();
}
return iFieldCount;
} | java | public int getFieldCount()
{
int iFieldCount = 0;
for (int i = 0; i < this.getRecordlistCount(); i++)
{
iFieldCount += this.getRecordlistAt(i).getFieldCount();
}
return iFieldCount;
} | [
"public",
"int",
"getFieldCount",
"(",
")",
"{",
"int",
"iFieldCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"getRecordlistCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"iFieldCount",
"+=",
"this",
".",
"getReco... | Number of Fields in this record.
@return The field count. | [
"Number",
"of",
"Fields",
"in",
"this",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L351-L359 |
154,022 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.getRecord | public Record getRecord(String sFileName)
{
Record pQueryCore = null;
Record pStmtTable = null;
pQueryCore = super.getRecord(sFileName);
if (pQueryCore != null)
return pQueryCore;
for (int i = 0; i < this.getRecordlistCount(); i++)
{
pStmtTable... | java | public Record getRecord(String sFileName)
{
Record pQueryCore = null;
Record pStmtTable = null;
pQueryCore = super.getRecord(sFileName);
if (pQueryCore != null)
return pQueryCore;
for (int i = 0; i < this.getRecordlistCount(); i++)
{
pStmtTable... | [
"public",
"Record",
"getRecord",
"(",
"String",
"sFileName",
")",
"{",
"Record",
"pQueryCore",
"=",
"null",
";",
"Record",
"pStmtTable",
"=",
"null",
";",
"pQueryCore",
"=",
"super",
".",
"getRecord",
"(",
"sFileName",
")",
";",
"if",
"(",
"pQueryCore",
"!... | Get this table in the query.
@param strFileName The record to retrieve.
@return The record with this name. | [
"Get",
"this",
"table",
"in",
"the",
"query",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L365-L380 |
154,023 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.moveTableQuery | public Record moveTableQuery(int iRelPosition) throws DBException
{
BaseTable table = null;
Record record = null;
Record recordLeft = null;
boolean bFirstTime = true;
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
Table... | java | public Record moveTableQuery(int iRelPosition) throws DBException
{
BaseTable table = null;
Record record = null;
Record recordLeft = null;
boolean bFirstTime = true;
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
Table... | [
"public",
"Record",
"moveTableQuery",
"(",
"int",
"iRelPosition",
")",
"throws",
"DBException",
"{",
"BaseTable",
"table",
"=",
"null",
";",
"Record",
"record",
"=",
"null",
";",
"Record",
"recordLeft",
"=",
"null",
";",
"boolean",
"bFirstTime",
"=",
"true",
... | Special logic to move a QueryRecord using the tables.
The method also retrives any linked record.
@param iRelPosition The positions to move.
@return The record at this location.
@exception DBException File exception. | [
"Special",
"logic",
"to",
"move",
"a",
"QueryRecord",
"using",
"the",
"tables",
".",
"The",
"method",
"also",
"retrives",
"any",
"linked",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L438-L487 |
154,024 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.openTableQuery | public void openTableQuery() throws DBException
{
Record record = null;
boolean bFirstTime = true;
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
TableLink tableLink = e.nextElement();
record = tableLink.getLeftRecord();
... | java | public void openTableQuery() throws DBException
{
Record record = null;
boolean bFirstTime = true;
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
TableLink tableLink = e.nextElement();
record = tableLink.getLeftRecord();
... | [
"public",
"void",
"openTableQuery",
"(",
")",
"throws",
"DBException",
"{",
"Record",
"record",
"=",
"null",
";",
"boolean",
"bFirstTime",
"=",
"true",
";",
"for",
"(",
"Enumeration",
"<",
"TableLink",
">",
"e",
"=",
"m_LinkageList",
".",
"elements",
"(",
... | Special logic to open a QueryRecord using the tables.
@exception DBException File exception. | [
"Special",
"logic",
"to",
"open",
"a",
"QueryRecord",
"using",
"the",
"tables",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L492-L510 |
154,025 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.checkLinkedFields | public void checkLinkedFields()
{
if (this.isManualQuery()) // ? Manually set up query?
{ // It is a requirement that all linked fields be selected in case a manual query is needed
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
... | java | public void checkLinkedFields()
{
if (this.isManualQuery()) // ? Manually set up query?
{ // It is a requirement that all linked fields be selected in case a manual query is needed
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
... | [
"public",
"void",
"checkLinkedFields",
"(",
")",
"{",
"if",
"(",
"this",
".",
"isManualQuery",
"(",
")",
")",
"// ? Manually set up query?",
"{",
"// It is a requirement that all linked fields be selected in case a manual query is needed",
"for",
"(",
"Enumeration",
"<",
"T... | Make sure all the linked fields are selected. | [
"Make",
"sure",
"all",
"the",
"linked",
"fields",
"are",
"selected",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L564-L580 |
154,026 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryRecord.java | QueryRecord.isComplexQuery | public boolean isComplexQuery()
{
for (int i = 0; i < this.getRecordlistCount(); i++)
{
if (this.getRecordlistAt(i).getTable() instanceof org.jbundle.base.db.shared.MultiTable)
return true;
}
return false;
} | java | public boolean isComplexQuery()
{
for (int i = 0; i < this.getRecordlistCount(); i++)
{
if (this.getRecordlistAt(i).getTable() instanceof org.jbundle.base.db.shared.MultiTable)
return true;
}
return false;
} | [
"public",
"boolean",
"isComplexQuery",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"getRecordlistCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"getRecordlistAt",
"(",
"i",
")",
".",
"getTable",... | Is one of the sub-queries a multi-table.
@return true if this is a query on top of an object query. | [
"Is",
"one",
"of",
"the",
"sub",
"-",
"queries",
"a",
"multi",
"-",
"table",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L633-L641 |
154,027 | lshift/jamume | src/main/java/net/lshift/java/dispatch/DefaultDirectSuperclasses.java | DefaultDirectSuperclasses.makeArrayClasses | public static List<Class<?>> makeArrayClasses(List<Class<?>> classes, int dims)
{
Iterator<Class<?>> i = classes.iterator();
LinkedList<Class<?>> arrayClasses = new LinkedList<Class<?>>();
while(i.hasNext())
arrayClasses.add(makeArrayClass(i.next(), dims));
return arrayCl... | java | public static List<Class<?>> makeArrayClasses(List<Class<?>> classes, int dims)
{
Iterator<Class<?>> i = classes.iterator();
LinkedList<Class<?>> arrayClasses = new LinkedList<Class<?>>();
while(i.hasNext())
arrayClasses.add(makeArrayClass(i.next(), dims));
return arrayCl... | [
"public",
"static",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"makeArrayClasses",
"(",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"classes",
",",
"int",
"dims",
")",
"{",
"Iterator",
"<",
"Class",
"<",
"?",
">",
">",
"i",
"=",
"classes",
".",
"ite... | this compensates for the lack of map | [
"this",
"compensates",
"for",
"the",
"lack",
"of",
"map"
] | 754d9ab29311601328a2f39928775e4e010305b7 | https://github.com/lshift/jamume/blob/754d9ab29311601328a2f39928775e4e010305b7/src/main/java/net/lshift/java/dispatch/DefaultDirectSuperclasses.java#L133-L140 |
154,028 | jbundle/jbundle | main/remote/src/main/java/org/jbundle/main/remote/MenusSession.java | MenusSession.addListeners | public void addListeners()
{
super.addListeners();
try {
this.doRemoteAction(DBConstants.BLANK, null); // Initial default menu
} catch (Exception ex) {
// Never
}
Record recMenus = this.getMainRecord();
recMenus.setOpenMode(DBConstants.OPEN_... | java | public void addListeners()
{
super.addListeners();
try {
this.doRemoteAction(DBConstants.BLANK, null); // Initial default menu
} catch (Exception ex) {
// Never
}
Record recMenus = this.getMainRecord();
recMenus.setOpenMode(DBConstants.OPEN_... | [
"public",
"void",
"addListeners",
"(",
")",
"{",
"super",
".",
"addListeners",
"(",
")",
";",
"try",
"{",
"this",
".",
"doRemoteAction",
"(",
"DBConstants",
".",
"BLANK",
",",
"null",
")",
";",
"// Initial default menu",
"}",
"catch",
"(",
"Exception",
"ex... | Add behaviors to this session. | [
"Add",
"behaviors",
"to",
"this",
"session",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/remote/src/main/java/org/jbundle/main/remote/MenusSession.java#L65-L96 |
154,029 | jbundle/jbundle | main/remote/src/main/java/org/jbundle/main/remote/MenusSession.java | MenusSession.setupSubMenus | public void setupSubMenus(String strMenu)
{
Record recMenu = this.getMainRecord();
try {
String strCommandNoCommas = Utility.replace(strMenu, ",", null); // Get any commas out
boolean bIsNumeric = Utility.isNumeric(strCommandNoCommas);
if (bIsNumeric)
... | java | public void setupSubMenus(String strMenu)
{
Record recMenu = this.getMainRecord();
try {
String strCommandNoCommas = Utility.replace(strMenu, ",", null); // Get any commas out
boolean bIsNumeric = Utility.isNumeric(strCommandNoCommas);
if (bIsNumeric)
... | [
"public",
"void",
"setupSubMenus",
"(",
"String",
"strMenu",
")",
"{",
"Record",
"recMenu",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"try",
"{",
"String",
"strCommandNoCommas",
"=",
"Utility",
".",
"replace",
"(",
"strMenu",
",",
"\",\"",
",",
"nu... | SetupSubMenus Method. | [
"SetupSubMenus",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/remote/src/main/java/org/jbundle/main/remote/MenusSession.java#L131-L164 |
154,030 | Joe0/Feather | src/main/java/com/joepritzel/feather/PSBrokerBuilder.java | PSBrokerBuilder.typeToSubscriberMapping | public PSBrokerBuilder typeToSubscriberMapping(
ConcurrentMap<Class<?>, List<SubscriberParent>> mapping) {
broker.mapping = mapping;
return this;
} | java | public PSBrokerBuilder typeToSubscriberMapping(
ConcurrentMap<Class<?>, List<SubscriberParent>> mapping) {
broker.mapping = mapping;
return this;
} | [
"public",
"PSBrokerBuilder",
"typeToSubscriberMapping",
"(",
"ConcurrentMap",
"<",
"Class",
"<",
"?",
">",
",",
"List",
"<",
"SubscriberParent",
">",
">",
"mapping",
")",
"{",
"broker",
".",
"mapping",
"=",
"mapping",
";",
"return",
"this",
";",
"}"
] | The map that should be used internally, that maps types to a list of
subscribers.
@param mapping
- The map to be used. | [
"The",
"map",
"that",
"should",
"be",
"used",
"internally",
"that",
"maps",
"types",
"to",
"a",
"list",
"of",
"subscribers",
"."
] | d17b1bc38326b8b86f1068898a59c8a34678d499 | https://github.com/Joe0/Feather/blob/d17b1bc38326b8b86f1068898a59c8a34678d499/src/main/java/com/joepritzel/feather/PSBrokerBuilder.java#L65-L69 |
154,031 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/QueryTable.java | QueryTable.init | public void init(BaseDatabase database, Record record)
{
super.init(database, record);
if (((QueryRecord)record).getBaseRecord() != null)
m_tableNext = ((QueryRecord)record).getBaseRecord().getTable(); // Pass most commands thru to the main record's table
} | java | public void init(BaseDatabase database, Record record)
{
super.init(database, record);
if (((QueryRecord)record).getBaseRecord() != null)
m_tableNext = ((QueryRecord)record).getBaseRecord().getTable(); // Pass most commands thru to the main record's table
} | [
"public",
"void",
"init",
"(",
"BaseDatabase",
"database",
",",
"Record",
"record",
")",
"{",
"super",
".",
"init",
"(",
"database",
",",
"record",
")",
";",
"if",
"(",
"(",
"(",
"QueryRecord",
")",
"record",
")",
".",
"getBaseRecord",
"(",
")",
"!=",
... | QueryTable Constructor.
@param database The database for this table.
@param record The queryRecord for this table. | [
"QueryTable",
"Constructor",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryTable.java#L46-L51 |
154,032 | gdx-libs/gdx-autumn | src/com/github/czyzby/autumn/context/ContextInitializer.java | ContextInitializer.addIfNotNull | protected <Type> void addIfNotNull(final Array<Type> array, final Type object) {
if (object != null) {
array.add(object);
}
} | java | protected <Type> void addIfNotNull(final Array<Type> array, final Type object) {
if (object != null) {
array.add(object);
}
} | [
"protected",
"<",
"Type",
">",
"void",
"addIfNotNull",
"(",
"final",
"Array",
"<",
"Type",
">",
"array",
",",
"final",
"Type",
"object",
")",
"{",
"if",
"(",
"object",
"!=",
"null",
")",
"{",
"array",
".",
"add",
"(",
"object",
")",
";",
"}",
"}"
] | Simple array utility.
@param array will contain the object if it's not null.
@param object if not null, will be added to the array.
@param <Type> type of values stored in the array. | [
"Simple",
"array",
"utility",
"."
] | 75a7d8e0c838b69a06ae847f5a3c13a3bcd1d914 | https://github.com/gdx-libs/gdx-autumn/blob/75a7d8e0c838b69a06ae847f5a3c13a3bcd1d914/src/com/github/czyzby/autumn/context/ContextInitializer.java#L394-L398 |
154,033 | mbenson/uelbox | src/main/java/uelbox/IterableELResolver.java | IterableELResolver.seek | private static Iterator<?> seek(ELContext context, Object base, Object property) {
if (base instanceof Iterable<?>) {
context.setPropertyResolved(true);
int index = toIndex(context, property);
if (index >= 0) {
Iterator<?> result = ((Iterable<?>) base).iterato... | java | private static Iterator<?> seek(ELContext context, Object base, Object property) {
if (base instanceof Iterable<?>) {
context.setPropertyResolved(true);
int index = toIndex(context, property);
if (index >= 0) {
Iterator<?> result = ((Iterable<?>) base).iterato... | [
"private",
"static",
"Iterator",
"<",
"?",
">",
"seek",
"(",
"ELContext",
"context",
",",
"Object",
"base",
",",
"Object",
"property",
")",
"{",
"if",
"(",
"base",
"instanceof",
"Iterable",
"<",
"?",
">",
")",
"{",
"context",
".",
"setPropertyResolved",
... | Establishes an Iterator and advances it to the specified index. If this operation succeeds the context will be
set as having been resolved.
@param context
@param base
@param property
@return Iterator
@throws PropertyNotFoundException
if index is out of bounds | [
"Establishes",
"an",
"Iterator",
"and",
"advances",
"it",
"to",
"the",
"specified",
"index",
".",
"If",
"this",
"operation",
"succeeds",
"the",
"context",
"will",
"be",
"set",
"as",
"having",
"been",
"resolved",
"."
] | b0c2df2c738295bddfd3c16a916e67c9c7c512ef | https://github.com/mbenson/uelbox/blob/b0c2df2c738295bddfd3c16a916e67c9c7c512ef/src/main/java/uelbox/IterableELResolver.java#L90-L106 |
154,034 | GII/broccoli | broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/serviceBuilder/DynamicAtomicJavaGroundingFactory.java | DynamicAtomicJavaGroundingFactory.generateOWLGrounding | public Grounding generateOWLGrounding(Service service) throws DynamicGroundingBuildingException {
JavaGrounding javaGrounding = service.getOntology().createJavaGrounding(null);
JavaAtomicGrounding javaAtomicGrounding = service.getOntology().createJavaAtomicGrounding(null);
AtomicProcess atomicPr... | java | public Grounding generateOWLGrounding(Service service) throws DynamicGroundingBuildingException {
JavaGrounding javaGrounding = service.getOntology().createJavaGrounding(null);
JavaAtomicGrounding javaAtomicGrounding = service.getOntology().createJavaAtomicGrounding(null);
AtomicProcess atomicPr... | [
"public",
"Grounding",
"generateOWLGrounding",
"(",
"Service",
"service",
")",
"throws",
"DynamicGroundingBuildingException",
"{",
"JavaGrounding",
"javaGrounding",
"=",
"service",
".",
"getOntology",
"(",
")",
".",
"createJavaGrounding",
"(",
"null",
")",
";",
"JavaA... | It automatically creates Output and Inputs assigning them a Java Transformator class
@param service
@return
@throws DynamicGroundingBuildingException | [
"It",
"automatically",
"creates",
"Output",
"and",
"Inputs",
"assigning",
"them",
"a",
"Java",
"Transformator",
"class"
] | a3033a90322cbcee4dc0f1719143b84b822bc4ba | https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/serviceBuilder/DynamicAtomicJavaGroundingFactory.java#L75-L112 |
154,035 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/engine/query/ProjectParsed.java | ProjectParsed.addLogicalStep | private void addLogicalStep(LogicalStep lStep) throws ExecutionException {
if (lStep instanceof Project) {
project = (Project) lStep;
} else if (lStep instanceof Filter) {
decideTypeFilterToAdd((Filter) lStep);
} else if (lStep instanceof FunctionFilter){
fu... | java | private void addLogicalStep(LogicalStep lStep) throws ExecutionException {
if (lStep instanceof Project) {
project = (Project) lStep;
} else if (lStep instanceof Filter) {
decideTypeFilterToAdd((Filter) lStep);
} else if (lStep instanceof FunctionFilter){
fu... | [
"private",
"void",
"addLogicalStep",
"(",
"LogicalStep",
"lStep",
")",
"throws",
"ExecutionException",
"{",
"if",
"(",
"lStep",
"instanceof",
"Project",
")",
"{",
"project",
"=",
"(",
"Project",
")",
"lStep",
";",
"}",
"else",
"if",
"(",
"lStep",
"instanceof... | This method add the correct logical step.
@param lStep logical step.
@throws ExecutionException if the logical step is not supported. | [
"This",
"method",
"add",
"the",
"correct",
"logical",
"step",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/engine/query/ProjectParsed.java#L205-L237 |
154,036 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/engine/query/ProjectParsed.java | ProjectParsed.decideTypeFilterToAdd | private void decideTypeFilterToAdd(Filter filter) {
Filter step = filter;
if (Operator.MATCH == step.getRelation().getOperator() ||
step.getRelation().getRightTerm() instanceof FunctionSelector) {
if (matchList.isEmpty()) {
matchList = new ArrayList<>();
... | java | private void decideTypeFilterToAdd(Filter filter) {
Filter step = filter;
if (Operator.MATCH == step.getRelation().getOperator() ||
step.getRelation().getRightTerm() instanceof FunctionSelector) {
if (matchList.isEmpty()) {
matchList = new ArrayList<>();
... | [
"private",
"void",
"decideTypeFilterToAdd",
"(",
"Filter",
"filter",
")",
"{",
"Filter",
"step",
"=",
"filter",
";",
"if",
"(",
"Operator",
".",
"MATCH",
"==",
"step",
".",
"getRelation",
"(",
")",
".",
"getOperator",
"(",
")",
"||",
"step",
".",
"getRel... | Add filter in the correct list.
@param filter the filter. | [
"Add",
"filter",
"in",
"the",
"correct",
"list",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/engine/query/ProjectParsed.java#L296-L311 |
154,037 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageQueue.java | BaseMessageQueue.free | public void free()
{
if (m_receiver != null)
m_receiver.free();
m_receiver = null;
if (m_sender != null)
m_sender.free();
m_sender = null;
if (m_manager != null)
m_manager.removeMessageQueue(this);
m_manager = null;
m_strQ... | java | public void free()
{
if (m_receiver != null)
m_receiver.free();
m_receiver = null;
if (m_sender != null)
m_sender.free();
m_sender = null;
if (m_manager != null)
m_manager.removeMessageQueue(this);
m_manager = null;
m_strQ... | [
"public",
"void",
"free",
"(",
")",
"{",
"if",
"(",
"m_receiver",
"!=",
"null",
")",
"m_receiver",
".",
"free",
"(",
")",
";",
"m_receiver",
"=",
"null",
";",
"if",
"(",
"m_sender",
"!=",
"null",
")",
"m_sender",
".",
"free",
"(",
")",
";",
"m_send... | Free all the resources belonging to this object. | [
"Free",
"all",
"the",
"resources",
"belonging",
"to",
"this",
"object",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageQueue.java#L73-L88 |
154,038 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageQueue.java | BaseMessageQueue.getMessageReceiver | public BaseMessageReceiver getMessageReceiver()
{
if (m_receiver == null)
{
m_receiver = this.createMessageReceiver();
if (m_receiver != null)
new Thread(m_receiver, "MessageReceiver").start();
}
return m_receiver;
} | java | public BaseMessageReceiver getMessageReceiver()
{
if (m_receiver == null)
{
m_receiver = this.createMessageReceiver();
if (m_receiver != null)
new Thread(m_receiver, "MessageReceiver").start();
}
return m_receiver;
} | [
"public",
"BaseMessageReceiver",
"getMessageReceiver",
"(",
")",
"{",
"if",
"(",
"m_receiver",
"==",
"null",
")",
"{",
"m_receiver",
"=",
"this",
".",
"createMessageReceiver",
"(",
")",
";",
"if",
"(",
"m_receiver",
"!=",
"null",
")",
"new",
"Thread",
"(",
... | Get the message receiver.
Create it if it doesn't exist.
@return The message receiver. | [
"Get",
"the",
"message",
"receiver",
".",
"Create",
"it",
"if",
"it",
"doesn",
"t",
"exist",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageQueue.java#L170-L179 |
154,039 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java | ManifestUtil.getDatastoreName | public static String[] getDatastoreName(String pathManifest) throws InitializationException {
String[] datastoreName = {""};
try {
Document document = getDocument(pathManifest);
// Search for the limit properties and connectorName
Object result = getResult(document, ... | java | public static String[] getDatastoreName(String pathManifest) throws InitializationException {
String[] datastoreName = {""};
try {
Document document = getDocument(pathManifest);
// Search for the limit properties and connectorName
Object result = getResult(document, ... | [
"public",
"static",
"String",
"[",
"]",
"getDatastoreName",
"(",
"String",
"pathManifest",
")",
"throws",
"InitializationException",
"{",
"String",
"[",
"]",
"datastoreName",
"=",
"{",
"\"\"",
"}",
";",
"try",
"{",
"Document",
"document",
"=",
"getDocument",
"... | Recovered the datastoreName form Manifest.
@param pathManifest the manifest path.
@return the datastoreName.
@throws InitializationException if an error happens while XML is reading. | [
"Recovered",
"the",
"datastoreName",
"form",
"Manifest",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java#L57-L77 |
154,040 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java | ManifestUtil.getConectorName | public static String getConectorName(String pathManifest) throws InitializationException {
String connectionName = "";
try {
Document document = getDocument(pathManifest);
Object result = getResult(document, "//ConnectorName/text()");
connectionName = ((NodeList) re... | java | public static String getConectorName(String pathManifest) throws InitializationException {
String connectionName = "";
try {
Document document = getDocument(pathManifest);
Object result = getResult(document, "//ConnectorName/text()");
connectionName = ((NodeList) re... | [
"public",
"static",
"String",
"getConectorName",
"(",
"String",
"pathManifest",
")",
"throws",
"InitializationException",
"{",
"String",
"connectionName",
"=",
"\"\"",
";",
"try",
"{",
"Document",
"document",
"=",
"getDocument",
"(",
"pathManifest",
")",
";",
"Obj... | Recovered the ConecrtorName form Manifest.
@param pathManifest the manifest path.
@return the ConectionName.
@throws InitializationException if an error happens while XML is reading. | [
"Recovered",
"the",
"ConecrtorName",
"form",
"Manifest",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java#L86-L103 |
154,041 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java | ManifestUtil.getResult | private static Object getResult(Document document, String node) throws XPathExpressionException {
// create an XPath object
XPath xpath = XPathFactory.newInstance().newXPath();
Object result;
XPathExpression expr = null;
expr = xpath.compile(node);
result = expr.evaluate(... | java | private static Object getResult(Document document, String node) throws XPathExpressionException {
// create an XPath object
XPath xpath = XPathFactory.newInstance().newXPath();
Object result;
XPathExpression expr = null;
expr = xpath.compile(node);
result = expr.evaluate(... | [
"private",
"static",
"Object",
"getResult",
"(",
"Document",
"document",
",",
"String",
"node",
")",
"throws",
"XPathExpressionException",
"{",
"// create an XPath object",
"XPath",
"xpath",
"=",
"XPathFactory",
".",
"newInstance",
"(",
")",
".",
"newXPath",
"(",
... | Get the node value.
@param document the document.
@param node the node.
@return the node value.
@throws XPathExpressionException if an exception happens. | [
"Get",
"the",
"node",
"value",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java#L113-L121 |
154,042 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java | ManifestUtil.getDocument | private static Document getDocument(String pathManifest) throws SAXException, IOException,
ParserConfigurationException {
InputStream inputStream = ManifestUtil.class.getClassLoader().getResourceAsStream(pathManifest);
return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in... | java | private static Document getDocument(String pathManifest) throws SAXException, IOException,
ParserConfigurationException {
InputStream inputStream = ManifestUtil.class.getClassLoader().getResourceAsStream(pathManifest);
return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in... | [
"private",
"static",
"Document",
"getDocument",
"(",
"String",
"pathManifest",
")",
"throws",
"SAXException",
",",
"IOException",
",",
"ParserConfigurationException",
"{",
"InputStream",
"inputStream",
"=",
"ManifestUtil",
".",
"class",
".",
"getClassLoader",
"(",
")"... | Create the documento.
@param pathManifest the manifest Path.
@return the document.
@throws SAXException if an exception happens.
@throws IOException if an exception happens.
@throws ParserConfigurationException if an exception happens. | [
"Create",
"the",
"documento",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java#L132-L136 |
154,043 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/FaxField.java | FaxField.getHyperlink | public String getHyperlink()
{
String strMailTo = this.getString();
if (strMailTo != null) if (strMailTo.length() > 0)
strMailTo = DBParams.FAX + ":" + strMailTo;
return strMailTo;
} | java | public String getHyperlink()
{
String strMailTo = this.getString();
if (strMailTo != null) if (strMailTo.length() > 0)
strMailTo = DBParams.FAX + ":" + strMailTo;
return strMailTo;
} | [
"public",
"String",
"getHyperlink",
"(",
")",
"{",
"String",
"strMailTo",
"=",
"this",
".",
"getString",
"(",
")",
";",
"if",
"(",
"strMailTo",
"!=",
"null",
")",
"if",
"(",
"strMailTo",
".",
"length",
"(",
")",
">",
"0",
")",
"strMailTo",
"=",
"DBPa... | Get the faxto HTML Hyperlink. | [
"Get",
"the",
"faxto",
"HTML",
"Hyperlink",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/FaxField.java#L58-L64 |
154,044 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.join | public static String join(Iterable<?> objects, char separator)
{
return join(objects, Character.toString(separator));
} | java | public static String join(Iterable<?> objects, char separator)
{
return join(objects, Character.toString(separator));
} | [
"public",
"static",
"String",
"join",
"(",
"Iterable",
"<",
"?",
">",
"objects",
",",
"char",
"separator",
")",
"{",
"return",
"join",
"(",
"objects",
",",
"Character",
".",
"toString",
"(",
"separator",
")",
")",
";",
"}"
] | Join collection of objects, converted to string, using specified char separator. Returns null if given objects
array is null and empty if empty.
@param objects collection of objects to join,
@param separator character used as separator.
@return joined string. | [
"Join",
"collection",
"of",
"objects",
"converted",
"to",
"string",
"using",
"specified",
"char",
"separator",
".",
"Returns",
"null",
"if",
"given",
"objects",
"array",
"is",
"null",
"and",
"empty",
"if",
"empty",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L493-L496 |
154,045 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.split | public static List<String> split(String string, String separator)
{
final int separatorLength = separator.length();
final List<String> list = new ArrayList<String>();
int fromIndex = 0;
for(;;) {
int endIndex = string.indexOf(separator, fromIndex);
if(endIndex == -1) {
br... | java | public static List<String> split(String string, String separator)
{
final int separatorLength = separator.length();
final List<String> list = new ArrayList<String>();
int fromIndex = 0;
for(;;) {
int endIndex = string.indexOf(separator, fromIndex);
if(endIndex == -1) {
br... | [
"public",
"static",
"List",
"<",
"String",
">",
"split",
"(",
"String",
"string",
",",
"String",
"separator",
")",
"{",
"final",
"int",
"separatorLength",
"=",
"separator",
".",
"length",
"(",
")",
";",
"final",
"List",
"<",
"String",
">",
"list",
"=",
... | Splits string using specified string separator and returns trimmed values. Returns null if string argument is null
and empty list if is empty.
@param string source string,
@param separator string used as separator.
@return strings list, possible empty. | [
"Splits",
"string",
"using",
"specified",
"string",
"separator",
"and",
"returns",
"trimmed",
"values",
".",
"Returns",
"null",
"if",
"string",
"argument",
"is",
"null",
"and",
"empty",
"list",
"if",
"is",
"empty",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L628-L648 |
154,046 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.isNumeric | public static boolean isNumeric(String string)
{
if(string == null || string.isEmpty()) return false;
State state = State.SIGN;
for(int i = 0; i < string.length(); ++i) {
char c = string.charAt(i);
switch(state) {
case SIGN:
if(c == '-' || c == '+') {
state... | java | public static boolean isNumeric(String string)
{
if(string == null || string.isEmpty()) return false;
State state = State.SIGN;
for(int i = 0; i < string.length(); ++i) {
char c = string.charAt(i);
switch(state) {
case SIGN:
if(c == '-' || c == '+') {
state... | [
"public",
"static",
"boolean",
"isNumeric",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
"||",
"string",
".",
"isEmpty",
"(",
")",
")",
"return",
"false",
";",
"State",
"state",
"=",
"State",
".",
"SIGN",
";",
"for",
"(",
"in... | Test if string is a numeric value. Returns false if string argument is null or empty.
@param string string to test.
@return true if given string denote a number. | [
"Test",
"if",
"string",
"is",
"a",
"numeric",
"value",
".",
"Returns",
"false",
"if",
"string",
"argument",
"is",
"null",
"or",
"empty",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L754-L842 |
154,047 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.isInteger | public static boolean isInteger(String string)
{
if(string == null || string.isEmpty()) return false;
int startIndex = string.charAt(0) == '-' ? 1 : string.charAt(0) == '+' ? 1 : 0;
for(int i = startIndex, l = string.length(); i < l; i++) {
if(string.charAt(i) == GROUPING_SEPARATOR) continue;
... | java | public static boolean isInteger(String string)
{
if(string == null || string.isEmpty()) return false;
int startIndex = string.charAt(0) == '-' ? 1 : string.charAt(0) == '+' ? 1 : 0;
for(int i = startIndex, l = string.length(); i < l; i++) {
if(string.charAt(i) == GROUPING_SEPARATOR) continue;
... | [
"public",
"static",
"boolean",
"isInteger",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
"||",
"string",
".",
"isEmpty",
"(",
")",
")",
"return",
"false",
";",
"int",
"startIndex",
"=",
"string",
".",
"charAt",
"(",
"0",
")",
... | Test if string is an integer numeric value. Returns false if string is null or empty.
@param string string to test.
@return true if string is an integer. | [
"Test",
"if",
"string",
"is",
"an",
"integer",
"numeric",
"value",
".",
"Returns",
"false",
"if",
"string",
"is",
"null",
"or",
"empty",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L850-L861 |
154,048 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.escapeXML | public static String escapeXML(String text)
{
StringWriter writer = new StringWriter();
try {
escapeXML(text, writer);
}
catch(IOException e) {
// there is no reason for IO exception on a string writer
throw new BugError("IO failure while attempting to write to string.");
... | java | public static String escapeXML(String text)
{
StringWriter writer = new StringWriter();
try {
escapeXML(text, writer);
}
catch(IOException e) {
// there is no reason for IO exception on a string writer
throw new BugError("IO failure while attempting to write to string.");
... | [
"public",
"static",
"String",
"escapeXML",
"(",
"String",
"text",
")",
"{",
"StringWriter",
"writer",
"=",
"new",
"StringWriter",
"(",
")",
";",
"try",
"{",
"escapeXML",
"(",
"text",
",",
"writer",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
... | Escape text for reserved XML characters. Replace quotes, apostrophe, ampersand, left and right angular brackets
with entities. Return the newly created, escaped string; if text argument is null or empty returns an empty string.
@param text string to escape.
@return the newly created string. | [
"Escape",
"text",
"for",
"reserved",
"XML",
"characters",
".",
"Replace",
"quotes",
"apostrophe",
"ampersand",
"left",
"and",
"right",
"angular",
"brackets",
"with",
"entities",
".",
"Return",
"the",
"newly",
"created",
"escaped",
"string",
";",
"if",
"text",
... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L870-L881 |
154,049 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.escapeRegExp | public static String escapeRegExp(String string)
{
if(string == null) {
return null;
}
return string.replaceAll(REGEXP_PATTERN, REPLACE_ARG_REX);
} | java | public static String escapeRegExp(String string)
{
if(string == null) {
return null;
}
return string.replaceAll(REGEXP_PATTERN, REPLACE_ARG_REX);
} | [
"public",
"static",
"String",
"escapeRegExp",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"string",
".",
"replaceAll",
"(",
"REGEXP_PATTERN",
",",
"REPLACE_ARG_REX",
")",
";",
"}"
] | Escape string for regular expression reserved characters. Return null if string argument is null and empty if
empty.
@param string regular expression to escape.
@return newly created, escaped string. | [
"Escape",
"string",
"for",
"regular",
"expression",
"reserved",
"characters",
".",
"Return",
"null",
"if",
"string",
"argument",
"is",
"null",
"and",
"empty",
"if",
"empty",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L948-L954 |
154,050 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.last | public static String last(String string, char separator)
{
if(string == null) {
return null;
}
if(string.isEmpty()) {
return "";
}
return string.substring(string.lastIndexOf(separator) + 1);
} | java | public static String last(String string, char separator)
{
if(string == null) {
return null;
}
if(string.isEmpty()) {
return "";
}
return string.substring(string.lastIndexOf(separator) + 1);
} | [
"public",
"static",
"String",
"last",
"(",
"String",
"string",
",",
"char",
"separator",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"string",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"\"\"",
"... | Get last string sequence following given character. If separator character is missing from the source string
returns entire string. Return null if string argument is null and empty if empty.
@param string source string,
@param separator character used as separator.
@return last string sequence. | [
"Get",
"last",
"string",
"sequence",
"following",
"given",
"character",
".",
"If",
"separator",
"character",
"is",
"missing",
"from",
"the",
"source",
"string",
"returns",
"entire",
"string",
".",
"Return",
"null",
"if",
"string",
"argument",
"is",
"null",
"an... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L980-L989 |
154,051 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.removeTrailing | public static String removeTrailing(String string, char c)
{
if(string == null) {
return null;
}
final int lastCharIndex = string.length() - 1;
return string.charAt(lastCharIndex) == c ? string.substring(0, lastCharIndex) : string;
} | java | public static String removeTrailing(String string, char c)
{
if(string == null) {
return null;
}
final int lastCharIndex = string.length() - 1;
return string.charAt(lastCharIndex) == c ? string.substring(0, lastCharIndex) : string;
} | [
"public",
"static",
"String",
"removeTrailing",
"(",
"String",
"string",
",",
"char",
"c",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"int",
"lastCharIndex",
"=",
"string",
".",
"length",
"(",
")",
"-",
... | Remove trailing character, if exists.
@param string source string,
@param c trailing character to eliminate.
@return source string guaranteed to not end in requested character. | [
"Remove",
"trailing",
"character",
"if",
"exists",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1328-L1335 |
154,052 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.load | public static String load(InputStream inputStream, Integer... maxCount) throws IOException
{
return load(new InputStreamReader(inputStream, "UTF-8"), maxCount);
} | java | public static String load(InputStream inputStream, Integer... maxCount) throws IOException
{
return load(new InputStreamReader(inputStream, "UTF-8"), maxCount);
} | [
"public",
"static",
"String",
"load",
"(",
"InputStream",
"inputStream",
",",
"Integer",
"...",
"maxCount",
")",
"throws",
"IOException",
"{",
"return",
"load",
"(",
"new",
"InputStreamReader",
"(",
"inputStream",
",",
"\"UTF-8\"",
")",
",",
"maxCount",
")",
"... | Load string from UTF-8 bytes stream then closes it.
@param inputStream source input stream,
@param maxCount optional maximum number of characters to read, default to MAX_VALUE.
@return string from input stream.
@throws NullPointerException if input stream is null.
@throws IOException if input stream read operation fai... | [
"Load",
"string",
"from",
"UTF",
"-",
"8",
"bytes",
"stream",
"then",
"closes",
"it",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1433-L1436 |
154,053 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.load | public static String load(File file, Integer... maxCount) throws IOException
{
return load(new FileReader(file), maxCount);
} | java | public static String load(File file, Integer... maxCount) throws IOException
{
return load(new FileReader(file), maxCount);
} | [
"public",
"static",
"String",
"load",
"(",
"File",
"file",
",",
"Integer",
"...",
"maxCount",
")",
"throws",
"IOException",
"{",
"return",
"load",
"(",
"new",
"FileReader",
"(",
"file",
")",
",",
"maxCount",
")",
";",
"}"
] | Load string from UTF-8 file content.
@param file source file,
@param maxCount optional maximum character count to load, default to entire file.
@return loaded string, possible empty but never null.
@throws IOException if file not found or file read operation fails. | [
"Load",
"string",
"from",
"UTF",
"-",
"8",
"file",
"content",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1446-L1449 |
154,054 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.load | public static String load(Reader reader, Integer... maxCount) throws IOException
{
long maxCountValue = maxCount.length > 0 ? maxCount[0] : Long.MAX_VALUE;
StringWriter writer = new StringWriter();
try {
char[] buffer = new char[1024];
for(;;) {
int readChars = reader.read(buf... | java | public static String load(Reader reader, Integer... maxCount) throws IOException
{
long maxCountValue = maxCount.length > 0 ? maxCount[0] : Long.MAX_VALUE;
StringWriter writer = new StringWriter();
try {
char[] buffer = new char[1024];
for(;;) {
int readChars = reader.read(buf... | [
"public",
"static",
"String",
"load",
"(",
"Reader",
"reader",
",",
"Integer",
"...",
"maxCount",
")",
"throws",
"IOException",
"{",
"long",
"maxCountValue",
"=",
"maxCount",
".",
"length",
">",
"0",
"?",
"maxCount",
"[",
"0",
"]",
":",
"Long",
".",
"MAX... | Load string from character stream then closes it.
@param reader source character stream.
@param maxCount optional maximum character count to load, default to entire file.
@return loaded string, possible empty but never null.
@throws IOException if read operation fails. | [
"Load",
"string",
"from",
"character",
"stream",
"then",
"closes",
"it",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1459-L1481 |
154,055 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.md5 | public static String md5(String text)
{
MessageDigest md;
try {
md = MessageDigest.getInstance("MD5");
}
catch(NoSuchAlgorithmException e) {
throw new BugError("Java runtime without MD5 support.");
}
md.update(text.getBytes());
byte[] md5 = md.digest();
char[] ... | java | public static String md5(String text)
{
MessageDigest md;
try {
md = MessageDigest.getInstance("MD5");
}
catch(NoSuchAlgorithmException e) {
throw new BugError("Java runtime without MD5 support.");
}
md.update(text.getBytes());
byte[] md5 = md.digest();
char[] ... | [
"public",
"static",
"String",
"md5",
"(",
"String",
"text",
")",
"{",
"MessageDigest",
"md",
";",
"try",
"{",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"MD5\"",
")",
";",
"}",
"catch",
"(",
"NoSuchAlgorithmException",
"e",
")",
"{",
"throw",
... | Generate text MD5 hash into hexadecimal format. Returned string will be exactly 32 characters long. This function
is designed, but not limited, to store password into databases. Anyway, be aware that MD5 is not a strong enough
hash function to be used on public transfers.
@param text source text.
@return MD5 hash in h... | [
"Generate",
"text",
"MD5",
"hash",
"into",
"hexadecimal",
"format",
".",
"Returned",
"string",
"will",
"be",
"exactly",
"32",
"characters",
"long",
".",
"This",
"function",
"is",
"designed",
"but",
"not",
"limited",
"to",
"store",
"password",
"into",
"database... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1603-L1621 |
154,056 | js-lib-com/commons | src/main/java/js/util/Strings.java | Strings.getProtocol | public static String getProtocol(String url)
{
if(url == null) {
return null;
}
int protocolSeparatorIndex = url.indexOf("://");
if(protocolSeparatorIndex == -1) {
return null;
}
return url.substring(0, protocolSeparatorIndex).toLowerCase();
} | java | public static String getProtocol(String url)
{
if(url == null) {
return null;
}
int protocolSeparatorIndex = url.indexOf("://");
if(protocolSeparatorIndex == -1) {
return null;
}
return url.substring(0, protocolSeparatorIndex).toLowerCase();
} | [
"public",
"static",
"String",
"getProtocol",
"(",
"String",
"url",
")",
"{",
"if",
"(",
"url",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"protocolSeparatorIndex",
"=",
"url",
".",
"indexOf",
"(",
"\"://\"",
")",
";",
"if",
"(",
"protoc... | Get URL protocol - lower case, or null if given URL does not contains one. Returns null if given URL argument is
null or empty.
@param url URL to retrieve the protocol.
@return lower case URL protocol, possible null. | [
"Get",
"URL",
"protocol",
"-",
"lower",
"case",
"or",
"null",
"if",
"given",
"URL",
"does",
"not",
"contains",
"one",
".",
"Returns",
"null",
"if",
"given",
"URL",
"argument",
"is",
"null",
"or",
"empty",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1630-L1640 |
154,057 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/swap/XORSwap.java | XORSwap.swap | public static void swap(short[] shortArray1, short[] shortArray2, int index) {
XORSwap.swap(shortArray1, index, shortArray2, index);
} | java | public static void swap(short[] shortArray1, short[] shortArray2, int index) {
XORSwap.swap(shortArray1, index, shortArray2, index);
} | [
"public",
"static",
"void",
"swap",
"(",
"short",
"[",
"]",
"shortArray1",
",",
"short",
"[",
"]",
"shortArray2",
",",
"int",
"index",
")",
"{",
"XORSwap",
".",
"swap",
"(",
"shortArray1",
",",
"index",
",",
"shortArray2",
",",
"index",
")",
";",
"}"
] | Swap the elements of short long arrays at the same position
@param shortArray1 one of the arrays that will have one of its values swapped.
@param shortArray2 other array that will have one of its values swapped.
@param index index of the arrays that will have their values swapped. | [
"Swap",
"the",
"elements",
"of",
"short",
"long",
"arrays",
"at",
"the",
"same",
"position"
] | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/swap/XORSwap.java#L264-L266 |
154,058 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java | TableMetadataBuilder.withColumns | @TimerJ
public TableMetadataBuilder withColumns(List<ColumnMetadata> columnsMetadata) {
for (ColumnMetadata colMetadata : columnsMetadata) {
columns.put(colMetadata.getName(), colMetadata);
}
return this;
} | java | @TimerJ
public TableMetadataBuilder withColumns(List<ColumnMetadata> columnsMetadata) {
for (ColumnMetadata colMetadata : columnsMetadata) {
columns.put(colMetadata.getName(), colMetadata);
}
return this;
} | [
"@",
"TimerJ",
"public",
"TableMetadataBuilder",
"withColumns",
"(",
"List",
"<",
"ColumnMetadata",
">",
"columnsMetadata",
")",
"{",
"for",
"(",
"ColumnMetadata",
"colMetadata",
":",
"columnsMetadata",
")",
"{",
"columns",
".",
"put",
"(",
"colMetadata",
".",
"... | Add new columns. The columns previously created are not removed.
@param columnsMetadata the columns metadata
@return the table metadata builder | [
"Add",
"new",
"columns",
".",
"The",
"columns",
"previously",
"created",
"are",
"not",
"removed",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L122-L128 |
154,059 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java | TableMetadataBuilder.addIndex | @TimerJ
public TableMetadataBuilder addIndex(IndexType indType, String indexName, String... fields) throws ExecutionException {
IndexName indName = new IndexName(tableName.getName(), tableName.getName(), indexName);
Map<ColumnName, ColumnMetadata> columnsMetadata = new HashMap<ColumnName, ColumnMe... | java | @TimerJ
public TableMetadataBuilder addIndex(IndexType indType, String indexName, String... fields) throws ExecutionException {
IndexName indName = new IndexName(tableName.getName(), tableName.getName(), indexName);
Map<ColumnName, ColumnMetadata> columnsMetadata = new HashMap<ColumnName, ColumnMe... | [
"@",
"TimerJ",
"public",
"TableMetadataBuilder",
"addIndex",
"(",
"IndexType",
"indType",
",",
"String",
"indexName",
",",
"String",
"...",
"fields",
")",
"throws",
"ExecutionException",
"{",
"IndexName",
"indName",
"=",
"new",
"IndexName",
"(",
"tableName",
".",
... | Add an index. Must be called after including columns because columnMetadata is recovered from the tableMetadata.
Options in indexMetadata will be null.
@param indType the index type.
@param indexName the index name.
@param fields the columns which define the index.
@return the table metadata builder.
@throws if a... | [
"Add",
"an",
"index",
".",
"Must",
"be",
"called",
"after",
"including",
"columns",
"because",
"columnMetadata",
"is",
"recovered",
"from",
"the",
"tableMetadata",
".",
"Options",
"in",
"indexMetadata",
"will",
"be",
"null",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L155-L172 |
154,060 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java | TableMetadataBuilder.addIndex | @TimerJ
public TableMetadataBuilder addIndex(IndexMetadata indexMetadata) {
indexes.put(indexMetadata.getName(), indexMetadata);
return this;
} | java | @TimerJ
public TableMetadataBuilder addIndex(IndexMetadata indexMetadata) {
indexes.put(indexMetadata.getName(), indexMetadata);
return this;
} | [
"@",
"TimerJ",
"public",
"TableMetadataBuilder",
"addIndex",
"(",
"IndexMetadata",
"indexMetadata",
")",
"{",
"indexes",
".",
"put",
"(",
"indexMetadata",
".",
"getName",
"(",
")",
",",
"indexMetadata",
")",
";",
"return",
"this",
";",
"}"
] | Add an index.
@param indexMetadata the index metadata
@return the table metadata builder | [
"Add",
"an",
"index",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L180-L184 |
154,061 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java | TableMetadataBuilder.withPartitionKey | @TimerJ
public TableMetadataBuilder withPartitionKey(String... fields) {
for (String field : fields) {
partitionKey.add(new ColumnName(tableName, field));
}
return this;
} | java | @TimerJ
public TableMetadataBuilder withPartitionKey(String... fields) {
for (String field : fields) {
partitionKey.add(new ColumnName(tableName, field));
}
return this;
} | [
"@",
"TimerJ",
"public",
"TableMetadataBuilder",
"withPartitionKey",
"(",
"String",
"...",
"fields",
")",
"{",
"for",
"(",
"String",
"field",
":",
"fields",
")",
"{",
"partitionKey",
".",
"add",
"(",
"new",
"ColumnName",
"(",
"tableName",
",",
"field",
")",
... | Set the partition key.
@param fields the fields
@return the table metadata builder | [
"Set",
"the",
"partition",
"key",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L192-L200 |
154,062 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java | TableMetadataBuilder.withClusterKey | @TimerJ
public TableMetadataBuilder withClusterKey(String... fields) {
for (String field : fields) {
clusterKey.add(new ColumnName(tableName, field));
}
return this;
} | java | @TimerJ
public TableMetadataBuilder withClusterKey(String... fields) {
for (String field : fields) {
clusterKey.add(new ColumnName(tableName, field));
}
return this;
} | [
"@",
"TimerJ",
"public",
"TableMetadataBuilder",
"withClusterKey",
"(",
"String",
"...",
"fields",
")",
"{",
"for",
"(",
"String",
"field",
":",
"fields",
")",
"{",
"clusterKey",
".",
"add",
"(",
"new",
"ColumnName",
"(",
"tableName",
",",
"field",
")",
")... | Set the cluster key.
@param fields the fields
@return the table metadata builder | [
"Set",
"the",
"cluster",
"key",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L208-L214 |
154,063 | Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java | TableMetadataBuilder.build | @TimerJ
public TableMetadata build(boolean isPKRequired) {
if (isPKRequired && partitionKey.isEmpty()) {
this.withPartitionKey(columns.keySet().iterator().next().getName());
}
return new TableMetadata(tableName, options, new LinkedHashMap<>(columns), indexes, clusterName, partiti... | java | @TimerJ
public TableMetadata build(boolean isPKRequired) {
if (isPKRequired && partitionKey.isEmpty()) {
this.withPartitionKey(columns.keySet().iterator().next().getName());
}
return new TableMetadata(tableName, options, new LinkedHashMap<>(columns), indexes, clusterName, partiti... | [
"@",
"TimerJ",
"public",
"TableMetadata",
"build",
"(",
"boolean",
"isPKRequired",
")",
"{",
"if",
"(",
"isPKRequired",
"&&",
"partitionKey",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"withPartitionKey",
"(",
"columns",
".",
"keySet",
"(",
")",
".",... | Builds the table metadata.
@param isPKRequired whether the pk is required or not
@return the table metadata | [
"Builds",
"the",
"table",
"metadata",
"."
] | d7cc66cb9591344a13055962e87a91f01c3707d1 | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L246-L252 |
154,064 | tvesalainen/util | util/src/main/java/org/vesalainen/util/BitGrid.java | BitGrid.patternOverflow | public boolean patternOverflow()
{
BitArray lin = new BitArray(width);
bits.forEach((i)->lin.set(column(i), true));
return lin.isSet(0) && lin.isSet(width-1);
} | java | public boolean patternOverflow()
{
BitArray lin = new BitArray(width);
bits.forEach((i)->lin.set(column(i), true));
return lin.isSet(0) && lin.isSet(width-1);
} | [
"public",
"boolean",
"patternOverflow",
"(",
")",
"{",
"BitArray",
"lin",
"=",
"new",
"BitArray",
"(",
"width",
")",
";",
"bits",
".",
"forEach",
"(",
"(",
"i",
")",
"-",
">",
"lin",
".",
"set",
"(",
"column",
"(",
"i",
")",
",",
"true",
")",
")"... | Returns true if pattern overflows line
@return | [
"Returns",
"true",
"if",
"pattern",
"overflows",
"line"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/BitGrid.java#L84-L89 |
154,065 | tvesalainen/util | util/src/main/java/org/vesalainen/util/BitGrid.java | BitGrid.patternLineCoverage | public float patternLineCoverage()
{
BitArray lin = new BitArray(width);
bits.forEach((i)->lin.set(column(i), true));
return (float)lin.count()/(float)width;
} | java | public float patternLineCoverage()
{
BitArray lin = new BitArray(width);
bits.forEach((i)->lin.set(column(i), true));
return (float)lin.count()/(float)width;
} | [
"public",
"float",
"patternLineCoverage",
"(",
")",
"{",
"BitArray",
"lin",
"=",
"new",
"BitArray",
"(",
"width",
")",
";",
"bits",
".",
"forEach",
"(",
"(",
"i",
")",
"-",
">",
"lin",
".",
"set",
"(",
"column",
"(",
"i",
")",
",",
"true",
")",
"... | Returns 1.0 if all columns have set bits or less
@return | [
"Returns",
"1",
".",
"0",
"if",
"all",
"columns",
"have",
"set",
"bits",
"or",
"less"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/BitGrid.java#L94-L99 |
154,066 | tvesalainen/util | util/src/main/java/org/vesalainen/util/BitGrid.java | BitGrid.patternSquareness | public float patternSquareness()
{
int patternStart = patternStart();
int patternEnd = patternEnd();
int sy = line(patternStart);
int ey = line(patternEnd);
int sx = column(patternStart);
int ex = column(patternEnd);
float actCnt = 0;
int w = ... | java | public float patternSquareness()
{
int patternStart = patternStart();
int patternEnd = patternEnd();
int sy = line(patternStart);
int ey = line(patternEnd);
int sx = column(patternStart);
int ex = column(patternEnd);
float actCnt = 0;
int w = ... | [
"public",
"float",
"patternSquareness",
"(",
")",
"{",
"int",
"patternStart",
"=",
"patternStart",
"(",
")",
";",
"int",
"patternEnd",
"=",
"patternEnd",
"(",
")",
";",
"int",
"sy",
"=",
"line",
"(",
"patternStart",
")",
";",
"int",
"ey",
"=",
"line",
... | Returns 1.0 if pattern is square or less if not.
@return | [
"Returns",
"1",
".",
"0",
"if",
"pattern",
"is",
"square",
"or",
"less",
"if",
"not",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/BitGrid.java#L104-L127 |
154,067 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/EMailField.java | EMailField.getHyperlink | public String getHyperlink()
{
String strMailTo = this.getString();
if (strMailTo != null) if (strMailTo.length() > 0)
strMailTo = BaseApplication.MAIL_TO + ":" + strMailTo;
return strMailTo;
} | java | public String getHyperlink()
{
String strMailTo = this.getString();
if (strMailTo != null) if (strMailTo.length() > 0)
strMailTo = BaseApplication.MAIL_TO + ":" + strMailTo;
return strMailTo;
} | [
"public",
"String",
"getHyperlink",
"(",
")",
"{",
"String",
"strMailTo",
"=",
"this",
".",
"getString",
"(",
")",
";",
"if",
"(",
"strMailTo",
"!=",
"null",
")",
"if",
"(",
"strMailTo",
".",
"length",
"(",
")",
">",
"0",
")",
"strMailTo",
"=",
"Base... | Get the HTML mailto Hyperlink.
@return The hyperlink. | [
"Get",
"the",
"HTML",
"mailto",
"Hyperlink",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/EMailField.java#L72-L78 |
154,068 | TrueNight/Utils | utils/src/main/java/xyz/truenight/utils/Utils.java | Utils.sorted | public static <T extends Comparable<? super T>> List<T> sorted(List<T> list) {
List<T> result = new ArrayList<>(list);
Collections.sort(result);
return result;
} | java | public static <T extends Comparable<? super T>> List<T> sorted(List<T> list) {
List<T> result = new ArrayList<>(list);
Collections.sort(result);
return result;
} | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"?",
"super",
"T",
">",
">",
"List",
"<",
"T",
">",
"sorted",
"(",
"List",
"<",
"T",
">",
"list",
")",
"{",
"List",
"<",
"T",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
"list",
... | Sorts the given list in ascending natural order. The algorithm is
stable which means equal elements don't get reordered.
@throws ClassCastException if any element does not implement {@code Comparable},
or if {@code compareTo} throws for any pair of elements. | [
"Sorts",
"the",
"given",
"list",
"in",
"ascending",
"natural",
"order",
".",
"The",
"algorithm",
"is",
"stable",
"which",
"means",
"equal",
"elements",
"don",
"t",
"get",
"reordered",
"."
] | 78a11faa16258b09f08826797370310ab650530c | https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/utils/src/main/java/xyz/truenight/utils/Utils.java#L1017-L1021 |
154,069 | TrueNight/Utils | utils/src/main/java/xyz/truenight/utils/Utils.java | Utils.sorted | @SuppressWarnings("unchecked")
public static <T> List<T> sorted(List<T> list, Comparator<? super T> comparator) {
List<T> result = new ArrayList<>(list);
Collections.sort(result, comparator);
return result;
} | java | @SuppressWarnings("unchecked")
public static <T> List<T> sorted(List<T> list, Comparator<? super T> comparator) {
List<T> result = new ArrayList<>(list);
Collections.sort(result, comparator);
return result;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"sorted",
"(",
"List",
"<",
"T",
">",
"list",
",",
"Comparator",
"<",
"?",
"super",
"T",
">",
"comparator",
")",
"{",
"List",
"<",
"T",
">... | Sorts the given list using the given comparator. The algorithm is
stable which means equal elements don't get reordered.
@throws ClassCastException if any element does not implement {@code Comparable},
or if {@code compareTo} throws for any pair of elements. | [
"Sorts",
"the",
"given",
"list",
"using",
"the",
"given",
"comparator",
".",
"The",
"algorithm",
"is",
"stable",
"which",
"means",
"equal",
"elements",
"don",
"t",
"get",
"reordered",
"."
] | 78a11faa16258b09f08826797370310ab650530c | https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/utils/src/main/java/xyz/truenight/utils/Utils.java#L1043-L1048 |
154,070 | TrueNight/Utils | utils/src/main/java/xyz/truenight/utils/Utils.java | Utils.addFirst | public static <T> List<T> addFirst(List<T> to, T what) {
List<T> data = safeList(to);
data.add(0, what);
return data;
} | java | public static <T> List<T> addFirst(List<T> to, T what) {
List<T> data = safeList(to);
data.add(0, what);
return data;
} | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"addFirst",
"(",
"List",
"<",
"T",
">",
"to",
",",
"T",
"what",
")",
"{",
"List",
"<",
"T",
">",
"data",
"=",
"safeList",
"(",
"to",
")",
";",
"data",
".",
"add",
"(",
"0",
",",
"wha... | Add element to start of list | [
"Add",
"element",
"to",
"start",
"of",
"list"
] | 78a11faa16258b09f08826797370310ab650530c | https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/utils/src/main/java/xyz/truenight/utils/Utils.java#L1139-L1143 |
154,071 | TrueNight/Utils | utils/src/main/java/xyz/truenight/utils/Utils.java | Utils.filter | public static <T> Collection<T> filter(Collection<T> data, Filter<T> filter) {
if (!Utils.isEmpty(data)) {
Iterator<T> iterator = data.iterator();
while (iterator.hasNext()) {
T item = iterator.next();
if (!filter.accept(item)) {
iterat... | java | public static <T> Collection<T> filter(Collection<T> data, Filter<T> filter) {
if (!Utils.isEmpty(data)) {
Iterator<T> iterator = data.iterator();
while (iterator.hasNext()) {
T item = iterator.next();
if (!filter.accept(item)) {
iterat... | [
"public",
"static",
"<",
"T",
">",
"Collection",
"<",
"T",
">",
"filter",
"(",
"Collection",
"<",
"T",
">",
"data",
",",
"Filter",
"<",
"T",
">",
"filter",
")",
"{",
"if",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"data",
")",
")",
"{",
"Iterator",... | Removes items which not accepted by filter | [
"Removes",
"items",
"which",
"not",
"accepted",
"by",
"filter"
] | 78a11faa16258b09f08826797370310ab650530c | https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/utils/src/main/java/xyz/truenight/utils/Utils.java#L1383-L1394 |
154,072 | TrueNight/Utils | utils/src/main/java/xyz/truenight/utils/Utils.java | Utils.filtered | public static <T> List<T> filtered(Collection<T> data, Filter<T> filter) {
List<T> list = new ArrayList<>();
if (!Utils.isEmpty(data)) {
for (T item : data) {
if (filter.accept(item)) {
list.add(item);
}
}
}
retu... | java | public static <T> List<T> filtered(Collection<T> data, Filter<T> filter) {
List<T> list = new ArrayList<>();
if (!Utils.isEmpty(data)) {
for (T item : data) {
if (filter.accept(item)) {
list.add(item);
}
}
}
retu... | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"filtered",
"(",
"Collection",
"<",
"T",
">",
"data",
",",
"Filter",
"<",
"T",
">",
"filter",
")",
"{",
"List",
"<",
"T",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",... | Returns new List without items which not accepted by filter | [
"Returns",
"new",
"List",
"without",
"items",
"which",
"not",
"accepted",
"by",
"filter"
] | 78a11faa16258b09f08826797370310ab650530c | https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/utils/src/main/java/xyz/truenight/utils/Utils.java#L1399-L1409 |
154,073 | jbundle/jbundle | main/db/src/main/java/org/jbundle/main/user/db/SetupNewUserHandler.java | SetupNewUserHandler.getUserTemplate | public UserInfo getUserTemplate()
{
if (userControl == null)
userControl = new UserControl(this.getOwner().findRecordOwner());
if (userControl != null)
if ((userControl.getEditMode() == DBConstants.EDIT_CURRENT) || (userControl.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
... | java | public UserInfo getUserTemplate()
{
if (userControl == null)
userControl = new UserControl(this.getOwner().findRecordOwner());
if (userControl != null)
if ((userControl.getEditMode() == DBConstants.EDIT_CURRENT) || (userControl.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
... | [
"public",
"UserInfo",
"getUserTemplate",
"(",
")",
"{",
"if",
"(",
"userControl",
"==",
"null",
")",
"userControl",
"=",
"new",
"UserControl",
"(",
"this",
".",
"getOwner",
"(",
")",
".",
"findRecordOwner",
"(",
")",
")",
";",
"if",
"(",
"userControl",
"... | GetUserTemplate Method. | [
"GetUserTemplate",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/user/db/SetupNewUserHandler.java#L131-L144 |
154,074 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.addNextField | public void addNextField(FieldInfo field)
{
if (((m_iFieldsTypes & MODIFIED_ONLY) == MODIFIED_ONLY) && (!field.isModified()))
this.addNextData(DATA_SKIP);
else
this.addNextData(field.getData());
} | java | public void addNextField(FieldInfo field)
{
if (((m_iFieldsTypes & MODIFIED_ONLY) == MODIFIED_ONLY) && (!field.isModified()))
this.addNextData(DATA_SKIP);
else
this.addNextData(field.getData());
} | [
"public",
"void",
"addNextField",
"(",
"FieldInfo",
"field",
")",
"{",
"if",
"(",
"(",
"(",
"m_iFieldsTypes",
"&",
"MODIFIED_ONLY",
")",
"==",
"MODIFIED_ONLY",
")",
"&&",
"(",
"!",
"field",
".",
"isModified",
"(",
")",
")",
")",
"this",
".",
"addNextData... | Add this field to the buffer.
@param field The field to add to this buffer. | [
"Add",
"this",
"field",
"to",
"the",
"buffer",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L141-L147 |
154,075 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.bufferToFields | public int bufferToFields(FieldList record, boolean bDisplayOption, int iMoveMode)
{
this.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
int iErrorCode = Constants.NORMAL_RETURN;
int iTempError;
for (int... | java | public int bufferToFields(FieldList record, boolean bDisplayOption, int iMoveMode)
{
this.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
int iErrorCode = Constants.NORMAL_RETURN;
int iTempError;
for (int... | [
"public",
"int",
"bufferToFields",
"(",
"FieldList",
"record",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"this",
".",
"resetPosition",
"(",
")",
";",
"// Start at the first field",
"int",
"iFieldCount",
"=",
"record",
".",
"getFieldCount... | Move the output buffer to all the fields.
This is a utility method that populates the record.
@param record The target record.
@param bDisplayOption The display option for the movetofield call.
@param iMoveMove The move mode for the movetofield call.
@return The error code. | [
"Move",
"the",
"output",
"buffer",
"to",
"all",
"the",
"fields",
".",
"This",
"is",
"a",
"utility",
"method",
"that",
"populates",
"the",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L171-L188 |
154,076 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.bufferToFields | public int bufferToFields(FieldList record, int iFieldsTypes, boolean bDisplayOption, int iMoveMode)
{
m_iFieldsTypes = iFieldsTypes;
return this.bufferToFields(record, bDisplayOption, iMoveMode);
} | java | public int bufferToFields(FieldList record, int iFieldsTypes, boolean bDisplayOption, int iMoveMode)
{
m_iFieldsTypes = iFieldsTypes;
return this.bufferToFields(record, bDisplayOption, iMoveMode);
} | [
"public",
"int",
"bufferToFields",
"(",
"FieldList",
"record",
",",
"int",
"iFieldsTypes",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"m_iFieldsTypes",
"=",
"iFieldsTypes",
";",
"return",
"this",
".",
"bufferToFields",
"(",
"record",
",... | Move the output buffer to all the fields.
This is the same as the bufferToFields method, specifying the fieldTypes to move.
@param record The target record.
@param iFieldTypes The field types to move.
@param bDisplayOption The display option for the movetofield call.
@param iMoveMove The move mode for the movetofield c... | [
"Move",
"the",
"output",
"buffer",
"to",
"all",
"the",
"fields",
".",
"This",
"is",
"the",
"same",
"as",
"the",
"bufferToFields",
"method",
"specifying",
"the",
"fieldTypes",
"to",
"move",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L198-L202 |
154,077 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.fieldsToBuffer | public void fieldsToBuffer(FieldList record, int iFieldsTypes)
{
m_iFieldsTypes = iFieldsTypes;
if (this.getHeaderCount() == 0)
this.clearBuffer(); // Being careful. (Remember to call this at the start anyway)
int fieldCount = record.getFieldCount(); // Number of fields to w... | java | public void fieldsToBuffer(FieldList record, int iFieldsTypes)
{
m_iFieldsTypes = iFieldsTypes;
if (this.getHeaderCount() == 0)
this.clearBuffer(); // Being careful. (Remember to call this at the start anyway)
int fieldCount = record.getFieldCount(); // Number of fields to w... | [
"public",
"void",
"fieldsToBuffer",
"(",
"FieldList",
"record",
",",
"int",
"iFieldsTypes",
")",
"{",
"m_iFieldsTypes",
"=",
"iFieldsTypes",
";",
"if",
"(",
"this",
".",
"getHeaderCount",
"(",
")",
"==",
"0",
")",
"this",
".",
"clearBuffer",
"(",
")",
";",... | Move all the fields to the output buffer.
This is the same as the fieldsToBuffer method, specifying the fieldTypes to move.
@param record The target record.
@param iFieldTypes The field types to move. | [
"Move",
"all",
"the",
"fields",
"to",
"the",
"output",
"buffer",
".",
"This",
"is",
"the",
"same",
"as",
"the",
"fieldsToBuffer",
"method",
"specifying",
"the",
"fieldTypes",
"to",
"move",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L225-L238 |
154,078 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.skipField | public boolean skipField(FieldInfo field)
{
boolean bSkipField = true;
if ((m_iFieldsTypes & DATA_TYPE_MASK) == ALL_FIELDS)
bSkipField = false; // Don't skip any
if ((m_iFieldsTypes & DATA_TYPE_MASK) == SELECTED_FIELDS)
if (field.isSelected())
bSki... | java | public boolean skipField(FieldInfo field)
{
boolean bSkipField = true;
if ((m_iFieldsTypes & DATA_TYPE_MASK) == ALL_FIELDS)
bSkipField = false; // Don't skip any
if ((m_iFieldsTypes & DATA_TYPE_MASK) == SELECTED_FIELDS)
if (field.isSelected())
bSki... | [
"public",
"boolean",
"skipField",
"(",
"FieldInfo",
"field",
")",
"{",
"boolean",
"bSkipField",
"=",
"true",
";",
"if",
"(",
"(",
"m_iFieldsTypes",
"&",
"DATA_TYPE_MASK",
")",
"==",
"ALL_FIELDS",
")",
"bSkipField",
"=",
"false",
";",
"// Don't skip any",
"if",... | Do I skip this field, based on the m_iFieldsTypes flag?
@param field Should I skip this field?
@return If true, skip this field. | [
"Do",
"I",
"skip",
"this",
"field",
"based",
"on",
"the",
"m_iFieldsTypes",
"flag?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L244-L260 |
154,079 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.compareToBuffer | public boolean compareToBuffer(FieldList record)
{
boolean bBufferEqual = true;
this.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq <= iFieldCount + Constants... | java | public boolean compareToBuffer(FieldList record)
{
boolean bBufferEqual = true;
this.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq <= iFieldCount + Constants... | [
"public",
"boolean",
"compareToBuffer",
"(",
"FieldList",
"record",
")",
"{",
"boolean",
"bBufferEqual",
"=",
"true",
";",
"this",
".",
"resetPosition",
"(",
")",
";",
"// Start at the first field",
"int",
"iFieldCount",
"=",
"record",
".",
"getFieldCount",
"(",
... | Compare this output buffer to all the fields.
This is a utility method that compares the record.
@param record The target record.
@return True if they are equal. | [
"Compare",
"this",
"output",
"buffer",
"to",
"all",
"the",
"fields",
".",
"This",
"is",
"a",
"utility",
"method",
"that",
"compares",
"the",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L273-L287 |
154,080 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.compareNextToField | public boolean compareNextToField(FieldInfo field) // Must be to call right Get calls
{
Object objNext = this.getNextData();
if (objNext == DATA_ERROR)
return false; // EOF
if (objNext == DATA_EOF)
return false; // EOF
if (objNext == DATA_SKIP)
... | java | public boolean compareNextToField(FieldInfo field) // Must be to call right Get calls
{
Object objNext = this.getNextData();
if (objNext == DATA_ERROR)
return false; // EOF
if (objNext == DATA_EOF)
return false; // EOF
if (objNext == DATA_SKIP)
... | [
"public",
"boolean",
"compareNextToField",
"(",
"FieldInfo",
"field",
")",
"// Must be to call right Get calls",
"{",
"Object",
"objNext",
"=",
"this",
".",
"getNextData",
"(",
")",
";",
"if",
"(",
"objNext",
"==",
"DATA_ERROR",
")",
"return",
"false",
";",
"// ... | Compare this fields with the next data in the buffer.
This is a utility method that compares the record.
@param field The target field.
@return True if they are equal. | [
"Compare",
"this",
"fields",
"with",
"the",
"next",
"data",
"in",
"the",
"buffer",
".",
"This",
"is",
"a",
"utility",
"method",
"that",
"compares",
"the",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L294-L311 |
154,081 | jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java | BaseBuffer.getNextString | public String getNextString()
{
Object data = this.getNextData();
if (data instanceof String)
return (String)data;
return null; // EOF
} | java | public String getNextString()
{
Object data = this.getNextData();
if (data instanceof String)
return (String)data;
return null; // EOF
} | [
"public",
"String",
"getNextString",
"(",
")",
"{",
"Object",
"data",
"=",
"this",
".",
"getNextData",
"(",
")",
";",
"if",
"(",
"data",
"instanceof",
"String",
")",
"return",
"(",
"String",
")",
"data",
";",
"return",
"null",
";",
"// EOF",
"}"
] | Get next next string.
@param Retrieve the next object from this buffer and return it if it is a string. | [
"Get",
"next",
"next",
"string",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L351-L357 |
154,082 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.init | private void init() throws IndexerException {
if (!loaded) {
loaded = true;
String storageType = config.getString(null, "storage", "type");
try {
storage = PluginManager.getStorage(storageType);
storage.init(config.toString());
} catch (PluginException pe) {
throw new IndexerException(pe);
... | java | private void init() throws IndexerException {
if (!loaded) {
loaded = true;
String storageType = config.getString(null, "storage", "type");
try {
storage = PluginManager.getStorage(storageType);
storage.init(config.toString());
} catch (PluginException pe) {
throw new IndexerException(pe);
... | [
"private",
"void",
"init",
"(",
")",
"throws",
"IndexerException",
"{",
"if",
"(",
"!",
"loaded",
")",
"{",
"loaded",
"=",
"true",
";",
"String",
"storageType",
"=",
"config",
".",
"getString",
"(",
"null",
",",
"\"storage\"",
",",
"\"type\"",
")",
";",
... | Private method wrapped by the above two methods to perform the actual
initialization after the JSON config is accessed.
@throws IndexerException
if errors occur during initialization | [
"Private",
"method",
"wrapped",
"by",
"the",
"above",
"two",
"methods",
"to",
"perform",
"the",
"actual",
"initialization",
"after",
"the",
"JSON",
"config",
"is",
"accessed",
"."
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L328-L374 |
154,083 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.search | @Override
public void search(SearchRequest request, OutputStream response, String format) throws IndexerException {
SolrSearcher searcher = new SolrSearcher(((CommonsHttpSolrServer) solr).getBaseURL());
String username = usernameMap.get("solr");
String password = passwordMap.get("solr");
if (username != null &... | java | @Override
public void search(SearchRequest request, OutputStream response, String format) throws IndexerException {
SolrSearcher searcher = new SolrSearcher(((CommonsHttpSolrServer) solr).getBaseURL());
String username = usernameMap.get("solr");
String password = passwordMap.get("solr");
if (username != null &... | [
"@",
"Override",
"public",
"void",
"search",
"(",
"SearchRequest",
"request",
",",
"OutputStream",
"response",
",",
"String",
"format",
")",
"throws",
"IndexerException",
"{",
"SolrSearcher",
"searcher",
"=",
"new",
"SolrSearcher",
"(",
"(",
"(",
"CommonsHttpSolrS... | Perform a Solr search and stream the results into the provided output
format
@param request
: A prepared SearchRequest object
@param response
: The OutputStream to send results to
@param format
: Output format - passed directly to SOlr as the "wt"
parameter
@throws IndexerException
if there were errors during the sear... | [
"Perform",
"a",
"Solr",
"search",
"and",
"stream",
"the",
"results",
"into",
"the",
"provided",
"output",
"format"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L486-L503 |
154,084 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.remove | @Override
public void remove(String oid) throws IndexerException {
log.debug("Deleting " + oid + " from index");
try {
solr.deleteByQuery("storage_id:\"" + oid + "\"");
solr.commit();
} catch (SolrServerException sse) {
throw new IndexerException(sse);
} catch (IOException ioe) {
throw new IndexerE... | java | @Override
public void remove(String oid) throws IndexerException {
log.debug("Deleting " + oid + " from index");
try {
solr.deleteByQuery("storage_id:\"" + oid + "\"");
solr.commit();
} catch (SolrServerException sse) {
throw new IndexerException(sse);
} catch (IOException ioe) {
throw new IndexerE... | [
"@",
"Override",
"public",
"void",
"remove",
"(",
"String",
"oid",
")",
"throws",
"IndexerException",
"{",
"log",
".",
"debug",
"(",
"\"Deleting \"",
"+",
"oid",
"+",
"\" from index\"",
")",
";",
"try",
"{",
"solr",
".",
"deleteByQuery",
"(",
"\"storage_id:\... | Remove the specified object from the index
@param oid
: The identifier of the object to remove
@throws IndexerException
if there were errors during removal | [
"Remove",
"the",
"specified",
"object",
"from",
"the",
"index"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L513-L524 |
154,085 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.annotateRemove | @Override
public void annotateRemove(String oid) throws IndexerException {
log.debug("Deleting " + oid + " from Anotar index");
try {
anotar.deleteByQuery("rootUri:\"" + oid + "\"");
anotar.commit();
} catch (SolrServerException sse) {
throw new IndexerException(sse);
} catch (IOException ioe) {
th... | java | @Override
public void annotateRemove(String oid) throws IndexerException {
log.debug("Deleting " + oid + " from Anotar index");
try {
anotar.deleteByQuery("rootUri:\"" + oid + "\"");
anotar.commit();
} catch (SolrServerException sse) {
throw new IndexerException(sse);
} catch (IOException ioe) {
th... | [
"@",
"Override",
"public",
"void",
"annotateRemove",
"(",
"String",
"oid",
")",
"throws",
"IndexerException",
"{",
"log",
".",
"debug",
"(",
"\"Deleting \"",
"+",
"oid",
"+",
"\" from Anotar index\"",
")",
";",
"try",
"{",
"anotar",
".",
"deleteByQuery",
"(",
... | Remove all annotations from the index against an object
@param oid
: The identifier of the object
@throws IndexerException
if there were errors during removal | [
"Remove",
"all",
"annotations",
"from",
"the",
"index",
"against",
"an",
"object"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L557-L568 |
154,086 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.index | @Override
public void index(String oid) throws IndexerException {
try {
DigitalObject object = storage.getObject(oid);
// Some workflow actions create payloads, so we can't iterate
// directly against the object.
String[] oldManifest = {};
oldManifest = object.getPayloadIdList().toArray(oldManifest);
... | java | @Override
public void index(String oid) throws IndexerException {
try {
DigitalObject object = storage.getObject(oid);
// Some workflow actions create payloads, so we can't iterate
// directly against the object.
String[] oldManifest = {};
oldManifest = object.getPayloadIdList().toArray(oldManifest);
... | [
"@",
"Override",
"public",
"void",
"index",
"(",
"String",
"oid",
")",
"throws",
"IndexerException",
"{",
"try",
"{",
"DigitalObject",
"object",
"=",
"storage",
".",
"getObject",
"(",
"oid",
")",
";",
"// Some workflow actions create payloads, so we can't iterate",
... | Index an object and all of its payloads
@param oid
: The identifier of the object
@throws IndexerException
if there were errors during indexing | [
"Index",
"an",
"object",
"and",
"all",
"of",
"its",
"payloads"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L601-L618 |
154,087 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.indexByGroovyScript | private String indexByGroovyScript(DigitalObject object, Payload payload, String confOid, String rulesOid,
Properties props) throws RuleException {
try {
if (engine == null) {
SimpleBindings bindings = new SimpleBindings();
ScriptEngineManager manager = new ScriptEngineManager();
engine = manager.g... | java | private String indexByGroovyScript(DigitalObject object, Payload payload, String confOid, String rulesOid,
Properties props) throws RuleException {
try {
if (engine == null) {
SimpleBindings bindings = new SimpleBindings();
ScriptEngineManager manager = new ScriptEngineManager();
engine = manager.g... | [
"private",
"String",
"indexByGroovyScript",
"(",
"DigitalObject",
"object",
",",
"Payload",
"payload",
",",
"String",
"confOid",
",",
"String",
"rulesOid",
",",
"Properties",
"props",
")",
"throws",
"RuleException",
"{",
"try",
"{",
"if",
"(",
"engine",
"==",
... | Index a payload using the provided data using a groovy script
@param object
: The DigitalObject to index
@param payload
: The Payload to index
@param in
: Reader containing the new empty document
@param inConf
: An InputStream holding the config file
@param rulesOid
: The oid of the rules file to use
@param props
: Pr... | [
"Index",
"a",
"payload",
"using",
"the",
"provided",
"data",
"using",
"a",
"groovy",
"script"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L723-L766 |
154,088 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.sendIndexToBuffer | public void sendIndexToBuffer(String index, Map<String, List<String>> fields) {
String doc = pyUtils.solrDocument(fields);
addToBuffer(index, doc);
} | java | public void sendIndexToBuffer(String index, Map<String, List<String>> fields) {
String doc = pyUtils.solrDocument(fields);
addToBuffer(index, doc);
} | [
"public",
"void",
"sendIndexToBuffer",
"(",
"String",
"index",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"fields",
")",
"{",
"String",
"doc",
"=",
"pyUtils",
".",
"solrDocument",
"(",
"fields",
")",
";",
"addToBuffer",
"(",
"index"... | Send the document to buffer directly
@param index
@param fields | [
"Send",
"the",
"document",
"to",
"buffer",
"directly"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L829-L832 |
154,089 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.sendToIndex | private void sendToIndex(String message) {
try {
getMessaging().queueMessage(SolrWrapperQueueConsumer.QUEUE_ID, message);
} catch (MessagingException ex) {
log.error("Unable to send message: ", ex);
}
} | java | private void sendToIndex(String message) {
try {
getMessaging().queueMessage(SolrWrapperQueueConsumer.QUEUE_ID, message);
} catch (MessagingException ex) {
log.error("Unable to send message: ", ex);
}
} | [
"private",
"void",
"sendToIndex",
"(",
"String",
"message",
")",
"{",
"try",
"{",
"getMessaging",
"(",
")",
".",
"queueMessage",
"(",
"SolrWrapperQueueConsumer",
".",
"QUEUE_ID",
",",
"message",
")",
";",
"}",
"catch",
"(",
"MessagingException",
"ex",
")",
"... | To put events to subscriber queue
@param oid
Object id
@param eventType
type of events happened
@param context
where the event happened
@param jsonFile
Configuration file | [
"To",
"put",
"events",
"to",
"subscriber",
"queue"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L846-L852 |
154,090 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.annotate | private void annotate(DigitalObject object, Payload payload) throws IndexerException {
String pid = payload.getId();
if (propertiesId.equals(pid)) {
return;
}
try {
Properties props = new Properties();
props.setProperty("metaPid", pid);
String doc = indexByPythonScript(object, payload, null, ANOTA... | java | private void annotate(DigitalObject object, Payload payload) throws IndexerException {
String pid = payload.getId();
if (propertiesId.equals(pid)) {
return;
}
try {
Properties props = new Properties();
props.setProperty("metaPid", pid);
String doc = indexByPythonScript(object, payload, null, ANOTA... | [
"private",
"void",
"annotate",
"(",
"DigitalObject",
"object",
",",
"Payload",
"payload",
")",
"throws",
"IndexerException",
"{",
"String",
"pid",
"=",
"payload",
".",
"getId",
"(",
")",
";",
"if",
"(",
"propertiesId",
".",
"equals",
"(",
"pid",
")",
")",
... | Index a specific annotation
@param object
: The annotation's object
@param pid
: The annotation payload
@throws IndexerException
if there were errors during indexing | [
"Index",
"a",
"specific",
"annotation"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L887-L908 |
154,091 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.indexByPythonScript | private String indexByPythonScript(DigitalObject object, Payload payload, String confOid, String rulesOid,
Properties props) throws IOException, RuleException {
try {
JsonSimpleConfig jsonConfig = getConfigFile(confOid);
// Get our data ready
Map<String, Object> bindings = new HashMap<String, Object>();
... | java | private String indexByPythonScript(DigitalObject object, Payload payload, String confOid, String rulesOid,
Properties props) throws IOException, RuleException {
try {
JsonSimpleConfig jsonConfig = getConfigFile(confOid);
// Get our data ready
Map<String, Object> bindings = new HashMap<String, Object>();
... | [
"private",
"String",
"indexByPythonScript",
"(",
"DigitalObject",
"object",
",",
"Payload",
"payload",
",",
"String",
"confOid",
",",
"String",
"rulesOid",
",",
"Properties",
"props",
")",
"throws",
"IOException",
",",
"RuleException",
"{",
"try",
"{",
"JsonSimple... | Index a payload using the provided data using a python script
@param object
: The DigitalObject to index
@param payload
: The Payload to index
@param in
: Reader containing the new empty document
@param inConf
: An InputStream holding the config file
@param rulesOid
: The oid of the rules file to use
@param props
: Pr... | [
"Index",
"a",
"payload",
"using",
"the",
"provided",
"data",
"using",
"a",
"python",
"script"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L992-L1022 |
154,092 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.getPythonObject | private PyObject getPythonObject(String oid) {
// Try the cache first
PyObject rulesObject = deCachePythonObject(oid);
if (rulesObject != null) {
return rulesObject;
}
// We need to evaluate then
InputStream inStream;
if (oid.equals(ANOTAR_RULES_OID)) {
// Anotar rules
inStream = getClass().getRe... | java | private PyObject getPythonObject(String oid) {
// Try the cache first
PyObject rulesObject = deCachePythonObject(oid);
if (rulesObject != null) {
return rulesObject;
}
// We need to evaluate then
InputStream inStream;
if (oid.equals(ANOTAR_RULES_OID)) {
// Anotar rules
inStream = getClass().getRe... | [
"private",
"PyObject",
"getPythonObject",
"(",
"String",
"oid",
")",
"{",
"// Try the cache first",
"PyObject",
"rulesObject",
"=",
"deCachePythonObject",
"(",
"oid",
")",
";",
"if",
"(",
"rulesObject",
"!=",
"null",
")",
"{",
"return",
"rulesObject",
";",
"}",
... | Evaluate the rules file stored under the provided object ID. If caching
is configured the compiled python object will be cached to speed up
subsequent access.
@param oid
: The rules OID to retrieve if cached
@return PyObject : The cached object, null if not found | [
"Evaluate",
"the",
"rules",
"file",
"stored",
"under",
"the",
"provided",
"object",
"ID",
".",
"If",
"caching",
"is",
"configured",
"the",
"compiled",
"python",
"object",
"will",
"be",
"cached",
"to",
"speed",
"up",
"subsequent",
"access",
"."
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1033-L1068 |
154,093 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.getConfigFile | private JsonSimpleConfig getConfigFile(String oid) {
if (oid == null) {
return null;
}
// Try the cache first
JsonSimpleConfig configFile = deCacheConfig(oid);
if (configFile != null) {
return configFile;
}
// Or evaluate afresh
try {
DigitalObject object = storage.getObject(oid);
Payload p... | java | private JsonSimpleConfig getConfigFile(String oid) {
if (oid == null) {
return null;
}
// Try the cache first
JsonSimpleConfig configFile = deCacheConfig(oid);
if (configFile != null) {
return configFile;
}
// Or evaluate afresh
try {
DigitalObject object = storage.getObject(oid);
Payload p... | [
"private",
"JsonSimpleConfig",
"getConfigFile",
"(",
"String",
"oid",
")",
"{",
"if",
"(",
"oid",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// Try the cache first",
"JsonSimpleConfig",
"configFile",
"=",
"deCacheConfig",
"(",
"oid",
")",
";",
"if",
... | Retrieve and parse the config file stored under the provided object ID.
If caching is configured the instantiated config object will be cached to
speed up subsequent access.
@param oid
: The config OID to retrieve from storage or cache
@return JsonSimple : The parsed or cached JSON object | [
"Retrieve",
"and",
"parse",
"the",
"config",
"file",
"stored",
"under",
"the",
"provided",
"object",
"ID",
".",
"If",
"caching",
"is",
"configured",
"the",
"instantiated",
"config",
"object",
"will",
"be",
"cached",
"to",
"speed",
"up",
"subsequent",
"access",... | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1079-L1105 |
154,094 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.evalScript | private PyObject evalScript(InputStream inStream, String scriptName) {
// Execute the script
PythonInterpreter python = new PythonInterpreter();
python.execfile(inStream, scriptName);
// Get the result and cleanup
PyObject scriptClass = python.get(SCRIPT_CLASS_NAME);
python.cleanup();
// Instantiate and r... | java | private PyObject evalScript(InputStream inStream, String scriptName) {
// Execute the script
PythonInterpreter python = new PythonInterpreter();
python.execfile(inStream, scriptName);
// Get the result and cleanup
PyObject scriptClass = python.get(SCRIPT_CLASS_NAME);
python.cleanup();
// Instantiate and r... | [
"private",
"PyObject",
"evalScript",
"(",
"InputStream",
"inStream",
",",
"String",
"scriptName",
")",
"{",
"// Execute the script",
"PythonInterpreter",
"python",
"=",
"new",
"PythonInterpreter",
"(",
")",
";",
"python",
".",
"execfile",
"(",
"inStream",
",",
"sc... | Evaluate and return a Python script.
@param inStream
: InputStream containing the script to evaluate
@param scriptName
: filename of the script (mainly for debugging)
@return PyObject : Compiled result | [
"Evaluate",
"and",
"return",
"a",
"Python",
"script",
"."
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1116-L1125 |
154,095 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.cachePythonObject | private void cachePythonObject(String oid, PyObject pyObject) {
if (useCache && pyObject != null) {
scriptCache.put(oid, pyObject);
}
} | java | private void cachePythonObject(String oid, PyObject pyObject) {
if (useCache && pyObject != null) {
scriptCache.put(oid, pyObject);
}
} | [
"private",
"void",
"cachePythonObject",
"(",
"String",
"oid",
",",
"PyObject",
"pyObject",
")",
"{",
"if",
"(",
"useCache",
"&&",
"pyObject",
"!=",
"null",
")",
"{",
"scriptCache",
".",
"put",
"(",
"oid",
",",
"pyObject",
")",
";",
"}",
"}"
] | Add a python object to the cache if caching if configured
@param oid
: The rules OID to use as an index
@param pyObject
: The compiled PyObject to cache | [
"Add",
"a",
"python",
"object",
"to",
"the",
"cache",
"if",
"caching",
"if",
"configured"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1135-L1139 |
154,096 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.deCachePythonObject | private PyObject deCachePythonObject(String oid) {
if (useCache && scriptCache.containsKey(oid)) {
return scriptCache.get(oid);
}
return null;
} | java | private PyObject deCachePythonObject(String oid) {
if (useCache && scriptCache.containsKey(oid)) {
return scriptCache.get(oid);
}
return null;
} | [
"private",
"PyObject",
"deCachePythonObject",
"(",
"String",
"oid",
")",
"{",
"if",
"(",
"useCache",
"&&",
"scriptCache",
".",
"containsKey",
"(",
"oid",
")",
")",
"{",
"return",
"scriptCache",
".",
"get",
"(",
"oid",
")",
";",
"}",
"return",
"null",
";"... | Return a python object from the cache if configured
@param oid
: The rules OID to retrieve if cached
@return PyObject : The cached object, null if not found | [
"Return",
"a",
"python",
"object",
"from",
"the",
"cache",
"if",
"configured"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1148-L1153 |
154,097 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.cacheConfig | private void cacheConfig(String oid, JsonSimpleConfig config) {
if (useCache && config != null) {
configCache.put(oid, config);
}
} | java | private void cacheConfig(String oid, JsonSimpleConfig config) {
if (useCache && config != null) {
configCache.put(oid, config);
}
} | [
"private",
"void",
"cacheConfig",
"(",
"String",
"oid",
",",
"JsonSimpleConfig",
"config",
")",
"{",
"if",
"(",
"useCache",
"&&",
"config",
"!=",
"null",
")",
"{",
"configCache",
".",
"put",
"(",
"oid",
",",
"config",
")",
";",
"}",
"}"
] | Add a config class to the cache if caching if configured
@param oid
: The config OID to use as an index
@param config
: The instantiated JsonConfigHelper to cache | [
"Add",
"a",
"config",
"class",
"to",
"the",
"cache",
"if",
"caching",
"if",
"configured"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1163-L1167 |
154,098 | the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.deCacheConfig | private JsonSimpleConfig deCacheConfig(String oid) {
if (useCache && configCache.containsKey(oid)) {
return configCache.get(oid);
}
return null;
} | java | private JsonSimpleConfig deCacheConfig(String oid) {
if (useCache && configCache.containsKey(oid)) {
return configCache.get(oid);
}
return null;
} | [
"private",
"JsonSimpleConfig",
"deCacheConfig",
"(",
"String",
"oid",
")",
"{",
"if",
"(",
"useCache",
"&&",
"configCache",
".",
"containsKey",
"(",
"oid",
")",
")",
"{",
"return",
"configCache",
".",
"get",
"(",
"oid",
")",
";",
"}",
"return",
"null",
"... | Return a config class from the cache if configured
@param oid
: The config OID to retrieve if cached
@return JsonConfigHelper : The cached config, null if not found | [
"Return",
"a",
"config",
"class",
"from",
"the",
"cache",
"if",
"configured"
] | 001159b18b78a87daa5d8b2a17ced28694bae156 | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1176-L1181 |
154,099 | watchrabbit/rabbit-commons | src/main/java/com/watchrabbit/commons/clock/Stopwatch.java | Stopwatch.create | public static Stopwatch create(VoidCallable callable) {
Stopwatch stopwatch = new Stopwatch();
stopwatch.callable = callable;
return stopwatch;
} | java | public static Stopwatch create(VoidCallable callable) {
Stopwatch stopwatch = new Stopwatch();
stopwatch.callable = callable;
return stopwatch;
} | [
"public",
"static",
"Stopwatch",
"create",
"(",
"VoidCallable",
"callable",
")",
"{",
"Stopwatch",
"stopwatch",
"=",
"new",
"Stopwatch",
"(",
")",
";",
"stopwatch",
".",
"callable",
"=",
"callable",
";",
"return",
"stopwatch",
";",
"}"
] | Creates Stopwatch around passed callable.
@param callable with invocation time would be measured
@return | [
"Creates",
"Stopwatch",
"around",
"passed",
"callable",
"."
] | b11c9f804b5ab70b9264635c34a02f5029bd2a5d | https://github.com/watchrabbit/rabbit-commons/blob/b11c9f804b5ab70b9264635c34a02f5029bd2a5d/src/main/java/com/watchrabbit/commons/clock/Stopwatch.java#L42-L46 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.