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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
152,500 | microfocus-idol/java-idol-user-service | src/main/java/com/hp/autonomy/user/UserServiceImpl.java | UserServiceImpl.createUsernameRolesMap | private Map<String, List<String>> createUsernameRolesMap(final Iterable<String> roleList) {
final Map<String, List<String>> usersRolesMap = new HashMap<>();
for (final String role : roleList) {
for (final String user : getUsersWithRole(role)) {
if (usersRolesMap.containsKey(... | java | private Map<String, List<String>> createUsernameRolesMap(final Iterable<String> roleList) {
final Map<String, List<String>> usersRolesMap = new HashMap<>();
for (final String role : roleList) {
for (final String user : getUsersWithRole(role)) {
if (usersRolesMap.containsKey(... | [
"private",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"createUsernameRolesMap",
"(",
"final",
"Iterable",
"<",
"String",
">",
"roleList",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"usersRolesMap",
"="... | and only the roles contained in the roleList are included in the role lists. | [
"and",
"only",
"the",
"roles",
"contained",
"in",
"the",
"roleList",
"are",
"included",
"in",
"the",
"role",
"lists",
"."
] | 8eb5d00b3359b69891893c54f8201c16e7910322 | https://github.com/microfocus-idol/java-idol-user-service/blob/8eb5d00b3359b69891893c54f8201c16e7910322/src/main/java/com/hp/autonomy/user/UserServiceImpl.java#L341-L358 |
152,501 | microfocus-idol/java-idol-user-service | src/main/java/com/hp/autonomy/user/UserServiceImpl.java | UserServiceImpl.retainExistingRoles | private Iterable<String> retainExistingRoles(final Collection<String> roles) {
final List<String> existingRoles = getRoles();
existingRoles.retainAll(roles);
return existingRoles;
} | java | private Iterable<String> retainExistingRoles(final Collection<String> roles) {
final List<String> existingRoles = getRoles();
existingRoles.retainAll(roles);
return existingRoles;
} | [
"private",
"Iterable",
"<",
"String",
">",
"retainExistingRoles",
"(",
"final",
"Collection",
"<",
"String",
">",
"roles",
")",
"{",
"final",
"List",
"<",
"String",
">",
"existingRoles",
"=",
"getRoles",
"(",
")",
";",
"existingRoles",
".",
"retainAll",
"(",... | Returns a list of roles present in both the roles parameter and in community | [
"Returns",
"a",
"list",
"of",
"roles",
"present",
"in",
"both",
"the",
"roles",
"parameter",
"and",
"in",
"community"
] | 8eb5d00b3359b69891893c54f8201c16e7910322 | https://github.com/microfocus-idol/java-idol-user-service/blob/8eb5d00b3359b69891893c54f8201c16e7910322/src/main/java/com/hp/autonomy/user/UserServiceImpl.java#L361-L365 |
152,502 | inkstand-io/scribble | scribble-file/src/main/java/io/inkstand/scribble/rules/builder/ZipFileBuilder.java | ZipFileBuilder.addClasspathResource | public ZipFileBuilder addClasspathResource(final String zipEntryPath, final String pathToResource) {
final Class<?> callerClass = getCallerClass();
final URL resource = resolver.resolve(pathToResource, callerClass);
addResource(zipEntryPath, resource);
return this;
} | java | public ZipFileBuilder addClasspathResource(final String zipEntryPath, final String pathToResource) {
final Class<?> callerClass = getCallerClass();
final URL resource = resolver.resolve(pathToResource, callerClass);
addResource(zipEntryPath, resource);
return this;
} | [
"public",
"ZipFileBuilder",
"addClasspathResource",
"(",
"final",
"String",
"zipEntryPath",
",",
"final",
"String",
"pathToResource",
")",
"{",
"final",
"Class",
"<",
"?",
">",
"callerClass",
"=",
"getCallerClass",
"(",
")",
";",
"final",
"URL",
"resource",
"=",... | Adds an entry to the zip file from a classpath resource.
@param zipEntryPath
the path of the entry in the zip file. If the path denotes a path (ends with '/') the resource is put
under its own name on that location. If it denotes a file, it will be put as this file into the zip. Note
that even if the path ist defined ... | [
"Adds",
"an",
"entry",
"to",
"the",
"zip",
"file",
"from",
"a",
"classpath",
"resource",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-file/src/main/java/io/inkstand/scribble/rules/builder/ZipFileBuilder.java#L68-L74 |
152,503 | inkstand-io/scribble | scribble-file/src/main/java/io/inkstand/scribble/rules/builder/ZipFileBuilder.java | ZipFileBuilder.addResource | public ZipFileBuilder addResource(String zipEntryPath, URL resource) {
this.entryMap.put(zipEntryPath, resource);
return this;
} | java | public ZipFileBuilder addResource(String zipEntryPath, URL resource) {
this.entryMap.put(zipEntryPath, resource);
return this;
} | [
"public",
"ZipFileBuilder",
"addResource",
"(",
"String",
"zipEntryPath",
",",
"URL",
"resource",
")",
"{",
"this",
".",
"entryMap",
".",
"put",
"(",
"zipEntryPath",
",",
"resource",
")",
";",
"return",
"this",
";",
"}"
] | Adds a resource to the Zip File under the path specified.
@param zipEntryPath
the path to the entry in the zip file
@param resource
the resource providing the content for the path. If an empty directory should be added, this value must
@return this builder | [
"Adds",
"a",
"resource",
"to",
"the",
"Zip",
"File",
"under",
"the",
"path",
"specified",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-file/src/main/java/io/inkstand/scribble/rules/builder/ZipFileBuilder.java#L86-L90 |
152,504 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/WaitForFieldChangeHandler.java | WaitForFieldChangeHandler.fieldChanged | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (m_bWaiting)
{
synchronized (this)
{
m_bWaiting = false;
this.notify();
}
}
return super.fieldChanged(bDisplayOption, iMoveMode);
} | java | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (m_bWaiting)
{
synchronized (this)
{
m_bWaiting = false;
this.notify();
}
}
return super.fieldChanged(bDisplayOption, iMoveMode);
} | [
"public",
"int",
"fieldChanged",
"(",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"if",
"(",
"m_bWaiting",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"m_bWaiting",
"=",
"false",
";",
"this",
".",
"notify",
"(",
")",
";",
"}",
... | The Field has Changed.
Don't need to call inherited.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay). | [
"The",
"Field",
"has",
"Changed",
".",
"Don",
"t",
"need",
"to",
"call",
"inherited",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/WaitForFieldChangeHandler.java#L108-L119 |
152,505 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/WaitForFieldChangeHandler.java | WaitForFieldChangeHandler.waitForChange | public int waitForChange()
{
if (m_lTimeOut <= 0)
return TIMEOUT_ERROR; // Timed out
m_bWaiting = false;
synchronized(this)
{
long lStartTime = System.currentTimeMillis();
try {
m_bWaiting = true;
... | java | public int waitForChange()
{
if (m_lTimeOut <= 0)
return TIMEOUT_ERROR; // Timed out
m_bWaiting = false;
synchronized(this)
{
long lStartTime = System.currentTimeMillis();
try {
m_bWaiting = true;
... | [
"public",
"int",
"waitForChange",
"(",
")",
"{",
"if",
"(",
"m_lTimeOut",
"<=",
"0",
")",
"return",
"TIMEOUT_ERROR",
";",
"// Timed out ",
"m_bWaiting",
"=",
"false",
";",
"synchronized",
"(",
"this",
")",
"{",
"long",
"lStartTime",
"=",
"System... | Wait for this field to change.
@return Normal return if changed, TIMEOUT if timeout. | [
"Wait",
"for",
"this",
"field",
"to",
"change",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/WaitForFieldChangeHandler.java#L132-L152 |
152,506 | tvesalainen/util | util/src/main/java/org/vesalainen/util/IntMap.java | IntMap.put | public IntReference put(K key, int value)
{
IntReference w = map.get(key);
if (w == null)
{
w = new IntReference(value);
return map.put(key, w);
}
else
{
w.value = value;
return null;
}
} | java | public IntReference put(K key, int value)
{
IntReference w = map.get(key);
if (w == null)
{
w = new IntReference(value);
return map.put(key, w);
}
else
{
w.value = value;
return null;
}
} | [
"public",
"IntReference",
"put",
"(",
"K",
"key",
",",
"int",
"value",
")",
"{",
"IntReference",
"w",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"w",
"==",
"null",
")",
"{",
"w",
"=",
"new",
"IntReference",
"(",
"value",
")",
";",
... | Associates value to key
@param key
@param value | [
"Associates",
"value",
"to",
"key"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/IntMap.java#L54-L67 |
152,507 | etnetera/seb | src/main/java/cz/etnetera/seb/Seb.java | Seb.withConfiguration | public <T extends SebConfiguration> Seb withConfiguration(Class<T> configCls) {
try {
return withConfiguration(configCls.getConstructor().newInstance());
} catch (Exception e) {
throw new SebConfigurationConstructException("Unable to construct Seb configuration " + configCls.getName(),
e);
}
} | java | public <T extends SebConfiguration> Seb withConfiguration(Class<T> configCls) {
try {
return withConfiguration(configCls.getConstructor().newInstance());
} catch (Exception e) {
throw new SebConfigurationConstructException("Unable to construct Seb configuration " + configCls.getName(),
e);
}
} | [
"public",
"<",
"T",
"extends",
"SebConfiguration",
">",
"Seb",
"withConfiguration",
"(",
"Class",
"<",
"T",
">",
"configCls",
")",
"{",
"try",
"{",
"return",
"withConfiguration",
"(",
"configCls",
".",
"getConstructor",
"(",
")",
".",
"newInstance",
"(",
")"... | Set configuration to configuration constructed from given class.
Configuration class needs to have constructor with no parameters.
@param configCls
The configuration class
@return Seb instance | [
"Set",
"configuration",
"to",
"configuration",
"constructed",
"from",
"given",
"class",
".",
"Configuration",
"class",
"needs",
"to",
"have",
"constructor",
"with",
"no",
"parameters",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/Seb.java#L212-L219 |
152,508 | etnetera/seb | src/main/java/cz/etnetera/seb/Seb.java | Seb.withLabel | public Seb withLabel(String... labels) {
this.label = utils.join(LABEL_DELIMITER, (Object[]) labels);
return this;
} | java | public Seb withLabel(String... labels) {
this.label = utils.join(LABEL_DELIMITER, (Object[]) labels);
return this;
} | [
"public",
"Seb",
"withLabel",
"(",
"String",
"...",
"labels",
")",
"{",
"this",
".",
"label",
"=",
"utils",
".",
"join",
"(",
"LABEL_DELIMITER",
",",
"(",
"Object",
"[",
"]",
")",
"labels",
")",
";",
"return",
"this",
";",
"}"
] | Set label joining given labels.
@param labels
Seb labels
@return Seb instance | [
"Set",
"label",
"joining",
"given",
"labels",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/Seb.java#L252-L255 |
152,509 | etnetera/seb | src/main/java/cz/etnetera/seb/Seb.java | Seb.setLabel | @Deprecated
public void setLabel(String... labels) {
this.label = utils.join(LABEL_DELIMITER, (Object[]) labels);
} | java | @Deprecated
public void setLabel(String... labels) {
this.label = utils.join(LABEL_DELIMITER, (Object[]) labels);
} | [
"@",
"Deprecated",
"public",
"void",
"setLabel",
"(",
"String",
"...",
"labels",
")",
"{",
"this",
".",
"label",
"=",
"utils",
".",
"join",
"(",
"LABEL_DELIMITER",
",",
"(",
"Object",
"[",
"]",
")",
"labels",
")",
";",
"}"
] | Modify Seb label joining given labels.
@param labels
Seb labels
@deprecated As of Seb version 0.3.22, replaced by
<code>Seb.withLabel(String... labels)</code>. | [
"Modify",
"Seb",
"label",
"joining",
"given",
"labels",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/Seb.java#L391-L394 |
152,510 | etnetera/seb | src/main/java/cz/etnetera/seb/Seb.java | Seb.useEnclosingMethodLabel | public Seb useEnclosingMethodLabel() {
final StackTraceElement e = Thread.currentThread().getStackTrace()[2];
final String s = e.getClassName();
setLabel(s.substring(s.lastIndexOf('.') + 1, s.length()), e.getMethodName());
return this;
} | java | public Seb useEnclosingMethodLabel() {
final StackTraceElement e = Thread.currentThread().getStackTrace()[2];
final String s = e.getClassName();
setLabel(s.substring(s.lastIndexOf('.') + 1, s.length()), e.getMethodName());
return this;
} | [
"public",
"Seb",
"useEnclosingMethodLabel",
"(",
")",
"{",
"final",
"StackTraceElement",
"e",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getStackTrace",
"(",
")",
"[",
"2",
"]",
";",
"final",
"String",
"s",
"=",
"e",
".",
"getClassName",
"(",
"... | Sets label using enclosing method class name and method name. | [
"Sets",
"label",
"using",
"enclosing",
"method",
"class",
"name",
"and",
"method",
"name",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/Seb.java#L603-L608 |
152,511 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteClasses.java | WriteClasses.writeThisClass | public void writeThisClass(String strClassName, String strRecordType)
{
Record recFileHdr = this.getRecord(FileHdr.FILE_HDR_FILE);
try {
recFileHdr.addNew();
recFileHdr.getField(FileHdr.FILE_NAME).setString(strClassName);
recFileHdr.setKeyArea(FileHdr.FILE_NAME_... | java | public void writeThisClass(String strClassName, String strRecordType)
{
Record recFileHdr = this.getRecord(FileHdr.FILE_HDR_FILE);
try {
recFileHdr.addNew();
recFileHdr.getField(FileHdr.FILE_NAME).setString(strClassName);
recFileHdr.setKeyArea(FileHdr.FILE_NAME_... | [
"public",
"void",
"writeThisClass",
"(",
"String",
"strClassName",
",",
"String",
"strRecordType",
")",
"{",
"Record",
"recFileHdr",
"=",
"this",
".",
"getRecord",
"(",
"FileHdr",
".",
"FILE_HDR_FILE",
")",
";",
"try",
"{",
"recFileHdr",
".",
"addNew",
"(",
... | Write this class using the correct method for the type. | [
"Write",
"this",
"class",
"using",
"the",
"correct",
"method",
"for",
"the",
"type",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteClasses.java#L183-L214 |
152,512 | jbundle/jbundle | thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/mem/memory/MTable.java | MTable.getRecordCount | public int getRecordCount(FieldTable table)
{
int iKeyOrder = table.getRecord().getDefaultOrder();
if (iKeyOrder == -1)
iKeyOrder = Constants.MAIN_KEY_AREA;
return this.getPKeyArea(iKeyOrder).getRecordCount();
} | java | public int getRecordCount(FieldTable table)
{
int iKeyOrder = table.getRecord().getDefaultOrder();
if (iKeyOrder == -1)
iKeyOrder = Constants.MAIN_KEY_AREA;
return this.getPKeyArea(iKeyOrder).getRecordCount();
} | [
"public",
"int",
"getRecordCount",
"(",
"FieldTable",
"table",
")",
"{",
"int",
"iKeyOrder",
"=",
"table",
".",
"getRecord",
"(",
")",
".",
"getDefaultOrder",
"(",
")",
";",
"if",
"(",
"iKeyOrder",
"==",
"-",
"1",
")",
"iKeyOrder",
"=",
"Constants",
".",... | Get the record count.
Just returns the count of the default key area.
@return The record count (or -1 if unknown). | [
"Get",
"the",
"record",
"count",
".",
"Just",
"returns",
"the",
"count",
"of",
"the",
"default",
"key",
"area",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/mem/memory/MTable.java#L79-L85 |
152,513 | jbundle/jbundle | thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/mem/memory/MTable.java | MTable.open | public void open(FieldTable table) throws DBException
{
super.open(table);
if (!m_bDataIn)
{ // Import all data on first open
m_bDataIn = true;
this.readData(table);
}
} | java | public void open(FieldTable table) throws DBException
{
super.open(table);
if (!m_bDataIn)
{ // Import all data on first open
m_bDataIn = true;
this.readData(table);
}
} | [
"public",
"void",
"open",
"(",
"FieldTable",
"table",
")",
"throws",
"DBException",
"{",
"super",
".",
"open",
"(",
"table",
")",
";",
"if",
"(",
"!",
"m_bDataIn",
")",
"{",
"// Import all data on first open",
"m_bDataIn",
"=",
"true",
";",
"this",
".",
"r... | Init this object | [
"Init",
"this",
"object"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/mem/memory/MTable.java#L98-L106 |
152,514 | inkstand-io/scribble | scribble-net/src/main/java/io/inkstand/scribble/net/NetworkMatchers.java | NetworkMatchers.remotePort | public static NetworkPort remotePort(String hostname, int port){
return new RemoteNetworkPort(hostname, port, NetworkPort.Type.TCP);
} | java | public static NetworkPort remotePort(String hostname, int port){
return new RemoteNetworkPort(hostname, port, NetworkPort.Type.TCP);
} | [
"public",
"static",
"NetworkPort",
"remotePort",
"(",
"String",
"hostname",
",",
"int",
"port",
")",
"{",
"return",
"new",
"RemoteNetworkPort",
"(",
"hostname",
",",
"port",
",",
"NetworkPort",
".",
"Type",
".",
"TCP",
")",
";",
"}"
] | Creates a type-safe tcp port pointing ot a remote host and port.
@param hostname
the hostname of the remote host
@param port
the port of the remote host
@return a {@link NetworkPort} instance describing the tcp port | [
"Creates",
"a",
"type",
"-",
"safe",
"tcp",
"port",
"pointing",
"ot",
"a",
"remote",
"host",
"and",
"port",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-net/src/main/java/io/inkstand/scribble/net/NetworkMatchers.java#L88-L90 |
152,515 | inkstand-io/scribble | scribble-net/src/main/java/io/inkstand/scribble/net/NetworkMatchers.java | NetworkMatchers.remoteDatagramPort | public static NetworkPort remoteDatagramPort(String hostname, int port){
return new RemoteNetworkPort(hostname, port, NetworkPort.Type.UDP);
} | java | public static NetworkPort remoteDatagramPort(String hostname, int port){
return new RemoteNetworkPort(hostname, port, NetworkPort.Type.UDP);
} | [
"public",
"static",
"NetworkPort",
"remoteDatagramPort",
"(",
"String",
"hostname",
",",
"int",
"port",
")",
"{",
"return",
"new",
"RemoteNetworkPort",
"(",
"hostname",
",",
"port",
",",
"NetworkPort",
".",
"Type",
".",
"UDP",
")",
";",
"}"
] | Creates a type-safe udp port pointing ot a remote host and port.
@param hostname
the hostname of the remote host
@param port
the port of the remote host
@return a {@link NetworkPort} instance describing the udp port | [
"Creates",
"a",
"type",
"-",
"safe",
"udp",
"port",
"pointing",
"ot",
"a",
"remote",
"host",
"and",
"port",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-net/src/main/java/io/inkstand/scribble/net/NetworkMatchers.java#L102-L104 |
152,516 | JM-Lab/utils-java9 | src/main/java/kr/jm/utils/HttpRequester.java | HttpRequester.buildUri | public static URI buildUri(String httpOrHttps, String host, String path,
Map<String, String> paramMap) {
try {
return new URIBuilder().setScheme(httpOrHttps).setHost(host)
.setPath(path)
.setParameters(buildNameValuePareList(paramMap)).build();
... | java | public static URI buildUri(String httpOrHttps, String host, String path,
Map<String, String> paramMap) {
try {
return new URIBuilder().setScheme(httpOrHttps).setHost(host)
.setPath(path)
.setParameters(buildNameValuePareList(paramMap)).build();
... | [
"public",
"static",
"URI",
"buildUri",
"(",
"String",
"httpOrHttps",
",",
"String",
"host",
",",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"paramMap",
")",
"{",
"try",
"{",
"return",
"new",
"URIBuilder",
"(",
")",
".",
"setScheme",... | Build uri uri.
@param httpOrHttps the http or https
@param host the host
@param path the path
@param paramMap the param map
@return the uri | [
"Build",
"uri",
"uri",
"."
] | ee80235b2760396a616cf7563cbdc98d4affe8e1 | https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/HttpRequester.java#L115-L125 |
152,517 | JM-Lab/utils-java9 | src/main/java/kr/jm/utils/HttpRequester.java | HttpRequester.buildNameValuePareList | public static List<NameValuePair>
buildNameValuePareList(Map<String, String> keyValueMap) {
return keyValueMap.entrySet().stream()
.map(entry -> new BasicNameValuePair(entry.getKey(),
entry.getValue()))
.collect(toList());
} | java | public static List<NameValuePair>
buildNameValuePareList(Map<String, String> keyValueMap) {
return keyValueMap.entrySet().stream()
.map(entry -> new BasicNameValuePair(entry.getKey(),
entry.getValue()))
.collect(toList());
} | [
"public",
"static",
"List",
"<",
"NameValuePair",
">",
"buildNameValuePareList",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"keyValueMap",
")",
"{",
"return",
"keyValueMap",
".",
"entrySet",
"(",
")",
".",
"stream",
"(",
")",
".",
"map",
"(",
"entry",
... | Build name value pare list list.
@param keyValueMap the key value map
@return the list | [
"Build",
"name",
"value",
"pare",
"list",
"list",
"."
] | ee80235b2760396a616cf7563cbdc98d4affe8e1 | https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/HttpRequester.java#L133-L139 |
152,518 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/CassandraCounter.java | CassandraCounter._getRowWithCache | @SuppressWarnings("unchecked")
private Map<Long, DataPoint> _getRowWithCache(long timestampMs) {
int[] yyyymm_dd = toYYYYMM_DD(timestampMs);
int yyyymmdd = yyyymm_dd[0] * 100 + yyyymm_dd[1];
ICache cache = getCache();
String cacheKey = String.valueOf(yyyymmdd);
Object temp = ... | java | @SuppressWarnings("unchecked")
private Map<Long, DataPoint> _getRowWithCache(long timestampMs) {
int[] yyyymm_dd = toYYYYMM_DD(timestampMs);
int yyyymmdd = yyyymm_dd[0] * 100 + yyyymm_dd[1];
ICache cache = getCache();
String cacheKey = String.valueOf(yyyymmdd);
Object temp = ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"Map",
"<",
"Long",
",",
"DataPoint",
">",
"_getRowWithCache",
"(",
"long",
"timestampMs",
")",
"{",
"int",
"[",
"]",
"yyyymm_dd",
"=",
"toYYYYMM_DD",
"(",
"timestampMs",
")",
";",
"int",
"yyyymm... | Gets all data points of a day specified by the timestamp, cache
supported.
@param timestampMs
@return | [
"Gets",
"all",
"data",
"points",
"of",
"a",
"day",
"specified",
"by",
"the",
"timestamp",
"cache",
"supported",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/CassandraCounter.java#L252-L267 |
152,519 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/CassandraCounter.java | CassandraCounter._getRow | private Map<Long, DataPoint> _getRow(String counterName, int yyyymm, int dd) {
Map<Long, DataPoint> result = new HashMap<Long, DataPoint>();
ResultSet rs = CqlUtils.execute(sessionHelper.getSession(), cqlGetRow,
getConsistencyLevelForRead(), counterName, yyyymm, dd);
for (Iterat... | java | private Map<Long, DataPoint> _getRow(String counterName, int yyyymm, int dd) {
Map<Long, DataPoint> result = new HashMap<Long, DataPoint>();
ResultSet rs = CqlUtils.execute(sessionHelper.getSession(), cqlGetRow,
getConsistencyLevelForRead(), counterName, yyyymm, dd);
for (Iterat... | [
"private",
"Map",
"<",
"Long",
",",
"DataPoint",
">",
"_getRow",
"(",
"String",
"counterName",
",",
"int",
"yyyymm",
",",
"int",
"dd",
")",
"{",
"Map",
"<",
"Long",
",",
"DataPoint",
">",
"result",
"=",
"new",
"HashMap",
"<",
"Long",
",",
"DataPoint",
... | Gets all data points of a day.
@param counterName
@param yyyymm
@param dd
@return
@since 0.3.1.1 | [
"Gets",
"all",
"data",
"points",
"of",
"a",
"day",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/CassandraCounter.java#L278-L292 |
152,520 | tvesalainen/util | util/src/main/java/org/vesalainen/util/HexDump.java | HexDump.fromHex | public static final byte[] fromHex(String hexDump)
{
List<Integer> list = new ArrayList<>();
String[] lines = hexDump.split("\n");
if (lines.length < 2)
{
throw new IllegalArgumentException("not a hex dump");
}
if (!lines[0].contains(Title))
... | java | public static final byte[] fromHex(String hexDump)
{
List<Integer> list = new ArrayList<>();
String[] lines = hexDump.split("\n");
if (lines.length < 2)
{
throw new IllegalArgumentException("not a hex dump");
}
if (!lines[0].contains(Title))
... | [
"public",
"static",
"final",
"byte",
"[",
"]",
"fromHex",
"(",
"String",
"hexDump",
")",
"{",
"List",
"<",
"Integer",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"String",
"[",
"]",
"lines",
"=",
"hexDump",
".",
"split",
"(",
"\"\\n\""... | Recreates byte array from hex dump.
@param hexDump
@return | [
"Recreates",
"byte",
"array",
"from",
"hex",
"dump",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/HexDump.java#L37-L74 |
152,521 | tvesalainen/util | util/src/main/java/org/vesalainen/util/HexDump.java | HexDump.remainingToHex | public static final String remainingToHex(ByteBuffer bb)
{
byte[] buf = new byte[bb.remaining()];
int safe = bb.position();
bb.get(buf);
bb.position(safe);
return toHex(buf);
} | java | public static final String remainingToHex(ByteBuffer bb)
{
byte[] buf = new byte[bb.remaining()];
int safe = bb.position();
bb.get(buf);
bb.position(safe);
return toHex(buf);
} | [
"public",
"static",
"final",
"String",
"remainingToHex",
"(",
"ByteBuffer",
"bb",
")",
"{",
"byte",
"[",
"]",
"buf",
"=",
"new",
"byte",
"[",
"bb",
".",
"remaining",
"(",
")",
"]",
";",
"int",
"safe",
"=",
"bb",
".",
"position",
"(",
")",
";",
"bb"... | Creates readable view to byte buffer remaining. Doesn't change byte buffer.
@param bb
@return | [
"Creates",
"readable",
"view",
"to",
"byte",
"buffer",
"remaining",
".",
"Doesn",
"t",
"change",
"byte",
"buffer",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/HexDump.java#L80-L87 |
152,522 | tvesalainen/util | util/src/main/java/org/vesalainen/util/HexDump.java | HexDump.startToHex | public static final String startToHex(ByteBuffer bb)
{
byte[] buf = new byte[bb.position()];
int safePos = bb.position();
int safeLim = bb.limit();
bb.position(0);
bb.get(buf);
bb.position(safePos);
bb.limit(safeLim);
return toHex(buf);
} | java | public static final String startToHex(ByteBuffer bb)
{
byte[] buf = new byte[bb.position()];
int safePos = bb.position();
int safeLim = bb.limit();
bb.position(0);
bb.get(buf);
bb.position(safePos);
bb.limit(safeLim);
return toHex(buf);
} | [
"public",
"static",
"final",
"String",
"startToHex",
"(",
"ByteBuffer",
"bb",
")",
"{",
"byte",
"[",
"]",
"buf",
"=",
"new",
"byte",
"[",
"bb",
".",
"position",
"(",
")",
"]",
";",
"int",
"safePos",
"=",
"bb",
".",
"position",
"(",
")",
";",
"int",... | Creates readable view to byte buffer remaining. Mark will be discarded.
@param bb
@return | [
"Creates",
"readable",
"view",
"to",
"byte",
"buffer",
"remaining",
".",
"Mark",
"will",
"be",
"discarded",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/HexDump.java#L93-L103 |
152,523 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/FieldListener.java | FieldListener.getSyncedListenersField | public BaseField getSyncedListenersField(BaseField field, FieldListener listener)
{
if (field != null)
if (field.getRecord() == this.getOwner().getRecord())
field = listener.getOwner().getRecord().getField(field.getFieldName());
return field;
} | java | public BaseField getSyncedListenersField(BaseField field, FieldListener listener)
{
if (field != null)
if (field.getRecord() == this.getOwner().getRecord())
field = listener.getOwner().getRecord().getField(field.getFieldName());
return field;
} | [
"public",
"BaseField",
"getSyncedListenersField",
"(",
"BaseField",
"field",
",",
"FieldListener",
"listener",
")",
"{",
"if",
"(",
"field",
"!=",
"null",
")",
"if",
"(",
"field",
".",
"getRecord",
"(",
")",
"==",
"this",
".",
"getOwner",
"(",
")",
".",
... | When cloning a listener, if the field is contained in the source record, get the same field is the new record.
@param field
@param listener
@return | [
"When",
"cloning",
"a",
"listener",
"if",
"the",
"field",
"is",
"contained",
"in",
"the",
"source",
"record",
"get",
"the",
"same",
"field",
"is",
"the",
"new",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/FieldListener.java#L132-L138 |
152,524 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/FieldListener.java | FieldListener.respondsToMode | public boolean respondsToMode(int iMoveMode)
{
if (iMoveMode == DBConstants.SCREEN_MOVE)
return m_bScreenMove;
if (iMoveMode == DBConstants.INIT_MOVE)
return m_bInitMove;
if (iMoveMode == DBConstants.READ_MOVE)
return m_bReadMove;
return false;
... | java | public boolean respondsToMode(int iMoveMode)
{
if (iMoveMode == DBConstants.SCREEN_MOVE)
return m_bScreenMove;
if (iMoveMode == DBConstants.INIT_MOVE)
return m_bInitMove;
if (iMoveMode == DBConstants.READ_MOVE)
return m_bReadMove;
return false;
... | [
"public",
"boolean",
"respondsToMode",
"(",
"int",
"iMoveMode",
")",
"{",
"if",
"(",
"iMoveMode",
"==",
"DBConstants",
".",
"SCREEN_MOVE",
")",
"return",
"m_bScreenMove",
";",
"if",
"(",
"iMoveMode",
"==",
"DBConstants",
".",
"INIT_MOVE",
")",
"return",
"m_bIn... | Does this listener respond to this mode?
@return true if this listener responds to this kind of move. | [
"Does",
"this",
"listener",
"respond",
"to",
"this",
"mode?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/FieldListener.java#L284-L293 |
152,525 | ggrandes/stringproperties | src/main/java/org/javastack/stringproperties/StringProperties.java | StringProperties.eval | private final String eval(final String str) throws InvalidExpression {
if (str == null)
return null;
return new MapExpression(str, null, mapper, false).eval().get();
} | java | private final String eval(final String str) throws InvalidExpression {
if (str == null)
return null;
return new MapExpression(str, null, mapper, false).eval().get();
} | [
"private",
"final",
"String",
"eval",
"(",
"final",
"String",
"str",
")",
"throws",
"InvalidExpression",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"return",
"null",
";",
"return",
"new",
"MapExpression",
"(",
"str",
",",
"null",
",",
"mapper",
",",
"fals... | GET with MapExpression | [
"GET",
"with",
"MapExpression"
] | 9bbfb351d1d39dc65a906c9cde929633f647ad2c | https://github.com/ggrandes/stringproperties/blob/9bbfb351d1d39dc65a906c9cde929633f647ad2c/src/main/java/org/javastack/stringproperties/StringProperties.java#L193-L197 |
152,526 | aoindustries/ao-dao-base | src/main/java/com/aoindustries/dao/impl/RowCacheTable.java | RowCacheTable.addToCache | protected void addToCache(K canonicalKey, R row) {
assert ObjectUtils.equals(canonicalize(row.getKey()), canonicalKey);
rowCache.get().put(canonicalKey, row);
} | java | protected void addToCache(K canonicalKey, R row) {
assert ObjectUtils.equals(canonicalize(row.getKey()), canonicalKey);
rowCache.get().put(canonicalKey, row);
} | [
"protected",
"void",
"addToCache",
"(",
"K",
"canonicalKey",
",",
"R",
"row",
")",
"{",
"assert",
"ObjectUtils",
".",
"equals",
"(",
"canonicalize",
"(",
"row",
".",
"getKey",
"(",
")",
")",
",",
"canonicalKey",
")",
";",
"rowCache",
".",
"get",
"(",
"... | Adds a single object to the cache. | [
"Adds",
"a",
"single",
"object",
"to",
"the",
"cache",
"."
] | b1cde7f8d976f2d1ab57d110a77e2399ffa595ac | https://github.com/aoindustries/ao-dao-base/blob/b1cde7f8d976f2d1ab57d110a77e2399ffa595ac/src/main/java/com/aoindustries/dao/impl/RowCacheTable.java#L150-L153 |
152,527 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageLog.java | MessageLog.createMessageHeader | public BaseMessageHeader createMessageHeader()
{
Map<String,Object> properties = ((PropertiesField)this.getField(MessageLog.MESSAGE_HEADER_PROPERTIES)).getProperties();
BaseMessageHeader messageHeader = null;
String strMessageHeaderClassName = this.getField(MessageLog.MESSAGE_HEADER_CLASS_NA... | java | public BaseMessageHeader createMessageHeader()
{
Map<String,Object> properties = ((PropertiesField)this.getField(MessageLog.MESSAGE_HEADER_PROPERTIES)).getProperties();
BaseMessageHeader messageHeader = null;
String strMessageHeaderClassName = this.getField(MessageLog.MESSAGE_HEADER_CLASS_NA... | [
"public",
"BaseMessageHeader",
"createMessageHeader",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
"=",
"(",
"(",
"PropertiesField",
")",
"this",
".",
"getField",
"(",
"MessageLog",
".",
"MESSAGE_HEADER_PROPERTIES",
")",
")",
".",
"ge... | CreateMessageHeader Method. | [
"CreateMessageHeader",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageLog.java#L313-L333 |
152,528 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageLog.java | MessageLog.createMessageData | public BaseMessageRecordDesc createMessageData()
{
MessageRecordDesc messageData = null;
String strMessageDataClassName = this.getField(MessageLog.MESSAGE_DATA_CLASS_NAME).toString();
return MessageRecordDesc.createMessageRecordDesc(strMessageDataClassName, null, null);
} | java | public BaseMessageRecordDesc createMessageData()
{
MessageRecordDesc messageData = null;
String strMessageDataClassName = this.getField(MessageLog.MESSAGE_DATA_CLASS_NAME).toString();
return MessageRecordDesc.createMessageRecordDesc(strMessageDataClassName, null, null);
} | [
"public",
"BaseMessageRecordDesc",
"createMessageData",
"(",
")",
"{",
"MessageRecordDesc",
"messageData",
"=",
"null",
";",
"String",
"strMessageDataClassName",
"=",
"this",
".",
"getField",
"(",
"MessageLog",
".",
"MESSAGE_DATA_CLASS_NAME",
")",
".",
"toString",
"("... | CreateMessageData Method. | [
"CreateMessageData",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageLog.java#L337-L342 |
152,529 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageLog.java | MessageLog.getProperty | public String getProperty(String strKey)
{
String strProperty = this.getMessageProperty(strKey);
if (strProperty == null)
strProperty = ((PropertiesField)this.getField(MessageLog.MESSAGE_HEADER_PROPERTIES)).getProperty(strKey);
if (strProperty == null)
strProperty = (... | java | public String getProperty(String strKey)
{
String strProperty = this.getMessageProperty(strKey);
if (strProperty == null)
strProperty = ((PropertiesField)this.getField(MessageLog.MESSAGE_HEADER_PROPERTIES)).getProperty(strKey);
if (strProperty == null)
strProperty = (... | [
"public",
"String",
"getProperty",
"(",
"String",
"strKey",
")",
"{",
"String",
"strProperty",
"=",
"this",
".",
"getMessageProperty",
"(",
"strKey",
")",
";",
"if",
"(",
"strProperty",
"==",
"null",
")",
"strProperty",
"=",
"(",
"(",
"PropertiesField",
")",... | Get this property from this record. | [
"Get",
"this",
"property",
"from",
"this",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageLog.java#L380-L390 |
152,530 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.toDigits | public static final IntStream toDigits(long v, int length, int radix)
{
Spliterator.OfInt spliterator = Spliterators.spliterator(new PRimIt(v, length, radix), Long.MAX_VALUE, 0);
return StreamSupport.intStream(spliterator, false);
} | java | public static final IntStream toDigits(long v, int length, int radix)
{
Spliterator.OfInt spliterator = Spliterators.spliterator(new PRimIt(v, length, radix), Long.MAX_VALUE, 0);
return StreamSupport.intStream(spliterator, false);
} | [
"public",
"static",
"final",
"IntStream",
"toDigits",
"(",
"long",
"v",
",",
"int",
"length",
",",
"int",
"radix",
")",
"{",
"Spliterator",
".",
"OfInt",
"spliterator",
"=",
"Spliterators",
".",
"spliterator",
"(",
"new",
"PRimIt",
"(",
"v",
",",
"length",... | Returns IntStream where each item is a digit. I.e zero leading digits.
@param v
@param length
@param radix
@return | [
"Returns",
"IntStream",
"where",
"each",
"item",
"is",
"a",
"digit",
".",
"I",
".",
"e",
"zero",
"leading",
"digits",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L79-L83 |
152,531 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.parseChar | public static final char parseChar(CharSequence cs, int beginIndex, int endIndex)
{
if (endIndex - beginIndex != 1)
{
throw new IllegalArgumentException("input length must be 1");
}
return cs.charAt(beginIndex);
} | java | public static final char parseChar(CharSequence cs, int beginIndex, int endIndex)
{
if (endIndex - beginIndex != 1)
{
throw new IllegalArgumentException("input length must be 1");
}
return cs.charAt(beginIndex);
} | [
"public",
"static",
"final",
"char",
"parseChar",
"(",
"CharSequence",
"cs",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"if",
"(",
"endIndex",
"-",
"beginIndex",
"!=",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"input ... | Returns char from input.
@param cs
@param beginIndex the index to the first char of the text range.
@param endIndex the index after the last char of the text range.
@return
@throws IllegalArgumentException if input length is not 1. | [
"Returns",
"char",
"from",
"input",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L471-L478 |
152,532 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.parseBoolean | public static final boolean parseBoolean(CharSequence cs, int beginIndex, int endIndex)
{
return
endIndex - beginIndex == 4 &&
Character.codePointCount(cs, beginIndex, endIndex) == 4 &&
Character.toUpperCase(Character.codePointAt(cs, beginIndex)) == 'T' ... | java | public static final boolean parseBoolean(CharSequence cs, int beginIndex, int endIndex)
{
return
endIndex - beginIndex == 4 &&
Character.codePointCount(cs, beginIndex, endIndex) == 4 &&
Character.toUpperCase(Character.codePointAt(cs, beginIndex)) == 'T' ... | [
"public",
"static",
"final",
"boolean",
"parseBoolean",
"(",
"CharSequence",
"cs",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"return",
"endIndex",
"-",
"beginIndex",
"==",
"4",
"&&",
"Character",
".",
"codePointCount",
"(",
"cs",
",",
"begi... | Parses the char sequence argument as a boolean. The boolean returned represents
the value true if the char sequence argument is not null and is equal, ignoring
case, to the string "true".
@param cs
@param beginIndex the index to the first char of the text range.
@param endIndex the index after the last char of the text... | [
"Parses",
"the",
"char",
"sequence",
"argument",
"as",
"a",
"boolean",
".",
"The",
"boolean",
"returned",
"represents",
"the",
"value",
"true",
"if",
"the",
"char",
"sequence",
"argument",
"is",
"not",
"null",
"and",
"is",
"equal",
"ignoring",
"case",
"to",
... | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L503-L512 |
152,533 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.parseBoolean | public static final boolean parseBoolean(CharSequence cs, int radix, int beginIndex, int endIndex)
{
if (radix != 2)
{
throw new IllegalArgumentException("radix must be 2");
}
if (Character.codePointCount(cs, beginIndex, endIndex) != 1)
{
throw... | java | public static final boolean parseBoolean(CharSequence cs, int radix, int beginIndex, int endIndex)
{
if (radix != 2)
{
throw new IllegalArgumentException("radix must be 2");
}
if (Character.codePointCount(cs, beginIndex, endIndex) != 1)
{
throw... | [
"public",
"static",
"final",
"boolean",
"parseBoolean",
"(",
"CharSequence",
"cs",
",",
"int",
"radix",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"if",
"(",
"radix",
"!=",
"2",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\... | Parses the char sequence argument as a boolean. The boolean returned represents
the value true if the char sequence argument is not null and it's digit value
is 1.
@param cs
@param radix Must be 2.
@param beginIndex the index to the first char of the text range.
@param endIndex the index after the last char of the text... | [
"Parses",
"the",
"char",
"sequence",
"argument",
"as",
"a",
"boolean",
".",
"The",
"boolean",
"returned",
"represents",
"the",
"value",
"true",
"if",
"the",
"char",
"sequence",
"argument",
"is",
"not",
"null",
"and",
"it",
"s",
"digit",
"value",
"is",
"1",... | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L543-L563 |
152,534 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.parseFloat | public static final float parseFloat(CharSequence cs, int beginIndex, int endIndex)
{
FloatState fs = FloatState.Significand;
int end = endIndex;
int significand = 0;
int sign = 1;
int index = beginIndex;
int decimal = 0;
int exponent = 0;
int... | java | public static final float parseFloat(CharSequence cs, int beginIndex, int endIndex)
{
FloatState fs = FloatState.Significand;
int end = endIndex;
int significand = 0;
int sign = 1;
int index = beginIndex;
int decimal = 0;
int exponent = 0;
int... | [
"public",
"static",
"final",
"float",
"parseFloat",
"(",
"CharSequence",
"cs",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"FloatState",
"fs",
"=",
"FloatState",
".",
"Significand",
";",
"int",
"end",
"=",
"endIndex",
";",
"int",
"significand... | Parses float from decimal floating point representation.
<p>Input can start with '-' or '+'.
<p>All numbers are decimals.
<p>Decimal separator is '.'
<p>Exponent separator is 'e' or 'E'
<p>Examples
<p>-1234.56
<p>+1234.56e12
<p>-1234.56E-12
@param cs
@param beginIndex the index to the first char of the text range.
@pa... | [
"Parses",
"float",
"from",
"decimal",
"floating",
"point",
"representation",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L606-L714 |
152,535 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.findInt | public static final int findInt(CharSequence cs, int radix, int beginIndex, int endIndex)
{
IntPredicate predicate = null;
switch (radix)
{
case 8:
predicate = Primitives::isOctalDigit;
break;
case 10:
predicate... | java | public static final int findInt(CharSequence cs, int radix, int beginIndex, int endIndex)
{
IntPredicate predicate = null;
switch (radix)
{
case 8:
predicate = Primitives::isOctalDigit;
break;
case 10:
predicate... | [
"public",
"static",
"final",
"int",
"findInt",
"(",
"CharSequence",
"cs",
",",
"int",
"radix",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"IntPredicate",
"predicate",
"=",
"null",
";",
"switch",
"(",
"radix",
")",
"{",
"case",
"8",
":",
... | Parses next int
@param cs
@param radix
@param beginIndex
@param endIndex
@return | [
"Parses",
"next",
"int"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L1563-L1583 |
152,536 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.findFloat | public static final float findFloat(CharSequence cs, int beginIndex, int endIndex)
{
int begin = CharSequences.indexOf(cs, Primitives::isFloatDigit, beginIndex);
int end = CharSequences.indexOf(cs, (c)->!Primitives.isFloatDigit(c), begin);
return parseFloat(cs, begin, endIndex(end, endIn... | java | public static final float findFloat(CharSequence cs, int beginIndex, int endIndex)
{
int begin = CharSequences.indexOf(cs, Primitives::isFloatDigit, beginIndex);
int end = CharSequences.indexOf(cs, (c)->!Primitives.isFloatDigit(c), begin);
return parseFloat(cs, begin, endIndex(end, endIn... | [
"public",
"static",
"final",
"float",
"findFloat",
"(",
"CharSequence",
"cs",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"int",
"begin",
"=",
"CharSequences",
".",
"indexOf",
"(",
"cs",
",",
"Primitives",
"::",
"isFloatDigit",
",",
"beginInd... | Parses next float
@param cs
@param beginIndex
@param endIndex
@return | [
"Parses",
"next",
"float"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L1659-L1664 |
152,537 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.findDouble | public static final double findDouble(CharSequence cs, int beginIndex, int endIndex)
{
int begin = CharSequences.indexOf(cs, Primitives::isFloatDigit, beginIndex);
int end = CharSequences.indexOf(cs, (c)->!Primitives.isFloatDigit(c), begin);
return parseDouble(cs, begin, endIndex(end, en... | java | public static final double findDouble(CharSequence cs, int beginIndex, int endIndex)
{
int begin = CharSequences.indexOf(cs, Primitives::isFloatDigit, beginIndex);
int end = CharSequences.indexOf(cs, (c)->!Primitives.isFloatDigit(c), begin);
return parseDouble(cs, begin, endIndex(end, en... | [
"public",
"static",
"final",
"double",
"findDouble",
"(",
"CharSequence",
"cs",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"int",
"begin",
"=",
"CharSequences",
".",
"indexOf",
"(",
"cs",
",",
"Primitives",
"::",
"isFloatDigit",
",",
"beginI... | Parses next double in decimal form
@param cs
@param beginIndex
@param endIndex
@return | [
"Parses",
"next",
"double",
"in",
"decimal",
"form"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L1681-L1686 |
152,538 | tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.findScientific | public static final double findScientific(CharSequence cs, int beginIndex, int endIndex)
{
int begin = CharSequences.indexOf(cs, Primitives::isScientificDigit, beginIndex);
int end = CharSequences.indexOf(cs, (c)->!Primitives.isScientificDigit(c), begin);
return parseDouble(cs, begin, en... | java | public static final double findScientific(CharSequence cs, int beginIndex, int endIndex)
{
int begin = CharSequences.indexOf(cs, Primitives::isScientificDigit, beginIndex);
int end = CharSequences.indexOf(cs, (c)->!Primitives.isScientificDigit(c), begin);
return parseDouble(cs, begin, en... | [
"public",
"static",
"final",
"double",
"findScientific",
"(",
"CharSequence",
"cs",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"int",
"begin",
"=",
"CharSequences",
".",
"indexOf",
"(",
"cs",
",",
"Primitives",
"::",
"isScientificDigit",
",",
... | Parses next double in scientific form
@param cs
@param beginIndex
@param endIndex
@return | [
"Parses",
"next",
"double",
"in",
"scientific",
"form"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L1703-L1708 |
152,539 | tvesalainen/util | util/src/main/java/org/vesalainen/math/BernsteinPolynomial.java | BernsteinPolynomial.b | public static DoubleUnaryOperator b(int n, int m)
{
return (t)->c(n,m)*Math.pow(t, m)*Math.pow(1-t, n-m);
} | java | public static DoubleUnaryOperator b(int n, int m)
{
return (t)->c(n,m)*Math.pow(t, m)*Math.pow(1-t, n-m);
} | [
"public",
"static",
"DoubleUnaryOperator",
"b",
"(",
"int",
"n",
",",
"int",
"m",
")",
"{",
"return",
"(",
"t",
")",
"-",
"",
">",
"c",
"(",
"n",
",",
"m",
")",
"*",
"Math",
".",
"pow",
"(",
"t",
",",
"m",
")",
"*",
"Math",
".",
"pow",
"(",... | Returns Bernstein polynomial
@param n
@param m
@return | [
"Returns",
"Bernstein",
"polynomial"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/BernsteinPolynomial.java#L34-L37 |
152,540 | openCage/kleinod-mixed | src/main/java/de/pfabulist/kleinod/text/Strings.java | Strings.toFirstLower | public static String toFirstLower( String name ) {
if ( isEmpty( name )) {
return name;
}
return "" + name.toLowerCase( Locale.ROOT ).charAt(0) + name.substring(1);
} | java | public static String toFirstLower( String name ) {
if ( isEmpty( name )) {
return name;
}
return "" + name.toLowerCase( Locale.ROOT ).charAt(0) + name.substring(1);
} | [
"public",
"static",
"String",
"toFirstLower",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"name",
")",
")",
"{",
"return",
"name",
";",
"}",
"return",
"\"\"",
"+",
"name",
".",
"toLowerCase",
"(",
"Locale",
".",
"ROOT",
")",
".",
"cha... | Make the first character lower case
@param name Any String
@return A String | [
"Make",
"the",
"first",
"character",
"lower",
"case"
] | a589fe205150bfeeaed03620f8db9de546c64d84 | https://github.com/openCage/kleinod-mixed/blob/a589fe205150bfeeaed03620f8db9de546c64d84/src/main/java/de/pfabulist/kleinod/text/Strings.java#L31-L36 |
152,541 | openCage/kleinod-mixed | src/main/java/de/pfabulist/kleinod/text/Strings.java | Strings.toFirstUpper | public static String toFirstUpper(String name) {
if ( isEmpty( name )) {
return name;
}
return "" + name.toUpperCase( Locale.ROOT ).charAt(0) + name.substring(1);
} | java | public static String toFirstUpper(String name) {
if ( isEmpty( name )) {
return name;
}
return "" + name.toUpperCase( Locale.ROOT ).charAt(0) + name.substring(1);
} | [
"public",
"static",
"String",
"toFirstUpper",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"name",
")",
")",
"{",
"return",
"name",
";",
"}",
"return",
"\"\"",
"+",
"name",
".",
"toUpperCase",
"(",
"Locale",
".",
"ROOT",
")",
".",
"cha... | Make the first character upper case
@param name Any String
@return A String | [
"Make",
"the",
"first",
"character",
"upper",
"case"
] | a589fe205150bfeeaed03620f8db9de546c64d84 | https://github.com/openCage/kleinod-mixed/blob/a589fe205150bfeeaed03620f8db9de546c64d84/src/main/java/de/pfabulist/kleinod/text/Strings.java#L52-L57 |
152,542 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.getInputType | public String getInputType(String strViewType)
{
if (ScreenModel.HTML_TYPE.equalsIgnoreCase(strViewType))
return "date";
else //if (TopScreen.XML_TYPE.equalsIgnoreCase(strViewType))
return super.getInputType(strViewType);
} | java | public String getInputType(String strViewType)
{
if (ScreenModel.HTML_TYPE.equalsIgnoreCase(strViewType))
return "date";
else //if (TopScreen.XML_TYPE.equalsIgnoreCase(strViewType))
return super.getInputType(strViewType);
} | [
"public",
"String",
"getInputType",
"(",
"String",
"strViewType",
")",
"{",
"if",
"(",
"ScreenModel",
".",
"HTML_TYPE",
".",
"equalsIgnoreCase",
"(",
"strViewType",
")",
")",
"return",
"\"date\"",
";",
"else",
"//if (TopScreen.XML_TYPE.equalsIgnoreCase(strViewType))",
... | Get the HTML Input Type.
@return The html type (date). | [
"Get",
"the",
"HTML",
"Input",
"Type",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L151-L157 |
152,543 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.getSQLFromField | public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException
{
if (this.isNull())
{
if ((!this.isNullable())
|| (iType == DBConstants.SQL_SELECT_TYPE)
|| (DBConstants.FALSE.equals(this.getRecord().getTable().get... | java | public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException
{
if (this.isNull())
{
if ((!this.isNullable())
|| (iType == DBConstants.SQL_SELECT_TYPE)
|| (DBConstants.FALSE.equals(this.getRecord().getTable().get... | [
"public",
"void",
"getSQLFromField",
"(",
"PreparedStatement",
"statement",
",",
"int",
"iType",
",",
"int",
"iParamColumn",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"this",
".",
"isNull",
"(",
")",
")",
"{",
"if",
"(",
"(",
"!",
"this",
".",
"isNu... | Move the physical binary data to this SQL parameter row.
This method used the setTimestamp statement method.
@param statement The SQL prepare statement.
@param iType the type of SQL statement.
@param iParamColumn The column in the prepared statement to set the data.
@exception SQLException From SQL calls. | [
"Move",
"the",
"physical",
"binary",
"data",
"to",
"this",
"SQL",
"parameter",
"row",
".",
"This",
"method",
"used",
"the",
"setTimestamp",
"statement",
"method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L166-L190 |
152,544 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.setValue | public int setValue(double value, boolean bDisplayOption, int iMoveMode)
{ // Set this field's value
java.util.Date dateTemp = new java.util.Date((long)value);
int iErrorCode = this.setData(dateTemp, bDisplayOption, iMoveMode);
return iErrorCode;
} | java | public int setValue(double value, boolean bDisplayOption, int iMoveMode)
{ // Set this field's value
java.util.Date dateTemp = new java.util.Date((long)value);
int iErrorCode = this.setData(dateTemp, bDisplayOption, iMoveMode);
return iErrorCode;
} | [
"public",
"int",
"setValue",
"(",
"double",
"value",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"// Set this field's value",
"java",
".",
"util",
".",
"Date",
"dateTemp",
"=",
"new",
"java",
".",
"util",
".",
"Date",
"(",
"(",
"lo... | Set the Value of this field as a double.
@param value The value of this field.
@param iDisplayOption If true, display the new field.
@param iMoveMove The move mode.
@return An error code (NORMAL_RETURN for success). | [
"Set",
"the",
"Value",
"of",
"this",
"field",
"as",
"a",
"double",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L251-L256 |
152,545 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.getCalendar | public Calendar getCalendar()
{ // Get this field's value
java.util.Date dateValue = (java.util.Date)this.getData(); // Get the physical data
if (dateValue == null)
return null;
Calendar calendar = Calendar.getInstance();
calendar.setTime(dateValue);
re... | java | public Calendar getCalendar()
{ // Get this field's value
java.util.Date dateValue = (java.util.Date)this.getData(); // Get the physical data
if (dateValue == null)
return null;
Calendar calendar = Calendar.getInstance();
calendar.setTime(dateValue);
re... | [
"public",
"Calendar",
"getCalendar",
"(",
")",
"{",
"// Get this field's value",
"java",
".",
"util",
".",
"Date",
"dateValue",
"=",
"(",
"java",
".",
"util",
".",
"Date",
")",
"this",
".",
"getData",
"(",
")",
";",
"// Get the physical data",
"if",
"(",
"... | Get this field as a java calendar value.
@return This field as a calendar value. | [
"Get",
"this",
"field",
"as",
"a",
"java",
"calendar",
"value",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L269-L277 |
152,546 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.setTime | public int setTime(java.util.Date time, boolean bDisplayOption, int iMoveMode)
{
java.util.Date m_DateTime = (java.util.Date)m_data;
int iYear = DBConstants.FIRST_YEAR;
int iMonth = DBConstants.FIRST_DAY;
int iDate = DBConstants.FIRST_MONTH;
if (m_DateTime != null) //|| (m_Cu... | java | public int setTime(java.util.Date time, boolean bDisplayOption, int iMoveMode)
{
java.util.Date m_DateTime = (java.util.Date)m_data;
int iYear = DBConstants.FIRST_YEAR;
int iMonth = DBConstants.FIRST_DAY;
int iDate = DBConstants.FIRST_MONTH;
if (m_DateTime != null) //|| (m_Cu... | [
"public",
"int",
"setTime",
"(",
"java",
".",
"util",
".",
"Date",
"time",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"java",
".",
"util",
".",
"Date",
"m_DateTime",
"=",
"(",
"java",
".",
"util",
".",
"Date",
")",
"m_data",
... | Change the time without changing the date.
@param time The date to set (only time portion is used).
@param bDisplayOption Display changed fields if true.
@param iMoveMode The move mode.
@return The error code (or NORMAL_RETURN). | [
"Change",
"the",
"time",
"without",
"changing",
"the",
"date",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L331-L351 |
152,547 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.setToLimit | public void setToLimit(int iAreaDesc) // Set this field to the largest or smallest value
{ // By default compare as ASCII strings
m_calendar.set(DBConstants.FIRST_YEAR, Calendar.JANUARY, 1, 0, 0, 0);
if (iAreaDesc == DBConstants.END_SELECT_KEY)
m_calendar.set(DBConstants.LAST_YEAR, Cal... | java | public void setToLimit(int iAreaDesc) // Set this field to the largest or smallest value
{ // By default compare as ASCII strings
m_calendar.set(DBConstants.FIRST_YEAR, Calendar.JANUARY, 1, 0, 0, 0);
if (iAreaDesc == DBConstants.END_SELECT_KEY)
m_calendar.set(DBConstants.LAST_YEAR, Cal... | [
"public",
"void",
"setToLimit",
"(",
"int",
"iAreaDesc",
")",
"// Set this field to the largest or smallest value",
"{",
"// By default compare as ASCII strings",
"m_calendar",
".",
"set",
"(",
"DBConstants",
".",
"FIRST_YEAR",
",",
"Calendar",
".",
"JANUARY",
",",
"1",
... | Set to the min or max value.
@param iAreaDesc END_SELECT_KEY means set to largest value, others mean smallest. | [
"Set",
"to",
"the",
"min",
"or",
"max",
"value",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L356-L363 |
152,548 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.todaysDate | public static double todaysDate()
{
java.util.Date date = new java.util.Date();
m_calendar.setTime(date);
m_calendar.set(Calendar.HOUR_OF_DAY, 0);
m_calendar.set(Calendar.MINUTE, 0);
m_calendar.set(Calendar.SECOND, 0);
m_calendar.set(Calendar.MILLISECOND, 0);
... | java | public static double todaysDate()
{
java.util.Date date = new java.util.Date();
m_calendar.setTime(date);
m_calendar.set(Calendar.HOUR_OF_DAY, 0);
m_calendar.set(Calendar.MINUTE, 0);
m_calendar.set(Calendar.SECOND, 0);
m_calendar.set(Calendar.MILLISECOND, 0);
... | [
"public",
"static",
"double",
"todaysDate",
"(",
")",
"{",
"java",
".",
"util",
".",
"Date",
"date",
"=",
"new",
"java",
".",
"util",
".",
"Date",
"(",
")",
";",
"m_calendar",
".",
"setTime",
"(",
"date",
")",
";",
"m_calendar",
".",
"set",
"(",
"C... | Return the current date with a 0 time.
@return The date. | [
"Return",
"the",
"current",
"date",
"with",
"a",
"0",
"time",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L443-L453 |
152,549 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.currentTime | public static double currentTime()
{
java.util.Date time = new java.util.Date();
m_calendar.setTime(time);
//x m_calendar.set(Calendar.SECOND, 0);
m_calendar.set(Calendar.MILLISECOND, 0);
time = m_calendar.getTime();
return time.getTime(); // Convert to double
} | java | public static double currentTime()
{
java.util.Date time = new java.util.Date();
m_calendar.setTime(time);
//x m_calendar.set(Calendar.SECOND, 0);
m_calendar.set(Calendar.MILLISECOND, 0);
time = m_calendar.getTime();
return time.getTime(); // Convert to double
} | [
"public",
"static",
"double",
"currentTime",
"(",
")",
"{",
"java",
".",
"util",
".",
"Date",
"time",
"=",
"new",
"java",
".",
"util",
".",
"Date",
"(",
")",
";",
"m_calendar",
".",
"setTime",
"(",
"time",
")",
";",
"//x m_calendar.set(Calendar.SECO... | Return the current date and time as a double.
@return The current date and time. | [
"Return",
"the",
"current",
"date",
"and",
"time",
"as",
"a",
"double",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L458-L466 |
152,550 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.doSetData | public int doSetData(Object vpData, boolean bDisplayOption, int iMoveMode)
{
if ((vpData != null) && (!(vpData instanceof java.util.Date)))
return DBConstants.ERROR_RETURN;
return super.doSetData(vpData, bDisplayOption, iMoveMode);
} | java | public int doSetData(Object vpData, boolean bDisplayOption, int iMoveMode)
{
if ((vpData != null) && (!(vpData instanceof java.util.Date)))
return DBConstants.ERROR_RETURN;
return super.doSetData(vpData, bDisplayOption, iMoveMode);
} | [
"public",
"int",
"doSetData",
"(",
"Object",
"vpData",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"if",
"(",
"(",
"vpData",
"!=",
"null",
")",
"&&",
"(",
"!",
"(",
"vpData",
"instanceof",
"java",
".",
"util",
".",
"Date",
")",... | Move this physical binary data to this field.
Must be java Date type.
@param data The physical data to move to this field (must be the correct raw data class).
@param bDisplayOption If true, display after setting the data.
@param iMoveMode The type of move.
@return an error code (0 if success). | [
"Move",
"this",
"physical",
"binary",
"data",
"to",
"this",
"field",
".",
"Must",
"be",
"java",
"Date",
"type",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L475-L480 |
152,551 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/DateTimeField.java | DateTimeField.propertyChange | public void propertyChange(PropertyChangeEvent evt)
{
if (MenuConstants.DATE.equalsIgnoreCase(evt.getPropertyName()))
if (evt.getNewValue() instanceof java.util.Date)
this.setDateTime((java.util.Date)evt.getNewValue(), true, DBConstants.SCREEN_MOVE);
} | java | public void propertyChange(PropertyChangeEvent evt)
{
if (MenuConstants.DATE.equalsIgnoreCase(evt.getPropertyName()))
if (evt.getNewValue() instanceof java.util.Date)
this.setDateTime((java.util.Date)evt.getNewValue(), true, DBConstants.SCREEN_MOVE);
} | [
"public",
"void",
"propertyChange",
"(",
"PropertyChangeEvent",
"evt",
")",
"{",
"if",
"(",
"MenuConstants",
".",
"DATE",
".",
"equalsIgnoreCase",
"(",
"evt",
".",
"getPropertyName",
"(",
")",
")",
")",
"if",
"(",
"evt",
".",
"getNewValue",
"(",
")",
"inst... | This method gets called when a bound property is changed.
This is required to listen to changes by the date popup control.
@param evt A PropertyChangeEvent object describing the event source and the property that has changed. | [
"This",
"method",
"gets",
"called",
"when",
"a",
"bound",
"property",
"is",
"changed",
".",
"This",
"is",
"required",
"to",
"listen",
"to",
"changes",
"by",
"the",
"date",
"popup",
"control",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L541-L546 |
152,552 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/PropertiesField.java | PropertiesField.getProperty | public String getProperty(String strProperty)
{
if ((strProperty == null) || (strProperty.length() == 0))
return null;
if (m_propertiesCache == null)
m_propertiesCache = this.loadProperties();
return (String)m_propertiesCache.get(strProperty); // Add code here
} | java | public String getProperty(String strProperty)
{
if ((strProperty == null) || (strProperty.length() == 0))
return null;
if (m_propertiesCache == null)
m_propertiesCache = this.loadProperties();
return (String)m_propertiesCache.get(strProperty); // Add code here
} | [
"public",
"String",
"getProperty",
"(",
"String",
"strProperty",
")",
"{",
"if",
"(",
"(",
"strProperty",
"==",
"null",
")",
"||",
"(",
"strProperty",
".",
"length",
"(",
")",
"==",
"0",
")",
")",
"return",
"null",
";",
"if",
"(",
"m_propertiesCache",
... | Get this property in the user's property area.
@param strProperty The property key to retrieve.
@return The property. | [
"Get",
"this",
"property",
"in",
"the",
"user",
"s",
"property",
"area",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/PropertiesField.java#L115-L122 |
152,553 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/PropertiesField.java | PropertiesField.getNewValue | public String getNewValue(String strKey, String strReadValue, String strOrigValue, String strCurrentValue)
{
String strNewValue = null;
if (((strCurrentValue != null) && (strCurrentValue.equals(strOrigValue)))
|| ((strCurrentValue == null) && (strOrigValue == null)))
{ // I hav... | java | public String getNewValue(String strKey, String strReadValue, String strOrigValue, String strCurrentValue)
{
String strNewValue = null;
if (((strCurrentValue != null) && (strCurrentValue.equals(strOrigValue)))
|| ((strCurrentValue == null) && (strOrigValue == null)))
{ // I hav... | [
"public",
"String",
"getNewValue",
"(",
"String",
"strKey",
",",
"String",
"strReadValue",
",",
"String",
"strOrigValue",
",",
"String",
"strCurrentValue",
")",
"{",
"String",
"strNewValue",
"=",
"null",
";",
"if",
"(",
"(",
"(",
"strCurrentValue",
"!=",
"null... | Given the read, original, and current values for this key, decide which to use.
@param strKey
@param strReadValue
@param strOrigValue
@param strCurrentValue
@return | [
"Given",
"the",
"read",
"original",
"and",
"current",
"values",
"for",
"this",
"key",
"decide",
"which",
"to",
"use",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/PropertiesField.java#L557-L580 |
152,554 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/PropertiesField.java | PropertiesField.updateOrigKey | public boolean updateOrigKey(Map<String,Object> propOrig, String strKey, String strOrigValue, String strNewValue, boolean bOrigChange)
{
if (((strNewValue != null) && (!strNewValue.equals(strOrigValue)))
|| ((strNewValue == null) && (strOrigValue != null)))
{ // If I am using t... | java | public boolean updateOrigKey(Map<String,Object> propOrig, String strKey, String strOrigValue, String strNewValue, boolean bOrigChange)
{
if (((strNewValue != null) && (!strNewValue.equals(strOrigValue)))
|| ((strNewValue == null) && (strOrigValue != null)))
{ // If I am using t... | [
"public",
"boolean",
"updateOrigKey",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"propOrig",
",",
"String",
"strKey",
",",
"String",
"strOrigValue",
",",
"String",
"strNewValue",
",",
"boolean",
"bOrigChange",
")",
"{",
"if",
"(",
"(",
"(",
"strNewValue"... | Given the read, original, and current values for this key, update the original key value.
@param propOrig
@param strKey
@param strReadValue
@param strOrigValue
@param strNewValue
@param bOrigChange
@return | [
"Given",
"the",
"read",
"original",
"and",
"current",
"values",
"for",
"this",
"key",
"update",
"the",
"original",
"key",
"value",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/PropertiesField.java#L591-L603 |
152,555 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java | FMDate.fromString | public static FMDate fromString(String value) {
return StringUtils.isEmpty(value) ? null : new FMDate(value);
} | java | public static FMDate fromString(String value) {
return StringUtils.isEmpty(value) ? null : new FMDate(value);
} | [
"public",
"static",
"FMDate",
"fromString",
"(",
"String",
"value",
")",
"{",
"return",
"StringUtils",
".",
"isEmpty",
"(",
"value",
")",
"?",
"null",
":",
"new",
"FMDate",
"(",
"value",
")",
";",
"}"
] | Converts a string value to a FM date.
@param value The string value to convert.
@return A FM date. | [
"Converts",
"a",
"string",
"value",
"to",
"a",
"FM",
"date",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java#L87-L89 |
152,556 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java | FMDate.setCalendar | private long setCalendar(Calendar cal, int part, long value, long div) {
cal.set(part, (int) (value % div));
return value / div;
} | java | private long setCalendar(Calendar cal, int part, long value, long div) {
cal.set(part, (int) (value % div));
return value / div;
} | [
"private",
"long",
"setCalendar",
"(",
"Calendar",
"cal",
",",
"int",
"part",
",",
"long",
"value",
",",
"long",
"div",
")",
"{",
"cal",
".",
"set",
"(",
"part",
",",
"(",
"int",
")",
"(",
"value",
"%",
"div",
")",
")",
";",
"return",
"value",
"/... | Sets a calendar component based on the input value. Meant to be called successively, with the
return value used as the input value for the next call, to extract lower digits from the
input value to be set into the calendar component.
@param cal Calendar component.
@param part Calendar component to be set.
@param value... | [
"Sets",
"a",
"calendar",
"component",
"based",
"on",
"the",
"input",
"value",
".",
"Meant",
"to",
"be",
"called",
"successively",
"with",
"the",
"return",
"value",
"used",
"as",
"the",
"input",
"value",
"for",
"the",
"next",
"call",
"to",
"extract",
"lower... | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java#L149-L152 |
152,557 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java | FMDate.setFMDate | public void setFMDate(String value) {
final long multiplier = 100000000;
Calendar cal = Calendar.getInstance();
double val = Double.parseDouble(value);
if (val < 1000000D || val > 9999999D) {
throw new IllegalArgumentException();
}
long date ... | java | public void setFMDate(String value) {
final long multiplier = 100000000;
Calendar cal = Calendar.getInstance();
double val = Double.parseDouble(value);
if (val < 1000000D || val > 9999999D) {
throw new IllegalArgumentException();
}
long date ... | [
"public",
"void",
"setFMDate",
"(",
"String",
"value",
")",
"{",
"final",
"long",
"multiplier",
"=",
"100000000",
";",
"Calendar",
"cal",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"double",
"val",
"=",
"Double",
".",
"parseDouble",
"(",
"value",
... | Sets the date value based on the specified FM string representation.
@param value FM string representation. | [
"Sets",
"the",
"date",
"value",
"based",
"on",
"the",
"specified",
"FM",
"string",
"representation",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java#L159-L178 |
152,558 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java | FMDate.getFMDate | public String getFMDate() {
Calendar cal = Calendar.getInstance();
cal.setTime(this);
StringBuilder sb = new StringBuilder(15);
int hour = cal.get(Calendar.HOUR_OF_DAY);
if (hour == 0 && hasTime) {
hour = 24;
cal.add(Calendar.DAY_OF_MONTH, -1);
... | java | public String getFMDate() {
Calendar cal = Calendar.getInstance();
cal.setTime(this);
StringBuilder sb = new StringBuilder(15);
int hour = cal.get(Calendar.HOUR_OF_DAY);
if (hour == 0 && hasTime) {
hour = 24;
cal.add(Calendar.DAY_OF_MONTH, -1);
... | [
"public",
"String",
"getFMDate",
"(",
")",
"{",
"Calendar",
"cal",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"cal",
".",
"setTime",
"(",
"this",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"15",
")",
";",
"int",
"hour",... | Returns the FM string representation of the date.
@return FM string representation. | [
"Returns",
"the",
"FM",
"string",
"representation",
"of",
"the",
"date",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java#L185-L222 |
152,559 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java | FMDate.addFMPiece | private void addFMPiece(StringBuilder sb, int value, int pad) {
String val = Integer.toString(value);
pad -= val.length();
while (pad-- > 0) {
sb.append('0');
}
sb.append(val);
} | java | private void addFMPiece(StringBuilder sb, int value, int pad) {
String val = Integer.toString(value);
pad -= val.length();
while (pad-- > 0) {
sb.append('0');
}
sb.append(val);
} | [
"private",
"void",
"addFMPiece",
"(",
"StringBuilder",
"sb",
",",
"int",
"value",
",",
"int",
"pad",
")",
"{",
"String",
"val",
"=",
"Integer",
".",
"toString",
"(",
"value",
")",
";",
"pad",
"-=",
"val",
".",
"length",
"(",
")",
";",
"while",
"(",
... | Used to build a FM string representation of a date.
@param sb String builder.
@param value Value to append.
@param pad Left pad with zeros to this number of digits. | [
"Used",
"to",
"build",
"a",
"FM",
"string",
"representation",
"of",
"a",
"date",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java#L231-L240 |
152,560 | pressgang-ccms/PressGangCCMSRESTv1Common | src/main/java/org/jboss/pressgang/ccms/rest/v1/collections/join/RESTCategoryInTagCollectionV1.java | RESTCategoryInTagCollectionV1.ignoreDuplicatedChangeItemRequests | @Override
protected void ignoreDuplicatedChangeItemRequests() {
if (getItems() != null) {
final List<RESTCategoryInTagCollectionItemV1> items = new ArrayList<RESTCategoryInTagCollectionItemV1>(getItems());
/* on the second loop, remove any items that are marked for both add ... | java | @Override
protected void ignoreDuplicatedChangeItemRequests() {
if (getItems() != null) {
final List<RESTCategoryInTagCollectionItemV1> items = new ArrayList<RESTCategoryInTagCollectionItemV1>(getItems());
/* on the second loop, remove any items that are marked for both add ... | [
"@",
"Override",
"protected",
"void",
"ignoreDuplicatedChangeItemRequests",
"(",
")",
"{",
"if",
"(",
"getItems",
"(",
")",
"!=",
"null",
")",
"{",
"final",
"List",
"<",
"RESTCategoryInTagCollectionItemV1",
">",
"items",
"=",
"new",
"ArrayList",
"<",
"RESTCatego... | CategoryTags are only duplicated when they have the same ID and the same value. | [
"CategoryTags",
"are",
"only",
"duplicated",
"when",
"they",
"have",
"the",
"same",
"ID",
"and",
"the",
"same",
"value",
"."
] | 0641d21b127297b47035f3b8e55fba81251b419c | https://github.com/pressgang-ccms/PressGangCCMSRESTv1Common/blob/0641d21b127297b47035f3b8e55fba81251b419c/src/main/java/org/jboss/pressgang/ccms/rest/v1/collections/join/RESTCategoryInTagCollectionV1.java#L64-L129 |
152,561 | jbundle/jbundle | base/screen/model/src/main/java/org/jbundle/base/screen/model/SCheckBox.java | SCheckBox.getSFieldProperty | public String getSFieldProperty(String strFieldName)
{
String strValue = super.getSFieldProperty(strFieldName);
if (strValue == null)
if (this.getParentScreen() != null)
if (DBConstants.SUBMIT.equalsIgnoreCase(this.getParentScreen().getProperty(DBParams.COMMAND)))
... | java | public String getSFieldProperty(String strFieldName)
{
String strValue = super.getSFieldProperty(strFieldName);
if (strValue == null)
if (this.getParentScreen() != null)
if (DBConstants.SUBMIT.equalsIgnoreCase(this.getParentScreen().getProperty(DBParams.COMMAND)))
... | [
"public",
"String",
"getSFieldProperty",
"(",
"String",
"strFieldName",
")",
"{",
"String",
"strValue",
"=",
"super",
".",
"getSFieldProperty",
"(",
"strFieldName",
")",
";",
"if",
"(",
"strValue",
"==",
"null",
")",
"if",
"(",
"this",
".",
"getParentScreen",
... | Set this control's value as it was submitted by the HTML post operation.
@return The value the field was set to. | [
"Set",
"this",
"control",
"s",
"value",
"as",
"it",
"was",
"submitted",
"by",
"the",
"HTML",
"post",
"operation",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/SCheckBox.java#L64-L72 |
152,562 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java | CreateFileExtensions.newDirectories | public static FileCreationState newDirectories(final Collection<File> directories)
throws DirectoryAlreadyExistsException
{
FileCreationState created = FileCreationState.PENDING;
for (final File dir : directories)
{
created = CreateFileExtensions.newDirectory(dir);
}
return created;
} | java | public static FileCreationState newDirectories(final Collection<File> directories)
throws DirectoryAlreadyExistsException
{
FileCreationState created = FileCreationState.PENDING;
for (final File dir : directories)
{
created = CreateFileExtensions.newDirectory(dir);
}
return created;
} | [
"public",
"static",
"FileCreationState",
"newDirectories",
"(",
"final",
"Collection",
"<",
"File",
">",
"directories",
")",
"throws",
"DirectoryAlreadyExistsException",
"{",
"FileCreationState",
"created",
"=",
"FileCreationState",
".",
"PENDING",
";",
"for",
"(",
"f... | Creates the directories.
@param directories
the directories
@return true, if successful
@throws DirectoryAlreadyExistsException
the directory allready exists exception | [
"Creates",
"the",
"directories",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java#L58-L68 |
152,563 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java | CreateFileExtensions.newFile | public static FileCreationState newFile(final File file) throws IOException
{
FileCreationState fileCreationState = FileCreationState.ALREADY_EXISTS;
if (!file.exists())
{
fileCreationState = FileCreationState.FAILED;
newParentDirectories(file);
if (file.createNewFile())
{
fileCreationState = Fil... | java | public static FileCreationState newFile(final File file) throws IOException
{
FileCreationState fileCreationState = FileCreationState.ALREADY_EXISTS;
if (!file.exists())
{
fileCreationState = FileCreationState.FAILED;
newParentDirectories(file);
if (file.createNewFile())
{
fileCreationState = Fil... | [
"public",
"static",
"FileCreationState",
"newFile",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"FileCreationState",
"fileCreationState",
"=",
"FileCreationState",
".",
"ALREADY_EXISTS",
";",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
... | Creates an empty file if the File does not exists otherwise it lets the file as it is.
@param file
the file.
@return true, if the file is successful created otherwise false.
@throws IOException
Signals that an I/O exception has occurred. | [
"Creates",
"an",
"empty",
"file",
"if",
"the",
"File",
"does",
"not",
"exists",
"otherwise",
"it",
"lets",
"the",
"file",
"as",
"it",
"is",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java#L149-L162 |
152,564 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java | CreateFileExtensions.newFiles | public static FileCreationState newFiles(final Collection<File> files) throws IOException
{
FileCreationState created = FileCreationState.PENDING;
for (final File file : files)
{
created = CreateFileExtensions.newFile(file);
}
return created;
} | java | public static FileCreationState newFiles(final Collection<File> files) throws IOException
{
FileCreationState created = FileCreationState.PENDING;
for (final File file : files)
{
created = CreateFileExtensions.newFile(file);
}
return created;
} | [
"public",
"static",
"FileCreationState",
"newFiles",
"(",
"final",
"Collection",
"<",
"File",
">",
"files",
")",
"throws",
"IOException",
"{",
"FileCreationState",
"created",
"=",
"FileCreationState",
".",
"PENDING",
";",
"for",
"(",
"final",
"File",
"file",
":"... | Creates all files contained in the collection as empty files if the files does not exists
otherwise it lets the files as they are.
@param files
the Collection with the File objects.
@return true, if successful
@throws IOException
Signals that an I/O exception has occurred. | [
"Creates",
"all",
"files",
"contained",
"in",
"the",
"collection",
"as",
"empty",
"files",
"if",
"the",
"files",
"does",
"not",
"exists",
"otherwise",
"it",
"lets",
"the",
"files",
"as",
"they",
"are",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java#L176-L184 |
152,565 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java | CreateFileExtensions.newParentDirectories | @Deprecated
public static void newParentDirectories(final File file)
{
if (!file.exists())
{
final File parent = file.getParentFile();
if (parent != null && !parent.exists())
{
parent.mkdirs();
}
}
} | java | @Deprecated
public static void newParentDirectories(final File file)
{
if (!file.exists())
{
final File parent = file.getParentFile();
if (parent != null && !parent.exists())
{
parent.mkdirs();
}
}
} | [
"@",
"Deprecated",
"public",
"static",
"void",
"newParentDirectories",
"(",
"final",
"File",
"file",
")",
"{",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
")",
"{",
"final",
"File",
"parent",
"=",
"file",
".",
"getParentFile",
"(",
")",
";",
"if",... | Creates the parent directories from the given file.
@param file
the file
@deprecated use instead the method
{@linkplain CreateFileExtensions#newDirectories(Path, FileAttribute...)} <br>
<br>
Note: will be removed in the next minor release | [
"Creates",
"the",
"parent",
"directories",
"from",
"the",
"given",
"file",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/create/CreateFileExtensions.java#L196-L207 |
152,566 | wigforss/Ka-Commons-Collection | src/main/java/org/kasource/commons/collection/builder/MapBuilder.java | MapBuilder.putAll | public MapBuilder<K, V> putAll(Map<K, V> otherMap) {
map.putAll(otherMap);
return this;
} | java | public MapBuilder<K, V> putAll(Map<K, V> otherMap) {
map.putAll(otherMap);
return this;
} | [
"public",
"MapBuilder",
"<",
"K",
",",
"V",
">",
"putAll",
"(",
"Map",
"<",
"K",
",",
"V",
">",
"otherMap",
")",
"{",
"map",
".",
"putAll",
"(",
"otherMap",
")",
";",
"return",
"this",
";",
"}"
] | Puts all entries from otherMap into the map.
@param otherMap Map to populate entries from.
@return This builder. | [
"Puts",
"all",
"entries",
"from",
"otherMap",
"into",
"the",
"map",
"."
] | bee25f16ec4a65af0005bf0a9151a891cfe23e8e | https://github.com/wigforss/Ka-Commons-Collection/blob/bee25f16ec4a65af0005bf0a9151a891cfe23e8e/src/main/java/org/kasource/commons/collection/builder/MapBuilder.java#L57-L60 |
152,567 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/PassThruTable.java | PassThruTable.init | public void init(BaseDatabase database, Record record)
{
m_tableNext = null;
database = null; // Use the database of the last table on the chain!
super.init(database, record);
if (record.getTable() != this)
m_tableNext = record.getTable();
record.setTable(this)... | java | public void init(BaseDatabase database, Record record)
{
m_tableNext = null;
database = null; // Use the database of the last table on the chain!
super.init(database, record);
if (record.getTable() != this)
m_tableNext = record.getTable();
record.setTable(this)... | [
"public",
"void",
"init",
"(",
"BaseDatabase",
"database",
",",
"Record",
"record",
")",
"{",
"m_tableNext",
"=",
"null",
";",
"database",
"=",
"null",
";",
"// Use the database of the last table on the chain!",
"super",
".",
"init",
"(",
"database",
",",
"record"... | Initialize the table.
Adds the record's current table to my chain, and sets the record's table to this new table.
@param database Should be null, as the last table on the chain contains the database.
@param record The record's current table will be changed to this table and moved down my list. | [
"Initialize",
"the",
"table",
".",
"Adds",
"the",
"record",
"s",
"current",
"table",
"to",
"my",
"chain",
"and",
"sets",
"the",
"record",
"s",
"table",
"to",
"this",
"new",
"table",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L73-L81 |
152,568 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/PassThruTable.java | PassThruTable.free | public void free()
{
if (m_mapTable != null)
{
Iterator<BaseTable> iterator = this.getTables();
while (iterator.hasNext())
{
BaseTable table = iterator.next();
if ((table != null) && (table != this.getNextTable()))
{... | java | public void free()
{
if (m_mapTable != null)
{
Iterator<BaseTable> iterator = this.getTables();
while (iterator.hasNext())
{
BaseTable table = iterator.next();
if ((table != null) && (table != this.getNextTable()))
{... | [
"public",
"void",
"free",
"(",
")",
"{",
"if",
"(",
"m_mapTable",
"!=",
"null",
")",
"{",
"Iterator",
"<",
"BaseTable",
">",
"iterator",
"=",
"this",
".",
"getTables",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Ba... | Free this passthrutable and all linked tables in this chain. | [
"Free",
"this",
"passthrutable",
"and",
"all",
"linked",
"tables",
"in",
"this",
"chain",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L85-L111 |
152,569 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/PassThruTable.java | PassThruTable.close | public void close()
{
if (m_mapTable != null)
{
Iterator<BaseTable> iterator = this.getTables();
while (iterator.hasNext())
{
BaseTable table = iterator.next();
if ((table != null) && (table != this.getNextTable()))
... | java | public void close()
{
if (m_mapTable != null)
{
Iterator<BaseTable> iterator = this.getTables();
while (iterator.hasNext())
{
BaseTable table = iterator.next();
if ((table != null) && (table != this.getNextTable()))
... | [
"public",
"void",
"close",
"(",
")",
"{",
"if",
"(",
"m_mapTable",
"!=",
"null",
")",
"{",
"Iterator",
"<",
"BaseTable",
">",
"iterator",
"=",
"this",
".",
"getTables",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"B... | Close the all the recordsets in the list. | [
"Close",
"the",
"all",
"the",
"recordsets",
"in",
"the",
"list",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L164-L183 |
152,570 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/PassThruTable.java | PassThruTable.getTableAt | public BaseTable getTableAt(Object objKey)
{
if (m_mapTable != null)
if (objKey != null)
return (BaseTable)m_mapTable.get(objKey);
return null;
} | java | public BaseTable getTableAt(Object objKey)
{
if (m_mapTable != null)
if (objKey != null)
return (BaseTable)m_mapTable.get(objKey);
return null;
} | [
"public",
"BaseTable",
"getTableAt",
"(",
"Object",
"objKey",
")",
"{",
"if",
"(",
"m_mapTable",
"!=",
"null",
")",
"if",
"(",
"objKey",
"!=",
"null",
")",
"return",
"(",
"BaseTable",
")",
"m_mapTable",
".",
"get",
"(",
"objKey",
")",
";",
"return",
"n... | Get the table at this position in the table list.
@param iIndex The index to retrieve the table from.
@return The table at this location. | [
"Get",
"the",
"table",
"at",
"this",
"position",
"in",
"the",
"table",
"list",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L451-L457 |
152,571 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/PassThruTable.java | PassThruTable.addTable | public void addTable(Object objKey, BaseTable table)
{
if (m_mapTable == null)
m_mapTable = new Hashtable<Object,BaseTable>();
if (objKey == null)
objKey = new Integer(m_mapTable.size());
m_mapTable.put(objKey, table);
} | java | public void addTable(Object objKey, BaseTable table)
{
if (m_mapTable == null)
m_mapTable = new Hashtable<Object,BaseTable>();
if (objKey == null)
objKey = new Integer(m_mapTable.size());
m_mapTable.put(objKey, table);
} | [
"public",
"void",
"addTable",
"(",
"Object",
"objKey",
",",
"BaseTable",
"table",
")",
"{",
"if",
"(",
"m_mapTable",
"==",
"null",
")",
"m_mapTable",
"=",
"new",
"Hashtable",
"<",
"Object",
",",
"BaseTable",
">",
"(",
")",
";",
"if",
"(",
"objKey",
"==... | Add this record's table to the list of tables to pass commands to.
@param table The table to add. | [
"Add",
"this",
"record",
"s",
"table",
"to",
"the",
"list",
"of",
"tables",
"to",
"pass",
"commands",
"to",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L506-L513 |
152,572 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/PassThruTable.java | PassThruTable.removeTable | public boolean removeTable(BaseTable table)
{
if (m_mapTable != null)
{
for (Object objKey : m_mapTable.keySet())
{
if (table == m_mapTable.get(objKey))
{
return (m_mapTable.remove(objKey) != null);
} ... | java | public boolean removeTable(BaseTable table)
{
if (m_mapTable != null)
{
for (Object objKey : m_mapTable.keySet())
{
if (table == m_mapTable.get(objKey))
{
return (m_mapTable.remove(objKey) != null);
} ... | [
"public",
"boolean",
"removeTable",
"(",
"BaseTable",
"table",
")",
"{",
"if",
"(",
"m_mapTable",
"!=",
"null",
")",
"{",
"for",
"(",
"Object",
"objKey",
":",
"m_mapTable",
".",
"keySet",
"(",
")",
")",
"{",
"if",
"(",
"table",
"==",
"m_mapTable",
".",... | Remove this table from this table list.
@param table The table to remove. | [
"Remove",
"this",
"table",
"from",
"this",
"table",
"list",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L518-L536 |
152,573 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/PassThruTable.java | PassThruTable.getDatabase | public BaseDatabase getDatabase()
{
BaseDatabase database = super.getDatabase();
if (database == null)
if (this.getNextTable() != null)
database = this.getNextTable().getDatabase();
return database;
} | java | public BaseDatabase getDatabase()
{
BaseDatabase database = super.getDatabase();
if (database == null)
if (this.getNextTable() != null)
database = this.getNextTable().getDatabase();
return database;
} | [
"public",
"BaseDatabase",
"getDatabase",
"(",
")",
"{",
"BaseDatabase",
"database",
"=",
"super",
".",
"getDatabase",
"(",
")",
";",
"if",
"(",
"database",
"==",
"null",
")",
"if",
"(",
"this",
".",
"getNextTable",
"(",
")",
"!=",
"null",
")",
"database"... | Get the table's database.
@return The database for this table. | [
"Get",
"the",
"table",
"s",
"database",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L541-L548 |
152,574 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java | TopicPool.savePool | public boolean savePool() {
if (newTopicPool.isEmpty() && updatedTopicPool.isEmpty()) return true;
try {
// Save the new topics
if (!newTopicPool.isEmpty()) {
final CollectionWrapper<TopicWrapper> response = topicProvider.createTopics(newTopicPool);
... | java | public boolean savePool() {
if (newTopicPool.isEmpty() && updatedTopicPool.isEmpty()) return true;
try {
// Save the new topics
if (!newTopicPool.isEmpty()) {
final CollectionWrapper<TopicWrapper> response = topicProvider.createTopics(newTopicPool);
... | [
"public",
"boolean",
"savePool",
"(",
")",
"{",
"if",
"(",
"newTopicPool",
".",
"isEmpty",
"(",
")",
"&&",
"updatedTopicPool",
".",
"isEmpty",
"(",
")",
")",
"return",
"true",
";",
"try",
"{",
"// Save the new topics",
"if",
"(",
"!",
"newTopicPool",
".",
... | Saves all the topics in the pool to the database using the REST API.
@return True if all the topics in the pool were saved successfully,
otherwise false. | [
"Saves",
"all",
"the",
"topics",
"in",
"the",
"pool",
"to",
"the",
"database",
"using",
"the",
"REST",
"API",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java#L80-L108 |
152,575 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java | TopicPool.initialiseFromPool | public ITopicNode initialiseFromPool(final ITopicNode topicNode) {
if (initialised) {
if (newTopicPool != null && !newTopicPool.isEmpty()) {
for (final TopicWrapper topic : newTopicPool.getItems()) {
if (topic.getProperty(cspIdPropertyTagId) != null) {
... | java | public ITopicNode initialiseFromPool(final ITopicNode topicNode) {
if (initialised) {
if (newTopicPool != null && !newTopicPool.isEmpty()) {
for (final TopicWrapper topic : newTopicPool.getItems()) {
if (topic.getProperty(cspIdPropertyTagId) != null) {
... | [
"public",
"ITopicNode",
"initialiseFromPool",
"(",
"final",
"ITopicNode",
"topicNode",
")",
"{",
"if",
"(",
"initialised",
")",
"{",
"if",
"(",
"newTopicPool",
"!=",
"null",
"&&",
"!",
"newTopicPool",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"final"... | Initialises a content spec topic using the REST topics that exist
within this pool. The topic pool must be saved and initialised before
this call will work.
@param topicNode
@return | [
"Initialises",
"a",
"content",
"spec",
"topic",
"using",
"the",
"REST",
"topics",
"that",
"exist",
"within",
"this",
"pool",
".",
"The",
"topic",
"pool",
"must",
"be",
"saved",
"and",
"initialised",
"before",
"this",
"call",
"will",
"work",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java#L118-L142 |
152,576 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java | TopicPool.isEmpty | public boolean isEmpty() {
return (newTopicPool == null ? true : newTopicPool.isEmpty()) && (updatedTopicPool == null ? true : updatedTopicPool.isEmpty());
} | java | public boolean isEmpty() {
return (newTopicPool == null ? true : newTopicPool.isEmpty()) && (updatedTopicPool == null ? true : updatedTopicPool.isEmpty());
} | [
"public",
"boolean",
"isEmpty",
"(",
")",
"{",
"return",
"(",
"newTopicPool",
"==",
"null",
"?",
"true",
":",
"newTopicPool",
".",
"isEmpty",
"(",
")",
")",
"&&",
"(",
"updatedTopicPool",
"==",
"null",
"?",
"true",
":",
"updatedTopicPool",
".",
"isEmpty",
... | Checks to see if the topic pool is empty.
@return True if the pool is empty otherwise false. | [
"Checks",
"to",
"see",
"if",
"the",
"topic",
"pool",
"is",
"empty",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java#L159-L161 |
152,577 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java | TopicPool.rollbackPool | public void rollbackPool() {
if (newTopicPool == null || newTopicPool.isEmpty()) return;
final List<Integer> topicIds = new ArrayList<Integer>();
for (final TopicWrapper topic : newTopicPool.getItems()) {
topicIds.add(topic.getTopicId());
}
try {
topicProv... | java | public void rollbackPool() {
if (newTopicPool == null || newTopicPool.isEmpty()) return;
final List<Integer> topicIds = new ArrayList<Integer>();
for (final TopicWrapper topic : newTopicPool.getItems()) {
topicIds.add(topic.getTopicId());
}
try {
topicProv... | [
"public",
"void",
"rollbackPool",
"(",
")",
"{",
"if",
"(",
"newTopicPool",
"==",
"null",
"||",
"newTopicPool",
".",
"isEmpty",
"(",
")",
")",
"return",
";",
"final",
"List",
"<",
"Integer",
">",
"topicIds",
"=",
"new",
"ArrayList",
"<",
"Integer",
">",
... | Rolls back any new topics that were created. Since existing topics are stored
in revision data when edited we can't roll back that data properly. | [
"Rolls",
"back",
"any",
"new",
"topics",
"that",
"were",
"created",
".",
"Since",
"existing",
"topics",
"are",
"stored",
"in",
"revision",
"data",
"when",
"edited",
"we",
"can",
"t",
"roll",
"back",
"that",
"data",
"properly",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/TopicPool.java#L167-L180 |
152,578 | jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBaseMenuScreen.java | XBaseMenuScreen.getStylesheetName | public String getStylesheetName()
{
if (this.getProperty(DBParams.HELP) != null)
return "menuhelp";
else if (this.getProperty(DBParams.STYLESHEET) != null)
return this.getProperty(DBParams.STYLESHEET);
else
return "menus";
} | java | public String getStylesheetName()
{
if (this.getProperty(DBParams.HELP) != null)
return "menuhelp";
else if (this.getProperty(DBParams.STYLESHEET) != null)
return this.getProperty(DBParams.STYLESHEET);
else
return "menus";
} | [
"public",
"String",
"getStylesheetName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getProperty",
"(",
"DBParams",
".",
"HELP",
")",
"!=",
"null",
")",
"return",
"\"menuhelp\"",
";",
"else",
"if",
"(",
"this",
".",
"getProperty",
"(",
"DBParams",
".",
"STYL... | Get the name of the stylesheet. | [
"Get",
"the",
"name",
"of",
"the",
"stylesheet",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBaseMenuScreen.java#L69-L77 |
152,579 | mlhartme/jasmin | src/main/java/net/oneandone/jasmin/cache/Cache.java | Cache.probe | public synchronized V probe(K key) {
Item<V> item;
item = items.get(key);
return item == null ? null : item.value;
} | java | public synchronized V probe(K key) {
Item<V> item;
item = items.get(key);
return item == null ? null : item.value;
} | [
"public",
"synchronized",
"V",
"probe",
"(",
"K",
"key",
")",
"{",
"Item",
"<",
"V",
">",
"item",
";",
"item",
"=",
"items",
".",
"get",
"(",
"key",
")",
";",
"return",
"item",
"==",
"null",
"?",
"null",
":",
"item",
".",
"value",
";",
"}"
] | lookup without stats | [
"lookup",
"without",
"stats"
] | 1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d | https://github.com/mlhartme/jasmin/blob/1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d/src/main/java/net/oneandone/jasmin/cache/Cache.java#L85-L90 |
152,580 | js-lib-com/commons | src/main/java/js/lang/LooperThread.java | LooperThread.wait | private static void wait(Object lock, int timeout)
{
try {
lock.wait(timeout);
}
catch(InterruptedException unused) {
Thread.currentThread().interrupt();
}
} | java | private static void wait(Object lock, int timeout)
{
try {
lock.wait(timeout);
}
catch(InterruptedException unused) {
Thread.currentThread().interrupt();
}
} | [
"private",
"static",
"void",
"wait",
"(",
"Object",
"lock",
",",
"int",
"timeout",
")",
"{",
"try",
"{",
"lock",
".",
"wait",
"(",
"timeout",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"unused",
")",
"{",
"Thread",
".",
"currentThread",
"(",
... | Wait notification on synchronized object for specified period of time. If timeout is zero this method blocks till
notification arrive.
@param lock synchronized object to wait on, possible zero,
@param timeout timeout in milliseconds. | [
"Wait",
"notification",
"on",
"synchronized",
"object",
"for",
"specified",
"period",
"of",
"time",
".",
"If",
"timeout",
"is",
"zero",
"this",
"method",
"blocks",
"till",
"notification",
"arrive",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/LooperThread.java#L299-L307 |
152,581 | GII/broccoli | broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/profile/functionality/OWLSAtomicService.java | OWLSAtomicService.executeWithInputs | @Override
public synchronized Collection<IResult> executeWithInputs(Collection<IInputValue> inputs) throws ModelException
{
if (!hasGrounding())
{
return null;
}
ValueMap<Output, OWLValue> returnedOutputs;
try
{
returnedOutputs = executionE... | java | @Override
public synchronized Collection<IResult> executeWithInputs(Collection<IInputValue> inputs) throws ModelException
{
if (!hasGrounding())
{
return null;
}
ValueMap<Output, OWLValue> returnedOutputs;
try
{
returnedOutputs = executionE... | [
"@",
"Override",
"public",
"synchronized",
"Collection",
"<",
"IResult",
">",
"executeWithInputs",
"(",
"Collection",
"<",
"IInputValue",
">",
"inputs",
")",
"throws",
"ModelException",
"{",
"if",
"(",
"!",
"hasGrounding",
"(",
")",
")",
"{",
"return",
"null",... | Executes the handled OWL-S service, given a list of inputs as IParameter
@param inputs
@return
@throws ModelException | [
"Executes",
"the",
"handled",
"OWL",
"-",
"S",
"service",
"given",
"a",
"list",
"of",
"inputs",
"as",
"IParameter"
] | a3033a90322cbcee4dc0f1719143b84b822bc4ba | https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/profile/functionality/OWLSAtomicService.java#L164-L184 |
152,582 | GII/broccoli | broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/profile/functionality/OWLSAtomicService.java | OWLSAtomicService.fromParameterInputs | private static ValueMap<Input, OWLValue> fromParameterInputs(Process process, Collection<IInputValue> parameters) throws ModelException
{
if (parameters.isEmpty())
{
return null;
}
ValueMap<Input, OWLValue> valueMap = new ValueMap<Input, OWLValue>();
for (IInputVa... | java | private static ValueMap<Input, OWLValue> fromParameterInputs(Process process, Collection<IInputValue> parameters) throws ModelException
{
if (parameters.isEmpty())
{
return null;
}
ValueMap<Input, OWLValue> valueMap = new ValueMap<Input, OWLValue>();
for (IInputVa... | [
"private",
"static",
"ValueMap",
"<",
"Input",
",",
"OWLValue",
">",
"fromParameterInputs",
"(",
"Process",
"process",
",",
"Collection",
"<",
"IInputValue",
">",
"parameters",
")",
"throws",
"ModelException",
"{",
"if",
"(",
"parameters",
".",
"isEmpty",
"(",
... | Translates a list of IParameter to a collection of Input,OWLValue
@param process
@param parameters
@return | [
"Translates",
"a",
"list",
"of",
"IParameter",
"to",
"a",
"collection",
"of",
"Input",
"OWLValue"
] | a3033a90322cbcee4dc0f1719143b84b822bc4ba | https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/profile/functionality/OWLSAtomicService.java#L258-L272 |
152,583 | GII/broccoli | broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/profile/functionality/OWLSAtomicService.java | OWLSAtomicService.valuesToParameters | private synchronized Collection<IResult> valuesToParameters(Process process, ValueMap<Output, OWLValue> values) throws NotYetImplementedException, OWLTranslationException
{
if (values.isEmpty())
{
return null;
}
Collection<IResult> parameters = new ArrayList<IResult>();
... | java | private synchronized Collection<IResult> valuesToParameters(Process process, ValueMap<Output, OWLValue> values) throws NotYetImplementedException, OWLTranslationException
{
if (values.isEmpty())
{
return null;
}
Collection<IResult> parameters = new ArrayList<IResult>();
... | [
"private",
"synchronized",
"Collection",
"<",
"IResult",
">",
"valuesToParameters",
"(",
"Process",
"process",
",",
"ValueMap",
"<",
"Output",
",",
"OWLValue",
">",
"values",
")",
"throws",
"NotYetImplementedException",
",",
"OWLTranslationException",
"{",
"if",
"("... | Translates a collection of Output,OWLvalue to a list of IParameter
@param process
@param values
@return
@throws NotYetImplementedException
@throws OWLTranslationException | [
"Translates",
"a",
"collection",
"of",
"Output",
"OWLvalue",
"to",
"a",
"list",
"of",
"IParameter"
] | a3033a90322cbcee4dc0f1719143b84b822bc4ba | https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/profile/functionality/OWLSAtomicService.java#L283-L337 |
152,584 | jbundle/jbundle | app/program/screen/src/main/java/org/jbundle/app/program/resource/screen/WriteResources.java | WriteResources.writeDetailLine | public void writeDetailLine(Record registration, StreamOut out, boolean bResourceListBundle)
{
String strKey = registration.getField(Registration.KEY_VALUE).toString();
String strValue = registration.getField(Registration.OBJECT_VALUE).toString();
strValue = ResourcesUtilities.fixPropertyVal... | java | public void writeDetailLine(Record registration, StreamOut out, boolean bResourceListBundle)
{
String strKey = registration.getField(Registration.KEY_VALUE).toString();
String strValue = registration.getField(Registration.OBJECT_VALUE).toString();
strValue = ResourcesUtilities.fixPropertyVal... | [
"public",
"void",
"writeDetailLine",
"(",
"Record",
"registration",
",",
"StreamOut",
"out",
",",
"boolean",
"bResourceListBundle",
")",
"{",
"String",
"strKey",
"=",
"registration",
".",
"getField",
"(",
"Registration",
".",
"KEY_VALUE",
")",
".",
"toString",
"... | WriteDetailLine Method. | [
"WriteDetailLine",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/screen/src/main/java/org/jbundle/app/program/resource/screen/WriteResources.java#L165-L174 |
152,585 | jbundle/jbundle | app/program/screen/src/main/java/org/jbundle/app/program/resource/screen/WriteResources.java | WriteResources.createFile | public StreamOut createFile(String strFullFileName)
{
StreamOut streamOut = null;
try {
File file = new File(strFullFileName);
String pathName = file.getParent();
File fileDir = new File(pathName);
fileDir.mkdirs();
streamOut = new Stream... | java | public StreamOut createFile(String strFullFileName)
{
StreamOut streamOut = null;
try {
File file = new File(strFullFileName);
String pathName = file.getParent();
File fileDir = new File(pathName);
fileDir.mkdirs();
streamOut = new Stream... | [
"public",
"StreamOut",
"createFile",
"(",
"String",
"strFullFileName",
")",
"{",
"StreamOut",
"streamOut",
"=",
"null",
";",
"try",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"strFullFileName",
")",
";",
"String",
"pathName",
"=",
"file",
".",
"getParent"... | CreateFile Method. | [
"CreateFile",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/screen/src/main/java/org/jbundle/app/program/resource/screen/WriteResources.java#L237-L251 |
152,586 | jbundle/jbundle | app/program/screen/src/main/java/org/jbundle/app/program/resource/screen/WriteResources.java | WriteResources.getStartSourceCode | public String getStartSourceCode(String packagePath, String strFileName, String strDescription, boolean bResourceListBundle)
{
String string;
if (bResourceListBundle)
{
string =
"package " + packagePath + ";\n"
+ "/**\n"
+ " * @(#)"... | java | public String getStartSourceCode(String packagePath, String strFileName, String strDescription, boolean bResourceListBundle)
{
String string;
if (bResourceListBundle)
{
string =
"package " + packagePath + ";\n"
+ "/**\n"
+ " * @(#)"... | [
"public",
"String",
"getStartSourceCode",
"(",
"String",
"packagePath",
",",
"String",
"strFileName",
",",
"String",
"strDescription",
",",
"boolean",
"bResourceListBundle",
")",
"{",
"String",
"string",
";",
"if",
"(",
"bResourceListBundle",
")",
"{",
"string",
"... | GetStartSourceCode Method. | [
"GetStartSourceCode",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/screen/src/main/java/org/jbundle/app/program/resource/screen/WriteResources.java#L255-L283 |
152,587 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java | BaseDatabase.free | public void free()
{
this.close();
while (m_vTableList.size() > 0)
{
BaseTable table = m_vTableList.elementAt(0);
table.free();
}
m_vTableList.removeAllElements();
m_vTableList = null;
if (m_databaseOwner != null)
m_databa... | java | public void free()
{
this.close();
while (m_vTableList.size() > 0)
{
BaseTable table = m_vTableList.elementAt(0);
table.free();
}
m_vTableList.removeAllElements();
m_vTableList = null;
if (m_databaseOwner != null)
m_databa... | [
"public",
"void",
"free",
"(",
")",
"{",
"this",
".",
"close",
"(",
")",
";",
"while",
"(",
"m_vTableList",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"BaseTable",
"table",
"=",
"m_vTableList",
".",
"elementAt",
"(",
"0",
")",
";",
"table",
".",
... | Free this database object. | [
"Free",
"this",
"database",
"object",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java#L129-L144 |
152,588 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java | BaseDatabase.doMakeTable | public BaseTable doMakeTable(Record record)
{
if (((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.MEMORY)
|| ((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.UNSHAREABLE_MEMORY))
{
BaseDatabase database = (BaseDatabase)this.getDat... | java | public BaseTable doMakeTable(Record record)
{
if (((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.MEMORY)
|| ((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.UNSHAREABLE_MEMORY))
{
BaseDatabase database = (BaseDatabase)this.getDat... | [
"public",
"BaseTable",
"doMakeTable",
"(",
"Record",
"record",
")",
"{",
"if",
"(",
"(",
"(",
"record",
".",
"getDatabaseType",
"(",
")",
"&",
"DBConstants",
".",
"TABLE_TYPE_MASK",
")",
"==",
"DBConstants",
".",
"MEMORY",
")",
"||",
"(",
"(",
"record",
... | You must override this to make a table for this database.
Always override this method.
@param record The record to make a table for.
@return BaseTable The new table. | [
"You",
"must",
"override",
"this",
"to",
"make",
"a",
"table",
"for",
"this",
"database",
".",
"Always",
"override",
"this",
"method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java#L338-L348 |
152,589 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java | BaseDatabase.retrieveUserProperties | public PropertyOwner retrieveUserProperties(String strRegistrationKey)
{
if (m_properties != null)
if (m_properties.get(strRegistrationKey) != null)
return this;
return m_databaseOwner.retrieveUserProperties(strRegistrationKey);
} | java | public PropertyOwner retrieveUserProperties(String strRegistrationKey)
{
if (m_properties != null)
if (m_properties.get(strRegistrationKey) != null)
return this;
return m_databaseOwner.retrieveUserProperties(strRegistrationKey);
} | [
"public",
"PropertyOwner",
"retrieveUserProperties",
"(",
"String",
"strRegistrationKey",
")",
"{",
"if",
"(",
"m_properties",
"!=",
"null",
")",
"if",
"(",
"m_properties",
".",
"get",
"(",
"strRegistrationKey",
")",
"!=",
"null",
")",
"return",
"this",
";",
"... | Get the owner of this property key.
@param strPropertyCode The key I'm looking for the owner to.
@return The owner of this property key. | [
"Get",
"the",
"owner",
"of",
"this",
"property",
"key",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java#L510-L516 |
152,590 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java | BaseDatabase.addDBProperties | public static Map<String,Object> addDBProperties(Map<String,Object> properties, PropertyOwner propertyOwner, Map<String,Object> otherProperties)
{
if (properties == null)
properties = new Hashtable<String,Object>();
BaseDatabase.addDBProperty(properties, propertyOwner, otherProperties, D... | java | public static Map<String,Object> addDBProperties(Map<String,Object> properties, PropertyOwner propertyOwner, Map<String,Object> otherProperties)
{
if (properties == null)
properties = new Hashtable<String,Object>();
BaseDatabase.addDBProperty(properties, propertyOwner, otherProperties, D... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"addDBProperties",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
",",
"PropertyOwner",
"propertyOwner",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"otherProperties",
")",
"{",
... | Since only the DB properties are passed down to the server,
make sure any global properties that pertain to databases are passed down also.
@param properties The properties object to add these properties to.
@param propertyOwner Look here for db properties
@param otherProperties to look for db properties in | [
"Since",
"only",
"the",
"DB",
"properties",
"are",
"passed",
"down",
"to",
"the",
"server",
"make",
"sure",
"any",
"global",
"properties",
"that",
"pertain",
"to",
"databases",
"are",
"passed",
"down",
"also",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java#L571-L606 |
152,591 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java | BaseDatabase.setupDatabaseProperties | public boolean setupDatabaseProperties()
{
if (this.getProperty(DB_PROPERTIES_LOADED) != null)
return true; // Already setup
String strDatabaseName = this.getDatabaseName(true);
Environment env = (Environment)this.getDatabaseOwner().getEnvironment();
Map<String,String... | java | public boolean setupDatabaseProperties()
{
if (this.getProperty(DB_PROPERTIES_LOADED) != null)
return true; // Already setup
String strDatabaseName = this.getDatabaseName(true);
Environment env = (Environment)this.getDatabaseOwner().getEnvironment();
Map<String,String... | [
"public",
"boolean",
"setupDatabaseProperties",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getProperty",
"(",
"DB_PROPERTIES_LOADED",
")",
"!=",
"null",
")",
"return",
"true",
";",
"// Already setup",
"String",
"strDatabaseName",
"=",
"this",
".",
"getDatabaseName",
... | Given the name of the database, get the properties file and optionally merge them with my current properties.
@param strDatabaseName The name of the database engine (as returned in the meta call).
@return The ResourceBundle with all the database properties. | [
"Given",
"the",
"name",
"of",
"the",
"database",
"get",
"the",
"properties",
"file",
"and",
"optionally",
"merge",
"them",
"with",
"my",
"current",
"properties",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java#L672-L708 |
152,592 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java | BaseDatabase.returnBaseTable | public BaseTable returnBaseTable(BaseTable table)
{
Record record = table.getRecord();
int iRawDBType = (record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK);
if ((iRawDBType == DBConstants.LOCAL)
|| (iRawDBType == DBConstants.REMOTE) || (iRawDBType == DBConstants.TABLE))
... | java | public BaseTable returnBaseTable(BaseTable table)
{
Record record = table.getRecord();
int iRawDBType = (record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK);
if ((iRawDBType == DBConstants.LOCAL)
|| (iRawDBType == DBConstants.REMOTE) || (iRawDBType == DBConstants.TABLE))
... | [
"public",
"BaseTable",
"returnBaseTable",
"(",
"BaseTable",
"table",
")",
"{",
"Record",
"record",
"=",
"table",
".",
"getRecord",
"(",
")",
";",
"int",
"iRawDBType",
"=",
"(",
"record",
".",
"getDatabaseType",
"(",
")",
"&",
"DBConstants",
".",
"TABLE_TYPE_... | Return the base table for this record.
This is very specialized logic for exporting and importing only the base file.
Further, this logic will return the localized version of the file if language=xxx is set for the client.
@param table The record's initial table
@return The base table. | [
"Return",
"the",
"base",
"table",
"for",
"this",
"record",
".",
"This",
"is",
"very",
"specialized",
"logic",
"for",
"exporting",
"and",
"importing",
"only",
"the",
"base",
"file",
".",
"Further",
"this",
"logic",
"will",
"return",
"the",
"localized",
"versi... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java#L726-L746 |
152,593 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/RingBuffer.java | RingBuffer.updated | protected void updated()
{
if (remaining < 0 && remaining > capacity)
{
throw new IllegalArgumentException(remaining+" illegal remaining at %s"+toString());
}
if (marked < 0 && marked > capacity)
{
throw new IllegalArgumentException(marked+" il... | java | protected void updated()
{
if (remaining < 0 && remaining > capacity)
{
throw new IllegalArgumentException(remaining+" illegal remaining at %s"+toString());
}
if (marked < 0 && marked > capacity)
{
throw new IllegalArgumentException(marked+" il... | [
"protected",
"void",
"updated",
"(",
")",
"{",
"if",
"(",
"remaining",
"<",
"0",
"&&",
"remaining",
">",
"capacity",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"remaining",
"+",
"\" illegal remaining at %s\"",
"+",
"toString",
"(",
")",
")",
... | This method is called after some parameters like marked are updated. | [
"This",
"method",
"is",
"called",
"after",
"some",
"parameters",
"like",
"marked",
"are",
"updated",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/RingBuffer.java#L193-L203 |
152,594 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/RingBuffer.java | RingBuffer.writeTo | protected int writeTo(SparseBufferOperator<B> op, Splitter<SparseBufferOperator<B>> splitter, int start, int length) throws IOException
{
return splitter.split(op, start, length);
} | java | protected int writeTo(SparseBufferOperator<B> op, Splitter<SparseBufferOperator<B>> splitter, int start, int length) throws IOException
{
return splitter.split(op, start, length);
} | [
"protected",
"int",
"writeTo",
"(",
"SparseBufferOperator",
"<",
"B",
">",
"op",
",",
"Splitter",
"<",
"SparseBufferOperator",
"<",
"B",
">",
">",
"splitter",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"return",
"splitter",... | Write buffers content from start
@param op
@param splitter
@param start
@param length
@return
@throws IOException | [
"Write",
"buffers",
"content",
"from",
"start"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/RingBuffer.java#L283-L286 |
152,595 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/RingBuffer.java | RingBuffer.getString | public String getString()
{
StringBuilder sb = new StringBuilder();
for (int ii=0;ii<marked;ii++)
{
sb.append(charAt(ii));
}
return sb.toString();
} | java | public String getString()
{
StringBuilder sb = new StringBuilder();
for (int ii=0;ii<marked;ii++)
{
sb.append(charAt(ii));
}
return sb.toString();
} | [
"public",
"String",
"getString",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"ii",
"=",
"0",
";",
"ii",
"<",
"marked",
";",
"ii",
"++",
")",
"{",
"sb",
".",
"append",
"(",
"charAt",
"(",
"i... | Returns input between discard and position as a string
@return | [
"Returns",
"input",
"between",
"discard",
"and",
"position",
"as",
"a",
"string"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/RingBuffer.java#L311-L319 |
152,596 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/RingBuffer.java | RingBuffer.subSequence | @Override
public CharSequence subSequence(int start, int end)
{
StringBuilder sb = new StringBuilder();
for (int ii=start;ii<end;ii++)
{
sb.append((char)getAt(ii));
}
return sb.toString();
} | java | @Override
public CharSequence subSequence(int start, int end)
{
StringBuilder sb = new StringBuilder();
for (int ii=start;ii<end;ii++)
{
sb.append((char)getAt(ii));
}
return sb.toString();
} | [
"@",
"Override",
"public",
"CharSequence",
"subSequence",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"ii",
"=",
"start",
";",
"ii",
"<",
"end",
";",
"ii",
"+... | Note that implementation uses StringBuilder to create String as CharSequence.
@param start
@param end
@return | [
"Note",
"that",
"implementation",
"uses",
"StringBuilder",
"to",
"create",
"String",
"as",
"CharSequence",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/RingBuffer.java#L344-L353 |
152,597 | jbundle/jbundle | base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/report/HDualReportScreen.java | HDualReportScreen.printHtmlNavMenu | public void printHtmlNavMenu(PrintWriter out)
throws DBException
{
String strForms = this.getProperty(HtmlConstants.FORMS); // Html page
if (strForms != null) if (strForms.equalsIgnoreCase(HtmlConstants.DISPLAY))
((BasePanel)this.getScreenField()).setProperty(DBPar... | java | public void printHtmlNavMenu(PrintWriter out)
throws DBException
{
String strForms = this.getProperty(HtmlConstants.FORMS); // Html page
if (strForms != null) if (strForms.equalsIgnoreCase(HtmlConstants.DISPLAY))
((BasePanel)this.getScreenField()).setProperty(DBPar... | [
"public",
"void",
"printHtmlNavMenu",
"(",
"PrintWriter",
"out",
")",
"throws",
"DBException",
"{",
"String",
"strForms",
"=",
"this",
".",
"getProperty",
"(",
"HtmlConstants",
".",
"FORMS",
")",
";",
"// Html page",
"if",
"(",
"strForms",
"!=",
"null",
")",
... | Code to display a Menu.
Skip Nav menu for reports.
@exception DBException File exception. | [
"Code",
"to",
"display",
"a",
"Menu",
".",
"Skip",
"Nav",
"menu",
"for",
"reports",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/report/HDualReportScreen.java#L74-L82 |
152,598 | jbundle/jbundle | base/screen/model/src/main/java/org/jbundle/base/screen/model/menu/SBaseMenuBar.java | SBaseMenuBar.getString | public String getString(String strKey)
{
if (m_resources == null)
{
BaseApplication application = (BaseApplication)this.getTask().getApplication();
m_resources = application.getResources(ResourceConstants.MENU_RESOURCE, true);
}
return m_resources.getString(st... | java | public String getString(String strKey)
{
if (m_resources == null)
{
BaseApplication application = (BaseApplication)this.getTask().getApplication();
m_resources = application.getResources(ResourceConstants.MENU_RESOURCE, true);
}
return m_resources.getString(st... | [
"public",
"String",
"getString",
"(",
"String",
"strKey",
")",
"{",
"if",
"(",
"m_resources",
"==",
"null",
")",
"{",
"BaseApplication",
"application",
"=",
"(",
"BaseApplication",
")",
"this",
".",
"getTask",
"(",
")",
".",
"getApplication",
"(",
")",
";"... | Get the Menu resource object.
@param strKey The key to lookup.
@return The local string. | [
"Get",
"the",
"Menu",
"resource",
"object",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/menu/SBaseMenuBar.java#L132-L140 |
152,599 | inkstand-io/scribble | scribble-inject/src/main/java/io/inkstand/scribble/inject/ResourceInjection.java | ResourceInjection.matchesResourceAnnotation | private boolean matchesResourceAnnotation(final Resource resourceAnnotation) {
for (final Resource expectedResources : this.matchingResources) {
if (expectedResources.equals(resourceAnnotation)) {
return true;
}
}
return false;
} | java | private boolean matchesResourceAnnotation(final Resource resourceAnnotation) {
for (final Resource expectedResources : this.matchingResources) {
if (expectedResources.equals(resourceAnnotation)) {
return true;
}
}
return false;
} | [
"private",
"boolean",
"matchesResourceAnnotation",
"(",
"final",
"Resource",
"resourceAnnotation",
")",
"{",
"for",
"(",
"final",
"Resource",
"expectedResources",
":",
"this",
".",
"matchingResources",
")",
"{",
"if",
"(",
"expectedResources",
".",
"equals",
"(",
... | Verifies, if the specified resource annotation matches any of the resource specification for this injection.
@param resourceAnnotation
the resource annotation of a potential injection target field
@return
<code>true</code> if any of the resource specifications of this injection matches the field | [
"Verifies",
"if",
"the",
"specified",
"resource",
"annotation",
"matches",
"any",
"of",
"the",
"resource",
"specification",
"for",
"this",
"injection",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-inject/src/main/java/io/inkstand/scribble/inject/ResourceInjection.java#L118-L126 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.