repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java
DynamicURLClassLoader.defineClass
protected Class<?> defineClass(String name, sun.misc.Resource res) throws IOException { final int i = name.lastIndexOf('.'); final URL url = res.getCodeSourceURL(); if (i != -1) { final String pkgname = name.substring(0, i); // Check if package already loaded. final Package pkg = getPackage(pkgname); ...
java
protected Class<?> defineClass(String name, sun.misc.Resource res) throws IOException { final int i = name.lastIndexOf('.'); final URL url = res.getCodeSourceURL(); if (i != -1) { final String pkgname = name.substring(0, i); // Check if package already loaded. final Package pkg = getPackage(pkgname); ...
[ "protected", "Class", "<", "?", ">", "defineClass", "(", "String", "name", ",", "sun", ".", "misc", ".", "Resource", "res", ")", "throws", "IOException", "{", "final", "int", "i", "=", "name", ".", "lastIndexOf", "(", "'", "'", ")", ";", "final", "UR...
Defines a Class using the class bytes obtained from the specified Resource. The resulting Class must be resolved before it can be used. @param name is the name of the class to define @param res is the resource from which the class byte-code could be obtained @return the loaded class. @throws IOException in case the by...
[ "Defines", "a", "Class", "using", "the", "class", "bytes", "obtained", "from", "the", "specified", "Resource", ".", "The", "resulting", "Class", "must", "be", "resolved", "before", "it", "can", "be", "used", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java#L211-L256
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java
DynamicURLClassLoader.definePackage
@SuppressWarnings("checkstyle:npathcomplexity") protected Package definePackage(String name, Manifest man, URL url) throws IllegalArgumentException { final String path = name.replace('.', '/').concat("/"); //$NON-NLS-1$ String specTitle = null; String specVersion = null; String specVendor = null; String impl...
java
@SuppressWarnings("checkstyle:npathcomplexity") protected Package definePackage(String name, Manifest man, URL url) throws IllegalArgumentException { final String path = name.replace('.', '/').concat("/"); //$NON-NLS-1$ String specTitle = null; String specVersion = null; String specVendor = null; String impl...
[ "@", "SuppressWarnings", "(", "\"checkstyle:npathcomplexity\"", ")", "protected", "Package", "definePackage", "(", "String", "name", ",", "Manifest", "man", ",", "URL", "url", ")", "throws", "IllegalArgumentException", "{", "final", "String", "path", "=", "name", ...
Defines a new package by name in this ClassLoader. The attributes contained in the specified Manifest will be used to obtain package version and sealing information. For sealed packages, the additional URL specifies the code source URL from which the package was loaded. @param name the package name @param man the M...
[ "Defines", "a", "new", "package", "by", "name", "in", "this", "ClassLoader", ".", "The", "attributes", "contained", "in", "the", "specified", "Manifest", "will", "be", "used", "to", "obtain", "package", "version", "and", "sealing", "information", ".", "For", ...
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java#L273-L324
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java
DynamicURLClassLoader.findResource
@Override @Pure public URL findResource(final String name) { /* * The same restriction to finding classes applies to resources */ final URL url = AccessController.doPrivileged(new PrivilegedAction<URL>() { @Override public URL run() { return DynamicURLClassLoader.this.ucp.findResource(name, tru...
java
@Override @Pure public URL findResource(final String name) { /* * The same restriction to finding classes applies to resources */ final URL url = AccessController.doPrivileged(new PrivilegedAction<URL>() { @Override public URL run() { return DynamicURLClassLoader.this.ucp.findResource(name, tru...
[ "@", "Override", "@", "Pure", "public", "URL", "findResource", "(", "final", "String", "name", ")", "{", "/*\n\t\t * The same restriction to finding classes applies to resources\n\t\t */", "final", "URL", "url", "=", "AccessController", ".", "doPrivileged", "(", "new", ...
Finds the resource with the specified name on the URL search path. @param name the name of the resource @return a <code>URL</code> for the resource, or <code>null</code> if the resource could not be found.
[ "Finds", "the", "resource", "with", "the", "specified", "name", "on", "the", "URL", "search", "path", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java#L353-L367
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java
DynamicURLClassLoader.findResources
@Override @Pure public Enumeration<URL> findResources(final String name) throws IOException { final Enumeration<?> e = this.ucp.findResources(name, true); return new Enumeration<URL>() { private URL url; private boolean next() { if (this.url != null) { return true; } do { final URL u...
java
@Override @Pure public Enumeration<URL> findResources(final String name) throws IOException { final Enumeration<?> e = this.ucp.findResources(name, true); return new Enumeration<URL>() { private URL url; private boolean next() { if (this.url != null) { return true; } do { final URL u...
[ "@", "Override", "@", "Pure", "public", "Enumeration", "<", "URL", ">", "findResources", "(", "final", "String", "name", ")", "throws", "IOException", "{", "final", "Enumeration", "<", "?", ">", "e", "=", "this", ".", "ucp", ".", "findResources", "(", "n...
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name. @param name the resource name @exception IOException if an I/O exception occurs @return an <code>Enumeration</code> of <code>URL</code>s
[ "Returns", "an", "Enumeration", "of", "URLs", "representing", "all", "of", "the", "resources", "on", "the", "URL", "search", "path", "having", "the", "specified", "name", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java#L377-L424
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java
DynamicURLClassLoader.getPermissions
@Override protected PermissionCollection getPermissions(CodeSource codesource) { final PermissionCollection perms = super.getPermissions(codesource); final URL url = codesource.getLocation(); Permission permission; URLConnection urlConnection; try { urlConnection = url.openConnection(); permission =...
java
@Override protected PermissionCollection getPermissions(CodeSource codesource) { final PermissionCollection perms = super.getPermissions(codesource); final URL url = codesource.getLocation(); Permission permission; URLConnection urlConnection; try { urlConnection = url.openConnection(); permission =...
[ "@", "Override", "protected", "PermissionCollection", "getPermissions", "(", "CodeSource", "codesource", ")", "{", "final", "PermissionCollection", "perms", "=", "super", ".", "getPermissions", "(", "codesource", ")", ";", "final", "URL", "url", "=", "codesource", ...
Returns the permissions for the given codesource object. The implementation of this method first calls super.getPermissions and then adds permissions based on the URL of the codesource. <p>If the protocol is "file" and the path specifies a file, then permission to read that file is granted. If protocol is "file" and t...
[ "Returns", "the", "permissions", "for", "the", "given", "codesource", "object", ".", "The", "implementation", "of", "this", "method", "first", "calls", "super", ".", "getPermissions", "and", "then", "adds", "permissions", "based", "on", "the", "URL", "of", "th...
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java#L443-L505
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java
DynamicURLClassLoader.mergeClassPath
private static URL[] mergeClassPath(URL... urls) { final String path = System.getProperty("java.class.path"); //$NON-NLS-1$ final String separator = System.getProperty("path.separator"); //$NON-NLS-1$ final String[] parts = path.split(Pattern.quote(separator)); final URL[] u = new URL[parts.length +...
java
private static URL[] mergeClassPath(URL... urls) { final String path = System.getProperty("java.class.path"); //$NON-NLS-1$ final String separator = System.getProperty("path.separator"); //$NON-NLS-1$ final String[] parts = path.split(Pattern.quote(separator)); final URL[] u = new URL[parts.length +...
[ "private", "static", "URL", "[", "]", "mergeClassPath", "(", "URL", "...", "urls", ")", "{", "final", "String", "path", "=", "System", ".", "getProperty", "(", "\"java.class.path\"", ")", ";", "//$NON-NLS-1$", "final", "String", "separator", "=", "System", "...
Merge the specified URLs to the current classpath.
[ "Merge", "the", "specified", "URLs", "to", "the", "current", "classpath", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java#L537-L551
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListUtil.java
ListUtil.remove
public static <E> int remove(List<E> list, Comparator<? super E> comparator, E data) { assert list != null; assert comparator != null; assert data != null; int first = 0; int last = list.size() - 1; while (last >= first) { final int center = (first + last) / 2; final E dt = list.get(center); final ...
java
public static <E> int remove(List<E> list, Comparator<? super E> comparator, E data) { assert list != null; assert comparator != null; assert data != null; int first = 0; int last = list.size() - 1; while (last >= first) { final int center = (first + last) / 2; final E dt = list.get(center); final ...
[ "public", "static", "<", "E", ">", "int", "remove", "(", "List", "<", "E", ">", "list", ",", "Comparator", "<", "?", "super", "E", ">", "comparator", ",", "E", "data", ")", "{", "assert", "list", "!=", "null", ";", "assert", "comparator", "!=", "nu...
Remove the given element from the list using a dichotomic algorithm. <p>This function ensure that the comparator is invoked as: <code>comparator(data, dataAlreadyInList)</code>. @param <E> is the type of the elements in the list. @param list is the list to change. @param comparator is the comparator of elements. @par...
[ "Remove", "the", "given", "element", "from", "the", "list", "using", "a", "dichotomic", "algorithm", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListUtil.java#L58-L78
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListUtil.java
ListUtil.addIfAbsent
@Inline(value = "add($1, $2, $3, false, false)") public static <E> int addIfAbsent(List<E> list, Comparator<? super E> comparator, E data) { return add(list, comparator, data, false, false); }
java
@Inline(value = "add($1, $2, $3, false, false)") public static <E> int addIfAbsent(List<E> list, Comparator<? super E> comparator, E data) { return add(list, comparator, data, false, false); }
[ "@", "Inline", "(", "value", "=", "\"add($1, $2, $3, false, false)\"", ")", "public", "static", "<", "E", ">", "int", "addIfAbsent", "(", "List", "<", "E", ">", "list", ",", "Comparator", "<", "?", "super", "E", ">", "comparator", ",", "E", "data", ")", ...
Add the given element in the main list using a dichotomic algorithm if the element is not already present. <p>This function ensure that the comparator is invoked as: <code>comparator(data, dataAlreadyInList)</code>. @param <E> is the type of the elements in the list. @param list is the list to change. @param comparat...
[ "Add", "the", "given", "element", "in", "the", "main", "list", "using", "a", "dichotomic", "algorithm", "if", "the", "element", "is", "not", "already", "present", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListUtil.java#L92-L95
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListUtil.java
ListUtil.add
public static <E> int add(List<E> list, Comparator<? super E> comparator, E data, boolean allowMultipleOccurencesOfSameValue, boolean allowReplacement) { assert list != null; assert comparator != null; assert data != null; int first = 0; int last = list.size() - 1; while (last >= first) { final int ce...
java
public static <E> int add(List<E> list, Comparator<? super E> comparator, E data, boolean allowMultipleOccurencesOfSameValue, boolean allowReplacement) { assert list != null; assert comparator != null; assert data != null; int first = 0; int last = list.size() - 1; while (last >= first) { final int ce...
[ "public", "static", "<", "E", ">", "int", "add", "(", "List", "<", "E", ">", "list", ",", "Comparator", "<", "?", "super", "E", ">", "comparator", ",", "E", "data", ",", "boolean", "allowMultipleOccurencesOfSameValue", ",", "boolean", "allowReplacement", "...
Add the given element in the main list using a dichotomic algorithm. <p>This function ensure that the comparator is invoked as: <code>comparator(data, dataAlreadyInList)</code>. @param <E> is the type of the elements in the list. @param list is the list to change. @param comparator is the comparator of elements. @par...
[ "Add", "the", "given", "element", "in", "the", "main", "list", "using", "a", "dichotomic", "algorithm", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListUtil.java#L112-L138
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListUtil.java
ListUtil.contains
@Pure public static <E> boolean contains(List<E> list, Comparator<? super E> comparator, E data) { assert list != null; assert comparator != null; assert data != null; int first = 0; int last = list.size() - 1; while (last >= first) { final int center = (first + last) / 2; final E dt = list.get(cente...
java
@Pure public static <E> boolean contains(List<E> list, Comparator<? super E> comparator, E data) { assert list != null; assert comparator != null; assert data != null; int first = 0; int last = list.size() - 1; while (last >= first) { final int center = (first + last) / 2; final E dt = list.get(cente...
[ "@", "Pure", "public", "static", "<", "E", ">", "boolean", "contains", "(", "List", "<", "E", ">", "list", ",", "Comparator", "<", "?", "super", "E", ">", "comparator", ",", "E", "data", ")", "{", "assert", "list", "!=", "null", ";", "assert", "com...
Replies if the given element is inside the list, using a dichotomic algorithm. <p>This function ensure that the comparator is invoked as: <code>comparator(data, dataAlreadyInList)</code>. @param <E> is the type of the elements in the list. @param list is the list to explore. @param comparator is the comparator of ele...
[ "Replies", "if", "the", "given", "element", "is", "inside", "the", "list", "using", "a", "dichotomic", "algorithm", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListUtil.java#L150-L170
train
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListUtil.java
ListUtil.reverseIterator
public static <T> Iterator<T> reverseIterator(final List<T> list) { return new Iterator<T>() { private int next = list.size() - 1; @Override @Pure public boolean hasNext() { return this.next >= 0; } @Override public T next() { final int n = this.next; --this.next; try { re...
java
public static <T> Iterator<T> reverseIterator(final List<T> list) { return new Iterator<T>() { private int next = list.size() - 1; @Override @Pure public boolean hasNext() { return this.next >= 0; } @Override public T next() { final int n = this.next; --this.next; try { re...
[ "public", "static", "<", "T", ">", "Iterator", "<", "T", ">", "reverseIterator", "(", "final", "List", "<", "T", ">", "list", ")", "{", "return", "new", "Iterator", "<", "T", ">", "(", ")", "{", "private", "int", "next", "=", "list", ".", "size", ...
Replies an iterator that goes from end to start of the given list. <p>The replied iterator dos not support removals. @param <T> the type of the list elements. @param list the list. @return the reverse iterator. @since 14.0
[ "Replies", "an", "iterator", "that", "goes", "from", "end", "to", "start", "of", "the", "given", "list", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListUtil.java#L554-L577
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeClassWithDefault
@Pure public static Class<?> getAttributeClassWithDefault(Node document, boolean caseSensitive, Class<?> defaultValue, String... path) { assert document != null : AssertMessages.notNullParameter(0); final String v = getAttributeValue(document, caseSensitive, 0, path); if (v != null && !v.isEmpty()) { try {...
java
@Pure public static Class<?> getAttributeClassWithDefault(Node document, boolean caseSensitive, Class<?> defaultValue, String... path) { assert document != null : AssertMessages.notNullParameter(0); final String v = getAttributeValue(document, caseSensitive, 0, path); if (v != null && !v.isEmpty()) { try {...
[ "@", "Pure", "public", "static", "Class", "<", "?", ">", "getAttributeClassWithDefault", "(", "Node", "document", ",", "boolean", "caseSensitive", ",", "Class", "<", "?", ">", "defaultValue", ",", "String", "...", "path", ")", "{", "assert", "document", "!="...
Read a java class. @param document is the XML document to explore. @param caseSensitive indicates of the {@code path}'s components are case sensitive. @param defaultValue is the default value replied if no attribute was found. @param path is the list of and ended by the attribute's name. @return the java class or <cod...
[ "Read", "a", "java", "class", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L382-L396
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getChild
@Pure public static <T extends Node> T getChild(Node parent, Class<T> type) { assert parent != null : AssertMessages.notNullParameter(0); assert type != null : AssertMessages.notNullParameter(1); final NodeList children = parent.getChildNodes(); final int len = children.getLength(); for (int i = 0; i < len; ...
java
@Pure public static <T extends Node> T getChild(Node parent, Class<T> type) { assert parent != null : AssertMessages.notNullParameter(0); assert type != null : AssertMessages.notNullParameter(1); final NodeList children = parent.getChildNodes(); final int len = children.getLength(); for (int i = 0; i < len; ...
[ "@", "Pure", "public", "static", "<", "T", "extends", "Node", ">", "T", "getChild", "(", "Node", "parent", ",", "Class", "<", "T", ">", "type", ")", "{", "assert", "parent", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ...
Replies the first child node that has the specified type. @param <T> is the type of the desired child @param parent is the element from which the child must be extracted. @param type is the type of the desired child @return the child node or <code>null</code> if none.
[ "Replies", "the", "first", "child", "node", "that", "has", "the", "specified", "type", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1305-L1318
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getDocumentFor
@Pure public static Document getDocumentFor(Node node) { Node localnode = node; while (localnode != null) { if (localnode instanceof Document) { return (Document) localnode; } localnode = localnode.getParentNode(); } return null; }
java
@Pure public static Document getDocumentFor(Node node) { Node localnode = node; while (localnode != null) { if (localnode instanceof Document) { return (Document) localnode; } localnode = localnode.getParentNode(); } return null; }
[ "@", "Pure", "public", "static", "Document", "getDocumentFor", "(", "Node", "node", ")", "{", "Node", "localnode", "=", "node", ";", "while", "(", "localnode", "!=", "null", ")", "{", "if", "(", "localnode", "instanceof", "Document", ")", "{", "return", ...
Replies the XML Document that is containing the given node. @param node the node. @return the Document in which the given node is, or <code>null</code> if not found.
[ "Replies", "the", "XML", "Document", "that", "is", "containing", "the", "given", "node", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1326-L1336
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getText
@Pure public static String getText(Node document, String... path) { assert document != null : AssertMessages.notNullParameter(0); Node parentNode = getNodeFromPath(document, path); if (parentNode == null) { parentNode = document; } final StringBuilder text = new StringBuilder(); final NodeList children ...
java
@Pure public static String getText(Node document, String... path) { assert document != null : AssertMessages.notNullParameter(0); Node parentNode = getNodeFromPath(document, path); if (parentNode == null) { parentNode = document; } final StringBuilder text = new StringBuilder(); final NodeList children ...
[ "@", "Pure", "public", "static", "String", "getText", "(", "Node", "document", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "Node", "parentNode", "=", "getNo...
Replies the text inside the node at the specified path. <p>The path is an ordered list of tag's names and ended by the name of the desired node. Be careful about the fact that the names are case sensitives. @param document is the XML document to explore. @param path is the list of names. This path may be empty. @retu...
[ "Replies", "the", "text", "inside", "the", "node", "at", "the", "specified", "path", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1674-L1694
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.iterate
@Pure public static Iterator<Node> iterate(Node parent, String nodeName) { assert parent != null : AssertMessages.notNullParameter(0); assert nodeName != null && !nodeName.isEmpty() : AssertMessages.notNullParameter(0); return new NameBasedIterator(parent, nodeName); }
java
@Pure public static Iterator<Node> iterate(Node parent, String nodeName) { assert parent != null : AssertMessages.notNullParameter(0); assert nodeName != null && !nodeName.isEmpty() : AssertMessages.notNullParameter(0); return new NameBasedIterator(parent, nodeName); }
[ "@", "Pure", "public", "static", "Iterator", "<", "Node", ">", "iterate", "(", "Node", "parent", ",", "String", "nodeName", ")", "{", "assert", "parent", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "assert", "nodeName"...
Replies an iterator on nodes that have the specified node name. @param parent is the node from which the children must be extracted. @param nodeName is the name of the extracted nodes @return the iterator on the parents.
[ "Replies", "an", "iterator", "on", "nodes", "that", "have", "the", "specified", "node", "name", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1702-L1707
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.parseObject
@Pure public static Object parseObject(String xmlSerializedObject) throws IOException, ClassNotFoundException { assert xmlSerializedObject != null : AssertMessages.notNullParameter(0); try (ByteArrayInputStream bais = new ByteArrayInputStream(Base64.getDecoder().decode(xmlSerializedObject))) { final ObjectInput...
java
@Pure public static Object parseObject(String xmlSerializedObject) throws IOException, ClassNotFoundException { assert xmlSerializedObject != null : AssertMessages.notNullParameter(0); try (ByteArrayInputStream bais = new ByteArrayInputStream(Base64.getDecoder().decode(xmlSerializedObject))) { final ObjectInput...
[ "@", "Pure", "public", "static", "Object", "parseObject", "(", "String", "xmlSerializedObject", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "assert", "xmlSerializedObject", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ...
Deserialize an object from the given XML string. @param xmlSerializedObject is the string which is containing the serialized object. @return the serialized object extracted from the XML string. @throws IOException if something wrong append during deserialization. @throws ClassNotFoundException is thrown when the class...
[ "Deserialize", "an", "object", "from", "the", "given", "XML", "string", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1811-L1818
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.parseString
@Pure public static byte[] parseString(String text) { return Base64.getDecoder().decode(Strings.nullToEmpty(text).trim()); }
java
@Pure public static byte[] parseString(String text) { return Base64.getDecoder().decode(Strings.nullToEmpty(text).trim()); }
[ "@", "Pure", "public", "static", "byte", "[", "]", "parseString", "(", "String", "text", ")", "{", "return", "Base64", ".", "getDecoder", "(", ")", ".", "decode", "(", "Strings", ".", "nullToEmpty", "(", "text", ")", ".", "trim", "(", ")", ")", ";", ...
Parse a Base64 string with contains a set of bytes. @param text is the string to uudecode @return the decoding result @see #toString(byte[])
[ "Parse", "a", "Base64", "string", "with", "contains", "a", "set", "of", "bytes", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1826-L1829
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.parseXML
@Pure public static Document parseXML(String xmlString) { assert xmlString != null : AssertMessages.notNullParameter(0); try { return readXML(new StringReader(xmlString)); } catch (Exception e) { // } return null; }
java
@Pure public static Document parseXML(String xmlString) { assert xmlString != null : AssertMessages.notNullParameter(0); try { return readXML(new StringReader(xmlString)); } catch (Exception e) { // } return null; }
[ "@", "Pure", "public", "static", "Document", "parseXML", "(", "String", "xmlString", ")", "{", "assert", "xmlString", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "try", "{", "return", "readXML", "(", "new", "StringReader...
Parse a string representation of an XML document. @param xmlString is the string representation of the XML document. @return the document or <code>null</code> in case of error.
[ "Parse", "a", "string", "representation", "of", "an", "XML", "document", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1836-L1845
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.writeResources
public static void writeResources(Element node, XMLResources resources, XMLBuilder builder) { if (resources != null) { final Element resourcesNode = builder.createElement(NODE_RESOURCES); for (final java.util.Map.Entry<Long, Entry> pair : resources.getPairs().entrySet()) { final Entry e = pair.getValue(); ...
java
public static void writeResources(Element node, XMLResources resources, XMLBuilder builder) { if (resources != null) { final Element resourcesNode = builder.createElement(NODE_RESOURCES); for (final java.util.Map.Entry<Long, Entry> pair : resources.getPairs().entrySet()) { final Entry e = pair.getValue(); ...
[ "public", "static", "void", "writeResources", "(", "Element", "node", ",", "XMLResources", "resources", ",", "XMLBuilder", "builder", ")", "{", "if", "(", "resources", "!=", "null", ")", "{", "final", "Element", "resourcesNode", "=", "builder", ".", "createEle...
Write the given resources into the given XML node. @param node is the XML node to fill. @param resources are the resources to put out. @param builder is the tool to create XML nodes.
[ "Write", "the", "given", "resources", "into", "the", "given", "XML", "node", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L2476-L2522
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.readResourceURL
@Pure public static URL readResourceURL(Element node, XMLResources resources, String... path) { final String stringValue = getAttributeValue(node, path); if (XMLResources.isStringIdentifier(stringValue)) { try { final long id = XMLResources.getNumericalIdentifier(stringValue); return resources.getResour...
java
@Pure public static URL readResourceURL(Element node, XMLResources resources, String... path) { final String stringValue = getAttributeValue(node, path); if (XMLResources.isStringIdentifier(stringValue)) { try { final long id = XMLResources.getNumericalIdentifier(stringValue); return resources.getResour...
[ "@", "Pure", "public", "static", "URL", "readResourceURL", "(", "Element", "node", ",", "XMLResources", "resources", ",", "String", "...", "path", ")", "{", "final", "String", "stringValue", "=", "getAttributeValue", "(", "node", ",", "path", ")", ";", "if",...
Replies the resource URL that is contained inside the XML attribute defined in the given node and with the given XML path. @param node is the XML node to read. @param resources is the collection of resources to read. @param path is the XML path, relative to the node, of the attribute. The last element of the array is ...
[ "Replies", "the", "resource", "URL", "that", "is", "contained", "inside", "the", "XML", "attribute", "defined", "in", "the", "given", "node", "and", "with", "the", "given", "XML", "path", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L2604-L2616
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/caller/StackTraceCaller.java
StackTraceCaller.getTraceElementAt
protected static StackTraceElement getTraceElementAt(int level) { if (level < 0) { return null; } try { final StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); int j = -1; boolean found = false; Class<?> type; for (int i = 0; i < stackTrace.length; ++i) { if (found) { ...
java
protected static StackTraceElement getTraceElementAt(int level) { if (level < 0) { return null; } try { final StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); int j = -1; boolean found = false; Class<?> type; for (int i = 0; i < stackTrace.length; ++i) { if (found) { ...
[ "protected", "static", "StackTraceElement", "getTraceElementAt", "(", "int", "level", ")", "{", "if", "(", "level", "<", "0", ")", "{", "return", "null", ";", "}", "try", "{", "final", "StackTraceElement", "[", "]", "stackTrace", "=", "Thread", ".", "curre...
Replies the stack trace element for the given level. <p>The given {@code level} permits to specify which class to reply: <ul> <li>{@code 0}: the class where is defined the function ({@code f<sub>0</sub>}) that has called one function of {@code Caller}</li> <li>{@code 1}: the class where is defined the function ({@code...
[ "Replies", "the", "stack", "trace", "element", "for", "the", "given", "level", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/caller/StackTraceCaller.java#L64-L98
train
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/NaryTreeNode.java
NaryTreeNode.moveTo
public boolean moveTo(N newParent) { if (newParent == null) { return false; } return moveTo(newParent, newParent.getChildCount()); }
java
public boolean moveTo(N newParent) { if (newParent == null) { return false; } return moveTo(newParent, newParent.getChildCount()); }
[ "public", "boolean", "moveTo", "(", "N", "newParent", ")", "{", "if", "(", "newParent", "==", "null", ")", "{", "return", "false", ";", "}", "return", "moveTo", "(", "newParent", ",", "newParent", ".", "getChildCount", "(", ")", ")", ";", "}" ]
Move this node in the given new parent node. <p>This function adds this node at the end of the list of the children of the new parent node. <p>This function is preferred to a sequence of calls to {@link #removeFromParent()} and {@link #setChildAt(int, NaryTreeNode)} because it fires a limited set of events dedicated ...
[ "Move", "this", "node", "in", "the", "given", "new", "parent", "node", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/NaryTreeNode.java#L221-L226
train
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/NaryTreeNode.java
NaryTreeNode.addChild
public final boolean addChild(int index, N newChild) { if (newChild == null) { return false; } final int count = (this.children == null) ? 0 : this.children.size(); final N oldParent = newChild.getParentNode(); if (oldParent != this && oldParent != null) { newChild.removeFromParent(); } final int...
java
public final boolean addChild(int index, N newChild) { if (newChild == null) { return false; } final int count = (this.children == null) ? 0 : this.children.size(); final N oldParent = newChild.getParentNode(); if (oldParent != this && oldParent != null) { newChild.removeFromParent(); } final int...
[ "public", "final", "boolean", "addChild", "(", "int", "index", ",", "N", "newChild", ")", "{", "if", "(", "newChild", "==", "null", ")", "{", "return", "false", ";", "}", "final", "int", "count", "=", "(", "this", ".", "children", "==", "null", ")", ...
Add a child node at the specified index. @param index is the insertion index. @param newChild is the new child to insert. @return <code>true</code> on success, otherwise <code>false</code>
[ "Add", "a", "child", "node", "at", "the", "specified", "index", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/NaryTreeNode.java#L341-L375
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/scoring/Scoreds.java
Scoreds.ByScoreThenByItem
public static final <T extends Comparable<T>> Ordering<Scored<T>> ByScoreThenByItem( Ordering<T> itemOrdering) { final Ordering<Scored<T>> byItem = itemOrdering.onResultOf(Scoreds.<T>itemsOnly()); final Ordering<Scored<T>> byScore = Scoreds.<T>ByScoreOnly(); return Ordering.compound(ImmutableList.of(...
java
public static final <T extends Comparable<T>> Ordering<Scored<T>> ByScoreThenByItem( Ordering<T> itemOrdering) { final Ordering<Scored<T>> byItem = itemOrdering.onResultOf(Scoreds.<T>itemsOnly()); final Ordering<Scored<T>> byScore = Scoreds.<T>ByScoreOnly(); return Ordering.compound(ImmutableList.of(...
[ "public", "static", "final", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "Ordering", "<", "Scored", "<", "T", ">", ">", "ByScoreThenByItem", "(", "Ordering", "<", "T", ">", "itemOrdering", ")", "{", "final", "Ordering", "<", "Scored", "<", "...
Comparator which compares Scoreds first by score, then by item, where the item ordering to use is explicitly specified.
[ "Comparator", "which", "compares", "Scoreds", "first", "by", "score", "then", "by", "item", "where", "the", "item", "ordering", "to", "use", "is", "explicitly", "specified", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/scoring/Scoreds.java#L117-L123
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/scoring/Scoreds.java
Scoreds.ByScoreThenByItem
public static final <T extends Comparable<T>> Ordering<Scored<T>> ByScoreThenByItem() { final Ordering<Scored<T>> byItem = Scoreds.<T>ByItemOnly(); final Ordering<Scored<T>> byScore = Scoreds.<T>ByScoreOnly(); return Ordering.compound(ImmutableList.of(byScore, byItem)); }
java
public static final <T extends Comparable<T>> Ordering<Scored<T>> ByScoreThenByItem() { final Ordering<Scored<T>> byItem = Scoreds.<T>ByItemOnly(); final Ordering<Scored<T>> byScore = Scoreds.<T>ByScoreOnly(); return Ordering.compound(ImmutableList.of(byScore, byItem)); }
[ "public", "static", "final", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "Ordering", "<", "Scored", "<", "T", ">", ">", "ByScoreThenByItem", "(", ")", "{", "final", "Ordering", "<", "Scored", "<", "T", ">", ">", "byItem", "=", "Scoreds", "...
Comparator which compares Scoreds first by score, then by item.
[ "Comparator", "which", "compares", "Scoreds", "first", "by", "score", "then", "by", "item", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/scoring/Scoreds.java#L128-L133
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/actions/OpenFileAction.java
OpenFileAction.onFileChoose
protected void onFileChoose(JFileChooser fileChooser, ActionEvent actionEvent) { final int returnVal = fileChooser.showOpenDialog(parent); if (returnVal == JFileChooser.APPROVE_OPTION) { final File file = fileChooser.getSelectedFile(); onApproveOption(file, actionEvent); } else { onCancel(actionE...
java
protected void onFileChoose(JFileChooser fileChooser, ActionEvent actionEvent) { final int returnVal = fileChooser.showOpenDialog(parent); if (returnVal == JFileChooser.APPROVE_OPTION) { final File file = fileChooser.getSelectedFile(); onApproveOption(file, actionEvent); } else { onCancel(actionE...
[ "protected", "void", "onFileChoose", "(", "JFileChooser", "fileChooser", ",", "ActionEvent", "actionEvent", ")", "{", "final", "int", "returnVal", "=", "fileChooser", ".", "showOpenDialog", "(", "parent", ")", ";", "if", "(", "returnVal", "==", "JFileChooser", "...
Callback method to interact on file choose. @param fileChooser the file chooser @param actionEvent the action event
[ "Callback", "method", "to", "interact", "on", "file", "choose", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/actions/OpenFileAction.java#L105-L118
train
digitalfondue/stampo
src/main/java/ch/digitalfondue/stampo/processor/LayoutProcessor.java
LayoutProcessor.applyLayout
LayoutProcessorOutput applyLayout(FileResource resource, Locale locale, Map<String, Object> model) { Optional<Path> layout = findLayout(resource); return layout.map(Path::toString)// .map(Files::getFileExtension)// .map(layoutEngines::get) // .orElse(lParam -> new LayoutProcess...
java
LayoutProcessorOutput applyLayout(FileResource resource, Locale locale, Map<String, Object> model) { Optional<Path> layout = findLayout(resource); return layout.map(Path::toString)// .map(Files::getFileExtension)// .map(layoutEngines::get) // .orElse(lParam -> new LayoutProcess...
[ "LayoutProcessorOutput", "applyLayout", "(", "FileResource", "resource", ",", "Locale", "locale", ",", "Map", "<", "String", ",", "Object", ">", "model", ")", "{", "Optional", "<", "Path", ">", "layout", "=", "findLayout", "(", "resource", ")", ";", "return"...
has been found, the file will be copied as it is
[ "has", "been", "found", "the", "file", "will", "be", "copied", "as", "it", "is" ]
5a41f20acd9211cf3951c30d0e0825994ae95573
https://github.com/digitalfondue/stampo/blob/5a41f20acd9211cf3951c30d0e0825994ae95573/src/main/java/ch/digitalfondue/stampo/processor/LayoutProcessor.java#L57-L67
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/temporal/Timex2Time.java
Timex2Time.modifiedCopy
@Deprecated public Timex2Time modifiedCopy(final Modifier modifier) { return new Timex2Time(val, modifier, set, granularity, periodicity, anchorVal, anchorDir, nonSpecific); }
java
@Deprecated public Timex2Time modifiedCopy(final Modifier modifier) { return new Timex2Time(val, modifier, set, granularity, periodicity, anchorVal, anchorDir, nonSpecific); }
[ "@", "Deprecated", "public", "Timex2Time", "modifiedCopy", "(", "final", "Modifier", "modifier", ")", "{", "return", "new", "Timex2Time", "(", "val", ",", "modifier", ",", "set", ",", "granularity", ",", "periodicity", ",", "anchorVal", ",", "anchorDir", ",", ...
Returns a copy of this Timex which is the same except with the specified modifier @deprecated Use {@link #copyBuilder()} and {@link Builder#withModifier(Modifier)} instead
[ "Returns", "a", "copy", "of", "this", "Timex", "which", "is", "the", "same", "except", "with", "the", "specified", "modifier" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/temporal/Timex2Time.java#L221-L225
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java
MACNumber.parse
@Pure public static MACNumber[] parse(String addresses) { if ((addresses == null) || ("".equals(addresses))) { //$NON-NLS-1$ return new MACNumber[0]; } final String[] adrs = addresses.split(Pattern.quote(Character.toString(MACNUMBER_SEPARATOR))); final List<MACNumber> list = new ArrayList<>(); for (final ...
java
@Pure public static MACNumber[] parse(String addresses) { if ((addresses == null) || ("".equals(addresses))) { //$NON-NLS-1$ return new MACNumber[0]; } final String[] adrs = addresses.split(Pattern.quote(Character.toString(MACNUMBER_SEPARATOR))); final List<MACNumber> list = new ArrayList<>(); for (final ...
[ "@", "Pure", "public", "static", "MACNumber", "[", "]", "parse", "(", "String", "addresses", ")", "{", "if", "(", "(", "addresses", "==", "null", ")", "||", "(", "\"\"", ".", "equals", "(", "addresses", ")", ")", ")", "{", "//$NON-NLS-1$", "return", ...
Parse the specified string an repleis the corresponding MAC numbers. @param addresses is the string to parse @return a list of addresses. @throws IllegalArgumentException is the argument has not the right syntax.
[ "Parse", "the", "specified", "string", "an", "repleis", "the", "corresponding", "MAC", "numbers", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L126-L140
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java
MACNumber.join
@Pure public static String join(MACNumber... addresses) { if ((addresses == null) || (addresses.length == 0)) { return null; } final StringBuilder buf = new StringBuilder(); for (final MACNumber number : addresses) { if (buf.length() > 0) { buf.append(MACNUMBER_SEPARATOR); } buf.append(number);...
java
@Pure public static String join(MACNumber... addresses) { if ((addresses == null) || (addresses.length == 0)) { return null; } final StringBuilder buf = new StringBuilder(); for (final MACNumber number : addresses) { if (buf.length() > 0) { buf.append(MACNUMBER_SEPARATOR); } buf.append(number);...
[ "@", "Pure", "public", "static", "String", "join", "(", "MACNumber", "...", "addresses", ")", "{", "if", "(", "(", "addresses", "==", "null", ")", "||", "(", "addresses", ".", "length", "==", "0", ")", ")", "{", "return", "null", ";", "}", "final", ...
Join the specified MAC numbers to reply a string. @param addresses is the list of mac addresses to join. @return the joined string.
[ "Join", "the", "specified", "MAC", "numbers", "to", "reply", "a", "string", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L169-L182
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java
MACNumber.getAllAdapters
@Pure public static Collection<MACNumber> getAllAdapters() { final List<MACNumber> av = new ArrayList<>(); final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return av; } if (interfaces != null) { Networ...
java
@Pure public static Collection<MACNumber> getAllAdapters() { final List<MACNumber> av = new ArrayList<>(); final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return av; } if (interfaces != null) { Networ...
[ "@", "Pure", "public", "static", "Collection", "<", "MACNumber", ">", "getAllAdapters", "(", ")", "{", "final", "List", "<", "MACNumber", ">", "av", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "Enumeration", "<", "NetworkInterface", ">", "interf...
Get all of the ethernet addresses associated with the local machine. <p>This method will try and find ALL of the ethernet adapters which are currently available on the system. This is heavily OS dependent and may not be supported on all platforms. When not supported, you should still get back a collection with the {@l...
[ "Get", "all", "of", "the", "ethernet", "addresses", "associated", "with", "the", "local", "machine", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L195-L219
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java
MACNumber.getAllMappings
@Pure public static Map<InetAddress, MACNumber> getAllMappings() { final Map<InetAddress, MACNumber> av = new HashMap<>(); final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return av; } if (interfaces != n...
java
@Pure public static Map<InetAddress, MACNumber> getAllMappings() { final Map<InetAddress, MACNumber> av = new HashMap<>(); final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return av; } if (interfaces != n...
[ "@", "Pure", "public", "static", "Map", "<", "InetAddress", ",", "MACNumber", ">", "getAllMappings", "(", ")", "{", "final", "Map", "<", "InetAddress", ",", "MACNumber", ">", "av", "=", "new", "HashMap", "<>", "(", ")", ";", "final", "Enumeration", "<", ...
Get all of the internet address and ethernet address mappings on the local machine. <p>This method will try and find ALL of the ethernet adapters which are currently available on the system. This is heavily OS dependent and may not be supported on all platforms. When not supported, you should still get back a collecti...
[ "Get", "all", "of", "the", "internet", "address", "and", "ethernet", "address", "mappings", "on", "the", "local", "machine", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L233-L264
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java
MACNumber.getPrimaryAdapter
@Pure public static MACNumber getPrimaryAdapter() { final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return null; } if (interfaces != null) { NetworkInterface inter; while (interfaces.hasMoreElements(...
java
@Pure public static MACNumber getPrimaryAdapter() { final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return null; } if (interfaces != null) { NetworkInterface inter; while (interfaces.hasMoreElements(...
[ "@", "Pure", "public", "static", "MACNumber", "getPrimaryAdapter", "(", ")", "{", "final", "Enumeration", "<", "NetworkInterface", ">", "interfaces", ";", "try", "{", "interfaces", "=", "NetworkInterface", ".", "getNetworkInterfaces", "(", ")", ";", "}", "catch"...
Try to determine the primary ethernet address of the machine. @return the primary MACNumber or <code>null</code>
[ "Try", "to", "determine", "the", "primary", "ethernet", "address", "of", "the", "machine", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L270-L293
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java
MACNumber.getPrimaryAdapterAddresses
@Pure public static Collection<InetAddress> getPrimaryAdapterAddresses() { final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return Collections.emptyList(); } if (interfaces != null) { NetworkInterface in...
java
@Pure public static Collection<InetAddress> getPrimaryAdapterAddresses() { final Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException exception) { return Collections.emptyList(); } if (interfaces != null) { NetworkInterface in...
[ "@", "Pure", "public", "static", "Collection", "<", "InetAddress", ">", "getPrimaryAdapterAddresses", "(", ")", "{", "final", "Enumeration", "<", "NetworkInterface", ">", "interfaces", ";", "try", "{", "interfaces", "=", "NetworkInterface", ".", "getNetworkInterface...
Try to determine the primary ethernet address of the machine and replies the associated internet addresses. @return the internet addresses of the primary network interface.
[ "Try", "to", "determine", "the", "primary", "ethernet", "address", "of", "the", "machine", "and", "replies", "the", "associated", "internet", "addresses", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L300-L328
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java
MACNumber.isNull
@Pure public boolean isNull() { for (int i = 0; i < this.bytes.length; ++i) { if (this.bytes[i] != 0) { return false; } } return true; }
java
@Pure public boolean isNull() { for (int i = 0; i < this.bytes.length; ++i) { if (this.bytes[i] != 0) { return false; } } return true; }
[ "@", "Pure", "public", "boolean", "isNull", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "bytes", ".", "length", ";", "++", "i", ")", "{", "if", "(", "this", ".", "bytes", "[", "i", "]", "!=", "0", ")", "{", ...
Replies if all the MAC address number are equal to zero. @return <code>true</code> if all the bytes are zero. @see #NULL
[ "Replies", "if", "all", "the", "MAC", "address", "number", "are", "equal", "to", "zero", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/MACNumber.java#L385-L393
train
hltcoe/annotated-nyt
src/main/java/edu/jhu/hlt/annotatednyt/AnnotatedNYTDocument.java
AnnotatedNYTDocument.getSourcePath
public Optional<Path> getSourcePath() { File f = this.nytdoc.getSourceFile(); return f == null ? Optional.empty() : Optional.of(f.toPath()); }
java
public Optional<Path> getSourcePath() { File f = this.nytdoc.getSourceFile(); return f == null ? Optional.empty() : Optional.of(f.toPath()); }
[ "public", "Optional", "<", "Path", ">", "getSourcePath", "(", ")", "{", "File", "f", "=", "this", ".", "nytdoc", ".", "getSourceFile", "(", ")", ";", "return", "f", "==", "null", "?", "Optional", ".", "empty", "(", ")", ":", "Optional", ".", "of", ...
Accessor for the sourceFile property. @return the sourceFile
[ "Accessor", "for", "the", "sourceFile", "property", "." ]
0a4daa97705591cefea9de61614770ae2665a48e
https://github.com/hltcoe/annotated-nyt/blob/0a4daa97705591cefea9de61614770ae2665a48e/src/main/java/edu/jhu/hlt/annotatednyt/AnnotatedNYTDocument.java#L489-L492
train
hltcoe/annotated-nyt
src/main/java/edu/jhu/hlt/annotatednyt/AnnotatedNYTDocument.java
AnnotatedNYTDocument.getUrl
public Optional<URL> getUrl() { URL u = this.nytdoc.getUrl(); return Optional.ofNullable(u); }
java
public Optional<URL> getUrl() { URL u = this.nytdoc.getUrl(); return Optional.ofNullable(u); }
[ "public", "Optional", "<", "URL", ">", "getUrl", "(", ")", "{", "URL", "u", "=", "this", ".", "nytdoc", ".", "getUrl", "(", ")", ";", "return", "Optional", ".", "ofNullable", "(", "u", ")", ";", "}" ]
Accessor for the url property. @return the url
[ "Accessor", "for", "the", "url", "property", "." ]
0a4daa97705591cefea9de61614770ae2665a48e
https://github.com/hltcoe/annotated-nyt/blob/0a4daa97705591cefea9de61614770ae2665a48e/src/main/java/edu/jhu/hlt/annotatednyt/AnnotatedNYTDocument.java#L526-L529
train
khmarbaise/sapm
src/main/java/com/soebes/subversion/sapm/AuthorizationFile.java
AuthorizationFile.load
public void load(File authorizationFile) throws AuthorizationFileException { FileInputStream fis = null; try { fis = new FileInputStream(authorizationFile); ANTLRInputStream stream = new ANTLRInputStream(fis); SAFPLexer lexer = new SAFPLexer(stream); Commo...
java
public void load(File authorizationFile) throws AuthorizationFileException { FileInputStream fis = null; try { fis = new FileInputStream(authorizationFile); ANTLRInputStream stream = new ANTLRInputStream(fis); SAFPLexer lexer = new SAFPLexer(stream); Commo...
[ "public", "void", "load", "(", "File", "authorizationFile", ")", "throws", "AuthorizationFileException", "{", "FileInputStream", "fis", "=", "null", ";", "try", "{", "fis", "=", "new", "FileInputStream", "(", "authorizationFile", ")", ";", "ANTLRInputStream", "str...
Load the authorization file. @param authorizationFile The file you would like to load. @throws AuthorizationFileException in case of a problem like file not found, IOException or parser problem (syntax error in the authorization file).
[ "Load", "the", "authorization", "file", "." ]
b5da5b0d8929324f03cb3a4233a3534813f93eea
https://github.com/khmarbaise/sapm/blob/b5da5b0d8929324f03cb3a4233a3534813f93eea/src/main/java/com/soebes/subversion/sapm/AuthorizationFile.java#L60-L85
train
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/KeyStoreExtensions.java
KeyStoreExtensions.deleteAlias
public static void deleteAlias(final File keystoreFile, String alias, final String password) throws NoSuchAlgorithmException, CertificateException, FileNotFoundException, KeyStoreException, IOException { KeyStore keyStore = KeyStoreFactory.newKeyStore(KeystoreType.JKS.name(), password, keystoreFile); keySt...
java
public static void deleteAlias(final File keystoreFile, String alias, final String password) throws NoSuchAlgorithmException, CertificateException, FileNotFoundException, KeyStoreException, IOException { KeyStore keyStore = KeyStoreFactory.newKeyStore(KeystoreType.JKS.name(), password, keystoreFile); keySt...
[ "public", "static", "void", "deleteAlias", "(", "final", "File", "keystoreFile", ",", "String", "alias", ",", "final", "String", "password", ")", "throws", "NoSuchAlgorithmException", ",", "CertificateException", ",", "FileNotFoundException", ",", "KeyStoreException", ...
Delete the given alias from the given keystore file. @param keystoreFile the keystore file @param alias the alias @param password the password @throws NoSuchAlgorithmException the no such algorithm exception @throws CertificateException the certificate exception @throws FileNotFoundException the file not found excepti...
[ "Delete", "the", "given", "alias", "from", "the", "given", "keystore", "file", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/KeyStoreExtensions.java#L67-L76
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/gzip/CompressFilterSettings.java
CompressFilterSettings.setResponseCompressionEnabled
@Nonnull public static EChange setResponseCompressionEnabled (final boolean bResponseCompressionEnabled) { return s_aRWLock.writeLocked ( () -> { if (s_bResponseCompressionEnabled == bResponseCompressionEnabled) return EChange.UNCHANGED; s_bResponseCompressionEnabled = bResponseCompressionEn...
java
@Nonnull public static EChange setResponseCompressionEnabled (final boolean bResponseCompressionEnabled) { return s_aRWLock.writeLocked ( () -> { if (s_bResponseCompressionEnabled == bResponseCompressionEnabled) return EChange.UNCHANGED; s_bResponseCompressionEnabled = bResponseCompressionEn...
[ "@", "Nonnull", "public", "static", "EChange", "setResponseCompressionEnabled", "(", "final", "boolean", "bResponseCompressionEnabled", ")", "{", "return", "s_aRWLock", ".", "writeLocked", "(", "(", ")", "->", "{", "if", "(", "s_bResponseCompressionEnabled", "==", "...
Enable or disable the overall compression. @param bResponseCompressionEnabled <code>true</code> to enable it, <code>false</code> to disable it @return {@link EChange}
[ "Enable", "or", "disable", "the", "overall", "compression", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/gzip/CompressFilterSettings.java#L78-L88
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/gzip/CompressFilterSettings.java
CompressFilterSettings.setDebugModeEnabled
@Nonnull public static EChange setDebugModeEnabled (final boolean bDebugModeEnabled) { return s_aRWLock.writeLocked ( () -> { if (s_bDebugModeEnabled == bDebugModeEnabled) return EChange.UNCHANGED; s_bDebugModeEnabled = bDebugModeEnabled; LOGGER.info ("CompressFilter debugMode=" + bDeb...
java
@Nonnull public static EChange setDebugModeEnabled (final boolean bDebugModeEnabled) { return s_aRWLock.writeLocked ( () -> { if (s_bDebugModeEnabled == bDebugModeEnabled) return EChange.UNCHANGED; s_bDebugModeEnabled = bDebugModeEnabled; LOGGER.info ("CompressFilter debugMode=" + bDeb...
[ "@", "Nonnull", "public", "static", "EChange", "setDebugModeEnabled", "(", "final", "boolean", "bDebugModeEnabled", ")", "{", "return", "s_aRWLock", ".", "writeLocked", "(", "(", ")", "->", "{", "if", "(", "s_bDebugModeEnabled", "==", "bDebugModeEnabled", ")", "...
Enable or disable debug mode @param bDebugModeEnabled <code>true</code> to enable it, <code>false</code> to disable it @return {@link EChange}
[ "Enable", "or", "disable", "debug", "mode" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/gzip/CompressFilterSettings.java#L204-L214
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/common/rest/GenomicsConverter.java
GenomicsConverter.makeSAMFileHeader
@Override public SAMFileHeader makeSAMFileHeader(ReadGroupSet readGroupSet, List<Reference> references) { return ReadUtils.makeSAMFileHeader(readGroupSet, references); }
java
@Override public SAMFileHeader makeSAMFileHeader(ReadGroupSet readGroupSet, List<Reference> references) { return ReadUtils.makeSAMFileHeader(readGroupSet, references); }
[ "@", "Override", "public", "SAMFileHeader", "makeSAMFileHeader", "(", "ReadGroupSet", "readGroupSet", ",", "List", "<", "Reference", ">", "references", ")", "{", "return", "ReadUtils", ".", "makeSAMFileHeader", "(", "readGroupSet", ",", "references", ")", ";", "}"...
Generates a SAMFileHeader from a ReadGroupSet and Reference metadata
[ "Generates", "a", "SAMFileHeader", "from", "a", "ReadGroupSet", "and", "Reference", "metadata" ]
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/common/rest/GenomicsConverter.java#L49-L53
train
khmarbaise/sapm
src/main/java/com/soebes/subversion/sapm/Users.java
Users.hasUser
public boolean hasUser(String userName) { boolean result = false; for (User item : getUsersList()) { if (item.getName().equals(userName)) { result = true; } } return result; }
java
public boolean hasUser(String userName) { boolean result = false; for (User item : getUsersList()) { if (item.getName().equals(userName)) { result = true; } } return result; }
[ "public", "boolean", "hasUser", "(", "String", "userName", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "User", "item", ":", "getUsersList", "(", ")", ")", "{", "if", "(", "item", ".", "getName", "(", ")", ".", "equals", "(", "userNa...
Check to see if a given user name is within the list of users. Checking will be done case sensitive. @param userName The name of the user which should be checked for. @return true if the user has been found false otherwise.
[ "Check", "to", "see", "if", "a", "given", "user", "name", "is", "within", "the", "list", "of", "users", ".", "Checking", "will", "be", "done", "case", "sensitive", "." ]
b5da5b0d8929324f03cb3a4233a3534813f93eea
https://github.com/khmarbaise/sapm/blob/b5da5b0d8929324f03cb3a4233a3534813f93eea/src/main/java/com/soebes/subversion/sapm/Users.java#L64-L72
train
khmarbaise/sapm
src/main/java/com/soebes/subversion/sapm/Users.java
Users.getUser
public User getUser(String userName) { User result = null; for (User item : getUsersList()) { if (item.getName().equals(userName)) { result = item; } } return result; }
java
public User getUser(String userName) { User result = null; for (User item : getUsersList()) { if (item.getName().equals(userName)) { result = item; } } return result; }
[ "public", "User", "getUser", "(", "String", "userName", ")", "{", "User", "result", "=", "null", ";", "for", "(", "User", "item", ":", "getUsersList", "(", ")", ")", "{", "if", "(", "item", ".", "getName", "(", ")", ".", "equals", "(", "userName", ...
Get the particular User instance if the user can be found. Null otherwise. @param userName The name for which we search in the list of users. @return The instance of the particular user or null otherwise.
[ "Get", "the", "particular", "User", "instance", "if", "the", "user", "can", "be", "found", ".", "Null", "otherwise", "." ]
b5da5b0d8929324f03cb3a4233a3534813f93eea
https://github.com/khmarbaise/sapm/blob/b5da5b0d8929324f03cb3a4233a3534813f93eea/src/main/java/com/soebes/subversion/sapm/Users.java#L82-L90
train
phax/ph-web
ph-http/src/main/java/com/helger/http/csp/CSP2SourceList.java
CSP2SourceList.addScheme
@Nonnull public CSP2SourceList addScheme (@Nonnull @Nonempty final String sScheme) { ValueEnforcer.notEmpty (sScheme, "Scheme"); ValueEnforcer.isTrue (sScheme.length () > 1 && sScheme.endsWith (":"), () -> "Passed scheme '" + sScheme + "' is invalid!"); m_aList.add (sScheme); ...
java
@Nonnull public CSP2SourceList addScheme (@Nonnull @Nonempty final String sScheme) { ValueEnforcer.notEmpty (sScheme, "Scheme"); ValueEnforcer.isTrue (sScheme.length () > 1 && sScheme.endsWith (":"), () -> "Passed scheme '" + sScheme + "' is invalid!"); m_aList.add (sScheme); ...
[ "@", "Nonnull", "public", "CSP2SourceList", "addScheme", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sScheme", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sScheme", ",", "\"Scheme\"", ")", ";", "ValueEnforcer", ".", "isTrue", "(", "sScheme"...
Add a scheme @param sScheme Scheme in the format <code>scheme ":"</code> @return this
[ "Add", "a", "scheme" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/csp/CSP2SourceList.java#L73-L81
train
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java
HttpClientFactory.setProxy
public final void setProxy (@Nullable final HttpHost aProxy, @Nullable final Credentials aProxyCredentials) { m_aProxy = aProxy; m_aProxyCredentials = aProxyCredentials; }
java
public final void setProxy (@Nullable final HttpHost aProxy, @Nullable final Credentials aProxyCredentials) { m_aProxy = aProxy; m_aProxyCredentials = aProxyCredentials; }
[ "public", "final", "void", "setProxy", "(", "@", "Nullable", "final", "HttpHost", "aProxy", ",", "@", "Nullable", "final", "Credentials", "aProxyCredentials", ")", "{", "m_aProxy", "=", "aProxy", ";", "m_aProxyCredentials", "=", "aProxyCredentials", ";", "}" ]
Set proxy host and proxy credentials. @param aProxy The proxy host to be used. May be <code>null</code>. @param aProxyCredentials The proxy server credentials to be used. May be <code>null</code>. They are only used if a proxy host is present! Usually they are of type {@link org.apache.http.auth.UsernamePasswordCreden...
[ "Set", "proxy", "host", "and", "proxy", "credentials", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java#L350-L354
train
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java
HttpClientFactory.setRetries
@Nonnull public final HttpClientFactory setRetries (@Nonnegative final int nRetries) { ValueEnforcer.isGE0 (nRetries, "Retries"); m_nRetries = nRetries; return this; }
java
@Nonnull public final HttpClientFactory setRetries (@Nonnegative final int nRetries) { ValueEnforcer.isGE0 (nRetries, "Retries"); m_nRetries = nRetries; return this; }
[ "@", "Nonnull", "public", "final", "HttpClientFactory", "setRetries", "(", "@", "Nonnegative", "final", "int", "nRetries", ")", "{", "ValueEnforcer", ".", "isGE0", "(", "nRetries", ",", "\"Retries\"", ")", ";", "m_nRetries", "=", "nRetries", ";", "return", "th...
Set the number of internal retries. @param nRetries Retries to use. Must be &ge; 0. @return this for chaining @since 9.0.0
[ "Set", "the", "number", "of", "internal", "retries", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java#L410-L416
train
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java
HttpClientFactory.setRetryMode
@Nonnull public final HttpClientFactory setRetryMode (@Nonnull final ERetryMode eRetryMode) { ValueEnforcer.notNull (eRetryMode, "RetryMode"); m_eRetryMode = eRetryMode; return this; }
java
@Nonnull public final HttpClientFactory setRetryMode (@Nonnull final ERetryMode eRetryMode) { ValueEnforcer.notNull (eRetryMode, "RetryMode"); m_eRetryMode = eRetryMode; return this; }
[ "@", "Nonnull", "public", "final", "HttpClientFactory", "setRetryMode", "(", "@", "Nonnull", "final", "ERetryMode", "eRetryMode", ")", "{", "ValueEnforcer", ".", "notNull", "(", "eRetryMode", ",", "\"RetryMode\"", ")", ";", "m_eRetryMode", "=", "eRetryMode", ";", ...
Set the retry mode to use. @param eRetryMode Retry mode to use. Must not be <code>null</code>. @return this for chaining @since 9.0.0
[ "Set", "the", "retry", "mode", "to", "use", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java#L437-L443
train
phax/ph-web
ph-network/src/main/java/com/helger/network/dns/DNSResolver.java
DNSResolver.dnsResolve
@Nullable public static String dnsResolve (@Nonnull final String sHostName) { final InetAddress aAddress = resolveByName (sHostName); if (aAddress == null) return null; return new IPV4Addr (aAddress.getAddress ()).getAsString (); }
java
@Nullable public static String dnsResolve (@Nonnull final String sHostName) { final InetAddress aAddress = resolveByName (sHostName); if (aAddress == null) return null; return new IPV4Addr (aAddress.getAddress ()).getAsString (); }
[ "@", "Nullable", "public", "static", "String", "dnsResolve", "(", "@", "Nonnull", "final", "String", "sHostName", ")", "{", "final", "InetAddress", "aAddress", "=", "resolveByName", "(", "sHostName", ")", ";", "if", "(", "aAddress", "==", "null", ")", "retur...
JavaScript callback function! Do not rename! @param sHostName The host name. @return The resolved IP address as String or <code>null</code> if the host name could not be resolved.
[ "JavaScript", "callback", "function!", "Do", "not", "rename!" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-network/src/main/java/com/helger/network/dns/DNSResolver.java#L69-L76
train
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/AbstractXFilter.java
AbstractXFilter.onFilterBefore
@Nonnull @OverrideOnDemand public EContinue onFilterBefore (@Nonnull final HttpServletRequest aHttpRequest, @Nonnull final HttpServletResponse aHttpResponse, @Nonnull final IRequestWebScope aRequestScope) throws IOException, ServletException { ...
java
@Nonnull @OverrideOnDemand public EContinue onFilterBefore (@Nonnull final HttpServletRequest aHttpRequest, @Nonnull final HttpServletResponse aHttpResponse, @Nonnull final IRequestWebScope aRequestScope) throws IOException, ServletException { ...
[ "@", "Nonnull", "@", "OverrideOnDemand", "public", "EContinue", "onFilterBefore", "(", "@", "Nonnull", "final", "HttpServletRequest", "aHttpRequest", ",", "@", "Nonnull", "final", "HttpServletResponse", "aHttpResponse", ",", "@", "Nonnull", "final", "IRequestWebScope", ...
Invoked before the rest of the request is processed. @param aHttpRequest The HTTP request. Never <code>null</code>. @param aHttpResponse The HTTP response. Never <code>null</code>. @param aRequestScope Current request scope. Never <code>null</code>. @return {@link EContinue#CONTINUE} to continue processing the request...
[ "Invoked", "before", "the", "rest", "of", "the", "request", "is", "processed", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/AbstractXFilter.java#L132-L140
train
phax/ph-web
ph-http/src/main/java/com/helger/http/AcceptMimeTypeList.java
AcceptMimeTypeList.supportsMimeType
public boolean supportsMimeType (@Nullable final IMimeType aMimeType) { if (aMimeType == null) return false; return getQValueOfMimeType (aMimeType).isAboveMinimumQuality (); }
java
public boolean supportsMimeType (@Nullable final IMimeType aMimeType) { if (aMimeType == null) return false; return getQValueOfMimeType (aMimeType).isAboveMinimumQuality (); }
[ "public", "boolean", "supportsMimeType", "(", "@", "Nullable", "final", "IMimeType", "aMimeType", ")", "{", "if", "(", "aMimeType", "==", "null", ")", "return", "false", ";", "return", "getQValueOfMimeType", "(", "aMimeType", ")", ".", "isAboveMinimumQuality", "...
Check if the passed MIME type is supported, incl. fallback handling @param aMimeType The MIME type to check. May be <code>null</code>. @return <code>true</code> if it is supported, <code>false</code> if not
[ "Check", "if", "the", "passed", "MIME", "type", "is", "supported", "incl", ".", "fallback", "handling" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/AcceptMimeTypeList.java#L131-L136
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/common/GenomicsDataSourceFactory.java
GenomicsDataSourceFactory.configure
public void configure(String rootUrl, Settings settings) { Data<Read, ReadGroupSet, Reference> data = dataSources.get(rootUrl); if (data == null) { data = new Data<Read, ReadGroupSet, Reference>(settings, null); dataSources.put(rootUrl, data); } else { data.settings = settings; } }
java
public void configure(String rootUrl, Settings settings) { Data<Read, ReadGroupSet, Reference> data = dataSources.get(rootUrl); if (data == null) { data = new Data<Read, ReadGroupSet, Reference>(settings, null); dataSources.put(rootUrl, data); } else { data.settings = settings; } }
[ "public", "void", "configure", "(", "String", "rootUrl", ",", "Settings", "settings", ")", "{", "Data", "<", "Read", ",", "ReadGroupSet", ",", "Reference", ">", "data", "=", "dataSources", ".", "get", "(", "rootUrl", ")", ";", "if", "(", "data", "==", ...
Sets the settings for a given root url, that will be used for creating the data source. Has no effect if the data source has already been created.
[ "Sets", "the", "settings", "for", "a", "given", "root", "url", "that", "will", "be", "used", "for", "creating", "the", "data", "source", ".", "Has", "no", "effect", "if", "the", "data", "source", "has", "already", "been", "created", "." ]
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/common/GenomicsDataSourceFactory.java#L66-L74
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/common/GenomicsDataSourceFactory.java
GenomicsDataSourceFactory.get
public GenomicsDataSource<Read, ReadGroupSet, Reference> get(String rootUrl) { Data<Read, ReadGroupSet, Reference> data = dataSources.get(rootUrl); if (data == null) { data = new Data<Read, ReadGroupSet, Reference>(new Settings(), null); dataSources.put(rootUrl, data); } if (data.dataSource ...
java
public GenomicsDataSource<Read, ReadGroupSet, Reference> get(String rootUrl) { Data<Read, ReadGroupSet, Reference> data = dataSources.get(rootUrl); if (data == null) { data = new Data<Read, ReadGroupSet, Reference>(new Settings(), null); dataSources.put(rootUrl, data); } if (data.dataSource ...
[ "public", "GenomicsDataSource", "<", "Read", ",", "ReadGroupSet", ",", "Reference", ">", "get", "(", "String", "rootUrl", ")", "{", "Data", "<", "Read", ",", "ReadGroupSet", ",", "Reference", ">", "data", "=", "dataSources", ".", "get", "(", "rootUrl", ")"...
Lazily creates and returns the data source for a given root url.
[ "Lazily", "creates", "and", "returns", "the", "data", "source", "for", "a", "given", "root", "url", "." ]
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/common/GenomicsDataSourceFactory.java#L79-L89
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/settings/SMTPSettings.java
SMTPSettings.setConnectionTimeoutMilliSecs
@Nonnull public EChange setConnectionTimeoutMilliSecs (final long nMilliSecs) { if (m_nConnectionTimeoutMilliSecs == nMilliSecs) return EChange.UNCHANGED; m_nConnectionTimeoutMilliSecs = nMilliSecs; return EChange.CHANGED; }
java
@Nonnull public EChange setConnectionTimeoutMilliSecs (final long nMilliSecs) { if (m_nConnectionTimeoutMilliSecs == nMilliSecs) return EChange.UNCHANGED; m_nConnectionTimeoutMilliSecs = nMilliSecs; return EChange.CHANGED; }
[ "@", "Nonnull", "public", "EChange", "setConnectionTimeoutMilliSecs", "(", "final", "long", "nMilliSecs", ")", "{", "if", "(", "m_nConnectionTimeoutMilliSecs", "==", "nMilliSecs", ")", "return", "EChange", ".", "UNCHANGED", ";", "m_nConnectionTimeoutMilliSecs", "=", "...
Set the connection timeout in milliseconds. Values &le; 0 are interpreted as indefinite timeout which is not recommended! @param nMilliSecs The milliseconds timeout @return {@link EChange}
[ "Set", "the", "connection", "timeout", "in", "milliseconds", ".", "Values", "&le", ";", "0", "are", "interpreted", "as", "indefinite", "timeout", "which", "is", "not", "recommended!" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/settings/SMTPSettings.java#L327-L334
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/settings/SMTPSettings.java
SMTPSettings.setTimeoutMilliSecs
@Nonnull public EChange setTimeoutMilliSecs (final long nMilliSecs) { if (m_nTimeoutMilliSecs == nMilliSecs) return EChange.UNCHANGED; m_nTimeoutMilliSecs = nMilliSecs; return EChange.CHANGED; }
java
@Nonnull public EChange setTimeoutMilliSecs (final long nMilliSecs) { if (m_nTimeoutMilliSecs == nMilliSecs) return EChange.UNCHANGED; m_nTimeoutMilliSecs = nMilliSecs; return EChange.CHANGED; }
[ "@", "Nonnull", "public", "EChange", "setTimeoutMilliSecs", "(", "final", "long", "nMilliSecs", ")", "{", "if", "(", "m_nTimeoutMilliSecs", "==", "nMilliSecs", ")", "return", "EChange", ".", "UNCHANGED", ";", "m_nTimeoutMilliSecs", "=", "nMilliSecs", ";", "return"...
Set the socket timeout in milliseconds. Values &le; 0 are interpreted as indefinite timeout which is not recommended! @param nMilliSecs The milliseconds timeout @return {@link EChange}
[ "Set", "the", "socket", "timeout", "in", "milliseconds", ".", "Values", "&le", ";", "0", "are", "interpreted", "as", "indefinite", "timeout", "which", "is", "not", "recommended!" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/settings/SMTPSettings.java#L349-L356
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/ResponseHelper.java
ResponseHelper.getResponseHeaderMap
@Nonnull @ReturnsMutableCopy public static HttpHeaderMap getResponseHeaderMap (@Nonnull final HttpServletResponse aHttpResponse) { ValueEnforcer.notNull (aHttpResponse, "HttpResponse"); final HttpHeaderMap ret = new HttpHeaderMap (); for (final String sName : aHttpResponse.getHeaderNames ()) fo...
java
@Nonnull @ReturnsMutableCopy public static HttpHeaderMap getResponseHeaderMap (@Nonnull final HttpServletResponse aHttpResponse) { ValueEnforcer.notNull (aHttpResponse, "HttpResponse"); final HttpHeaderMap ret = new HttpHeaderMap (); for (final String sName : aHttpResponse.getHeaderNames ()) fo...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "HttpHeaderMap", "getResponseHeaderMap", "(", "@", "Nonnull", "final", "HttpServletResponse", "aHttpResponse", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aHttpResponse", ",", "\"HttpResponse\"", ")", ...
Get a complete response header map as a copy. @param aHttpResponse The source HTTP response. May not be <code>null</code>. @return Never <code>null</code>. @since 8.7.3
[ "Get", "a", "complete", "response", "header", "map", "as", "a", "copy", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/ResponseHelper.java#L201-L212
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.setContentAndCharset
@Nonnull public final UnifiedResponse setContentAndCharset (@Nonnull final String sContent, @Nonnull final Charset aCharset) { ValueEnforcer.notNull (sContent, "Content"); setCharset (aCharset); setContent (sContent.getBytes (aCharset)); return this; }
java
@Nonnull public final UnifiedResponse setContentAndCharset (@Nonnull final String sContent, @Nonnull final Charset aCharset) { ValueEnforcer.notNull (sContent, "Content"); setCharset (aCharset); setContent (sContent.getBytes (aCharset)); return this; }
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "setContentAndCharset", "(", "@", "Nonnull", "final", "String", "sContent", ",", "@", "Nonnull", "final", "Charset", "aCharset", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sContent", ",", "\"Content\"", ...
Utility method to set content and charset at once. @param sContent The response content string. May not be <code>null</code>. @param aCharset The charset to use. May not be <code>null</code>. @return this
[ "Utility", "method", "to", "set", "content", "and", "charset", "at", "once", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L415-L422
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.setContent
@Nonnull public final UnifiedResponse setContent (@Nonnull final IHasInputStream aISP) { ValueEnforcer.notNull (aISP, "InputStreamProvider"); if (hasContent ()) logInfo ("Overwriting content with content provider!"); m_aContentArray = null; m_nContentArrayOfs = -1; m_nContentArrayLength = ...
java
@Nonnull public final UnifiedResponse setContent (@Nonnull final IHasInputStream aISP) { ValueEnforcer.notNull (aISP, "InputStreamProvider"); if (hasContent ()) logInfo ("Overwriting content with content provider!"); m_aContentArray = null; m_nContentArrayOfs = -1; m_nContentArrayLength = ...
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "setContent", "(", "@", "Nonnull", "final", "IHasInputStream", "aISP", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aISP", ",", "\"InputStreamProvider\"", ")", ";", "if", "(", "hasContent", "(", ")", ")...
Set the response content provider. @param aISP The content provider to be used. May not be <code>null</code>. @return this
[ "Set", "the", "response", "content", "provider", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L477-L488
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.setContentDispositionFilename
@Nonnull public final UnifiedResponse setContentDispositionFilename (@Nonnull @Nonempty final String sFilename) { ValueEnforcer.notEmpty (sFilename, "Filename"); // Ensure that a valid filename is used // -> Strip all paths and replace all invalid characters final String sFilenameToUse = FilenameHe...
java
@Nonnull public final UnifiedResponse setContentDispositionFilename (@Nonnull @Nonempty final String sFilename) { ValueEnforcer.notEmpty (sFilename, "Filename"); // Ensure that a valid filename is used // -> Strip all paths and replace all invalid characters final String sFilenameToUse = FilenameHe...
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "setContentDispositionFilename", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sFilename", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sFilename", ",", "\"Filename\"", ")", ";", "// Ensure that ...
Set the content disposition filename for attachment download. @param sFilename The filename for attachment download to use. May neither be <code>null</code> nor empty. @return this @see #removeContentDispositionFilename()
[ "Set", "the", "content", "disposition", "filename", "for", "attachment", "download", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L623-L661
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.removeCaching
@Nonnull public final UnifiedResponse removeCaching () { // Remove any eventually set headers removeExpires (); removeCacheControl (); removeETag (); removeLastModified (); m_aResponseHeaderMap.removeHeaders (CHttpHeader.PRAGMA); return this; }
java
@Nonnull public final UnifiedResponse removeCaching () { // Remove any eventually set headers removeExpires (); removeCacheControl (); removeETag (); removeLastModified (); m_aResponseHeaderMap.removeHeaders (CHttpHeader.PRAGMA); return this; }
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "removeCaching", "(", ")", "{", "// Remove any eventually set headers", "removeExpires", "(", ")", ";", "removeCacheControl", "(", ")", ";", "removeETag", "(", ")", ";", "removeLastModified", "(", ")", ";", "m_...
Remove all settings and headers relevant to caching. @return this for chaining
[ "Remove", "all", "settings", "and", "headers", "relevant", "to", "caching", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L746-L756
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.disableCaching
@Nonnull public final UnifiedResponse disableCaching () { // Remove any eventually set headers removeCaching (); if (m_eHttpVersion.is10 ()) { // Set to expire far in the past for HTTP/1.0. m_aResponseHeaderMap.setHeader (CHttpHeader.EXPIRES, ResponseHelperSettings.EXPIRES_NEVER_STRING)...
java
@Nonnull public final UnifiedResponse disableCaching () { // Remove any eventually set headers removeCaching (); if (m_eHttpVersion.is10 ()) { // Set to expire far in the past for HTTP/1.0. m_aResponseHeaderMap.setHeader (CHttpHeader.EXPIRES, ResponseHelperSettings.EXPIRES_NEVER_STRING)...
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "disableCaching", "(", ")", "{", "// Remove any eventually set headers", "removeCaching", "(", ")", ";", "if", "(", "m_eHttpVersion", ".", "is10", "(", ")", ")", "{", "// Set to expire far in the past for HTTP/1.0.",...
A utility method that disables caching for this response. @return this
[ "A", "utility", "method", "that", "disables", "caching", "for", "this", "response", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L763-L794
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.enableCaching
@Nonnull public final UnifiedResponse enableCaching (@Nonnegative final int nSeconds) { ValueEnforcer.isGT0 (nSeconds, "Seconds"); // Remove any eventually set headers // Note: don't remove Last-Modified and ETag! removeExpires (); removeCacheControl (); m_aResponseHeaderMap.removeHeaders (...
java
@Nonnull public final UnifiedResponse enableCaching (@Nonnegative final int nSeconds) { ValueEnforcer.isGT0 (nSeconds, "Seconds"); // Remove any eventually set headers // Note: don't remove Last-Modified and ETag! removeExpires (); removeCacheControl (); m_aResponseHeaderMap.removeHeaders (...
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "enableCaching", "(", "@", "Nonnegative", "final", "int", "nSeconds", ")", "{", "ValueEnforcer", ".", "isGT0", "(", "nSeconds", ",", "\"Seconds\"", ")", ";", "// Remove any eventually set headers", "// Note: don't ...
Enable caching of this resource for the specified number of seconds. @param nSeconds The number of seconds caching is allowed. Must be &gt; 0. @return this
[ "Enable", "caching", "of", "this", "resource", "for", "the", "specified", "number", "of", "seconds", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L803-L826
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.setStatusUnauthorized
@Nonnull public final UnifiedResponse setStatusUnauthorized (@Nullable final String sAuthenticate) { _setStatus (HttpServletResponse.SC_UNAUTHORIZED); if (StringHelper.hasText (sAuthenticate)) m_aResponseHeaderMap.setHeader (CHttpHeader.WWW_AUTHENTICATE, sAuthenticate); return this; }
java
@Nonnull public final UnifiedResponse setStatusUnauthorized (@Nullable final String sAuthenticate) { _setStatus (HttpServletResponse.SC_UNAUTHORIZED); if (StringHelper.hasText (sAuthenticate)) m_aResponseHeaderMap.setHeader (CHttpHeader.WWW_AUTHENTICATE, sAuthenticate); return this; }
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "setStatusUnauthorized", "(", "@", "Nullable", "final", "String", "sAuthenticate", ")", "{", "_setStatus", "(", "HttpServletResponse", ".", "SC_UNAUTHORIZED", ")", ";", "if", "(", "StringHelper", ".", "hasText", ...
Special handling for returning status code 401 UNAUTHORIZED. @param sAuthenticate The string to be used for the {@link CHttpHeader#WWW_AUTHENTICATE} response header. May be <code>null</code> or empty. @return this
[ "Special", "handling", "for", "returning", "status", "code", "401", "UNAUTHORIZED", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L876-L883
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.setCustomResponseHeaders
public final void setCustomResponseHeaders (@Nullable final HttpHeaderMap aOther) { m_aResponseHeaderMap.removeAll (); if (aOther != null) m_aResponseHeaderMap.setAllHeaders (aOther); }
java
public final void setCustomResponseHeaders (@Nullable final HttpHeaderMap aOther) { m_aResponseHeaderMap.removeAll (); if (aOther != null) m_aResponseHeaderMap.setAllHeaders (aOther); }
[ "public", "final", "void", "setCustomResponseHeaders", "(", "@", "Nullable", "final", "HttpHeaderMap", "aOther", ")", "{", "m_aResponseHeaderMap", ".", "removeAll", "(", ")", ";", "if", "(", "aOther", "!=", "null", ")", "m_aResponseHeaderMap", ".", "setAllHeaders"...
Set many custom headers at once. All existing headers are unconditionally removed. @param aOther The headers to be set. May be <code>null</code>.
[ "Set", "many", "custom", "headers", "at", "once", ".", "All", "existing", "headers", "are", "unconditionally", "removed", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L1221-L1226
train
hmsonline/json-transformer
src/main/java/com/hmsonline/json/transformer/JsonTransformerFactory.java
JsonTransformerFactory.factory
static private JsonTransformer factory(Object jsonObject) throws InvalidTransformerException { if (jsonObject instanceof JSONObject) { return factory((JSONObject)jsonObject); } else if (jsonObject instanceof JSONArray) { return factory((JSONArray)jsonObject); } ...
java
static private JsonTransformer factory(Object jsonObject) throws InvalidTransformerException { if (jsonObject instanceof JSONObject) { return factory((JSONObject)jsonObject); } else if (jsonObject instanceof JSONArray) { return factory((JSONArray)jsonObject); } ...
[ "static", "private", "JsonTransformer", "factory", "(", "Object", "jsonObject", ")", "throws", "InvalidTransformerException", "{", "if", "(", "jsonObject", "instanceof", "JSONObject", ")", "{", "return", "factory", "(", "(", "JSONObject", ")", "jsonObject", ")", "...
Convenient private method
[ "Convenient", "private", "method" ]
4c739170db8b30a166066436af71c14288c65a4e
https://github.com/hmsonline/json-transformer/blob/4c739170db8b30a166066436af71c14288c65a4e/src/main/java/com/hmsonline/json/transformer/JsonTransformerFactory.java#L49-L61
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpServletRequest.java
MockHttpServletRequest.invalidate
public void invalidate () { if (m_bInvalidated) throw new IllegalStateException ("Request scope already invalidated!"); m_bInvalidated = true; if (m_aServletContext != null) { final ServletRequestEvent aSRE = new ServletRequestEvent (m_aServletContext, this); for (final ServletReque...
java
public void invalidate () { if (m_bInvalidated) throw new IllegalStateException ("Request scope already invalidated!"); m_bInvalidated = true; if (m_aServletContext != null) { final ServletRequestEvent aSRE = new ServletRequestEvent (m_aServletContext, this); for (final ServletReque...
[ "public", "void", "invalidate", "(", ")", "{", "if", "(", "m_bInvalidated", ")", "throw", "new", "IllegalStateException", "(", "\"Request scope already invalidated!\"", ")", ";", "m_bInvalidated", "=", "true", ";", "if", "(", "m_aServletContext", "!=", "null", ")"...
Invalidate this request, clearing its state and invoking all HTTP event listener. @see #close() @see #clearAttributes()
[ "Invalidate", "this", "request", "clearing", "its", "state", "and", "invoking", "all", "HTTP", "event", "listener", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpServletRequest.java#L260-L275
train
phax/ph-web
ph-http/src/main/java/com/helger/http/AcceptEncodingList.java
AcceptEncodingList.getQValueOfEncoding
@Nonnull public QValue getQValueOfEncoding (@Nonnull final String sEncoding) { ValueEnforcer.notNull (sEncoding, "Encoding"); // Direct search encoding QValue aQuality = m_aMap.get (_unify (sEncoding)); if (aQuality == null) { // If not explicitly given, check for "*" aQuality = m_a...
java
@Nonnull public QValue getQValueOfEncoding (@Nonnull final String sEncoding) { ValueEnforcer.notNull (sEncoding, "Encoding"); // Direct search encoding QValue aQuality = m_aMap.get (_unify (sEncoding)); if (aQuality == null) { // If not explicitly given, check for "*" aQuality = m_a...
[ "@", "Nonnull", "public", "QValue", "getQValueOfEncoding", "(", "@", "Nonnull", "final", "String", "sEncoding", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sEncoding", ",", "\"Encoding\"", ")", ";", "// Direct search encoding", "QValue", "aQuality", "=", "m_a...
Return the associated quality of the given encoding. @param sEncoding The encoding name to query. May not be <code>null</code>. @return The matching {@link QValue} and never <code>null</code>.
[ "Return", "the", "associated", "quality", "of", "the", "given", "encoding", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/AcceptEncodingList.java#L58-L77
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/Material.java
Material.bind
public void bind() { program.use(); if (textures != null) { final TIntObjectIterator<Texture> iterator = textures.iterator(); while (iterator.hasNext()) { iterator.advance(); // Bind the texture to the unit final int unit = iterator...
java
public void bind() { program.use(); if (textures != null) { final TIntObjectIterator<Texture> iterator = textures.iterator(); while (iterator.hasNext()) { iterator.advance(); // Bind the texture to the unit final int unit = iterator...
[ "public", "void", "bind", "(", ")", "{", "program", ".", "use", "(", ")", ";", "if", "(", "textures", "!=", "null", ")", "{", "final", "TIntObjectIterator", "<", "Texture", ">", "iterator", "=", "textures", ".", "iterator", "(", ")", ";", "while", "(...
Binds the material to the OpenGL context.
[ "Binds", "the", "material", "to", "the", "OpenGL", "context", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/Material.java#L63-L76
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/Material.java
Material.setProgram
public void setProgram(Program program) { if (program == null) { throw new IllegalStateException("Program cannot be null"); } program.checkCreated(); this.program = program; }
java
public void setProgram(Program program) { if (program == null) { throw new IllegalStateException("Program cannot be null"); } program.checkCreated(); this.program = program; }
[ "public", "void", "setProgram", "(", "Program", "program", ")", "{", "if", "(", "program", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Program cannot be null\"", ")", ";", "}", "program", ".", "checkCreated", "(", ")", ";", "this...
Sets the program to be used by this material to shade the models. @param program The program to use
[ "Sets", "the", "program", "to", "be", "used", "by", "this", "material", "to", "shade", "the", "models", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/Material.java#L101-L107
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/Material.java
Material.addTexture
public void addTexture(int unit, Texture texture) { if (texture == null) { throw new IllegalStateException("Texture cannot be null"); } texture.checkCreated(); if (textures == null) { textures = new TIntObjectHashMap<>(); } textures.put(unit, textu...
java
public void addTexture(int unit, Texture texture) { if (texture == null) { throw new IllegalStateException("Texture cannot be null"); } texture.checkCreated(); if (textures == null) { textures = new TIntObjectHashMap<>(); } textures.put(unit, textu...
[ "public", "void", "addTexture", "(", "int", "unit", ",", "Texture", "texture", ")", "{", "if", "(", "texture", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Texture cannot be null\"", ")", ";", "}", "texture", ".", "checkCreated", ...
Adds a texture to the material. If a texture is a already present in the same unit as this one, it will be replaced. @param unit The unit to add the texture to @param texture The texture to add
[ "Adds", "a", "texture", "to", "the", "material", ".", "If", "a", "texture", "is", "a", "already", "present", "in", "the", "same", "unit", "as", "this", "one", "it", "will", "be", "replaced", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/Material.java#L124-L133
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/common/grpc/UnmappedReads.java
UnmappedReads.maybeAddRead
@Override public boolean maybeAddRead(Read read) { if (!isUnmappedMateOfMappedRead(read)) { return false; } final String reference = read.getNextMatePosition().getReferenceName(); String key = getReadKey(read); Map<String, ArrayList<Read>> reads = unmappedReads.get(reference); if (reads ...
java
@Override public boolean maybeAddRead(Read read) { if (!isUnmappedMateOfMappedRead(read)) { return false; } final String reference = read.getNextMatePosition().getReferenceName(); String key = getReadKey(read); Map<String, ArrayList<Read>> reads = unmappedReads.get(reference); if (reads ...
[ "@", "Override", "public", "boolean", "maybeAddRead", "(", "Read", "read", ")", "{", "if", "(", "!", "isUnmappedMateOfMappedRead", "(", "read", ")", ")", "{", "return", "false", ";", "}", "final", "String", "reference", "=", "read", ".", "getNextMatePosition...
Checks and adds the read if we need to remember it for injection. Returns true if the read was added.
[ "Checks", "and", "adds", "the", "read", "if", "we", "need", "to", "remember", "it", "for", "injection", ".", "Returns", "true", "if", "the", "read", "was", "added", "." ]
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/common/grpc/UnmappedReads.java#L56-L81
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/common/grpc/UnmappedReads.java
UnmappedReads.getUnmappedMates
@Override public ArrayList<Read> getUnmappedMates(Read read) { if (read.getNumberReads() < 2 || (read.hasNextMatePosition() && read.getNextMatePosition() != null) || !read.hasAlignment() || read.getAlignment() == null || !read.getAlignment().hasPosition() || read.getAlignment().getPosition...
java
@Override public ArrayList<Read> getUnmappedMates(Read read) { if (read.getNumberReads() < 2 || (read.hasNextMatePosition() && read.getNextMatePosition() != null) || !read.hasAlignment() || read.getAlignment() == null || !read.getAlignment().hasPosition() || read.getAlignment().getPosition...
[ "@", "Override", "public", "ArrayList", "<", "Read", ">", "getUnmappedMates", "(", "Read", "read", ")", "{", "if", "(", "read", ".", "getNumberReads", "(", ")", "<", "2", "||", "(", "read", ".", "hasNextMatePosition", "(", ")", "&&", "read", ".", "getN...
Checks if the passed read has unmapped mates that need to be injected and if so - returns them. The returned list is sorted by read number to handle the case of multi-read fragments.
[ "Checks", "if", "the", "passed", "read", "has", "unmapped", "mates", "that", "need", "to", "be", "injected", "and", "if", "so", "-", "returns", "them", ".", "The", "returned", "list", "is", "sorted", "by", "read", "number", "to", "handle", "the", "case",...
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/common/grpc/UnmappedReads.java#L88-L110
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java
WebScopeManager.setSessionPassivationAllowed
public static void setSessionPassivationAllowed (final boolean bSessionPassivationAllowed) { s_aSessionPassivationAllowed.set (bSessionPassivationAllowed); if (LOGGER.isInfoEnabled ()) LOGGER.info ("Session passivation is now " + (bSessionPassivationAllowed ? "enabled" : "disabled")); // For passiv...
java
public static void setSessionPassivationAllowed (final boolean bSessionPassivationAllowed) { s_aSessionPassivationAllowed.set (bSessionPassivationAllowed); if (LOGGER.isInfoEnabled ()) LOGGER.info ("Session passivation is now " + (bSessionPassivationAllowed ? "enabled" : "disabled")); // For passiv...
[ "public", "static", "void", "setSessionPassivationAllowed", "(", "final", "boolean", "bSessionPassivationAllowed", ")", "{", "s_aSessionPassivationAllowed", ".", "set", "(", "bSessionPassivationAllowed", ")", ";", "if", "(", "LOGGER", ".", "isInfoEnabled", "(", ")", "...
Allow or disallow session passivation @param bSessionPassivationAllowed <code>true</code> to enable session passivation, <code>false</code> to disable it
[ "Allow", "or", "disallow", "session", "passivation" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java#L95-L124
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java
WebScopeManager.internalGetOrCreateSessionScope
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetOrCreateSessionScope (@Nonnull final HttpSession aHttpSession, final boolean bCreateIfNotExisting, ...
java
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetOrCreateSessionScope (@Nonnull final HttpSession aHttpSession, final boolean bCreateIfNotExisting, ...
[ "@", "Nullable", "@", "DevelopersNote", "(", "\"This is only for project-internal use!\"", ")", "public", "static", "ISessionWebScope", "internalGetOrCreateSessionScope", "(", "@", "Nonnull", "final", "HttpSession", "aHttpSession", ",", "final", "boolean", "bCreateIfNotExisti...
Internal method which does the main logic for session web scope creation @param aHttpSession The underlying HTTP session @param bCreateIfNotExisting if <code>true</code> if a new session web scope is created, if none is present @param bItsOkayToCreateANewScope if <code>true</code> no warning is emitted, if a new sessi...
[ "Internal", "method", "which", "does", "the", "main", "logic", "for", "session", "web", "scope", "creation" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java#L253-L289
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java
WebScopeManager.internalGetSessionScope
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetSessionScope (final boolean bCreateIfNotExisting, final boolean bItsOkayToCreateANewSession) { // Try to to resolve the current request scope...
java
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetSessionScope (final boolean bCreateIfNotExisting, final boolean bItsOkayToCreateANewSession) { // Try to to resolve the current request scope...
[ "@", "Nullable", "@", "DevelopersNote", "(", "\"This is only for project-internal use!\"", ")", "public", "static", "ISessionWebScope", "internalGetSessionScope", "(", "final", "boolean", "bCreateIfNotExisting", ",", "final", "boolean", "bItsOkayToCreateANewSession", ")", "{"...
Get the session scope from the current request scope. @param bCreateIfNotExisting if <code>true</code> a new session scope (and a new HTTP session if required) is created if none is existing so far. @param bItsOkayToCreateANewSession if <code>true</code> no warning is emitted, if a new session scope must be created. T...
[ "Get", "the", "session", "scope", "from", "the", "current", "request", "scope", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java#L331-L339
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java
WebScopeManager.internalGetSessionScope
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetSessionScope (@Nullable final IRequestWebScope aRequestScope, final boolean bCreateIfNotExisting, ...
java
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetSessionScope (@Nullable final IRequestWebScope aRequestScope, final boolean bCreateIfNotExisting, ...
[ "@", "Nullable", "@", "DevelopersNote", "(", "\"This is only for project-internal use!\"", ")", "public", "static", "ISessionWebScope", "internalGetSessionScope", "(", "@", "Nullable", "final", "IRequestWebScope", "aRequestScope", ",", "final", "boolean", "bCreateIfNotExistin...
Get the session scope of the provided request scope. @param aRequestScope The request scope it is about. May be <code>null</code>. @param bCreateIfNotExisting if <code>true</code> a new session scope (and a new HTTP session if required) is created if none is existing so far. @param bItsOkayToCreateANewSession if <code...
[ "Get", "the", "session", "scope", "of", "the", "provided", "request", "scope", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java#L355-L376
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java
VertexData.getIndicesBuffer
public ByteBuffer getIndicesBuffer() { final ByteBuffer buffer = CausticUtil.createByteBuffer(indices.size() * DataType.INT.getByteSize()); for (int i = 0; i < indices.size(); i++) { buffer.putInt(indices.get(i)); } buffer.flip(); return buffer; }
java
public ByteBuffer getIndicesBuffer() { final ByteBuffer buffer = CausticUtil.createByteBuffer(indices.size() * DataType.INT.getByteSize()); for (int i = 0; i < indices.size(); i++) { buffer.putInt(indices.get(i)); } buffer.flip(); return buffer; }
[ "public", "ByteBuffer", "getIndicesBuffer", "(", ")", "{", "final", "ByteBuffer", "buffer", "=", "CausticUtil", ".", "createByteBuffer", "(", "indices", ".", "size", "(", ")", "*", "DataType", ".", "INT", ".", "getByteSize", "(", ")", ")", ";", "for", "(",...
Returns a byte buffer containing all the current indices. @return A buffer of the indices
[ "Returns", "a", "byte", "buffer", "containing", "all", "the", "current", "indices", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java#L77-L84
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java
VertexData.addAttribute
public void addAttribute(int index, VertexAttribute attribute) { attributes.put(index, attribute); nameToIndex.put(attribute.getName(), index); }
java
public void addAttribute(int index, VertexAttribute attribute) { attributes.put(index, attribute); nameToIndex.put(attribute.getName(), index); }
[ "public", "void", "addAttribute", "(", "int", "index", ",", "VertexAttribute", "attribute", ")", "{", "attributes", ".", "put", "(", "index", ",", "attribute", ")", ";", "nameToIndex", ".", "put", "(", "attribute", ".", "getName", "(", ")", ",", "index", ...
Adds an attribute. @param index The attribute index @param attribute The attribute to add
[ "Adds", "an", "attribute", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java#L92-L95
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java
VertexData.getAttributeSize
public int getAttributeSize(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return -1; } return attribute.getSize(); }
java
public int getAttributeSize(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return -1; } return attribute.getSize(); }
[ "public", "int", "getAttributeSize", "(", "int", "index", ")", "{", "final", "VertexAttribute", "attribute", "=", "getAttribute", "(", "index", ")", ";", "if", "(", "attribute", "==", "null", ")", "{", "return", "-", "1", ";", "}", "return", "attribute", ...
Returns the size of the attribute at the provided index, or -1 if none can be found. @param index The index to lookup @return The size of the attribute, or -1 if none can be found
[ "Returns", "the", "size", "of", "the", "attribute", "at", "the", "provided", "index", "or", "-", "1", "if", "none", "can", "be", "found", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java#L182-L188
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java
VertexData.getAttributeType
public DataType getAttributeType(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return null; } return attribute.getType(); }
java
public DataType getAttributeType(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return null; } return attribute.getType(); }
[ "public", "DataType", "getAttributeType", "(", "int", "index", ")", "{", "final", "VertexAttribute", "attribute", "=", "getAttribute", "(", "index", ")", ";", "if", "(", "attribute", "==", "null", ")", "{", "return", "null", ";", "}", "return", "attribute", ...
Returns the type of the attribute at the provided index, or null if none can be found. @param index The index to lookup @return The type of the attribute, or null if none can be found
[ "Returns", "the", "type", "of", "the", "attribute", "at", "the", "provided", "index", "or", "null", "if", "none", "can", "be", "found", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java#L206-L212
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java
VertexData.getAttributeName
public String getAttributeName(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return null; } return attribute.getName(); }
java
public String getAttributeName(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return null; } return attribute.getName(); }
[ "public", "String", "getAttributeName", "(", "int", "index", ")", "{", "final", "VertexAttribute", "attribute", "=", "getAttribute", "(", "index", ")", ";", "if", "(", "attribute", "==", "null", ")", "{", "return", "null", ";", "}", "return", "attribute", ...
Returns the name of the attribute at the provided index, or null if none can be found. @param index The index to lookup @return The name of the attribute, or null if none can be found
[ "Returns", "the", "name", "of", "the", "attribute", "at", "the", "provided", "index", "or", "null", "if", "none", "can", "be", "found", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java#L220-L226
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java
VertexData.getAttributeBuffer
public ByteBuffer getAttributeBuffer(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return null; } return attribute.getData(); }
java
public ByteBuffer getAttributeBuffer(int index) { final VertexAttribute attribute = getAttribute(index); if (attribute == null) { return null; } return attribute.getData(); }
[ "public", "ByteBuffer", "getAttributeBuffer", "(", "int", "index", ")", "{", "final", "VertexAttribute", "attribute", "=", "getAttribute", "(", "index", ")", ";", "if", "(", "attribute", "==", "null", ")", "{", "return", "null", ";", "}", "return", "attribut...
Returns the buffer for the attribute at the provided index, or null if none can be found. The buffer is returned filled and ready for reading. @param index The index to lookup @return The attribute buffer, filled and flipped
[ "Returns", "the", "buffer", "for", "the", "attribute", "at", "the", "provided", "index", "or", "null", "if", "none", "can", "be", "found", ".", "The", "buffer", "is", "returned", "filled", "and", "ready", "for", "reading", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java#L262-L268
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java
VertexData.copy
public void copy(VertexData data) { clear(); indices.addAll(data.indices); final TIntObjectIterator<VertexAttribute> iterator = data.attributes.iterator(); while (iterator.hasNext()) { iterator.advance(); attributes.put(iterator.key(), iterator.value().clone()); ...
java
public void copy(VertexData data) { clear(); indices.addAll(data.indices); final TIntObjectIterator<VertexAttribute> iterator = data.attributes.iterator(); while (iterator.hasNext()) { iterator.advance(); attributes.put(iterator.key(), iterator.value().clone()); ...
[ "public", "void", "copy", "(", "VertexData", "data", ")", "{", "clear", "(", ")", ";", "indices", ".", "addAll", "(", "data", ".", "indices", ")", ";", "final", "TIntObjectIterator", "<", "VertexAttribute", ">", "iterator", "=", "data", ".", "attributes", ...
Replaces the contents of this vertex data by the provided one. This is a deep copy. The vertex attribute are each individually cloned. @param data The data to copy.
[ "Replaces", "the", "contents", "of", "this", "vertex", "data", "by", "the", "provided", "one", ".", "This", "is", "a", "deep", "copy", ".", "The", "vertex", "attribute", "are", "each", "individually", "cloned", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/VertexData.java#L284-L293
train
phax/ph-web
ph-http/src/main/java/com/helger/http/AcceptLanguageList.java
AcceptLanguageList.getQValueOfLanguage
@Nonnull public QValue getQValueOfLanguage (@Nonnull final String sLanguage) { ValueEnforcer.notNull (sLanguage, "Language"); // Find language direct QValue aQuality = m_aMap.get (_unify (sLanguage)); if (aQuality == null) { // If not explicitly given, check for "*" aQuality = m_aMa...
java
@Nonnull public QValue getQValueOfLanguage (@Nonnull final String sLanguage) { ValueEnforcer.notNull (sLanguage, "Language"); // Find language direct QValue aQuality = m_aMap.get (_unify (sLanguage)); if (aQuality == null) { // If not explicitly given, check for "*" aQuality = m_aMa...
[ "@", "Nonnull", "public", "QValue", "getQValueOfLanguage", "(", "@", "Nonnull", "final", "String", "sLanguage", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sLanguage", ",", "\"Language\"", ")", ";", "// Find language direct", "QValue", "aQuality", "=", "m_aMa...
Return the associated quality of the given language. @param sLanguage The language name to query. May not be <code>null</code>. @return The associated {@link QValue}. Never <code>null</code>.
[ "Return", "the", "associated", "quality", "of", "the", "given", "language", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/AcceptLanguageList.java#L55-L74
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/model/Model.java
Model.setVertexArray
public void setVertexArray(VertexArray vertexArray) { if (vertexArray == null) { throw new IllegalArgumentException("Vertex array cannot be null"); } vertexArray.checkCreated(); this.vertexArray = vertexArray; }
java
public void setVertexArray(VertexArray vertexArray) { if (vertexArray == null) { throw new IllegalArgumentException("Vertex array cannot be null"); } vertexArray.checkCreated(); this.vertexArray = vertexArray; }
[ "public", "void", "setVertexArray", "(", "VertexArray", "vertexArray", ")", "{", "if", "(", "vertexArray", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Vertex array cannot be null\"", ")", ";", "}", "vertexArray", ".", "checkCreated", ...
Sets the vertex array for this model. @param vertexArray The vertex array to use
[ "Sets", "the", "vertex", "array", "for", "this", "model", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/model/Model.java#L125-L131
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/model/Model.java
Model.getMatrix
public Matrix4f getMatrix() { if (updateMatrix) { final Matrix4f matrix = Matrix4f.createScaling(scale.toVector4(1)).rotate(rotation).translate(position); if (parent == null) { this.matrix = matrix; } else { childMatrix = matrix; } ...
java
public Matrix4f getMatrix() { if (updateMatrix) { final Matrix4f matrix = Matrix4f.createScaling(scale.toVector4(1)).rotate(rotation).translate(position); if (parent == null) { this.matrix = matrix; } else { childMatrix = matrix; } ...
[ "public", "Matrix4f", "getMatrix", "(", ")", "{", "if", "(", "updateMatrix", ")", "{", "final", "Matrix4f", "matrix", "=", "Matrix4f", ".", "createScaling", "(", "scale", ".", "toVector4", "(", "1", ")", ")", ".", "rotate", "(", "rotation", ")", ".", "...
Returns the transformation matrix that represent the model's current scale, rotation and position. @return The transformation matrix
[ "Returns", "the", "transformation", "matrix", "that", "represent", "the", "model", "s", "current", "scale", "rotation", "and", "position", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/model/Model.java#L159-L177
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/model/Model.java
Model.setParent
public void setParent(Model parent) { if (parent == this) { throw new IllegalArgumentException("The model can't be its own parent"); } if (parent == null) { this.parent.children.remove(this); } else { parent.children.add(this); } this.p...
java
public void setParent(Model parent) { if (parent == this) { throw new IllegalArgumentException("The model can't be its own parent"); } if (parent == null) { this.parent.children.remove(this); } else { parent.children.add(this); } this.p...
[ "public", "void", "setParent", "(", "Model", "parent", ")", "{", "if", "(", "parent", "==", "this", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The model can't be its own parent\"", ")", ";", "}", "if", "(", "parent", "==", "null", ")", "{"...
Sets the parent model. This model's position, rotation and scale will be relative to that model if not null. @param parent The parent model, or null for no parent
[ "Sets", "the", "parent", "model", ".", "This", "model", "s", "position", "rotation", "and", "scale", "will", "be", "relative", "to", "that", "model", "if", "not", "null", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/model/Model.java#L277-L287
train
khmarbaise/sapm
src/main/java/com/soebes/subversion/sapm/Aliases.java
Aliases.hasAlias
public boolean hasAlias(String aliasName) { boolean result = false; for (Alias item : getAliasesList()) { if (item.getName().equals(aliasName)) { result = true; } } return result; }
java
public boolean hasAlias(String aliasName) { boolean result = false; for (Alias item : getAliasesList()) { if (item.getName().equals(aliasName)) { result = true; } } return result; }
[ "public", "boolean", "hasAlias", "(", "String", "aliasName", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "Alias", "item", ":", "getAliasesList", "(", ")", ")", "{", "if", "(", "item", ".", "getName", "(", ")", ".", "equals", "(", "a...
Check if the given alias exists in the list of aliases or not. @param aliasName The alias name which will be checked for. @return true if the alias has been found false otherwise.
[ "Check", "if", "the", "given", "alias", "exists", "in", "the", "list", "of", "aliases", "or", "not", "." ]
b5da5b0d8929324f03cb3a4233a3534813f93eea
https://github.com/khmarbaise/sapm/blob/b5da5b0d8929324f03cb3a4233a3534813f93eea/src/main/java/com/soebes/subversion/sapm/Aliases.java#L56-L65
train
phax/ph-web
ph-web/src/main/java/com/helger/web/encoding/RFC2047Helper.java
RFC2047Helper.encode
@Nullable public static String encode (@Nullable final String sValue, @Nonnull final Charset aCharset, final ECodec eCodec) { if (sValue == null) return null; try { switch (eCodec) { case Q: return new RFC1522QCodec (aCharset).getEncoded (sValue); case B: ...
java
@Nullable public static String encode (@Nullable final String sValue, @Nonnull final Charset aCharset, final ECodec eCodec) { if (sValue == null) return null; try { switch (eCodec) { case Q: return new RFC1522QCodec (aCharset).getEncoded (sValue); case B: ...
[ "@", "Nullable", "public", "static", "String", "encode", "(", "@", "Nullable", "final", "String", "sValue", ",", "@", "Nonnull", "final", "Charset", "aCharset", ",", "final", "ECodec", "eCodec", ")", "{", "if", "(", "sValue", "==", "null", ")", "return", ...
Used to encode a string as specified by RFC 2047 @param sValue The string to encode @param aCharset The character set to use for the encoding @param eCodec Codec type @return Encoded String
[ "Used", "to", "encode", "a", "string", "as", "specified", "by", "RFC", "2047" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/encoding/RFC2047Helper.java#L80-L101
train
phax/ph-web
ph-web/src/main/java/com/helger/web/encoding/RFC2047Helper.java
RFC2047Helper.decode
@Nullable public static String decode (@Nullable final String sValue) { if (sValue == null) return null; try { // try BCodec first return new RFC1522BCodec ().getDecoded (sValue); } catch (final DecodeException de) { // try QCodec next try { retur...
java
@Nullable public static String decode (@Nullable final String sValue) { if (sValue == null) return null; try { // try BCodec first return new RFC1522BCodec ().getDecoded (sValue); } catch (final DecodeException de) { // try QCodec next try { retur...
[ "@", "Nullable", "public", "static", "String", "decode", "(", "@", "Nullable", "final", "String", "sValue", ")", "{", "if", "(", "sValue", "==", "null", ")", "return", "null", ";", "try", "{", "// try BCodec first", "return", "new", "RFC1522BCodec", "(", "...
Used to decode a string as specified by RFC 2047 @param sValue The encoded string @return Decoded String
[ "Used", "to", "decode", "a", "string", "as", "specified", "by", "RFC", "2047" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/encoding/RFC2047Helper.java#L110-L137
train
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/requesttrack/RequestTracker.java
RequestTracker.addRequest
public static void addRequest (@Nonnull @Nonempty final String sRequestID, @Nonnull final IRequestWebScope aRequestScope) { getInstance ().m_aRequestTrackingMgr.addRequest (sRequestID, aRequestScope, s_aParallelRunningCallbacks); }
java
public static void addRequest (@Nonnull @Nonempty final String sRequestID, @Nonnull final IRequestWebScope aRequestScope) { getInstance ().m_aRequestTrackingMgr.addRequest (sRequestID, aRequestScope, s_aParallelRunningCallbacks); }
[ "public", "static", "void", "addRequest", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sRequestID", ",", "@", "Nonnull", "final", "IRequestWebScope", "aRequestScope", ")", "{", "getInstance", "(", ")", ".", "m_aRequestTrackingMgr", ".", "addRequest", ...
Add new request to the tracking @param sRequestID The unique request ID. @param aRequestScope The request scope itself.
[ "Add", "new", "request", "to", "the", "tracking" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/requesttrack/RequestTracker.java#L166-L170
train
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/requesttrack/RequestTracker.java
RequestTracker.removeRequest
public static void removeRequest (@Nonnull @Nonempty final String sRequestID) { final RequestTracker aTracker = getGlobalSingletonIfInstantiated (RequestTracker.class); if (aTracker != null) aTracker.m_aRequestTrackingMgr.removeRequest (sRequestID, s_aParallelRunningCallbacks); }
java
public static void removeRequest (@Nonnull @Nonempty final String sRequestID) { final RequestTracker aTracker = getGlobalSingletonIfInstantiated (RequestTracker.class); if (aTracker != null) aTracker.m_aRequestTrackingMgr.removeRequest (sRequestID, s_aParallelRunningCallbacks); }
[ "public", "static", "void", "removeRequest", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sRequestID", ")", "{", "final", "RequestTracker", "aTracker", "=", "getGlobalSingletonIfInstantiated", "(", "RequestTracker", ".", "class", ")", ";", "if", "(", ...
Remove a request from the tracking. @param sRequestID The request ID.
[ "Remove", "a", "request", "from", "the", "tracking", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/requesttrack/RequestTracker.java#L178-L183
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/scope/ScopedMailAPI.java
ScopedMailAPI.queueMail
@Nonnull public ESuccess queueMail (@Nonnull final ISMTPSettings aSMTPSettings, @Nonnull final IMutableEmailData aMailData) { return MailAPI.queueMail (aSMTPSettings, aMailData); }
java
@Nonnull public ESuccess queueMail (@Nonnull final ISMTPSettings aSMTPSettings, @Nonnull final IMutableEmailData aMailData) { return MailAPI.queueMail (aSMTPSettings, aMailData); }
[ "@", "Nonnull", "public", "ESuccess", "queueMail", "(", "@", "Nonnull", "final", "ISMTPSettings", "aSMTPSettings", ",", "@", "Nonnull", "final", "IMutableEmailData", "aMailData", ")", "{", "return", "MailAPI", ".", "queueMail", "(", "aSMTPSettings", ",", "aMailDat...
Unconditionally queue a mail @param aSMTPSettings The SMTP settings to use. May not be <code>null</code>. @param aMailData The data of the email to be send. May not be <code>null</code>. @return {@link ESuccess}
[ "Unconditionally", "queue", "a", "mail" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/scope/ScopedMailAPI.java#L88-L92
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/scope/ScopedMailAPI.java
ScopedMailAPI.queueMails
@Nonnegative public int queueMails (@Nonnull final ISMTPSettings aSMTPSettings, @Nonnull final Collection <? extends IMutableEmailData> aMailDataList) { return MailAPI.queueMails (aSMTPSettings, aMailDataList); }
java
@Nonnegative public int queueMails (@Nonnull final ISMTPSettings aSMTPSettings, @Nonnull final Collection <? extends IMutableEmailData> aMailDataList) { return MailAPI.queueMails (aSMTPSettings, aMailDataList); }
[ "@", "Nonnegative", "public", "int", "queueMails", "(", "@", "Nonnull", "final", "ISMTPSettings", "aSMTPSettings", ",", "@", "Nonnull", "final", "Collection", "<", "?", "extends", "IMutableEmailData", ">", "aMailDataList", ")", "{", "return", "MailAPI", ".", "qu...
Queue multiple mails at once. @param aSMTPSettings The SMTP settings to be used. @param aMailDataList The mail messages to queue. May not be <code>null</code>. @return The number of queued emails. Always &ge; 0. Maximum value is the number of {@link IMutableEmailData} objects in the argument.
[ "Queue", "multiple", "mails", "at", "once", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/scope/ScopedMailAPI.java#L104-L109
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java
EmailAddressValidator.setPerformMXRecordCheck
public static void setPerformMXRecordCheck (final boolean bPerformMXRecordCheck) { s_aPerformMXRecordCheck.set (bPerformMXRecordCheck); if (LOGGER.isInfoEnabled ()) LOGGER.info ("Email address record check is " + (bPerformMXRecordCheck ? "enabled" : "disabled")); }
java
public static void setPerformMXRecordCheck (final boolean bPerformMXRecordCheck) { s_aPerformMXRecordCheck.set (bPerformMXRecordCheck); if (LOGGER.isInfoEnabled ()) LOGGER.info ("Email address record check is " + (bPerformMXRecordCheck ? "enabled" : "disabled")); }
[ "public", "static", "void", "setPerformMXRecordCheck", "(", "final", "boolean", "bPerformMXRecordCheck", ")", "{", "s_aPerformMXRecordCheck", ".", "set", "(", "bPerformMXRecordCheck", ")", ";", "if", "(", "LOGGER", ".", "isInfoEnabled", "(", ")", ")", "LOGGER", "....
Set the global "check MX record" flag. @param bPerformMXRecordCheck <code>true</code> to enable, <code>false</code> otherwise.
[ "Set", "the", "global", "check", "MX", "record", "flag", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java#L57-L63
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java
EmailAddressValidator._hasMXRecord
private static boolean _hasMXRecord (@Nonnull final String sHostName) { try { final Record [] aRecords = new Lookup (sHostName, Type.MX).run (); return aRecords != null && aRecords.length > 0; } catch (final Exception ex) { // Do not log this message, as this method is potentiall...
java
private static boolean _hasMXRecord (@Nonnull final String sHostName) { try { final Record [] aRecords = new Lookup (sHostName, Type.MX).run (); return aRecords != null && aRecords.length > 0; } catch (final Exception ex) { // Do not log this message, as this method is potentiall...
[ "private", "static", "boolean", "_hasMXRecord", "(", "@", "Nonnull", "final", "String", "sHostName", ")", "{", "try", "{", "final", "Record", "[", "]", "aRecords", "=", "new", "Lookup", "(", "sHostName", ",", "Type", ".", "MX", ")", ".", "run", "(", ")...
Check if the passed host name has an MX record. @param sHostName The host name to check. @return <code>true</code> if an MX record was found, <code>false</code> if not (or if an exception occurred)
[ "Check", "if", "the", "passed", "host", "name", "has", "an", "MX", "record", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java#L81-L101
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java
EmailAddressValidator.isValid
public static boolean isValid (@Nullable final String sEmail) { return s_aPerformMXRecordCheck.get () ? isValidWithMXCheck (sEmail) : EmailAddressHelper.isValid (sEmail); }
java
public static boolean isValid (@Nullable final String sEmail) { return s_aPerformMXRecordCheck.get () ? isValidWithMXCheck (sEmail) : EmailAddressHelper.isValid (sEmail); }
[ "public", "static", "boolean", "isValid", "(", "@", "Nullable", "final", "String", "sEmail", ")", "{", "return", "s_aPerformMXRecordCheck", ".", "get", "(", ")", "?", "isValidWithMXCheck", "(", "sEmail", ")", ":", "EmailAddressHelper", ".", "isValid", "(", "sE...
Checks if a value is a valid e-mail address. Depending on the global value for the MX record check the check is performed incl. the MX record check or without. @param sEmail The value validation is being performed on. A <code>null</code> value is considered invalid. @return <code>true</code> if the email address is va...
[ "Checks", "if", "a", "value", "is", "a", "valid", "e", "-", "mail", "address", ".", "Depending", "on", "the", "global", "value", "for", "the", "MX", "record", "check", "the", "check", "is", "performed", "incl", ".", "the", "MX", "record", "check", "or"...
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java#L116-L119
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java
EmailAddressValidator.isValidWithMXCheck
public static boolean isValidWithMXCheck (@Nullable final String sEmail) { // First check without MX if (!EmailAddressHelper.isValid (sEmail)) return false; final String sUnifiedEmail = EmailAddressHelper.getUnifiedEmailAddress (sEmail); // MX record checking final int i = sUnifiedEmail.in...
java
public static boolean isValidWithMXCheck (@Nullable final String sEmail) { // First check without MX if (!EmailAddressHelper.isValid (sEmail)) return false; final String sUnifiedEmail = EmailAddressHelper.getUnifiedEmailAddress (sEmail); // MX record checking final int i = sUnifiedEmail.in...
[ "public", "static", "boolean", "isValidWithMXCheck", "(", "@", "Nullable", "final", "String", "sEmail", ")", "{", "// First check without MX", "if", "(", "!", "EmailAddressHelper", ".", "isValid", "(", "sEmail", ")", ")", "return", "false", ";", "final", "String...
Checks if a value is a valid e-mail address according to a complex regular expression. Additionally an MX record lookup is performed to see whether this host provides SMTP services. @param sEmail The value validation is being performed on. A <code>null</code> value is considered invalid. @return <code>true</code> if t...
[ "Checks", "if", "a", "value", "is", "a", "valid", "e", "-", "mail", "address", "according", "to", "a", "complex", "regular", "expression", ".", "Additionally", "an", "MX", "record", "lookup", "is", "performed", "to", "see", "whether", "this", "host", "prov...
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java#L132-L144
train
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/response/ExtendedHttpResponseException.java
ExtendedHttpResponseException.getResponseBodyAsString
@Nullable public String getResponseBodyAsString (@Nonnull final Charset aCharset) { return m_aResponseBody == null ? null : new String (m_aResponseBody, aCharset); }
java
@Nullable public String getResponseBodyAsString (@Nonnull final Charset aCharset) { return m_aResponseBody == null ? null : new String (m_aResponseBody, aCharset); }
[ "@", "Nullable", "public", "String", "getResponseBodyAsString", "(", "@", "Nonnull", "final", "Charset", "aCharset", ")", "{", "return", "m_aResponseBody", "==", "null", "?", "null", ":", "new", "String", "(", "m_aResponseBody", ",", "aCharset", ")", ";", "}" ...
Get the response body as a string in the provided charset. @param aCharset The charset to use. May not be <code>null</code>. @return <code>null</code> if no response body is present.
[ "Get", "the", "response", "body", "as", "a", "string", "in", "the", "provided", "charset", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/response/ExtendedHttpResponseException.java#L148-L152
train