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
151,500
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java
HBasePanel.printHtmlHeader
public void printHtmlHeader(PrintWriter out, String strTitle, String strHTMLStart, String strHTMLEnd) { if ((strHTMLStart == null) || (strHTMLStart.length() == 0)) strHTMLStart = "<html>\n" + "<head>\n" + "<link rel=\"stylesheet\" type=\"text/css\" href=\"org/jbun...
java
public void printHtmlHeader(PrintWriter out, String strTitle, String strHTMLStart, String strHTMLEnd) { if ((strHTMLStart == null) || (strHTMLStart.length() == 0)) strHTMLStart = "<html>\n" + "<head>\n" + "<link rel=\"stylesheet\" type=\"text/css\" href=\"org/jbun...
[ "public", "void", "printHtmlHeader", "(", "PrintWriter", "out", ",", "String", "strTitle", ",", "String", "strHTMLStart", ",", "String", "strHTMLEnd", ")", "{", "if", "(", "(", "strHTMLStart", "==", "null", ")", "||", "(", "strHTMLStart", ".", "length", "(",...
Default Form Header. @param out The html out stream. @param strTitle The screen title. @param strHTMLStart The start HTML. @param strHTMLEnd The ending HTML.
[ "Default", "Form", "Header", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L466-L500
151,501
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java
HBasePanel.writeHtmlString
public void writeHtmlString(String strHTML, PrintWriter out) { int iIndex; if (strHTML == null) return; while ((iIndex = strHTML.indexOf(HtmlConstants.TITLE_TAG)) != -1) { // ** FIX THIS to look for a <xxx/> and look up the token ** strHTML = strHTML.substri...
java
public void writeHtmlString(String strHTML, PrintWriter out) { int iIndex; if (strHTML == null) return; while ((iIndex = strHTML.indexOf(HtmlConstants.TITLE_TAG)) != -1) { // ** FIX THIS to look for a <xxx/> and look up the token ** strHTML = strHTML.substri...
[ "public", "void", "writeHtmlString", "(", "String", "strHTML", ",", "PrintWriter", "out", ")", "{", "int", "iIndex", ";", "if", "(", "strHTML", "==", "null", ")", "return", ";", "while", "(", "(", "iIndex", "=", "strHTML", ".", "indexOf", "(", "HtmlConst...
Parse the HTML for variables and print it. @param strHTML the html string to output. @param out The html out stream.
[ "Parse", "the", "HTML", "for", "variables", "and", "print", "it", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L610-L620
151,502
tvesalainen/util
util/src/main/java/org/vesalainen/io/CompressedOutput.java
CompressedOutput.write
public float write() throws IOException { bitArray.setAll(false); for (int ii=0;ii<bytes;ii++) { bitArray.set(ii, bb1.get(ii) != bb2.get(ii)); } if (!bitArray.any()) { return 0; } if (!bitArray.and(selfImportantArray)...
java
public float write() throws IOException { bitArray.setAll(false); for (int ii=0;ii<bytes;ii++) { bitArray.set(ii, bb1.get(ii) != bb2.get(ii)); } if (!bitArray.any()) { return 0; } if (!bitArray.and(selfImportantArray)...
[ "public", "float", "write", "(", ")", "throws", "IOException", "{", "bitArray", ".", "setAll", "(", "false", ")", ";", "for", "(", "int", "ii", "=", "0", ";", "ii", "<", "bytes", ";", "ii", "++", ")", "{", "bitArray", ".", "set", "(", "ii", ",", ...
Writes objects fields to stream @return Compression rate @throws IOException
[ "Writes", "objects", "fields", "to", "stream" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/io/CompressedOutput.java#L53-L99
151,503
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.getRoles
@Override public String[] getRoles(String username) { if (user_list.containsKey(username)) { return user_list.get(username).toArray(new String[0]); } else { if (defaultRoles == null) { return new String[0]; } else { return defaultRoles; } } }
java
@Override public String[] getRoles(String username) { if (user_list.containsKey(username)) { return user_list.get(username).toArray(new String[0]); } else { if (defaultRoles == null) { return new String[0]; } else { return defaultRoles; } } }
[ "@", "Override", "public", "String", "[", "]", "getRoles", "(", "String", "username", ")", "{", "if", "(", "user_list", ".", "containsKey", "(", "username", ")", ")", "{", "return", "user_list", ".", "get", "(", "username", ")", ".", "toArray", "(", "n...
Find and return all roles this user has. @param username The username of the user. @return An array of role names (String).
[ "Find", "and", "return", "all", "roles", "this", "user", "has", "." ]
5f75f802a92ef907acf030692d462aec4b4d3aae
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L239-L250
151,504
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.getUsersInRole
@Override public String[] getUsersInRole(String role) { if (role_list.containsKey(role)) { return role_list.get(role).toArray(new String[0]); } else { return new String[0]; } }
java
@Override public String[] getUsersInRole(String role) { if (role_list.containsKey(role)) { return role_list.get(role).toArray(new String[0]); } else { return new String[0]; } }
[ "@", "Override", "public", "String", "[", "]", "getUsersInRole", "(", "String", "role", ")", "{", "if", "(", "role_list", ".", "containsKey", "(", "role", ")", ")", "{", "return", "role_list", ".", "get", "(", "role", ")", ".", "toArray", "(", "new", ...
Returns a list of users who have a particular role. @param role The role to search for. @return An array of usernames (String) that have that role.
[ "Returns", "a", "list", "of", "users", "who", "have", "a", "particular", "role", "." ]
5f75f802a92ef907acf030692d462aec4b4d3aae
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L259-L266
151,505
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.setRole
@Override public void setRole(String username, String newrole) throws RolesException { List<String> users_with_role = new ArrayList<String>(); if (user_list.containsKey(username)) { List<String> roles_of_user = user_list.get(username); if (!roles_of_user.contains(newrole)) { // Update our user list ...
java
@Override public void setRole(String username, String newrole) throws RolesException { List<String> users_with_role = new ArrayList<String>(); if (user_list.containsKey(username)) { List<String> roles_of_user = user_list.get(username); if (!roles_of_user.contains(newrole)) { // Update our user list ...
[ "@", "Override", "public", "void", "setRole", "(", "String", "username", ",", "String", "newrole", ")", "throws", "RolesException", "{", "List", "<", "String", ">", "users_with_role", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "(", ...
Assign a role to a user. @param username The username of the user. @param newrole The new role to assign the user. @throws RolesException if there was an error during assignment.
[ "Assign", "a", "role", "to", "a", "user", "." ]
5f75f802a92ef907acf030692d462aec4b4d3aae
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L289-L325
151,506
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.removeRole
@Override public void removeRole(String username, String oldrole) throws RolesException { List<String> users_with_role = new ArrayList<String>(); if (user_list.containsKey(username)) { List<String> roles_of_user = user_list.get(username); if (roles_of_user.contains(oldrole)) { // Update our user list ...
java
@Override public void removeRole(String username, String oldrole) throws RolesException { List<String> users_with_role = new ArrayList<String>(); if (user_list.containsKey(username)) { List<String> roles_of_user = user_list.get(username); if (roles_of_user.contains(oldrole)) { // Update our user list ...
[ "@", "Override", "public", "void", "removeRole", "(", "String", "username", ",", "String", "oldrole", ")", "throws", "RolesException", "{", "List", "<", "String", ">", "users_with_role", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "("...
Remove a role from a user. @param username The username of the user. @param oldrole The role to remove from the user. @throws RolesException if there was an error during removal.
[ "Remove", "a", "role", "from", "a", "user", "." ]
5f75f802a92ef907acf030692d462aec4b4d3aae
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L337-L373
151,507
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.deleteRole
@Override public void deleteRole(String rolename) throws RolesException { if (role_list.containsKey(rolename)) { List<String> users_with_role = role_list.get(rolename); for (String user : users_with_role) { // Remove the role from this user List<String> roles_of_user = user_list.get(user); roles_of...
java
@Override public void deleteRole(String rolename) throws RolesException { if (role_list.containsKey(rolename)) { List<String> users_with_role = role_list.get(rolename); for (String user : users_with_role) { // Remove the role from this user List<String> roles_of_user = user_list.get(user); roles_of...
[ "@", "Override", "public", "void", "deleteRole", "(", "String", "rolename", ")", "throws", "RolesException", "{", "if", "(", "role_list", ".", "containsKey", "(", "rolename", ")", ")", "{", "List", "<", "String", ">", "users_with_role", "=", "role_list", "."...
Delete a role. @param rolename The name of the role to delete. @throws RolesException if there was an error during deletion.
[ "Delete", "a", "role", "." ]
5f75f802a92ef907acf030692d462aec4b4d3aae
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L397-L423
151,508
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.renameRole
@Override public void renameRole(String oldrole, String newrole) throws RolesException { if (role_list.containsKey(oldrole)) { List<String> users_with_role = role_list.get(oldrole); for (String user : users_with_role) { // Remove the role from this user List<String> roles_of_user = user_list.get(user);...
java
@Override public void renameRole(String oldrole, String newrole) throws RolesException { if (role_list.containsKey(oldrole)) { List<String> users_with_role = role_list.get(oldrole); for (String user : users_with_role) { // Remove the role from this user List<String> roles_of_user = user_list.get(user);...
[ "@", "Override", "public", "void", "renameRole", "(", "String", "oldrole", ",", "String", "newrole", ")", "throws", "RolesException", "{", "if", "(", "role_list", ".", "containsKey", "(", "oldrole", ")", ")", "{", "List", "<", "String", ">", "users_with_role...
Rename a role. @param oldrole The name role currently has. @param newrole The name role is changing to. @throws RolesException if there was an error during rename.
[ "Rename", "a", "role", "." ]
5f75f802a92ef907acf030692d462aec4b4d3aae
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L435-L463
151,509
the-fascinator/plugin-roles-internal
src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java
InternalRoles.searchRoles
@Override public String[] searchRoles(String search) throws RolesException { // Complete list of users String[] roles = role_list.keySet().toArray(new String[role_list.size()]); List<String> found = new ArrayList<String>(); // Look through the list for anyone who matches for (int i = 0; i < roles.length; i+...
java
@Override public String[] searchRoles(String search) throws RolesException { // Complete list of users String[] roles = role_list.keySet().toArray(new String[role_list.size()]); List<String> found = new ArrayList<String>(); // Look through the list for anyone who matches for (int i = 0; i < roles.length; i+...
[ "@", "Override", "public", "String", "[", "]", "searchRoles", "(", "String", "search", ")", "throws", "RolesException", "{", "// Complete list of users", "String", "[", "]", "roles", "=", "role_list", ".", "keySet", "(", ")", ".", "toArray", "(", "new", "Str...
Returns a list of roles matching the search. @param search The search string to execute. @return An array of role names that match the search. @throws RolesException if there was an error searching.
[ "Returns", "a", "list", "of", "roles", "matching", "the", "search", "." ]
5f75f802a92ef907acf030692d462aec4b4d3aae
https://github.com/the-fascinator/plugin-roles-internal/blob/5f75f802a92ef907acf030692d462aec4b4d3aae/src/main/java/com/googlecode/fascinator/roles/internal/InternalRoles.java#L474-L489
151,510
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java
MessageReceivingPopClientProcess.run
public void run() { Folder folder = this.getInboxFolder(); if (folder != null) this.processMail(folder); try { folder.close(true); } catch (MessagingException e) { e.printStackTrace(); } }
java
public void run() { Folder folder = this.getInboxFolder(); if (folder != null) this.processMail(folder); try { folder.close(true); } catch (MessagingException e) { e.printStackTrace(); } }
[ "public", "void", "run", "(", ")", "{", "Folder", "folder", "=", "this", ".", "getInboxFolder", "(", ")", ";", "if", "(", "folder", "!=", "null", ")", "this", ".", "processMail", "(", "folder", ")", ";", "try", "{", "folder", ".", "close", "(", "tr...
Run the code in this process.
[ "Run", "the", "code", "in", "this", "process", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java#L96-L108
151,511
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java
MessageReceivingPopClientProcess.getInboxFolder
public Folder getInboxFolder() { String strMessageType = MessageTransportModel.EMAIL; String strClassName = null; Record recMessageTransport = this.getRecord(MessageTransportModel.MESSAGE_TRANSPORT_FILE); if (recMessageTransport == null) recMessageTransport = Rec...
java
public Folder getInboxFolder() { String strMessageType = MessageTransportModel.EMAIL; String strClassName = null; Record recMessageTransport = this.getRecord(MessageTransportModel.MESSAGE_TRANSPORT_FILE); if (recMessageTransport == null) recMessageTransport = Rec...
[ "public", "Folder", "getInboxFolder", "(", ")", "{", "String", "strMessageType", "=", "MessageTransportModel", ".", "EMAIL", ";", "String", "strClassName", "=", "null", ";", "Record", "recMessageTransport", "=", "this", ".", "getRecord", "(", "MessageTransportModel"...
Open the poop3 inbox. @return The INBOX folder.
[ "Open", "the", "poop3", "inbox", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java#L113-L195
151,512
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java
MessageReceivingPopClientProcess.processMail
public void processMail(Folder folder) { try { int iCount = folder.getMessageCount(); if (iCount == 0) return; String pattern = REPLY_STRING; Message[] messages = null; if (this.getProperty(PATTERN) == null) { ...
java
public void processMail(Folder folder) { try { int iCount = folder.getMessageCount(); if (iCount == 0) return; String pattern = REPLY_STRING; Message[] messages = null; if (this.getProperty(PATTERN) == null) { ...
[ "public", "void", "processMail", "(", "Folder", "folder", ")", "{", "try", "{", "int", "iCount", "=", "folder", ".", "getMessageCount", "(", ")", ";", "if", "(", "iCount", "==", "0", ")", "return", ";", "String", "pattern", "=", "REPLY_STRING", ";", "M...
Go through all the mail and process the messages. @param folder The inbox folder.
[ "Go", "through", "all", "the", "mail", "and", "process", "the", "messages", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java#L200-L233
151,513
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java
MessageReceivingPopClientProcess.getContentString
public String getContentString(Message message) { try { String strContentType = message.getContentType(); Object content = message.getContent(); if (content instanceof MimeMultipart) { for (int index = 0; ; index++) { ...
java
public String getContentString(Message message) { try { String strContentType = message.getContentType(); Object content = message.getContent(); if (content instanceof MimeMultipart) { for (int index = 0; ; index++) { ...
[ "public", "String", "getContentString", "(", "Message", "message", ")", "{", "try", "{", "String", "strContentType", "=", "message", ".", "getContentType", "(", ")", ";", "Object", "content", "=", "message", ".", "getContent", "(", ")", ";", "if", "(", "co...
Get the message content as a string. @param message The message. @return The message content.
[ "Get", "the", "message", "content", "as", "a", "string", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/email/MessageReceivingPopClientProcess.java#L320-L342
151,514
FrodeRanders/java-vopn
src/main/java/org/gautelis/vopn/lang/DynamicInvoker.java
DynamicInvoker.createObject
public Object createObject(String className, Class clazz) throws ClassNotFoundException { Object object; try { object = clazz.newInstance(); } catch (InstantiationException ie) { String info = "Could not create " + description + " object: " + className ...
java
public Object createObject(String className, Class clazz) throws ClassNotFoundException { Object object; try { object = clazz.newInstance(); } catch (InstantiationException ie) { String info = "Could not create " + description + " object: " + className ...
[ "public", "Object", "createObject", "(", "String", "className", ",", "Class", "clazz", ")", "throws", "ClassNotFoundException", "{", "Object", "object", ";", "try", "{", "object", "=", "clazz", ".", "newInstance", "(", ")", ";", "}", "catch", "(", "Instantia...
Dynamically creates an object
[ "Dynamically", "creates", "an", "object" ]
4c7b2f90201327af4eaa3cd46b3fee68f864e5cc
https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/lang/DynamicInvoker.java#L143-L169
151,515
tvesalainen/util
util/src/main/java/org/vesalainen/math/sliding/AbstractSlidingAngleAverage.java
AbstractSlidingAngleAverage.fast
@Override public double fast() { readLock.lock(); try { int count = count(); return toDegrees(sinSum / count, cosSum / count); } finally { readLock.unlock(); } }
java
@Override public double fast() { readLock.lock(); try { int count = count(); return toDegrees(sinSum / count, cosSum / count); } finally { readLock.unlock(); } }
[ "@", "Override", "public", "double", "fast", "(", ")", "{", "readLock", ".", "lock", "(", ")", ";", "try", "{", "int", "count", "=", "count", "(", ")", ";", "return", "toDegrees", "(", "sinSum", "/", "count", ",", "cosSum", "/", "count", ")", ";", ...
Returns fast average. Fast calculation adds and subtracts values from sum field. This might cause difference in time to actual calculating sample by sample. @return
[ "Returns", "fast", "average", ".", "Fast", "calculation", "adds", "and", "subtracts", "values", "from", "sum", "field", ".", "This", "might", "cause", "difference", "in", "time", "to", "actual", "calculating", "sample", "by", "sample", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/sliding/AbstractSlidingAngleAverage.java#L85-L98
151,516
tvesalainen/util
util/src/main/java/org/vesalainen/math/sliding/AbstractSlidingAngleAverage.java
AbstractSlidingAngleAverage.average
@Override public double average() { readLock.lock(); try { int count = count(); double s = 0; double c = 0; PrimitiveIterator.OfInt it = modIterator(); while (it.hasNext()) { int m = it.nextInt(); ...
java
@Override public double average() { readLock.lock(); try { int count = count(); double s = 0; double c = 0; PrimitiveIterator.OfInt it = modIterator(); while (it.hasNext()) { int m = it.nextInt(); ...
[ "@", "Override", "public", "double", "average", "(", ")", "{", "readLock", ".", "lock", "(", ")", ";", "try", "{", "int", "count", "=", "count", "(", ")", ";", "double", "s", "=", "0", ";", "double", "c", "=", "0", ";", "PrimitiveIterator", ".", ...
Returns sample by sample calculated average. @return
[ "Returns", "sample", "by", "sample", "calculated", "average", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/sliding/AbstractSlidingAngleAverage.java#L103-L125
151,517
timothyb89/EventBus
src/main/java/org/timothyb89/eventbus/EventQueueDefinition.java
EventQueueDefinition.remove
public void remove(EventQueueEntry entry) { List<EventQueueEntry> container = queue.get(entry.getPriority()); if (container == null) { return; } container.remove(entry); // TODO: can we remove an empty container safely? }
java
public void remove(EventQueueEntry entry) { List<EventQueueEntry> container = queue.get(entry.getPriority()); if (container == null) { return; } container.remove(entry); // TODO: can we remove an empty container safely? }
[ "public", "void", "remove", "(", "EventQueueEntry", "entry", ")", "{", "List", "<", "EventQueueEntry", ">", "container", "=", "queue", ".", "get", "(", "entry", ".", "getPriority", "(", ")", ")", ";", "if", "(", "container", "==", "null", ")", "{", "re...
Removes the given queue entry from the notification list. @param entry the entry to remove
[ "Removes", "the", "given", "queue", "entry", "from", "the", "notification", "list", "." ]
9285406c16eda84e20da6c72fe2500c24c7848db
https://github.com/timothyb89/EventBus/blob/9285406c16eda84e20da6c72fe2500c24c7848db/src/main/java/org/timothyb89/eventbus/EventQueueDefinition.java#L61-L70
151,518
timothyb89/EventBus
src/main/java/org/timothyb89/eventbus/EventQueueDefinition.java
EventQueueDefinition.removeAll
public void removeAll(Object object) { for (Entry<Integer, List<EventQueueEntry>> e : queue.entrySet()) { List<EventQueueEntry> entries = e.getValue(); List<EventQueueEntry> toRemove = new LinkedList<>(); synchronized (entries) { for (EventQueueEntry entry : entries) { if (entry.getObject() == o...
java
public void removeAll(Object object) { for (Entry<Integer, List<EventQueueEntry>> e : queue.entrySet()) { List<EventQueueEntry> entries = e.getValue(); List<EventQueueEntry> toRemove = new LinkedList<>(); synchronized (entries) { for (EventQueueEntry entry : entries) { if (entry.getObject() == o...
[ "public", "void", "removeAll", "(", "Object", "object", ")", "{", "for", "(", "Entry", "<", "Integer", ",", "List", "<", "EventQueueEntry", ">", ">", "e", ":", "queue", ".", "entrySet", "(", ")", ")", "{", "List", "<", "EventQueueEntry", ">", "entries"...
Removes all handler methods in the given object from notifications by this queue. @param object the object to deregister
[ "Removes", "all", "handler", "methods", "in", "the", "given", "object", "from", "notifications", "by", "this", "queue", "." ]
9285406c16eda84e20da6c72fe2500c24c7848db
https://github.com/timothyb89/EventBus/blob/9285406c16eda84e20da6c72fe2500c24c7848db/src/main/java/org/timothyb89/eventbus/EventQueueDefinition.java#L77-L98
151,519
tvesalainen/util
util/src/main/java/org/vesalainen/nio/ByteBufferOutputStream.java
ByteBufferOutputStream.getRemaining
public final int getRemaining() { int rem = 0; for (int ii=0;ii<length;ii++) { rem += srcs[offset+ii].remaining(); } return rem; }
java
public final int getRemaining() { int rem = 0; for (int ii=0;ii<length;ii++) { rem += srcs[offset+ii].remaining(); } return rem; }
[ "public", "final", "int", "getRemaining", "(", ")", "{", "int", "rem", "=", "0", ";", "for", "(", "int", "ii", "=", "0", ";", "ii", "<", "length", ";", "ii", "++", ")", "{", "rem", "+=", "srcs", "[", "offset", "+", "ii", "]", ".", "remaining", ...
Returns the number of bytes that can be written. @return
[ "Returns", "the", "number", "of", "bytes", "that", "can", "be", "written", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/ByteBufferOutputStream.java#L56-L64
151,520
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JThreeStateCheckBox.java
JThreeStateCheckBox.updateImage
public void updateImage() { if (m_iCurrentState == ON) this.setIcon(m_iconOn); else if (m_iCurrentState == OFF) this.setIcon(m_iconOff); else this.setIcon(m_iconNull); }
java
public void updateImage() { if (m_iCurrentState == ON) this.setIcon(m_iconOn); else if (m_iCurrentState == OFF) this.setIcon(m_iconOff); else this.setIcon(m_iconNull); }
[ "public", "void", "updateImage", "(", ")", "{", "if", "(", "m_iCurrentState", "==", "ON", ")", "this", ".", "setIcon", "(", "m_iconOn", ")", ";", "else", "if", "(", "m_iCurrentState", "==", "OFF", ")", "this", ".", "setIcon", "(", "m_iconOff", ")", ";"...
Update the image to the current state.
[ "Update", "the", "image", "to", "the", "current", "state", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JThreeStateCheckBox.java#L128-L136
151,521
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JThreeStateCheckBox.java
JThreeStateCheckBox.toggleState
public void toggleState() { if (m_iCurrentState == ON) m_iCurrentState = NULL; else if (m_iCurrentState == OFF) m_iCurrentState = ON; else m_iCurrentState = OFF; this.updateImage(); }
java
public void toggleState() { if (m_iCurrentState == ON) m_iCurrentState = NULL; else if (m_iCurrentState == OFF) m_iCurrentState = ON; else m_iCurrentState = OFF; this.updateImage(); }
[ "public", "void", "toggleState", "(", ")", "{", "if", "(", "m_iCurrentState", "==", "ON", ")", "m_iCurrentState", "=", "NULL", ";", "else", "if", "(", "m_iCurrentState", "==", "OFF", ")", "m_iCurrentState", "=", "ON", ";", "else", "m_iCurrentState", "=", "...
Toggle the button state.
[ "Toggle", "the", "button", "state", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JThreeStateCheckBox.java#L149-L158
151,522
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.createDirectoryService
private DirectoryService createDirectoryService() { final DirectoryServiceFactory factory = new DefaultDirectoryServiceFactory(); try { factory.init("scribble"); return factory.getDirectoryService(); } catch (Exception e) { //NOSONAR throw new AssertionError...
java
private DirectoryService createDirectoryService() { final DirectoryServiceFactory factory = new DefaultDirectoryServiceFactory(); try { factory.init("scribble"); return factory.getDirectoryService(); } catch (Exception e) { //NOSONAR throw new AssertionError...
[ "private", "DirectoryService", "createDirectoryService", "(", ")", "{", "final", "DirectoryServiceFactory", "factory", "=", "new", "DefaultDirectoryServiceFactory", "(", ")", ";", "try", "{", "factory", ".", "init", "(", "\"scribble\"", ")", ";", "return", "factory"...
Creates a new DirectoryService instance for the test rule. Initialization of the service is done in the apply Statement phase by invoking the setupService method.
[ "Creates", "a", "new", "DirectoryService", "instance", "for", "the", "test", "rule", ".", "Initialization", "of", "the", "service", "is", "done", "in", "the", "apply", "Statement", "phase", "by", "invoking", "the", "setupService", "method", "." ]
66e67553bad4b1ff817e1715fd1d3dd833406744
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L158-L168
151,523
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.setupService
protected void setupService() throws Exception { // NOSONAR final DirectoryService service = this.getDirectoryService(); service.getChangeLog().setEnabled(false); this.workDir = getOuterRule().newFolder("dsworkdir"); service.setInstanceLayout(new InstanceLayout(this.workDir)); ...
java
protected void setupService() throws Exception { // NOSONAR final DirectoryService service = this.getDirectoryService(); service.getChangeLog().setEnabled(false); this.workDir = getOuterRule().newFolder("dsworkdir"); service.setInstanceLayout(new InstanceLayout(this.workDir)); ...
[ "protected", "void", "setupService", "(", ")", "throws", "Exception", "{", "// NOSONAR", "final", "DirectoryService", "service", "=", "this", ".", "getDirectoryService", "(", ")", ";", "service", ".", "getChangeLog", "(", ")", ".", "setEnabled", "(", "false", ...
Applies the configuration to the service such as AccessControl and AnonymousAccess. Both are enabled as configured. Further, the method initializes the cache service. The method does not start the service. @throws Exception if starting the directory service failed for any reason
[ "Applies", "the", "configuration", "to", "the", "service", "such", "as", "AccessControl", "and", "AnonymousAccess", ".", "Both", "are", "enabled", "as", "configured", ".", "Further", "the", "method", "initializes", "the", "cache", "service", ".", "The", "method"...
66e67553bad4b1ff817e1715fd1d3dd833406744
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L177-L194
151,524
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.importInitialLdif
private void importInitialLdif() throws IOException { if (this.initialLdif != null) { try (InputStream ldifStream = this.initialLdif.openStream()) { this.importLdif(ldifStream); } } }
java
private void importInitialLdif() throws IOException { if (this.initialLdif != null) { try (InputStream ldifStream = this.initialLdif.openStream()) { this.importLdif(ldifStream); } } }
[ "private", "void", "importInitialLdif", "(", ")", "throws", "IOException", "{", "if", "(", "this", ".", "initialLdif", "!=", "null", ")", "{", "try", "(", "InputStream", "ldifStream", "=", "this", ".", "initialLdif", ".", "openStream", "(", ")", ")", "{", ...
Initializes the directory with content from the initial ldif file. Note that a partition has to be created for the root of the ldif file. @throws IOException if the resource pointing to the ldif file to be imported can not be accessed
[ "Initializes", "the", "directory", "with", "content", "from", "the", "initial", "ldif", "file", ".", "Note", "that", "a", "partition", "has", "to", "be", "created", "for", "the", "root", "of", "the", "ldif", "file", "." ]
66e67553bad4b1ff817e1715fd1d3dd833406744
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L214-L221
151,525
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.createPartitions
private void createPartitions() { for (Map.Entry<String, String> partitionEntry : this.partitions.entrySet()) { try { this.addPartitionInternal(partitionEntry.getKey(), partitionEntry.getValue()); } catch (Exception e) { //NOSONAR throw new AssertionError...
java
private void createPartitions() { for (Map.Entry<String, String> partitionEntry : this.partitions.entrySet()) { try { this.addPartitionInternal(partitionEntry.getKey(), partitionEntry.getValue()); } catch (Exception e) { //NOSONAR throw new AssertionError...
[ "private", "void", "createPartitions", "(", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "partitionEntry", ":", "this", ".", "partitions", ".", "entrySet", "(", ")", ")", "{", "try", "{", "this", ".", "addPartitionInterna...
Creates all paritions that are added on rule setup.
[ "Creates", "all", "paritions", "that", "are", "added", "on", "rule", "setup", "." ]
66e67553bad4b1ff817e1715fd1d3dd833406744
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L227-L236
151,526
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.importLdif
public void importLdif(InputStream ldifData) throws IOException { final File ldifFile = getOuterRule().newFile("scribble_import.ldif"); try (final Writer writer = new OutputStreamWriter(new FileOutputStream(ldifFile), Charsets.UTF_8)) { IOUtils.copy(ldifData, writer); } fin...
java
public void importLdif(InputStream ldifData) throws IOException { final File ldifFile = getOuterRule().newFile("scribble_import.ldif"); try (final Writer writer = new OutputStreamWriter(new FileOutputStream(ldifFile), Charsets.UTF_8)) { IOUtils.copy(ldifData, writer); } fin...
[ "public", "void", "importLdif", "(", "InputStream", "ldifData", ")", "throws", "IOException", "{", "final", "File", "ldifFile", "=", "getOuterRule", "(", ")", ".", "newFile", "(", "\"scribble_import.ldif\"", ")", ";", "try", "(", "final", "Writer", "writer", "...
Imports directory content that is defined in LDIF format and provided as input stream. The method writes the stream content into a temporary file. @param ldifData the ldif data to import as a stream @throws IOException if the temporary file can not be created
[ "Imports", "directory", "content", "that", "is", "defined", "in", "LDIF", "format", "and", "provided", "as", "input", "stream", ".", "The", "method", "writes", "the", "stream", "content", "into", "a", "temporary", "file", "." ]
66e67553bad4b1ff817e1715fd1d3dd833406744
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L324-L336
151,527
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.addPartition
@RuleSetup public void addPartition(String partitionId, String suffix) { this.partitions.put(partitionId, suffix); }
java
@RuleSetup public void addPartition(String partitionId, String suffix) { this.partitions.put(partitionId, suffix); }
[ "@", "RuleSetup", "public", "void", "addPartition", "(", "String", "partitionId", ",", "String", "suffix", ")", "{", "this", ".", "partitions", ".", "put", "(", "partitionId", ",", "suffix", ")", ";", "}" ]
Adds a partition to the rule. The actual parititon is created when the rule is applied. @param partitionId the id of the partition @param suffix the suffix of the partition
[ "Adds", "a", "partition", "to", "the", "rule", ".", "The", "actual", "parititon", "is", "created", "when", "the", "rule", "is", "applied", "." ]
66e67553bad4b1ff817e1715fd1d3dd833406744
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L371-L375
151,528
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/event/MoveOnEventHandler.java
MoveOnEventHandler.moveTheData
public void moveTheData(boolean bDisplayOption, int iMoveType) { if (m_convCheckMark != null) if (m_bDisableOnMove) m_fldDest.setEnabled(!m_convCheckMark.getState()); if ((m_convCheckMark == null) || (m_convCheckMark.getState())) { if ((this.getSourceField...
java
public void moveTheData(boolean bDisplayOption, int iMoveType) { if (m_convCheckMark != null) if (m_bDisableOnMove) m_fldDest.setEnabled(!m_convCheckMark.getState()); if ((m_convCheckMark == null) || (m_convCheckMark.getState())) { if ((this.getSourceField...
[ "public", "void", "moveTheData", "(", "boolean", "bDisplayOption", ",", "int", "iMoveType", ")", "{", "if", "(", "m_convCheckMark", "!=", "null", ")", "if", "(", "m_bDisableOnMove", ")", "m_fldDest", ".", "setEnabled", "(", "!", "m_convCheckMark", ".", "getSta...
Actually move the data. @param bDisplayOption If true, display any changes.
[ "Actually", "move", "the", "data", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/MoveOnEventHandler.java#L200-L220
151,529
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/BaseXmlTrxMessageIn.java
BaseXmlTrxMessageIn.convertToMessage
public Object convertToMessage() { try { Object reply = this.getRawData(); org.w3c.dom.Node nodeBody = this.getMessageBody(reply, false); if (this.getConvertToMessage() == null) return null; Object msg = this.getConvertToMessage().unmarshalRo...
java
public Object convertToMessage() { try { Object reply = this.getRawData(); org.w3c.dom.Node nodeBody = this.getMessageBody(reply, false); if (this.getConvertToMessage() == null) return null; Object msg = this.getConvertToMessage().unmarshalRo...
[ "public", "Object", "convertToMessage", "(", ")", "{", "try", "{", "Object", "reply", "=", "this", ".", "getRawData", "(", ")", ";", "org", ".", "w3c", ".", "dom", ".", "Node", "nodeBody", "=", "this", ".", "getMessageBody", "(", "reply", ",", "false",...
Convert this DOM Tree to the JAXB message tree. Don't override this method, override the unmarshalRootElement method. @param nodeBody The source message. @return The JAXB object root.
[ "Convert", "this", "DOM", "Tree", "to", "the", "JAXB", "message", "tree", ".", "Don", "t", "override", "this", "method", "override", "the", "unmarshalRootElement", "method", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/BaseXmlTrxMessageIn.java#L106-L122
151,530
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/BaseXmlTrxMessageIn.java
BaseXmlTrxMessageIn.setMessageException
public void setMessageException(Throwable ex) { String strErrorMessage = ex.getMessage(); BaseMessage message = this.getMessage(); if ((message != null) && (message.getMessageHeader() instanceof TrxMessageHeader)) ((TrxMessageHeader)message.getMessageHeader()).put(TrxMessageHeade...
java
public void setMessageException(Throwable ex) { String strErrorMessage = ex.getMessage(); BaseMessage message = this.getMessage(); if ((message != null) && (message.getMessageHeader() instanceof TrxMessageHeader)) ((TrxMessageHeader)message.getMessageHeader()).put(TrxMessageHeade...
[ "public", "void", "setMessageException", "(", "Throwable", "ex", ")", "{", "String", "strErrorMessage", "=", "ex", ".", "getMessage", "(", ")", ";", "BaseMessage", "message", "=", "this", ".", "getMessage", "(", ")", ";", "if", "(", "(", "message", "!=", ...
If an exception occurred, set it in the message @param ex
[ "If", "an", "exception", "occurred", "set", "it", "in", "the", "message" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/BaseXmlTrxMessageIn.java#L147-L155
151,531
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JMultiFieldPanel.java
JMultiFieldPanel.addComponent
public void addComponent(JComponent component, boolean bLinkComponentToConverter) { this.add(Box.createHorizontalStrut(3)); if (this.getComponentCount() < brgComponentsLinkedToConverter.length) brgComponentsLinkedToConverter[this.getComponentCount()] = bLinkComponentToConverter;...
java
public void addComponent(JComponent component, boolean bLinkComponentToConverter) { this.add(Box.createHorizontalStrut(3)); if (this.getComponentCount() < brgComponentsLinkedToConverter.length) brgComponentsLinkedToConverter[this.getComponentCount()] = bLinkComponentToConverter;...
[ "public", "void", "addComponent", "(", "JComponent", "component", ",", "boolean", "bLinkComponentToConverter", ")", "{", "this", ".", "add", "(", "Box", ".", "createHorizontalStrut", "(", "3", ")", ")", ";", "if", "(", "this", ".", "getComponentCount", "(", ...
Add this component to this panel.
[ "Add", "this", "component", "to", "this", "panel", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JMultiFieldPanel.java#L104-L112
151,532
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JMultiFieldPanel.java
JMultiFieldPanel.setControlValue
public void setControlValue(Object objValue, Component component) { Convert converter = null; if (component instanceof ScreenComponent) converter = ((ScreenComponent)component).getConverter(); if (converter == null) converter = m_converter; if (component inst...
java
public void setControlValue(Object objValue, Component component) { Convert converter = null; if (component instanceof ScreenComponent) converter = ((ScreenComponent)component).getConverter(); if (converter == null) converter = m_converter; if (component inst...
[ "public", "void", "setControlValue", "(", "Object", "objValue", ",", "Component", "component", ")", "{", "Convert", "converter", "=", "null", ";", "if", "(", "component", "instanceof", "ScreenComponent", ")", "converter", "=", "(", "(", "ScreenComponent", ")", ...
Set this control to this value. @param objValue The value to set the component to. @param component The component to set to this value.
[ "Set", "this", "control", "to", "this", "value", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JMultiFieldPanel.java#L161-L173
151,533
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java
BaseMessageTransport.getTransportProperties
public Map<String,Object> getTransportProperties() { Map<String,Object> propMessageTransport = null; Record recMessageTransport = Record.makeRecordFromClassName(MessageTransportModel.THICK_CLASS, this); recMessageTransport.setKeyArea(MessageTransportModel.CODE_KEY); String strMessage...
java
public Map<String,Object> getTransportProperties() { Map<String,Object> propMessageTransport = null; Record recMessageTransport = Record.makeRecordFromClassName(MessageTransportModel.THICK_CLASS, this); recMessageTransport.setKeyArea(MessageTransportModel.CODE_KEY); String strMessage...
[ "public", "Map", "<", "String", ",", "Object", ">", "getTransportProperties", "(", ")", "{", "Map", "<", "String", ",", "Object", ">", "propMessageTransport", "=", "null", ";", "Record", "recMessageTransport", "=", "Record", ".", "makeRecordFromClassName", "(", ...
Get the properties that go with this transport type.
[ "Get", "the", "properties", "that", "go", "with", "this", "transport", "type", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java#L112-L132
151,534
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java
BaseMessageTransport.setupReplyMessage
public void setupReplyMessage(BaseMessage messageReply, BaseMessage messageOut, String strMessageInfoType, String strMessageProcessType) { if (messageReply != null) // No reply if null. { TrxMessageHeader trxMessageHeaderIncomming = null; if (messageOut != null) ...
java
public void setupReplyMessage(BaseMessage messageReply, BaseMessage messageOut, String strMessageInfoType, String strMessageProcessType) { if (messageReply != null) // No reply if null. { TrxMessageHeader trxMessageHeaderIncomming = null; if (messageOut != null) ...
[ "public", "void", "setupReplyMessage", "(", "BaseMessage", "messageReply", ",", "BaseMessage", "messageOut", ",", "String", "strMessageInfoType", ",", "String", "strMessageProcessType", ")", "{", "if", "(", "messageReply", "!=", "null", ")", "// No reply if null.", "{...
Set up a message header for this reply using the message header for the original message. @param messageReply The (internal or external) reply message (typically without a header). @param trxMessageHeaderIncomming The header of the message that I'm replying to. @param The type of message to tag this reply as (Reply in,...
[ "Set", "up", "a", "message", "header", "for", "this", "reply", "using", "the", "message", "header", "for", "the", "original", "message", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java#L380-L410
151,535
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java
BaseMessageTransport.getProperty
public String getProperty(TrxMessageHeader trxMessageHeader, String strParamName) { String strProperty = (String)trxMessageHeader.get(strParamName); if (strProperty == null) strProperty = this.getProperty(strParamName); return strProperty; }
java
public String getProperty(TrxMessageHeader trxMessageHeader, String strParamName) { String strProperty = (String)trxMessageHeader.get(strParamName); if (strProperty == null) strProperty = this.getProperty(strParamName); return strProperty; }
[ "public", "String", "getProperty", "(", "TrxMessageHeader", "trxMessageHeader", ",", "String", "strParamName", ")", "{", "String", "strProperty", "=", "(", "String", ")", "trxMessageHeader", ".", "get", "(", "strParamName", ")", ";", "if", "(", "strProperty", "=...
Get this transport specific param. Get this param. The transport properties specify param names by adding the word param after it. For example, to specify a different param for the messageClass for a SOAP transport, the SOAP property messageClassParam=SOAPMessageClass should be set in the SOAP transport properties and ...
[ "Get", "this", "transport", "specific", "param", ".", "Get", "this", "param", ".", "The", "transport", "properties", "specify", "param", "names", "by", "adding", "the", "word", "param", "after", "it", ".", "For", "example", "to", "specify", "a", "different",...
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java#L436-L442
151,536
jbundle/jbundle
main/db/src/main/java/org/jbundle/main/db/base/ContactField.java
ContactField.getContactTypeField
public ContactTypeField getContactTypeField() { BaseField field = this.getRecord().getField("ContactTypeID"); if (field instanceof ContactTypeField) return (ContactTypeField)field; return null; // Never }
java
public ContactTypeField getContactTypeField() { BaseField field = this.getRecord().getField("ContactTypeID"); if (field instanceof ContactTypeField) return (ContactTypeField)field; return null; // Never }
[ "public", "ContactTypeField", "getContactTypeField", "(", ")", "{", "BaseField", "field", "=", "this", ".", "getRecord", "(", ")", ".", "getField", "(", "\"ContactTypeID\"", ")", ";", "if", "(", "field", "instanceof", "ContactTypeField", ")", "return", "(", "C...
Get the contact type field in the same record as this contact field. @return The contact type field.
[ "Get", "the", "contact", "type", "field", "in", "the", "same", "record", "as", "this", "contact", "field", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/db/base/ContactField.java#L188-L194
151,537
williamwebb/alogger
BillingHelper/src/main/java/com/jug6ernaut/billing/Security.java
Security.generatePublicKey
public static PublicKey generatePublicKey(String encodedPublicKey) { try { byte[] decodedKey = Base64.decode(encodedPublicKey); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); ...
java
public static PublicKey generatePublicKey(String encodedPublicKey) { try { byte[] decodedKey = Base64.decode(encodedPublicKey); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); ...
[ "public", "static", "PublicKey", "generatePublicKey", "(", "String", "encodedPublicKey", ")", "{", "try", "{", "byte", "[", "]", "decodedKey", "=", "Base64", ".", "decode", "(", "encodedPublicKey", ")", ";", "KeyFactory", "keyFactory", "=", "KeyFactory", ".", ...
Generates a PublicKey instance from a string containing the Base64-encoded public key. @param encodedPublicKey Base64-encoded public key @throws IllegalArgumentException if encodedPublicKey is invalid
[ "Generates", "a", "PublicKey", "instance", "from", "a", "string", "containing", "the", "Base64", "-", "encoded", "public", "key", "." ]
61fca49e0b8d9c3a76c40da8883ac354b240351e
https://github.com/williamwebb/alogger/blob/61fca49e0b8d9c3a76c40da8883ac354b240351e/BillingHelper/src/main/java/com/jug6ernaut/billing/Security.java#L67-L81
151,538
inkstand-io/scribble
scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/ConfigurableContentRepository.java
ConfigurableContentRepository.logNodeTypes
private void logNodeTypes(final NodeType... nodeTypes) { if(LOG.isDebugEnabled()){ StringBuilder buf = new StringBuilder(32); buf.append("[\n"); for(NodeType nt : nodeTypes){ buf.append(nt.getName()).append(" > "); for(NodeType st : nt.getSupe...
java
private void logNodeTypes(final NodeType... nodeTypes) { if(LOG.isDebugEnabled()){ StringBuilder buf = new StringBuilder(32); buf.append("[\n"); for(NodeType nt : nodeTypes){ buf.append(nt.getName()).append(" > "); for(NodeType st : nt.getSupe...
[ "private", "void", "logNodeTypes", "(", "final", "NodeType", "...", "nodeTypes", ")", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", "32", ")", ";", "buf", ".", "append", "(", ...
Helper method to logs a list of node types and their properties in a human readable way. @param nodeTypes the node types to be logged.
[ "Helper", "method", "to", "logs", "a", "list", "of", "node", "types", "and", "their", "properties", "in", "a", "human", "readable", "way", "." ]
66e67553bad4b1ff817e1715fd1d3dd833406744
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/ConfigurableContentRepository.java#L164-L184
151,539
rometools/rome-certiorem
src/main/java/com/rometools/certiorem/hub/notify/standard/AbstractNotifier.java
AbstractNotifier.notifySubscribers
@Override public void notifySubscribers(final List<? extends Subscriber> subscribers, final SyndFeed value, final SubscriptionSummaryCallback callback) { String mimeType = null; if (value.getFeedType().startsWith("rss")) { mimeType = "application/rss+xml"; } else { ...
java
@Override public void notifySubscribers(final List<? extends Subscriber> subscribers, final SyndFeed value, final SubscriptionSummaryCallback callback) { String mimeType = null; if (value.getFeedType().startsWith("rss")) { mimeType = "application/rss+xml"; } else { ...
[ "@", "Override", "public", "void", "notifySubscribers", "(", "final", "List", "<", "?", "extends", "Subscriber", ">", "subscribers", ",", "final", "SyndFeed", "value", ",", "final", "SubscriptionSummaryCallback", "callback", ")", "{", "String", "mimeType", "=", ...
This method will serialize the synd feed and build Notifications for the implementation class to handle. @see enqueueNotification @param subscribers List of subscribers to notify @param value The SyndFeed object to send @param callback A callback that will be invoked each time a subscriber is notified.
[ "This", "method", "will", "serialize", "the", "synd", "feed", "and", "build", "Notifications", "for", "the", "implementation", "class", "to", "handle", "." ]
e5a003193dd2abd748e77961c0f216a7f5690712
https://github.com/rometools/rome-certiorem/blob/e5a003193dd2abd748e77961c0f216a7f5690712/src/main/java/com/rometools/certiorem/hub/notify/standard/AbstractNotifier.java#L59-L96
151,540
jbundle/jbundle
app/program/db/src/main/java/org/jbundle/app/program/db/util/ResourcesUtilities.java
ResourcesUtilities.fixPropertyValue
public static String fixPropertyValue(String string, boolean bResourceListBundle) { if (string == null) string = Constants.BLANK; StringBuffer strBuff = new StringBuffer(); StringReader stringReader = new StringReader(string); LineNumberReader lineReader = new LineNumberR...
java
public static String fixPropertyValue(String string, boolean bResourceListBundle) { if (string == null) string = Constants.BLANK; StringBuffer strBuff = new StringBuffer(); StringReader stringReader = new StringReader(string); LineNumberReader lineReader = new LineNumberR...
[ "public", "static", "String", "fixPropertyValue", "(", "String", "string", ",", "boolean", "bResourceListBundle", ")", "{", "if", "(", "string", "==", "null", ")", "string", "=", "Constants", ".", "BLANK", ";", "StringBuffer", "strBuff", "=", "new", "StringBuf...
Clean up this long string and convert it to a java quoted string.
[ "Clean", "up", "this", "long", "string", "and", "convert", "it", "to", "a", "java", "quoted", "string", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/util/ResourcesUtilities.java#L49-L83
151,541
jbundle/jbundle
app/program/db/src/main/java/org/jbundle/app/program/db/util/ResourcesUtilities.java
ResourcesUtilities.encodeLine
public static String encodeLine(String string, boolean bResourceListBundle) { if (string == null) return string; for (int i = 0; i < string.length(); i++) { if (((string.charAt(i) == '\"') || (string.charAt(i) == '\\')) || ((!bResourceListBundle) && (stri...
java
public static String encodeLine(String string, boolean bResourceListBundle) { if (string == null) return string; for (int i = 0; i < string.length(); i++) { if (((string.charAt(i) == '\"') || (string.charAt(i) == '\\')) || ((!bResourceListBundle) && (stri...
[ "public", "static", "String", "encodeLine", "(", "String", "string", ",", "boolean", "bResourceListBundle", ")", "{", "if", "(", "string", "==", "null", ")", "return", "string", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "string", ".", "leng...
Encode the utf-16 characters in this line to escaped java strings.
[ "Encode", "the", "utf", "-", "16", "characters", "in", "this", "line", "to", "escaped", "java", "strings", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/util/ResourcesUtilities.java#L87-L112
151,542
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.doFor
public static final <T> void doFor(Object bean, String property, Consumer<T> consumer) { T t = (T) getValue(bean, property); consumer.accept(t); }
java
public static final <T> void doFor(Object bean, String property, Consumer<T> consumer) { T t = (T) getValue(bean, property); consumer.accept(t); }
[ "public", "static", "final", "<", "T", ">", "void", "doFor", "(", "Object", "bean", ",", "String", "property", ",", "Consumer", "<", "T", ">", "consumer", ")", "{", "T", "t", "=", "(", "T", ")", "getValue", "(", "bean", ",", "property", ")", ";", ...
Executes consumer for property. @param <T> @param bean @param property @param consumer
[ "Executes", "consumer", "for", "property", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L92-L96
151,543
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.getValue
public static final Object getValue(Object bean, String property) { return doFor(bean, property, null, BeanHelper::getValue, BeanHelper::getValue, BeanHelper::getFieldValue, BeanHelper::getMethodValue); }
java
public static final Object getValue(Object bean, String property) { return doFor(bean, property, null, BeanHelper::getValue, BeanHelper::getValue, BeanHelper::getFieldValue, BeanHelper::getMethodValue); }
[ "public", "static", "final", "Object", "getValue", "(", "Object", "bean", ",", "String", "property", ")", "{", "return", "doFor", "(", "bean", ",", "property", ",", "null", ",", "BeanHelper", "::", "getValue", ",", "BeanHelper", "::", "getValue", ",", "Bea...
Return propertys value. @param bean @param property @return
[ "Return", "propertys", "value", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L103-L106
151,544
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.getParameterTypes
public static final Class[] getParameterTypes(Object bean, String property) { Type type = (Type) doFor( bean, property, null, (Object a, int i)->{Object o = Array.get(a, i);return o!=null?o.getClass().getComponentType():null;}, (List l, in...
java
public static final Class[] getParameterTypes(Object bean, String property) { Type type = (Type) doFor( bean, property, null, (Object a, int i)->{Object o = Array.get(a, i);return o!=null?o.getClass().getComponentType():null;}, (List l, in...
[ "public", "static", "final", "Class", "[", "]", "getParameterTypes", "(", "Object", "bean", ",", "String", "property", ")", "{", "Type", "type", "=", "(", "Type", ")", "doFor", "(", "bean", ",", "property", ",", "null", ",", "(", "Object", "a", ",", ...
Returns actual parameter types for property @param bean @param property @return
[ "Returns", "actual", "parameter", "types", "for", "property" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L227-L261
151,545
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.getField
public static Field getField(Class cls, String fieldname) throws NoSuchFieldException { while (true) { try { return cls.getDeclaredField(fieldname); } catch (NoSuchFieldException ex) { cls = cls.get...
java
public static Field getField(Class cls, String fieldname) throws NoSuchFieldException { while (true) { try { return cls.getDeclaredField(fieldname); } catch (NoSuchFieldException ex) { cls = cls.get...
[ "public", "static", "Field", "getField", "(", "Class", "cls", ",", "String", "fieldname", ")", "throws", "NoSuchFieldException", "{", "while", "(", "true", ")", "{", "try", "{", "return", "cls", ".", "getDeclaredField", "(", "fieldname", ")", ";", "}", "ca...
Returns Declared field either from given class or it's super class @param cls @param fieldname @return @throws NoSuchFieldException
[ "Returns", "Declared", "field", "either", "from", "given", "class", "or", "it", "s", "super", "class" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L269-L290
151,546
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.getType
public static final Class getType(Object bean, String property) { return (Class) doFor(bean, property, null, BeanHelper::getObjectType, BeanHelper::getObjectType, BeanHelper::getFieldType, BeanHelper::getMethodType); }
java
public static final Class getType(Object bean, String property) { return (Class) doFor(bean, property, null, BeanHelper::getObjectType, BeanHelper::getObjectType, BeanHelper::getFieldType, BeanHelper::getMethodType); }
[ "public", "static", "final", "Class", "getType", "(", "Object", "bean", ",", "String", "property", ")", "{", "return", "(", "Class", ")", "doFor", "(", "bean", ",", "property", ",", "null", ",", "BeanHelper", "::", "getObjectType", ",", "BeanHelper", "::",...
Return property type. @param bean @param property @return
[ "Return", "property", "type", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L321-L324
151,547
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.getAnnotation
public static final <T extends Annotation> T getAnnotation(Object bean, String property, Class<T> annotationClass) { return (T) doFor( bean, property, null, (Object a, int i)->{Object o=Array.get(a, i);return o!=null?o.getClass().getAnnotation(annotati...
java
public static final <T extends Annotation> T getAnnotation(Object bean, String property, Class<T> annotationClass) { return (T) doFor( bean, property, null, (Object a, int i)->{Object o=Array.get(a, i);return o!=null?o.getClass().getAnnotation(annotati...
[ "public", "static", "final", "<", "T", "extends", "Annotation", ">", "T", "getAnnotation", "(", "Object", "bean", ",", "String", "property", ",", "Class", "<", "T", ">", "annotationClass", ")", "{", "return", "(", "T", ")", "doFor", "(", "bean", ",", "...
Returns property annotation. @param <T> @param bean @param property @param annotationClass @return
[ "Returns", "property", "annotation", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L337-L347
151,548
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.hasProperty
public static final boolean hasProperty(Object bean, String property) { try { return (boolean) doFor( bean, property, null, (Object a, int i)->{return true;}, (List l, int i)->{return true;}, ...
java
public static final boolean hasProperty(Object bean, String property) { try { return (boolean) doFor( bean, property, null, (Object a, int i)->{return true;}, (List l, int i)->{return true;}, ...
[ "public", "static", "final", "boolean", "hasProperty", "(", "Object", "bean", ",", "String", "property", ")", "{", "try", "{", "return", "(", "boolean", ")", "doFor", "(", "bean", ",", "property", ",", "null", ",", "(", "Object", "a", ",", "int", "i", ...
Return true if property exists. @param bean @param property @return
[ "Return", "true", "if", "property", "exists", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L355-L372
151,549
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.defaultFactory
public static final <T> T defaultFactory(Class<T> cls, String hint) { try { return cls.newInstance(); } catch (InstantiationException | IllegalAccessException ex) { throw new IllegalArgumentException(ex); } }
java
public static final <T> T defaultFactory(Class<T> cls, String hint) { try { return cls.newInstance(); } catch (InstantiationException | IllegalAccessException ex) { throw new IllegalArgumentException(ex); } }
[ "public", "static", "final", "<", "T", ">", "T", "defaultFactory", "(", "Class", "<", "T", ">", "cls", ",", "String", "hint", ")", "{", "try", "{", "return", "cls", ".", "newInstance", "(", ")", ";", "}", "catch", "(", "InstantiationException", "|", ...
Default object factory that calls newInstance method. Checked exceptions are wrapped in IllegalArgumentException. @param <T> @param cls Target class @param hint Hint for factory @return
[ "Default", "object", "factory", "that", "calls", "newInstance", "method", ".", "Checked", "exceptions", "are", "wrapped", "in", "IllegalArgumentException", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L416-L426
151,550
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.applyList
public static final <T> T applyList(Object base, String fieldname) { return applyList(base, fieldname, BeanHelper::defaultFactory); }
java
public static final <T> T applyList(Object base, String fieldname) { return applyList(base, fieldname, BeanHelper::defaultFactory); }
[ "public", "static", "final", "<", "T", ">", "T", "applyList", "(", "Object", "base", ",", "String", "fieldname", ")", "{", "return", "applyList", "(", "base", ",", "fieldname", ",", "BeanHelper", "::", "defaultFactory", ")", ";", "}" ]
Applies bean action by using default factory. <p>Bean actions are: <p>List item property remove by adding '#' to the end of pattern. <p>E.g. list.3- same as list.remove(3) <p>List item property assign by adding '=' to the end of pattern <p>E.g. list.3=hint same as list.set(3, factory.get(cls, hint)) <p>List item creat...
[ "Applies", "bean", "action", "by", "using", "default", "factory", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L443-L446
151,551
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.applyPrefix
public static final String applyPrefix(String property) { int addIdx = property.lastIndexOf(Add); if (addIdx != -1) { return property.substring(0, addIdx); } else { int assignIdx = property.lastIndexOf(Assign); if (assignI...
java
public static final String applyPrefix(String property) { int addIdx = property.lastIndexOf(Add); if (addIdx != -1) { return property.substring(0, addIdx); } else { int assignIdx = property.lastIndexOf(Assign); if (assignI...
[ "public", "static", "final", "String", "applyPrefix", "(", "String", "property", ")", "{", "int", "addIdx", "=", "property", ".", "lastIndexOf", "(", "Add", ")", ";", "if", "(", "addIdx", "!=", "-", "1", ")", "{", "return", "property", ".", "substring", ...
Return prefix of apply pattern or pattern if not apply-pattern. @param property @return
[ "Return", "prefix", "of", "apply", "pattern", "or", "pattern", "if", "not", "apply", "-", "pattern", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L495-L521
151,552
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.removeList
public static final Object removeList(Object bean, String property) { return doFor( bean, property, null, (Object a, int i)->{throw new UnsupportedOperationException("not supported");}, (List l, int i)->{return l.remove(i);}, ...
java
public static final Object removeList(Object bean, String property) { return doFor( bean, property, null, (Object a, int i)->{throw new UnsupportedOperationException("not supported");}, (List l, int i)->{return l.remove(i);}, ...
[ "public", "static", "final", "Object", "removeList", "(", "Object", "bean", ",", "String", "property", ")", "{", "return", "doFor", "(", "bean", ",", "property", ",", "null", ",", "(", "Object", "a", ",", "int", "i", ")", "->", "{", "throw", "new", "...
Removes pattern item from list @param bean @param property
[ "Removes", "pattern", "item", "from", "list" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L563-L574
151,553
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.addList
public static final <T> void addList(Object bean, String property, T value) { addList(bean, property, null, (Class<T> c, String h)->{return value;}); }
java
public static final <T> void addList(Object bean, String property, T value) { addList(bean, property, null, (Class<T> c, String h)->{return value;}); }
[ "public", "static", "final", "<", "T", ">", "void", "addList", "(", "Object", "bean", ",", "String", "property", ",", "T", "value", ")", "{", "addList", "(", "bean", ",", "property", ",", "null", ",", "(", "Class", "<", "T", ">", "c", ",", "String"...
Adds pattern item to end of list @param <T> @param bean @param property @param value
[ "Adds", "pattern", "item", "to", "end", "of", "list" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L582-L585
151,554
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.addList
public static final <T> T addList(Object bean, String property, String hint, BiFunction<Class<T>,String,T> factory) { Object fieldValue = getValue(bean, property); if (fieldValue instanceof List) { List list = (List) fieldValue; Class[] pt = getParameterTypes(be...
java
public static final <T> T addList(Object bean, String property, String hint, BiFunction<Class<T>,String,T> factory) { Object fieldValue = getValue(bean, property); if (fieldValue instanceof List) { List list = (List) fieldValue; Class[] pt = getParameterTypes(be...
[ "public", "static", "final", "<", "T", ">", "T", "addList", "(", "Object", "bean", ",", "String", "property", ",", "String", "hint", ",", "BiFunction", "<", "Class", "<", "T", ">", ",", "String", ",", "T", ">", "factory", ")", "{", "Object", "fieldVa...
Adds pattern item to end of list using given factory and hint @param <T> @param bean @param property @param hint @param factory
[ "Adds", "pattern", "item", "to", "end", "of", "list", "using", "given", "factory", "and", "hint" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L594-L613
151,555
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.getter
public static final String getter(Field field, String fieldName) { Class<?> type = field.getType(); if (type.isPrimitive() && "boolean".equals(type.getName())) { return isser(fieldName); } else { return getter(fieldName); } ...
java
public static final String getter(Field field, String fieldName) { Class<?> type = field.getType(); if (type.isPrimitive() && "boolean".equals(type.getName())) { return isser(fieldName); } else { return getter(fieldName); } ...
[ "public", "static", "final", "String", "getter", "(", "Field", "field", ",", "String", "fieldName", ")", "{", "Class", "<", "?", ">", "type", "=", "field", ".", "getType", "(", ")", ";", "if", "(", "type", ".", "isPrimitive", "(", ")", "&&", "\"boole...
property -> getProperty @param field @param fieldName @return
[ "property", "-", ">", "getProperty" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L707-L718
151,556
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.prefix
public static final String prefix(String pattern) { int idx = CharSequences.lastIndexOf(pattern, BeanHelper::separator); if (idx != -1) { return pattern.substring(0, idx); } else { return ""; } }
java
public static final String prefix(String pattern) { int idx = CharSequences.lastIndexOf(pattern, BeanHelper::separator); if (idx != -1) { return pattern.substring(0, idx); } else { return ""; } }
[ "public", "static", "final", "String", "prefix", "(", "String", "pattern", ")", "{", "int", "idx", "=", "CharSequences", ".", "lastIndexOf", "(", "pattern", ",", "BeanHelper", "::", "separator", ")", ";", "if", "(", "idx", "!=", "-", "1", ")", "{", "re...
Return string before last reparator @param pattern @return
[ "Return", "string", "before", "last", "reparator" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L905-L916
151,557
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.isListItem
public static final boolean isListItem(String pattern) { int idx = pattern.lastIndexOf(Lim); if (idx != -1) { try { Integer.parseInt(pattern.substring(idx+1)); return true; } catch (NumberFormatExceptio...
java
public static final boolean isListItem(String pattern) { int idx = pattern.lastIndexOf(Lim); if (idx != -1) { try { Integer.parseInt(pattern.substring(idx+1)); return true; } catch (NumberFormatExceptio...
[ "public", "static", "final", "boolean", "isListItem", "(", "String", "pattern", ")", "{", "int", "idx", "=", "pattern", ".", "lastIndexOf", "(", "Lim", ")", ";", "if", "(", "idx", "!=", "-", "1", ")", "{", "try", "{", "Integer", ".", "parseInt", "(",...
Return true if string after last separator is numeric @param pattern @return
[ "Return", "true", "if", "string", "after", "last", "separator", "is", "numeric" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L922-L941
151,558
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.getProperties
public static final Set<String> getProperties(Object bean) { return stream(bean).collect(Collectors.toSet()); }
java
public static final Set<String> getProperties(Object bean) { return stream(bean).collect(Collectors.toSet()); }
[ "public", "static", "final", "Set", "<", "String", ">", "getProperties", "(", "Object", "bean", ")", "{", "return", "stream", "(", "bean", ")", ".", "collect", "(", "Collectors", ".", "toSet", "(", ")", ")", ";", "}" ]
Return set of objects patterns @param bean @return
[ "Return", "set", "of", "objects", "patterns" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L964-L967
151,559
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.free
public void free() { super.free(); if (m_record != null) m_record.removeField(this); m_record = null; m_strFieldName = null; m_strFieldDesc = null; if (m_vScreenField != null) { // Remove all the screen fields m_vScreenField.remove...
java
public void free() { super.free(); if (m_record != null) m_record.removeField(this); m_record = null; m_strFieldName = null; m_strFieldDesc = null; if (m_vScreenField != null) { // Remove all the screen fields m_vScreenField.remove...
[ "public", "void", "free", "(", ")", "{", "super", ".", "free", "(", ")", ";", "if", "(", "m_record", "!=", "null", ")", "m_record", ".", "removeField", "(", "this", ")", ";", "m_record", "=", "null", ";", "m_strFieldName", "=", "null", ";", "m_strFie...
Free this field's resources. Removes this fieldlist from the parent record.
[ "Free", "this", "field", "s", "resources", ".", "Removes", "this", "fieldlist", "from", "the", "parent", "record", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L138-L151
151,560
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.addComponent
public void addComponent(Object sField) { if (m_vScreenField == null) m_vScreenField = new Vector<Object>(); m_vScreenField.addElement(sField); // Notify this screen field if I change }
java
public void addComponent(Object sField) { if (m_vScreenField == null) m_vScreenField = new Vector<Object>(); m_vScreenField.addElement(sField); // Notify this screen field if I change }
[ "public", "void", "addComponent", "(", "Object", "sField", ")", "{", "if", "(", "m_vScreenField", "==", "null", ")", "m_vScreenField", "=", "new", "Vector", "<", "Object", ">", "(", ")", ";", "m_vScreenField", ".", "addElement", "(", "sField", ")", ";", ...
This screen component is displaying this field. @param Object sField The screen component.. either a awt.Component or a ScreenField.
[ "This", "screen", "component", "is", "displaying", "this", "field", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L156-L161
151,561
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.getComponent
public Object getComponent(int iPosition) { if (m_vScreenField == null) return null; if (iPosition < m_vScreenField.size()) { try { return m_vScreenField.elementAt(iPosition); } catch (ArrayIndexOutOfBoundsException e) { ...
java
public Object getComponent(int iPosition) { if (m_vScreenField == null) return null; if (iPosition < m_vScreenField.size()) { try { return m_vScreenField.elementAt(iPosition); } catch (ArrayIndexOutOfBoundsException e) { ...
[ "public", "Object", "getComponent", "(", "int", "iPosition", ")", "{", "if", "(", "m_vScreenField", "==", "null", ")", "return", "null", ";", "if", "(", "iPosition", "<", "m_vScreenField", ".", "size", "(", ")", ")", "{", "try", "{", "return", "m_vScreen...
Get the component at this position. @return The component at this position or null.
[ "Get", "the", "component", "at", "this", "position", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L175-L189
151,562
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.displayField
public void displayField() // init this field override for other value { if (m_vScreenField == null) return; for (int i = 0; i < m_vScreenField.size(); i++) { Object component = m_vScreenField.elementAt(i); Convert converter = null; ...
java
public void displayField() // init this field override for other value { if (m_vScreenField == null) return; for (int i = 0; i < m_vScreenField.size(); i++) { Object component = m_vScreenField.elementAt(i); Convert converter = null; ...
[ "public", "void", "displayField", "(", ")", "// init this field override for other value", "{", "if", "(", "m_vScreenField", "==", "null", ")", "return", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "m_vScreenField", ".", "size", "(", ")", ";", "i...
Display this field. Go through the sFieldList and setText for JTextComponents and setControlValue for FieldComponents. @see org.jbundle.model.screen.FieldComponent
[ "Display", "this", "field", ".", "Go", "through", "the", "sFieldList", "and", "setText", "for", "JTextComponents", "and", "setControlValue", "for", "FieldComponents", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L287-L310
151,563
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.getFieldDesc
public String getFieldDesc() { String strFieldDesc = null; if (m_strFieldDesc != null) // Field desc null? (using default) strFieldDesc = m_strFieldDesc; else { // Get the description from the resource file if (this.getRecord() != null) strF...
java
public String getFieldDesc() { String strFieldDesc = null; if (m_strFieldDesc != null) // Field desc null? (using default) strFieldDesc = m_strFieldDesc; else { // Get the description from the resource file if (this.getRecord() != null) strF...
[ "public", "String", "getFieldDesc", "(", ")", "{", "String", "strFieldDesc", "=", "null", ";", "if", "(", "m_strFieldDesc", "!=", "null", ")", "// Field desc null? (using default)", "strFieldDesc", "=", "m_strFieldDesc", ";", "else", "{", "// Get the description from ...
Get the short field description. @return The field desc. If null, return the resource from the record's resouce file. If not available, return the field name.
[ "Get", "the", "short", "field", "description", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L361-L372
151,564
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.getFieldTip
public String getFieldTip() { String strTipKey = this.getFieldName() + Constants.TIP; String strFieldTip = strTipKey; if (this.getRecord() != null) strFieldTip = this.getRecord().getString(strTipKey); if (strFieldTip == strTipKey) return this.getFieldDesc(); ...
java
public String getFieldTip() { String strTipKey = this.getFieldName() + Constants.TIP; String strFieldTip = strTipKey; if (this.getRecord() != null) strFieldTip = this.getRecord().getString(strTipKey); if (strFieldTip == strTipKey) return this.getFieldDesc(); ...
[ "public", "String", "getFieldTip", "(", ")", "{", "String", "strTipKey", "=", "this", ".", "getFieldName", "(", ")", "+", "Constants", ".", "TIP", ";", "String", "strFieldTip", "=", "strTipKey", ";", "if", "(", "this", ".", "getRecord", "(", ")", "!=", ...
Get the long field description tip. Look in the resource for the long description, if not found, return the field desc. @return The field tip.
[ "Get", "the", "long", "field", "description", "tip", ".", "Look", "in", "the", "resource", "for", "the", "long", "description", "if", "not", "found", "return", "the", "field", "desc", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L386-L395
151,565
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.getMaxLength
public int getMaxLength() { if (m_iMaxLength == Constants.DEFAULT_FIELD_LENGTH) { m_iMaxLength = 20; if (m_classData == Short.class) m_iMaxLength = 4; else if (m_classData == Integer.class) m_iMaxLength = 8; else if (m_c...
java
public int getMaxLength() { if (m_iMaxLength == Constants.DEFAULT_FIELD_LENGTH) { m_iMaxLength = 20; if (m_classData == Short.class) m_iMaxLength = 4; else if (m_classData == Integer.class) m_iMaxLength = 8; else if (m_c...
[ "public", "int", "getMaxLength", "(", ")", "{", "if", "(", "m_iMaxLength", "==", "Constants", ".", "DEFAULT_FIELD_LENGTH", ")", "{", "m_iMaxLength", "=", "20", ";", "if", "(", "m_classData", "==", "Short", ".", "class", ")", "m_iMaxLength", "=", "4", ";", ...
Maximum string length. @return The max field length.
[ "Maximum", "string", "length", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L428-L449
151,566
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.initField
public int initField(boolean bDisplayOption) // Init this field override for other value { if ((this.getDefault() == null) || (this.getDefault() instanceof String)) return this.setString((String)this.getDefault(), bDisplayOption, Constants.INIT_MOVE); // zero out the field ...
java
public int initField(boolean bDisplayOption) // Init this field override for other value { if ((this.getDefault() == null) || (this.getDefault() instanceof String)) return this.setString((String)this.getDefault(), bDisplayOption, Constants.INIT_MOVE); // zero out the field ...
[ "public", "int", "initField", "(", "boolean", "bDisplayOption", ")", "// Init this field override for other value", "{", "if", "(", "(", "this", ".", "getDefault", "(", ")", "==", "null", ")", "||", "(", "this", ".", "getDefault", "(", ")", "instanceof", "Stri...
Set this field back to the original value. @param bDisplayOption If true, display the data. @return The error code.
[ "Set", "this", "field", "back", "to", "the", "original", "value", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L455-L460
151,567
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.getValue
public double getValue() { Object objData = this.getData(); if (objData != null) { Class<?> classData = this.getDataClass(); if (classData != Object.class) if (classData == objData.getClass()) { if (classData == Short.class)...
java
public double getValue() { Object objData = this.getData(); if (objData != null) { Class<?> classData = this.getDataClass(); if (classData != Object.class) if (classData == objData.getClass()) { if (classData == Short.class)...
[ "public", "double", "getValue", "(", ")", "{", "Object", "objData", "=", "this", ".", "getData", "(", ")", ";", "if", "(", "objData", "!=", "null", ")", "{", "Class", "<", "?", ">", "classData", "=", "this", ".", "getDataClass", "(", ")", ";", "if"...
For numeric fields, get the current value. Usually overidden. @return the field's value.
[ "For", "numeric", "fields", "get", "the", "current", "value", ".", "Usually", "overidden", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L600-L631
151,568
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.setState
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { Boolean objData = new Boolean(bState); if (this.getDataClass() == Boolean.class) return this.setData(objData, bDisplayOption, iMoveMode); else if (Number.class.isAssignableFrom(this.getDataClass())) ...
java
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { Boolean objData = new Boolean(bState); if (this.getDataClass() == Boolean.class) return this.setData(objData, bDisplayOption, iMoveMode); else if (Number.class.isAssignableFrom(this.getDataClass())) ...
[ "public", "int", "setState", "(", "boolean", "bState", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "Boolean", "objData", "=", "new", "Boolean", "(", "bState", ")", ";", "if", "(", "this", ".", "getDataClass", "(", ")", "==", "Boo...
Set the data in this field to true or false.
[ "Set", "the", "data", "in", "this", "field", "to", "true", "or", "false", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L635-L645
151,569
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java
FieldInfo.getState
public boolean getState() // init this field override for other value { if (this.getDataClass() == Boolean.class) { Boolean objData = (Boolean)this.getData(); if (objData != null) return objData.booleanValue(); } return false; ...
java
public boolean getState() // init this field override for other value { if (this.getDataClass() == Boolean.class) { Boolean objData = (Boolean)this.getData(); if (objData != null) return objData.booleanValue(); } return false; ...
[ "public", "boolean", "getState", "(", ")", "// init this field override for other value", "{", "if", "(", "this", ".", "getDataClass", "(", ")", "==", "Boolean", ".", "class", ")", "{", "Boolean", "objData", "=", "(", "Boolean", ")", "this", ".", "getData", ...
Get the state of this boolean field. @return true if true, false if not boolean or null.
[ "Get", "the", "state", "of", "this", "boolean", "field", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L650-L659
151,570
JM-Lab/utils-java9
src/main/java/kr/jm/utils/RestfulResourceUpdater.java
RestfulResourceUpdater.updateResourceWithLog
public Optional<T> updateResourceWithLog() { Optional<T> resourceAsOpt = updateResource(); log.debug("Updated Resource - {}", updateResource().isPresent() ? "YES" : "NO"); return resourceAsOpt; }
java
public Optional<T> updateResourceWithLog() { Optional<T> resourceAsOpt = updateResource(); log.debug("Updated Resource - {}", updateResource().isPresent() ? "YES" : "NO"); return resourceAsOpt; }
[ "public", "Optional", "<", "T", ">", "updateResourceWithLog", "(", ")", "{", "Optional", "<", "T", ">", "resourceAsOpt", "=", "updateResource", "(", ")", ";", "log", ".", "debug", "(", "\"Updated Resource - {}\"", ",", "updateResource", "(", ")", ".", "isPre...
Update resource with log optional. @return the optional
[ "Update", "resource", "with", "log", "optional", "." ]
ee80235b2760396a616cf7563cbdc98d4affe8e1
https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/RestfulResourceUpdater.java#L87-L92
151,571
JM-Lab/utils-java9
src/main/java/kr/jm/utils/RestfulResourceUpdater.java
RestfulResourceUpdater.updateResource
public Optional<T> updateResource() { return JMOptional.getOptional(JMRestfulResource .getStringWithRestOrClasspathOrFilePath(restfulResourceUrl)) .filter(getEquals(cachedJsonString).negate()) .filter(peek(this::setJsonStringCache)) .map(jsonString...
java
public Optional<T> updateResource() { return JMOptional.getOptional(JMRestfulResource .getStringWithRestOrClasspathOrFilePath(restfulResourceUrl)) .filter(getEquals(cachedJsonString).negate()) .filter(peek(this::setJsonStringCache)) .map(jsonString...
[ "public", "Optional", "<", "T", ">", "updateResource", "(", ")", "{", "return", "JMOptional", ".", "getOptional", "(", "JMRestfulResource", ".", "getStringWithRestOrClasspathOrFilePath", "(", "restfulResourceUrl", ")", ")", ".", "filter", "(", "getEquals", "(", "c...
Update resource optional. @return the optional
[ "Update", "resource", "optional", "." ]
ee80235b2760396a616cf7563cbdc98d4affe8e1
https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/RestfulResourceUpdater.java#L99-L107
151,572
incodehq-legacy/incode-module-communications
module/src/main/java/org/incode/module/communications/dom/mixins/Document_sendByEmail.java
Document_sendByEmail.stripFileExtensionIfAny
private static String stripFileExtensionIfAny(final String name) { final int suffix = name.lastIndexOf(".html"); return suffix == -1 ? name : name.substring(0, suffix); }
java
private static String stripFileExtensionIfAny(final String name) { final int suffix = name.lastIndexOf(".html"); return suffix == -1 ? name : name.substring(0, suffix); }
[ "private", "static", "String", "stripFileExtensionIfAny", "(", "final", "String", "name", ")", "{", "final", "int", "suffix", "=", "name", ".", "lastIndexOf", "(", "\".html\"", ")", ";", "return", "suffix", "==", "-", "1", "?", "name", ":", "name", ".", ...
bit of a hack...
[ "bit", "of", "a", "hack", "..." ]
0dca6825886e85cb778f7c4f6ede126f636fdd54
https://github.com/incodehq-legacy/incode-module-communications/blob/0dca6825886e85cb778f7c4f6ede126f636fdd54/module/src/main/java/org/incode/module/communications/dom/mixins/Document_sendByEmail.java#L246-L249
151,573
jbundle/jbundle
main/msg/src/main/java/org/jbundle/main/msg/db/MessageDetail.java
MessageDetail.addPropertyListeners
public void addPropertyListeners() { this.addPropertiesFieldBehavior(this.getField(MessageDetail.DESTINATION_SITE), TrxMessageHeader.DESTINATION_PARAM); this.addPropertiesFieldBehavior(this.getField(MessageDetail.DESTINATION_PATH), TrxMessageHeader.DESTINATION_MESSAGE_PARAM); this.addPropert...
java
public void addPropertyListeners() { this.addPropertiesFieldBehavior(this.getField(MessageDetail.DESTINATION_SITE), TrxMessageHeader.DESTINATION_PARAM); this.addPropertiesFieldBehavior(this.getField(MessageDetail.DESTINATION_PATH), TrxMessageHeader.DESTINATION_MESSAGE_PARAM); this.addPropert...
[ "public", "void", "addPropertyListeners", "(", ")", "{", "this", ".", "addPropertiesFieldBehavior", "(", "this", ".", "getField", "(", "MessageDetail", ".", "DESTINATION_SITE", ")", ",", "TrxMessageHeader", ".", "DESTINATION_PARAM", ")", ";", "this", ".", "addProp...
AddPropertyListeners Method.
[ "AddPropertyListeners", "Method", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageDetail.java#L201-L210
151,574
jbundle/jbundle
main/msg/src/main/java/org/jbundle/main/msg/db/MessageDetail.java
MessageDetail.addMessageProperties
public TrxMessageHeader addMessageProperties(TrxMessageHeader trxMessageHeader, MessageDetailTarget recMessageDetailTarget, MessageProcessInfo recMessageProcessInfo, MessageTransport recMessageTransport) { try { if (trxMessageHeader == null) trxMessageHeader = new TrxMessageHeade...
java
public TrxMessageHeader addMessageProperties(TrxMessageHeader trxMessageHeader, MessageDetailTarget recMessageDetailTarget, MessageProcessInfo recMessageProcessInfo, MessageTransport recMessageTransport) { try { if (trxMessageHeader == null) trxMessageHeader = new TrxMessageHeade...
[ "public", "TrxMessageHeader", "addMessageProperties", "(", "TrxMessageHeader", "trxMessageHeader", ",", "MessageDetailTarget", "recMessageDetailTarget", ",", "MessageProcessInfo", "recMessageProcessInfo", ",", "MessageTransport", "recMessageTransport", ")", "{", "try", "{", "if...
Get the message properties for this vendor. @param strMessageName The message name. @return A map with the message properties.
[ "Get", "the", "message", "properties", "for", "this", "vendor", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageDetail.java#L216-L254
151,575
NessComputing/components-ness-quartz
src/main/java/com/nesscomputing/quartz/QuartzJob.java
QuartzJob.startTime
@SuppressWarnings("unchecked") public final SelfType startTime(final DateTime when, final TimeSpan jitter) { // Find the current week day in the same time zone as the "when" time passed in. final DateTime now = new DateTime().withZone(when.getZone()); final int startWeekDay = when.getDa...
java
@SuppressWarnings("unchecked") public final SelfType startTime(final DateTime when, final TimeSpan jitter) { // Find the current week day in the same time zone as the "when" time passed in. final DateTime now = new DateTime().withZone(when.getZone()); final int startWeekDay = when.getDa...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "SelfType", "startTime", "(", "final", "DateTime", "when", ",", "final", "TimeSpan", "jitter", ")", "{", "// Find the current week day in the same time zone as the \"when\" time passed in.", "final", "Da...
Set the time-of-day when the first run of the job will take place.
[ "Set", "the", "time", "-", "of", "-", "day", "when", "the", "first", "run", "of", "the", "job", "will", "take", "place", "." ]
fd41c440e21b31a5292a0606c8687eacfc5120ae
https://github.com/NessComputing/components-ness-quartz/blob/fd41c440e21b31a5292a0606c8687eacfc5120ae/src/main/java/com/nesscomputing/quartz/QuartzJob.java#L87-L106
151,576
wigforss/Ka-Web
servlet/src/main/java/org/kasource/web/servlet/filter/NoCacheFilter.java
NoCacheFilter.doFilter
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if(response instanceof HttpServletResponse) { HttpServletResponse httpResponse = (HttpServletResponse) response; String quer...
java
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if(response instanceof HttpServletResponse) { HttpServletResponse httpResponse = (HttpServletResponse) response; String quer...
[ "@", "Override", "public", "void", "doFilter", "(", "ServletRequest", "request", ",", "ServletResponse", "response", ",", "FilterChain", "chain", ")", "throws", "IOException", ",", "ServletException", "{", "if", "(", "response", "instanceof", "HttpServletResponse", ...
Add no-cache headers if Query String matches reqExoFilters
[ "Add", "no", "-", "cache", "headers", "if", "Query", "String", "matches", "reqExoFilters" ]
bb6d8eacbefdeb7c8c6bb6135e55939d968fa433
https://github.com/wigforss/Ka-Web/blob/bb6d8eacbefdeb7c8c6bb6135e55939d968fa433/servlet/src/main/java/org/kasource/web/servlet/filter/NoCacheFilter.java#L40-L61
151,577
wigforss/Ka-Web
servlet/src/main/java/org/kasource/web/servlet/filter/NoCacheFilter.java
NoCacheFilter.setHeader
private void setHeader(HttpServletResponse response, String name, String value) { if(response.containsHeader(value)) { response.setHeader(name, value); } else { response.addHeader(name, value); } }
java
private void setHeader(HttpServletResponse response, String name, String value) { if(response.containsHeader(value)) { response.setHeader(name, value); } else { response.addHeader(name, value); } }
[ "private", "void", "setHeader", "(", "HttpServletResponse", "response", ",", "String", "name", ",", "String", "value", ")", "{", "if", "(", "response", ".", "containsHeader", "(", "value", ")", ")", "{", "response", ".", "setHeader", "(", "name", ",", "val...
Set Cache header. @param response The HttpResponse to set header on @param name Name of the header to set @param value Value of the header to set.
[ "Set", "Cache", "header", "." ]
bb6d8eacbefdeb7c8c6bb6135e55939d968fa433
https://github.com/wigforss/Ka-Web/blob/bb6d8eacbefdeb7c8c6bb6135e55939d968fa433/servlet/src/main/java/org/kasource/web/servlet/filter/NoCacheFilter.java#L81-L87
151,578
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java
DocBookXMLPreProcessor.createLinkWrapperElement
protected Element createLinkWrapperElement(final Document document, final Node node, final String cssClass) { // Create the bug/editor link root element final Element linkElement = document.createElement("para"); if (cssClass != null) { linkElement.setAttribute("role", cssClass); ...
java
protected Element createLinkWrapperElement(final Document document, final Node node, final String cssClass) { // Create the bug/editor link root element final Element linkElement = document.createElement("para"); if (cssClass != null) { linkElement.setAttribute("role", cssClass); ...
[ "protected", "Element", "createLinkWrapperElement", "(", "final", "Document", "document", ",", "final", "Node", "node", ",", "final", "String", "cssClass", ")", "{", "// Create the bug/editor link root element", "final", "Element", "linkElement", "=", "document", ".", ...
Creates the wrapper element for bug or editor links and adds it to the document. @param document The document to add the wrapper/link to. @param node The specific node the wrapper/link should be added to. @param cssClass The css class name to use for the wrapper. @return The wrapper element that links can be adde...
[ "Creates", "the", "wrapper", "element", "for", "bug", "or", "editor", "links", "and", "adds", "it", "to", "the", "document", "." ]
5436d36ba1b3c5baa246b270e5fc350e6778bce8
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java#L227-L237
151,579
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java
DocBookXMLPreProcessor.createExternalLinkElement
protected Element createExternalLinkElement(final DocBookVersion docBookVersion, final Document document, String title, final String url) { final Element linkEle; if (docBookVersion == DocBookVersion.DOCBOOK_50) { linkEle = document.createElement("link"); linkEle.setA...
java
protected Element createExternalLinkElement(final DocBookVersion docBookVersion, final Document document, String title, final String url) { final Element linkEle; if (docBookVersion == DocBookVersion.DOCBOOK_50) { linkEle = document.createElement("link"); linkEle.setA...
[ "protected", "Element", "createExternalLinkElement", "(", "final", "DocBookVersion", "docBookVersion", ",", "final", "Document", "document", ",", "String", "title", ",", "final", "String", "url", ")", "{", "final", "Element", "linkEle", ";", "if", "(", "docBookVer...
Creates an element that represents an external link. @param docBookVersion The DocBook Version the link should be created for. @param document The document to create the link for. @param title @param url The links url. @return
[ "Creates", "an", "element", "that", "represents", "an", "external", "link", "." ]
5436d36ba1b3c5baa246b270e5fc350e6778bce8
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java#L247-L259
151,580
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java
DocBookXMLPreProcessor.createExternalLinkElement
protected String createExternalLinkElement(final DocBookVersion docBookVersion, final String title, final String url) { final StringBuilder linkEle = new StringBuilder(); if (docBookVersion == DocBookVersion.DOCBOOK_50) { linkEle.append("<link xmlns:xlink=\"http://www.w3.org/1999/xlink\" xli...
java
protected String createExternalLinkElement(final DocBookVersion docBookVersion, final String title, final String url) { final StringBuilder linkEle = new StringBuilder(); if (docBookVersion == DocBookVersion.DOCBOOK_50) { linkEle.append("<link xmlns:xlink=\"http://www.w3.org/1999/xlink\" xli...
[ "protected", "String", "createExternalLinkElement", "(", "final", "DocBookVersion", "docBookVersion", ",", "final", "String", "title", ",", "final", "String", "url", ")", "{", "final", "StringBuilder", "linkEle", "=", "new", "StringBuilder", "(", ")", ";", "if", ...
Creates a string that represents an external link. @param docBookVersion The DocBook Version the link should be created for. @param title @param url The links url. @return
[ "Creates", "a", "string", "that", "represents", "an", "external", "link", "." ]
5436d36ba1b3c5baa246b270e5fc350e6778bce8
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java#L268-L280
151,581
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java
DocBookXMLPreProcessor.processTopicAdditionalInfo
public void processTopicAdditionalInfo(final BuildData buildData, final SpecTopic specTopic, final Document document) throws BuildProcessingException { // First check if we should even bother processing any additional info based on build data if (!shouldAddAdditionalInfo(buildData, specTopic...
java
public void processTopicAdditionalInfo(final BuildData buildData, final SpecTopic specTopic, final Document document) throws BuildProcessingException { // First check if we should even bother processing any additional info based on build data if (!shouldAddAdditionalInfo(buildData, specTopic...
[ "public", "void", "processTopicAdditionalInfo", "(", "final", "BuildData", "buildData", ",", "final", "SpecTopic", "specTopic", ",", "final", "Document", "document", ")", "throws", "BuildProcessingException", "{", "// First check if we should even bother processing any addition...
Adds some debug information and links to the end of the topic
[ "Adds", "some", "debug", "information", "and", "links", "to", "the", "end", "of", "the", "topic" ]
5436d36ba1b3c5baa246b270e5fc350e6778bce8
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java#L383-L404
151,582
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java
DocBookXMLPreProcessor.shouldAddAdditionalInfo
protected static boolean shouldAddAdditionalInfo(final BuildData buildData, final SpecTopic specTopic) { return (buildData.getBuildOptions().getInsertEditorLinks() && specTopic.getTopicType() != TopicType.AUTHOR_GROUP) || (buildData .getBuildOptions().getInsertBugLinks() && specTopic.getTopicTyp...
java
protected static boolean shouldAddAdditionalInfo(final BuildData buildData, final SpecTopic specTopic) { return (buildData.getBuildOptions().getInsertEditorLinks() && specTopic.getTopicType() != TopicType.AUTHOR_GROUP) || (buildData .getBuildOptions().getInsertBugLinks() && specTopic.getTopicTyp...
[ "protected", "static", "boolean", "shouldAddAdditionalInfo", "(", "final", "BuildData", "buildData", ",", "final", "SpecTopic", "specTopic", ")", "{", "return", "(", "buildData", ".", "getBuildOptions", "(", ")", ".", "getInsertEditorLinks", "(", ")", "&&", "specT...
Checks to see if additional info should be added based on the build options and the spec topic type. @param buildData @param specTopic @return
[ "Checks", "to", "see", "if", "additional", "info", "should", "be", "added", "based", "on", "the", "build", "options", "and", "the", "spec", "topic", "type", "." ]
5436d36ba1b3c5baa246b270e5fc350e6778bce8
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java#L413-L416
151,583
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java
DocBookXMLPreProcessor.processIdList
private static List<InjectionData> processIdList(final String list) { /* find the individual topic ids */ final String[] ids = list.split(","); List<InjectionData> retValue = new ArrayList<InjectionData>(ids.length); /* clean the topic ids */ for (final String id : ids) { ...
java
private static List<InjectionData> processIdList(final String list) { /* find the individual topic ids */ final String[] ids = list.split(","); List<InjectionData> retValue = new ArrayList<InjectionData>(ids.length); /* clean the topic ids */ for (final String id : ids) { ...
[ "private", "static", "List", "<", "InjectionData", ">", "processIdList", "(", "final", "String", "list", ")", "{", "/* find the individual topic ids */", "final", "String", "[", "]", "ids", "=", "list", ".", "split", "(", "\",\"", ")", ";", "List", "<", "Inj...
Takes a comma separated list of ints, and returns an array of Integers. This is used when processing custom injection points.
[ "Takes", "a", "comma", "separated", "list", "of", "ints", "and", "returns", "an", "array", "of", "Integers", ".", "This", "is", "used", "when", "processing", "custom", "injection", "points", "." ]
5436d36ba1b3c5baa246b270e5fc350e6778bce8
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java#L468-L492
151,584
arxanchain/java-common
src/main/java/com/arxanfintech/common/util/RLP.java
RLP.encodeLength
public static byte[] encodeLength(int length, int offset) { if (length < SIZE_THRESHOLD) { byte firstByte = (byte) (length + offset); return new byte[] { firstByte }; } else if (length < MAX_ITEM_LENGTH) { byte[] binaryLength; if (length > 0xFF) ...
java
public static byte[] encodeLength(int length, int offset) { if (length < SIZE_THRESHOLD) { byte firstByte = (byte) (length + offset); return new byte[] { firstByte }; } else if (length < MAX_ITEM_LENGTH) { byte[] binaryLength; if (length > 0xFF) ...
[ "public", "static", "byte", "[", "]", "encodeLength", "(", "int", "length", ",", "int", "offset", ")", "{", "if", "(", "length", "<", "SIZE_THRESHOLD", ")", "{", "byte", "firstByte", "=", "(", "byte", ")", "(", "length", "+", "offset", ")", ";", "ret...
Integer limitation goes up to 2^31-1 so length can never be bigger than MAX_ITEM_LENGTH @param length length @param offset offset @return byte[]
[ "Integer", "limitation", "goes", "up", "to", "2^31", "-", "1", "so", "length", "can", "never", "be", "bigger", "than", "MAX_ITEM_LENGTH" ]
3ddfedfd948f5bab3fee0b74b85cdce4702ed84e
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/RLP.java#L437-L452
151,585
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getIntensity
public double getIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return ti; }
java
public double getIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return ti; }
[ "public", "double", "getIntensity", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "ti", ";", "}" ]
Returns the magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilometers. @retur...
[ "Returns", "the", "magnetic", "field", "intensity", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "nano", "Tesla", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L968-L972
151,586
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getHorizontalIntensity
public double getHorizontalIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return bh; }
java
public double getHorizontalIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return bh; }
[ "public", "double", "getHorizontalIntensity", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "bh", ";", ...
Returns the horizontal magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilomete...
[ "Returns", "the", "horizontal", "magnetic", "field", "intensity", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "nano", "Tesla", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L1003-L1007
151,587
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getVerticalIntensity
public double getVerticalIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return bz; }
java
public double getVerticalIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return bz; }
[ "public", "double", "getVerticalIntensity", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "bz", ";", "...
Returns the vertical magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilometers...
[ "Returns", "the", "vertical", "magnetic", "field", "intensity", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "nano", "Tesla", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L1038-L1042
151,588
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getNorthIntensity
public double getNorthIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return by; }
java
public double getNorthIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return by; }
[ "public", "double", "getNorthIntensity", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "by", ";", "}" ...
Returns the northerly magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilometer...
[ "Returns", "the", "northerly", "magnetic", "field", "intensity", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "nano", "Tesla", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L1073-L1077
151,589
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getEastIntensity
public double getEastIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return bx; }
java
public double getEastIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return bx; }
[ "public", "double", "getEastIntensity", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "bx", ";", "}" ]
Returns the easterly magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilometers...
[ "Returns", "the", "easterly", "magnetic", "field", "intensity", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "nano", "Tesla", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L1108-L1112
151,590
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getDipAngle
public double getDipAngle( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return dip; }
java
public double getDipAngle( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return dip; }
[ "public", "double", "getDipAngle", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "dip", ";", "}" ]
Returns the magnetic field dip angle from the Department of Defense geomagnetic model and data, in degrees. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilometers. @retur...
[ "Returns", "the", "magnetic", "field", "dip", "angle", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "degrees", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L1143-L1147
151,591
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.setCoeff
private void setCoeff() { c[0][0] = 0.0; cd[0][0] = 0.0; epoch = Double.parseDouble(input[0].trim().split("[\\s]+")[0]); defaultDate = epoch + 2.5; String [] tokens; //loop to get data from internal values for(int i=1; i<input.len...
java
private void setCoeff() { c[0][0] = 0.0; cd[0][0] = 0.0; epoch = Double.parseDouble(input[0].trim().split("[\\s]+")[0]); defaultDate = epoch + 2.5; String [] tokens; //loop to get data from internal values for(int i=1; i<input.len...
[ "private", "void", "setCoeff", "(", ")", "{", "c", "[", "0", "]", "[", "0", "]", "=", "0.0", ";", "cd", "[", "0", "]", "[", "0", "]", "=", "0.0", ";", "epoch", "=", "Double", ".", "parseDouble", "(", "input", "[", "0", "]", ".", "trim", "("...
This method sets the input data to the internal fit coefficents. If there is an exception reading the input file WMM.COF, these values are used. NOTE: This method is not tested by the JUnit test, unless the WMM.COF file is missing.
[ "This", "method", "sets", "the", "input", "data", "to", "the", "internal", "fit", "coefficents", ".", "If", "there", "is", "an", "exception", "reading", "the", "input", "file", "WMM", ".", "COF", "these", "values", "are", "used", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L1156-L1190
151,592
OwlPlatform/java-owl-worldmodel
src/main/java/com/owlplatform/worldmodel/client/Response.java
Response.setState
void setState(final WorldState state) { if (this.ready) { throw new IllegalStateException( "Cannot reassign the world state of a response."); } this.state = state; this.ready = true; // Notify any blocking/waiting threads synchronized (this) { this.notifyAll(); } }
java
void setState(final WorldState state) { if (this.ready) { throw new IllegalStateException( "Cannot reassign the world state of a response."); } this.state = state; this.ready = true; // Notify any blocking/waiting threads synchronized (this) { this.notifyAll(); } }
[ "void", "setState", "(", "final", "WorldState", "state", ")", "{", "if", "(", "this", ".", "ready", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Cannot reassign the world state of a response.\"", ")", ";", "}", "this", ".", "state", "=", "state", ...
Sets the state of this Response message. This method should only be called once. @param state
[ "Sets", "the", "state", "of", "this", "Response", "message", ".", "This", "method", "should", "only", "be", "called", "once", "." ]
a850e8b930c6e9787c7cad30c0de887858ca563d
https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/Response.java#L94-L105
151,593
js-lib-com/commons
src/main/java/js/converter/TimeZoneConverter.java
TimeZoneConverter.asObject
@Override public <T> T asObject(String string, Class<T> valueType) { // at this point value type is guaranteed to be a kind of TimeZone return (T) TimeZone.getTimeZone(string); }
java
@Override public <T> T asObject(String string, Class<T> valueType) { // at this point value type is guaranteed to be a kind of TimeZone return (T) TimeZone.getTimeZone(string); }
[ "@", "Override", "public", "<", "T", ">", "T", "asObject", "(", "String", "string", ",", "Class", "<", "T", ">", "valueType", ")", "{", "// at this point value type is guaranteed to be a kind of TimeZone\r", "return", "(", "T", ")", "TimeZone", ".", "getTimeZone",...
Create time zone instance from time zone ID. If time zone ID is not recognized return UTC.
[ "Create", "time", "zone", "instance", "from", "time", "zone", "ID", ".", "If", "time", "zone", "ID", "is", "not", "recognized", "return", "UTC", "." ]
f8c64482142b163487745da74feb106f0765c16b
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/TimeZoneConverter.java#L18-L22
151,594
JM-Lab/utils-java9
src/main/java/kr/jm/utils/flow/processor/JMProcessorBuilder.java
JMProcessorBuilder.build
public static <I, O> JMProcessor<I, O> build( Function<I, O> transformerFunction) { return new JMProcessor<>(transformerFunction); }
java
public static <I, O> JMProcessor<I, O> build( Function<I, O> transformerFunction) { return new JMProcessor<>(transformerFunction); }
[ "public", "static", "<", "I", ",", "O", ">", "JMProcessor", "<", "I", ",", "O", ">", "build", "(", "Function", "<", "I", ",", "O", ">", "transformerFunction", ")", "{", "return", "new", "JMProcessor", "<>", "(", "transformerFunction", ")", ";", "}" ]
Build jm processor. @param <I> the type parameter @param <O> the type parameter @param transformerFunction the transformer function @return the jm processor
[ "Build", "jm", "processor", "." ]
ee80235b2760396a616cf7563cbdc98d4affe8e1
https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/flow/processor/JMProcessorBuilder.java#L22-L25
151,595
JM-Lab/utils-java9
src/main/java/kr/jm/utils/flow/processor/JMProcessorBuilder.java
JMProcessorBuilder.combine
public static <T, M, R> Processor<T, R> combine( Processor<T, M> processor1, Processor<M, R> processor2) { processor1.subscribe(processor2); return new Processor<>() { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { processor2....
java
public static <T, M, R> Processor<T, R> combine( Processor<T, M> processor1, Processor<M, R> processor2) { processor1.subscribe(processor2); return new Processor<>() { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { processor2....
[ "public", "static", "<", "T", ",", "M", ",", "R", ">", "Processor", "<", "T", ",", "R", ">", "combine", "(", "Processor", "<", "T", ",", "M", ">", "processor1", ",", "Processor", "<", "M", ",", "R", ">", "processor2", ")", "{", "processor1", ".",...
Combine processor. @param <T> the type parameter @param <M> the type parameter @param <R> the type parameter @param processor1 the processor 1 @param processor2 the processor 2 @return the processor
[ "Combine", "processor", "." ]
ee80235b2760396a616cf7563cbdc98d4affe8e1
https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/flow/processor/JMProcessorBuilder.java#L37-L62
151,596
jbundle/jbundle
main/msg/src/main/java/org/jbundle/main/msg/screen/MessageLogGridScreen.java
MessageLogGridScreen.isContactDisplay
public boolean isContactDisplay() { String strUserContactType = this.getProperty(DBParams.CONTACT_TYPE); String strUserContactID = this.getProperty(DBParams.CONTACT_ID); String strContactType = ((ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_TYPE_ID))...
java
public boolean isContactDisplay() { String strUserContactType = this.getProperty(DBParams.CONTACT_TYPE); String strUserContactID = this.getProperty(DBParams.CONTACT_ID); String strContactType = ((ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_TYPE_ID))...
[ "public", "boolean", "isContactDisplay", "(", ")", "{", "String", "strUserContactType", "=", "this", ".", "getProperty", "(", "DBParams", ".", "CONTACT_TYPE", ")", ";", "String", "strUserContactID", "=", "this", ".", "getProperty", "(", "DBParams", ".", "CONTACT...
IsContactDisplay Method.
[ "IsContactDisplay", "Method", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/screen/MessageLogGridScreen.java#L137-L149
151,597
lightblueseas/vintage-time
src/main/java/de/alpharogroup/date/ParseDateExtensions.java
ParseDateExtensions.parseDate
public static Date parseDate(final String date, final List<String> patterns) { for (final String pattern : patterns) { final SimpleDateFormat formatter = new SimpleDateFormat(pattern); try { return formatter.parse(date); } catch (final ParseException e) { // Do nothing... } } retur...
java
public static Date parseDate(final String date, final List<String> patterns) { for (final String pattern : patterns) { final SimpleDateFormat formatter = new SimpleDateFormat(pattern); try { return formatter.parse(date); } catch (final ParseException e) { // Do nothing... } } retur...
[ "public", "static", "Date", "parseDate", "(", "final", "String", "date", ",", "final", "List", "<", "String", ">", "patterns", ")", "{", "for", "(", "final", "String", "pattern", ":", "patterns", ")", "{", "final", "SimpleDateFormat", "formatter", "=", "ne...
Tries to convert the given String to a Date. @param date The date to convert as String. @param patterns The date patterns to convert the String to a date-object. @return Gives a Date if the convertion was successfull otherwise null.
[ "Tries", "to", "convert", "the", "given", "String", "to", "a", "Date", "." ]
fbf201e679d9f9b92e7b5771f3eea1413cc2e113
https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/ParseDateExtensions.java#L56-L71
151,598
lightblueseas/vintage-time
src/main/java/de/alpharogroup/date/ParseDateExtensions.java
ParseDateExtensions.parseToDate
public static Date parseToDate(final String datum, final String[] formats, final Locale locale) { for (final String format : formats) { final SimpleDateFormat sdf = new SimpleDateFormat(format, locale); try { return sdf.parse(datum); } catch (final ParseException e) { // Do nothing... ...
java
public static Date parseToDate(final String datum, final String[] formats, final Locale locale) { for (final String format : formats) { final SimpleDateFormat sdf = new SimpleDateFormat(format, locale); try { return sdf.parse(datum); } catch (final ParseException e) { // Do nothing... ...
[ "public", "static", "Date", "parseToDate", "(", "final", "String", "datum", ",", "final", "String", "[", "]", "formats", ",", "final", "Locale", "locale", ")", "{", "for", "(", "final", "String", "format", ":", "formats", ")", "{", "final", "SimpleDateForm...
Returns a date-object if the array with the formats are valid otherwise null. @param datum The date as string which to parse to a date-object. @param formats The string-array with the date-patterns. @param locale THe Locale for the SimpleDateFormat. @return A date-object if the array with the formats are valid otherwi...
[ "Returns", "a", "date", "-", "object", "if", "the", "array", "with", "the", "formats", "are", "valid", "otherwise", "null", "." ]
fbf201e679d9f9b92e7b5771f3eea1413cc2e113
https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/ParseDateExtensions.java#L103-L118
151,599
jpelzer/pelzer-spring
src/main/java/com/pelzer/util/spring/SpringUtil.java
SpringUtil.readBeanName
private String readBeanName(Class beanClass) throws NoSuchFieldException, IllegalAccessException{ final Field field = beanClass.getField("BEAN_NAME"); return String.valueOf(field.get(null)); }
java
private String readBeanName(Class beanClass) throws NoSuchFieldException, IllegalAccessException{ final Field field = beanClass.getField("BEAN_NAME"); return String.valueOf(field.get(null)); }
[ "private", "String", "readBeanName", "(", "Class", "beanClass", ")", "throws", "NoSuchFieldException", ",", "IllegalAccessException", "{", "final", "Field", "field", "=", "beanClass", ".", "getField", "(", "\"BEAN_NAME\"", ")", ";", "return", "String", ".", "value...
Find what's stored in 'BEAN_NAME' and return it, or toss an exception.
[ "Find", "what", "s", "stored", "in", "BEAN_NAME", "and", "return", "it", "or", "toss", "an", "exception", "." ]
b5bd9877df244d9092df01c12d81e7b35d438c57
https://github.com/jpelzer/pelzer-spring/blob/b5bd9877df244d9092df01c12d81e7b35d438c57/src/main/java/com/pelzer/util/spring/SpringUtil.java#L107-L110