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
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/serialize/write/XMLCharHelper.java
XMLCharHelper.isInvalidXMLCDATAChar
public static boolean isInvalidXMLCDATAChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c) { switch (eXMLVersion) { case XML_10: return INVALID_VALUE_CHAR_XML10.get (c); case XML_11: return INVALID_CDATA_VALUE_CHAR_XML11.get (c); case HTML: return INVA...
java
public static boolean isInvalidXMLCDATAChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c) { switch (eXMLVersion) { case XML_10: return INVALID_VALUE_CHAR_XML10.get (c); case XML_11: return INVALID_CDATA_VALUE_CHAR_XML11.get (c); case HTML: return INVA...
[ "public", "static", "boolean", "isInvalidXMLCDATAChar", "(", "@", "Nonnull", "final", "EXMLSerializeVersion", "eXMLVersion", ",", "final", "int", "c", ")", "{", "switch", "(", "eXMLVersion", ")", "{", "case", "XML_10", ":", "return", "INVALID_VALUE_CHAR_XML10", "....
Check if the passed character is invalid for a CDATA node. @param eXMLVersion XML version to be used. May not be <code>null</code>. @param c char to check @return <code>true</code> if the char is invalid
[ "Check", "if", "the", "passed", "character", "is", "invalid", "for", "a", "CDATA", "node", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/serialize/write/XMLCharHelper.java#L867-L880
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/serialize/write/XMLCharHelper.java
XMLCharHelper.isInvalidXMLAttributeValueChar
public static boolean isInvalidXMLAttributeValueChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c) { switch (eXMLVersion) { case XML_10: return INVALID_VALUE_CHAR_XML10.get (c); case XML_11: return INVALID_ATTR_VALUE_CHAR_XML11.get (c); case HTML: ret...
java
public static boolean isInvalidXMLAttributeValueChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c) { switch (eXMLVersion) { case XML_10: return INVALID_VALUE_CHAR_XML10.get (c); case XML_11: return INVALID_ATTR_VALUE_CHAR_XML11.get (c); case HTML: ret...
[ "public", "static", "boolean", "isInvalidXMLAttributeValueChar", "(", "@", "Nonnull", "final", "EXMLSerializeVersion", "eXMLVersion", ",", "final", "int", "c", ")", "{", "switch", "(", "eXMLVersion", ")", "{", "case", "XML_10", ":", "return", "INVALID_VALUE_CHAR_XML...
Check if the passed character is invalid for a attribute value node. @param eXMLVersion XML version to be used. May not be <code>null</code>. @param c char to check @return <code>true</code> if the char is invalid
[ "Check", "if", "the", "passed", "character", "is", "invalid", "for", "a", "attribute", "value", "node", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/serialize/write/XMLCharHelper.java#L956-L969
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/stream/NonBlockingBufferedInputStream.java
NonBlockingBufferedInputStream._fill
private void _fill () throws IOException { byte [] buffer = _getBufIfOpen (); if (m_nMarkPos < 0) m_nPos = 0; /* no mark: throw away the buffer */ else if (m_nPos >= buffer.length) /* no room left in buffer */ if (m_nMarkPos > 0) { /* can throw away early part of the ...
java
private void _fill () throws IOException { byte [] buffer = _getBufIfOpen (); if (m_nMarkPos < 0) m_nPos = 0; /* no mark: throw away the buffer */ else if (m_nPos >= buffer.length) /* no room left in buffer */ if (m_nMarkPos > 0) { /* can throw away early part of the ...
[ "private", "void", "_fill", "(", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "_getBufIfOpen", "(", ")", ";", "if", "(", "m_nMarkPos", "<", "0", ")", "m_nPos", "=", "0", ";", "/* no mark: throw away the buffer */", "else", "if", "(",...
Fills the buffer with more data, taking into account shuffling and other tricks for dealing with marks. Assumes that it is being called by a method. This method also assumes that all data has already been read in, hence pos > count.
[ "Fills", "the", "buffer", "with", "more", "data", "taking", "into", "account", "shuffling", "and", "other", "tricks", "for", "dealing", "with", "marks", ".", "Assumes", "that", "it", "is", "being", "called", "by", "a", "method", ".", "This", "method", "als...
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/NonBlockingBufferedInputStream.java#L178-L225
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/StackTraceHelper.java
StackTraceHelper.getStackAsString
@Nonnull public static String getStackAsString (@Nullable final Throwable t, final boolean bOmitCommonStackTraceElements) { if (t == null) return ""; // convert call stack to string final StringBuilder aCallStack = _getRecursiveStackAsStringBuilder (t, ...
java
@Nonnull public static String getStackAsString (@Nullable final Throwable t, final boolean bOmitCommonStackTraceElements) { if (t == null) return ""; // convert call stack to string final StringBuilder aCallStack = _getRecursiveStackAsStringBuilder (t, ...
[ "@", "Nonnull", "public", "static", "String", "getStackAsString", "(", "@", "Nullable", "final", "Throwable", "t", ",", "final", "boolean", "bOmitCommonStackTraceElements", ")", "{", "if", "(", "t", "==", "null", ")", "return", "\"\"", ";", "// convert call stac...
Get the stack trace of a throwable as string. @param t The throwable to be converted. May be <code>null</code>. @param bOmitCommonStackTraceElements If <code>true</code> the stack trace is cut after certain class names occurring. If <code>false</code> the complete stack trace is returned. @return the stack trace as ne...
[ "Get", "the", "stack", "trace", "of", "a", "throwable", "as", "string", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/StackTraceHelper.java#L207-L226
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/serialize/write/AbstractXMLSerializer.java
AbstractXMLSerializer.handlePutNamespaceContextPrefixInRoot
protected final void handlePutNamespaceContextPrefixInRoot (@Nonnull final Map <QName, String> aAttrMap) { if (m_aSettings.isEmitNamespaces () && m_aNSStack.size () == 1 && m_aSettings.isPutNamespaceContextPrefixesInRoot ()) { // The only place where the namespace context prefixes are ad...
java
protected final void handlePutNamespaceContextPrefixInRoot (@Nonnull final Map <QName, String> aAttrMap) { if (m_aSettings.isEmitNamespaces () && m_aNSStack.size () == 1 && m_aSettings.isPutNamespaceContextPrefixesInRoot ()) { // The only place where the namespace context prefixes are ad...
[ "protected", "final", "void", "handlePutNamespaceContextPrefixInRoot", "(", "@", "Nonnull", "final", "Map", "<", "QName", ",", "String", ">", "aAttrMap", ")", "{", "if", "(", "m_aSettings", ".", "isEmitNamespaces", "(", ")", "&&", "m_aNSStack", ".", "size", "(...
This method handles the case, if all namespace context entries should be emitted on the root element. @param aAttrMap
[ "This", "method", "handles", "the", "case", "if", "all", "namespace", "context", "entries", "should", "be", "emitted", "on", "the", "root", "element", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/serialize/write/AbstractXMLSerializer.java#L498-L512
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/version/VersionRange.java
VersionRange.compareTo
public int compareTo (@Nonnull final VersionRange rhs) { int i = m_aFloorVersion.compareTo (rhs.m_aFloorVersion); if (i == 0) { if (m_bIncludeFloor && !rhs.m_bIncludeFloor) { // this < rhs i = -1; } else if (!m_bIncludeFloor && rhs.m_bIncludeFloor) {...
java
public int compareTo (@Nonnull final VersionRange rhs) { int i = m_aFloorVersion.compareTo (rhs.m_aFloorVersion); if (i == 0) { if (m_bIncludeFloor && !rhs.m_bIncludeFloor) { // this < rhs i = -1; } else if (!m_bIncludeFloor && rhs.m_bIncludeFloor) {...
[ "public", "int", "compareTo", "(", "@", "Nonnull", "final", "VersionRange", "rhs", ")", "{", "int", "i", "=", "m_aFloorVersion", ".", "compareTo", "(", "rhs", ".", "m_aFloorVersion", ")", ";", "if", "(", "i", "==", "0", ")", "{", "if", "(", "m_bInclude...
Compare this version range to another version range. Returns -1 if this is &lt; than the passed version or +1 if this is &gt; the passed version range @param rhs the version range to compare to @return 0 if the passed version range is equal to this version range<br> -1 if the floor version of this is &lt; than the flo...
[ "Compare", "this", "version", "range", "to", "another", "version", "range", ".", "Returns", "-", "1", "if", "this", "is", "&lt", ";", "than", "the", "passed", "version", "or", "+", "1", "if", "this", "is", "&gt", ";", "the", "passed", "version", "range...
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/version/VersionRange.java#L272-L313
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/channel/ChannelHelper.java
ChannelHelper.channelCopy
@Nonnegative public static long channelCopy (@Nonnull @WillNotClose final ReadableByteChannel aSrc, @Nonnull @WillNotClose final WritableByteChannel aDest) throws IOException { ValueEnforcer.notNull (aSrc, "SourceChannel"); ValueEnforcer.isTrue (aSrc.isOpen (), "SourceChann...
java
@Nonnegative public static long channelCopy (@Nonnull @WillNotClose final ReadableByteChannel aSrc, @Nonnull @WillNotClose final WritableByteChannel aDest) throws IOException { ValueEnforcer.notNull (aSrc, "SourceChannel"); ValueEnforcer.isTrue (aSrc.isOpen (), "SourceChann...
[ "@", "Nonnegative", "public", "static", "long", "channelCopy", "(", "@", "Nonnull", "@", "WillNotClose", "final", "ReadableByteChannel", "aSrc", ",", "@", "Nonnull", "@", "WillNotClose", "final", "WritableByteChannel", "aDest", ")", "throws", "IOException", "{", "...
Copy all content from the source channel to the destination channel. @param aSrc Source channel. May not be <code>null</code>. Is not closed after the operation. @param aDest Destination channel. May not be <code>null</code>. Is not closed after the operation. @return The number of bytes written. @throws IOException I...
[ "Copy", "all", "content", "from", "the", "source", "channel", "to", "the", "destination", "channel", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/channel/ChannelHelper.java#L74-L89
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/url/URLParameterList.java
URLParameterList.remove
@Nonnull public URLParameterList remove (@Nullable final String sName) { removeIf (aParam -> aParam.hasName (sName)); return this; }
java
@Nonnull public URLParameterList remove (@Nullable final String sName) { removeIf (aParam -> aParam.hasName (sName)); return this; }
[ "@", "Nonnull", "public", "URLParameterList", "remove", "(", "@", "Nullable", "final", "String", "sName", ")", "{", "removeIf", "(", "aParam", "->", "aParam", ".", "hasName", "(", "sName", ")", ")", ";", "return", "this", ";", "}" ]
Remove all parameter with the given name. @param sName The key to remove @return this
[ "Remove", "all", "parameter", "with", "the", "given", "name", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/url/URLParameterList.java#L58-L63
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/url/URLParameterList.java
URLParameterList.remove
@Nonnull public URLParameterList remove (@Nullable final String sName, @Nullable final String sValue) { removeIf (aParam -> aParam.hasName (sName) && aParam.hasValue (sValue)); return this; }
java
@Nonnull public URLParameterList remove (@Nullable final String sName, @Nullable final String sValue) { removeIf (aParam -> aParam.hasName (sName) && aParam.hasValue (sValue)); return this; }
[ "@", "Nonnull", "public", "URLParameterList", "remove", "(", "@", "Nullable", "final", "String", "sName", ",", "@", "Nullable", "final", "String", "sValue", ")", "{", "removeIf", "(", "aParam", "->", "aParam", ".", "hasName", "(", "sName", ")", "&&", "aPar...
Remove all parameter with the given name and value. @param sName The key to remove. May be <code>null</code>. @param sValue The value to be removed. May be <code>null</code>. @return this
[ "Remove", "all", "parameter", "with", "the", "given", "name", "and", "value", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/url/URLParameterList.java#L74-L79
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/url/URLParameterList.java
URLParameterList.getFirstParamValue
@Nullable public String getFirstParamValue (@Nullable final String sName) { return sName == null ? null : findFirstMapped (aParam -> aParam.hasName (sName), URLParameter::getValue); }
java
@Nullable public String getFirstParamValue (@Nullable final String sName) { return sName == null ? null : findFirstMapped (aParam -> aParam.hasName (sName), URLParameter::getValue); }
[ "@", "Nullable", "public", "String", "getFirstParamValue", "(", "@", "Nullable", "final", "String", "sName", ")", "{", "return", "sName", "==", "null", "?", "null", ":", "findFirstMapped", "(", "aParam", "->", "aParam", ".", "hasName", "(", "sName", ")", "...
Get the value of the first parameter with the provided name @param sName The parameter name to search @return <code>null</code> if no such parameter is present.
[ "Get", "the", "value", "of", "the", "first", "parameter", "with", "the", "provided", "name" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/url/URLParameterList.java#L119-L123
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/microdom/serialize/MicroReader.java
MicroReader.readMicroXML
@Nullable public static IMicroDocument readMicroXML (@WillClose @Nullable final InputSource aInputSource, @Nullable final ISAXReaderSettings aSettings) { if (aInputSource == null) return null; final EntityResolver aEntityResolver = aSettings == null ? null...
java
@Nullable public static IMicroDocument readMicroXML (@WillClose @Nullable final InputSource aInputSource, @Nullable final ISAXReaderSettings aSettings) { if (aInputSource == null) return null; final EntityResolver aEntityResolver = aSettings == null ? null...
[ "@", "Nullable", "public", "static", "IMicroDocument", "readMicroXML", "(", "@", "WillClose", "@", "Nullable", "final", "InputSource", "aInputSource", ",", "@", "Nullable", "final", "ISAXReaderSettings", "aSettings", ")", "{", "if", "(", "aInputSource", "==", "nul...
Read the passed input source as MicroXML. @param aInputSource The input source to use. May be <code>null</code> in which case <code>null</code> is directly returned. @param aSettings The settings to use. If <code>null</code> the default settings will be used. @return <code>null</code> if either the input source is <co...
[ "Read", "the", "passed", "input", "source", "as", "MicroXML", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/microdom/serialize/MicroReader.java#L79-L109
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/language/LanguageCache.java
LanguageCache.containsLanguage
public boolean containsLanguage (@Nullable final String sLanguage) { if (sLanguage == null) return false; final String sValidLanguage = LocaleHelper.getValidLanguageCode (sLanguage); if (sValidLanguage == null) return false; return m_aRWLock.readLocked ( () -> m_aLanguages.contains (sVali...
java
public boolean containsLanguage (@Nullable final String sLanguage) { if (sLanguage == null) return false; final String sValidLanguage = LocaleHelper.getValidLanguageCode (sLanguage); if (sValidLanguage == null) return false; return m_aRWLock.readLocked ( () -> m_aLanguages.contains (sVali...
[ "public", "boolean", "containsLanguage", "(", "@", "Nullable", "final", "String", "sLanguage", ")", "{", "if", "(", "sLanguage", "==", "null", ")", "return", "false", ";", "final", "String", "sValidLanguage", "=", "LocaleHelper", ".", "getValidLanguageCode", "("...
Check if the passed language is known. @param sLanguage The language to check. May be <code>null</code>. @return <code>true</code> if the passed language is contained, <code>false</code> otherwise.
[ "Check", "if", "the", "passed", "language", "is", "known", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/language/LanguageCache.java#L165-L174
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/serialize/convert/SerializationConverterRegistry.java
SerializationConverterRegistry.iterateAllRegisteredSerializationConverters
public void iterateAllRegisteredSerializationConverters (@Nonnull final ISerializationConverterCallback aCallback) { // Create a static (non weak) copy of the map final Map <Class <?>, ISerializationConverter <?>> aCopy = m_aRWLock.readLocked ( () -> new CommonsHashMap <> (m_aMap)); // And iterate the co...
java
public void iterateAllRegisteredSerializationConverters (@Nonnull final ISerializationConverterCallback aCallback) { // Create a static (non weak) copy of the map final Map <Class <?>, ISerializationConverter <?>> aCopy = m_aRWLock.readLocked ( () -> new CommonsHashMap <> (m_aMap)); // And iterate the co...
[ "public", "void", "iterateAllRegisteredSerializationConverters", "(", "@", "Nonnull", "final", "ISerializationConverterCallback", "aCallback", ")", "{", "// Create a static (non weak) copy of the map", "final", "Map", "<", "Class", "<", "?", ">", ",", "ISerializationConverter...
Iterate all registered serialization converters. For informational purposes only. @param aCallback The callback invoked for all iterations.
[ "Iterate", "all", "registered", "serialization", "converters", ".", "For", "informational", "purposes", "only", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/serialize/convert/SerializationConverterRegistry.java#L155-L164
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/serialize/SerializationHelper.java
SerializationHelper.getSerializedByteArray
@Nonnull public static byte [] getSerializedByteArray (@Nonnull final Serializable aData) { ValueEnforcer.notNull (aData, "Data"); try (final NonBlockingByteArrayOutputStream aBAOS = new NonBlockingByteArrayOutputStream ()) { // Convert to byte array try (final ObjectOutputStream aOOS = new...
java
@Nonnull public static byte [] getSerializedByteArray (@Nonnull final Serializable aData) { ValueEnforcer.notNull (aData, "Data"); try (final NonBlockingByteArrayOutputStream aBAOS = new NonBlockingByteArrayOutputStream ()) { // Convert to byte array try (final ObjectOutputStream aOOS = new...
[ "@", "Nonnull", "public", "static", "byte", "[", "]", "getSerializedByteArray", "(", "@", "Nonnull", "final", "Serializable", "aData", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aData", ",", "\"Data\"", ")", ";", "try", "(", "final", "NonBlockingByteArra...
Convert the passed Serializable object to a serialized byte array. @param aData Source object. May not be <code>null</code>. @return A non-<code>null</code> byte array. @throws IllegalStateException If serialization failed
[ "Convert", "the", "passed", "Serializable", "object", "to", "a", "serialized", "byte", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/serialize/SerializationHelper.java#L54-L82
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/serialize/SerializationHelper.java
SerializationHelper.getDeserializedObject
@Nonnull public static <T> T getDeserializedObject (@Nonnull final byte [] aData) { ValueEnforcer.notNull (aData, "Data"); // Read new object from byte array try (final ObjectInputStream aOIS = new ObjectInputStream (new NonBlockingByteArrayInputStream (aData))) { return GenericReflection.unc...
java
@Nonnull public static <T> T getDeserializedObject (@Nonnull final byte [] aData) { ValueEnforcer.notNull (aData, "Data"); // Read new object from byte array try (final ObjectInputStream aOIS = new ObjectInputStream (new NonBlockingByteArrayInputStream (aData))) { return GenericReflection.unc...
[ "@", "Nonnull", "public", "static", "<", "T", ">", "T", "getDeserializedObject", "(", "@", "Nonnull", "final", "byte", "[", "]", "aData", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aData", ",", "\"Data\"", ")", ";", "// Read new object from byte array", ...
Convert the passed byte array to an object using deserialization. @param aData The source serialized byte array. Must contain a single object only. May not be <code>null</code>. @return The deserialized object. Never <code>null</code>. @throws IllegalStateException If deserialization failed @param <T> The type of the ...
[ "Convert", "the", "passed", "byte", "array", "to", "an", "object", "using", "deserialization", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/serialize/SerializationHelper.java#L96-L110
train
phax/ph-commons
ph-datetime/src/main/java/com/helger/datetime/util/PDTIOHelper.java
PDTIOHelper.getLocalDateTimeForFilename
@Nonnull public static String getLocalDateTimeForFilename (@Nonnull final LocalDateTime aDT) { return PDTToString.getAsString (PATTERN_DATETIME, aDT); }
java
@Nonnull public static String getLocalDateTimeForFilename (@Nonnull final LocalDateTime aDT) { return PDTToString.getAsString (PATTERN_DATETIME, aDT); }
[ "@", "Nonnull", "public", "static", "String", "getLocalDateTimeForFilename", "(", "@", "Nonnull", "final", "LocalDateTime", "aDT", ")", "{", "return", "PDTToString", ".", "getAsString", "(", "PATTERN_DATETIME", ",", "aDT", ")", ";", "}" ]
Get the passed local date time formatted suitable for a file name. @param aDT The local date time to be formatted. May not be <code>null</code>. @return The formatted string.
[ "Get", "the", "passed", "local", "date", "time", "formatted", "suitable", "for", "a", "file", "name", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-datetime/src/main/java/com/helger/datetime/util/PDTIOHelper.java#L67-L71
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/FileSystemRecursiveIterator.java
FileSystemRecursiveIterator.recurseIntoDirectory
@OverrideOnDemand protected boolean recurseIntoDirectory (@Nonnull final File aDirectory) { return m_aRecursionFilter == null || m_aRecursionFilter.test (aDirectory); }
java
@OverrideOnDemand protected boolean recurseIntoDirectory (@Nonnull final File aDirectory) { return m_aRecursionFilter == null || m_aRecursionFilter.test (aDirectory); }
[ "@", "OverrideOnDemand", "protected", "boolean", "recurseIntoDirectory", "(", "@", "Nonnull", "final", "File", "aDirectory", ")", "{", "return", "m_aRecursionFilter", "==", "null", "||", "m_aRecursionFilter", ".", "test", "(", "aDirectory", ")", ";", "}" ]
Override this method to manually filter the directories, which are recursed into. @param aDirectory The non-<code>null</code> directory @return <code>true</code> if all children of this directory should be investigated
[ "Override", "this", "method", "to", "manually", "filter", "the", "directories", "which", "are", "recursed", "into", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/FileSystemRecursiveIterator.java#L138-L142
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java
LocaleFormatter.getFormatted
@Nonnull public static String getFormatted (@Nonnull final BigDecimal aValue, @Nonnegative final int nFractionDigits, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aValue, "Value"); ValueEnforcer.notNull (aDisplayLoca...
java
@Nonnull public static String getFormatted (@Nonnull final BigDecimal aValue, @Nonnegative final int nFractionDigits, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aValue, "Value"); ValueEnforcer.notNull (aDisplayLoca...
[ "@", "Nonnull", "public", "static", "String", "getFormatted", "(", "@", "Nonnull", "final", "BigDecimal", "aValue", ",", "@", "Nonnegative", "final", "int", "nFractionDigits", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "ValueEnforcer", "...
Format the passed value according to the rules specified by the given locale. @param aValue The value to be formatted. May not be <code>null</code>. @param nFractionDigits The number of fractional digits to use. Must be &ge; 0. @param aDisplayLocale The locale to be used. May not be <code>null</code>. @return The form...
[ "Format", "the", "passed", "value", "according", "to", "the", "rules", "specified", "by", "the", "given", "locale", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java#L155-L167
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java
LocaleFormatter.getFormattedWithAllFractionDigits
@Nonnull public static String getFormattedWithAllFractionDigits (@Nonnull final BigDecimal aValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aValue, "Value"); ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); final Nu...
java
@Nonnull public static String getFormattedWithAllFractionDigits (@Nonnull final BigDecimal aValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aValue, "Value"); ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); final Nu...
[ "@", "Nonnull", "public", "static", "String", "getFormattedWithAllFractionDigits", "(", "@", "Nonnull", "final", "BigDecimal", "aValue", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aValue", ",", "\"Val...
Format the passed value according to the rules specified by the given locale. All fraction digits of the passed value are displayed. @param aValue The value to be formatted. May not be <code>null</code>. @param aDisplayLocale The locale to be used. May not be <code>null</code>. @return The formatted string.
[ "Format", "the", "passed", "value", "according", "to", "the", "rules", "specified", "by", "the", "given", "locale", ".", "All", "fraction", "digits", "of", "the", "passed", "value", "are", "displayed", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java#L179-L189
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java
LocaleFormatter.getFormattedPercent
@Nonnull public static String getFormattedPercent (final double dValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); return NumberFormat.getPercentInstance (aDisplayLocale).format (dValue); }
java
@Nonnull public static String getFormattedPercent (final double dValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); return NumberFormat.getPercentInstance (aDisplayLocale).format (dValue); }
[ "@", "Nonnull", "public", "static", "String", "getFormattedPercent", "(", "final", "double", "dValue", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aDisplayLocale", ",", "\"DisplayLocale\"", ")", ";", ...
Format the given value as percentage. The "%" sign is automatically appended according to the requested locale. The number of fractional digits depend on the locale. @param dValue The value to be used. E.g. "0.125" will result in something like "12.5%" @param aDisplayLocale The locale to use. @return The non-<code>nul...
[ "Format", "the", "given", "value", "as", "percentage", ".", "The", "%", "sign", "is", "automatically", "appended", "according", "to", "the", "requested", "locale", ".", "The", "number", "of", "fractional", "digits", "depend", "on", "the", "locale", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java#L203-L209
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java
LocaleFormatter.getFormattedPercent
@Nonnull public static String getFormattedPercent (final double dValue, @Nonnegative final int nFractionDigits, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); final Numb...
java
@Nonnull public static String getFormattedPercent (final double dValue, @Nonnegative final int nFractionDigits, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); final Numb...
[ "@", "Nonnull", "public", "static", "String", "getFormattedPercent", "(", "final", "double", "dValue", ",", "@", "Nonnegative", "final", "int", "nFractionDigits", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "ValueEnforcer", ".", "notNull", ...
Format the given value as percentage. The "%" sign is automatically appended according to the requested locale. @param dValue The value to be used. E.g. "0.125" will result in something like "12.5%" @param nFractionDigits The number of fractional digits to use. Must be &ge; 0. @param aDisplayLocale The locale to use. ...
[ "Format", "the", "given", "value", "as", "percentage", ".", "The", "%", "sign", "is", "automatically", "appended", "according", "to", "the", "requested", "locale", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java#L224-L235
train
phax/ph-commons
ph-collection/src/main/java/com/helger/collection/ring/RingBufferFifo.java
RingBufferFifo.put
@Nonnull public EChange put (@Nullable final ELEMENTTYPE aElement) { if (m_nAvailable < m_nCapacity) { if (m_nWritePos >= m_nCapacity) m_nWritePos = 0; m_aElements[m_nWritePos] = aElement; m_nWritePos++; m_nAvailable++; return EChange.CHANGED; } else if (m...
java
@Nonnull public EChange put (@Nullable final ELEMENTTYPE aElement) { if (m_nAvailable < m_nCapacity) { if (m_nWritePos >= m_nCapacity) m_nWritePos = 0; m_aElements[m_nWritePos] = aElement; m_nWritePos++; m_nAvailable++; return EChange.CHANGED; } else if (m...
[ "@", "Nonnull", "public", "EChange", "put", "(", "@", "Nullable", "final", "ELEMENTTYPE", "aElement", ")", "{", "if", "(", "m_nAvailable", "<", "m_nCapacity", ")", "{", "if", "(", "m_nWritePos", ">=", "m_nCapacity", ")", "m_nWritePos", "=", "0", ";", "m_aE...
Add a new element into the ring buffer @param aElement The element to be added. May be <code>null</code>. @return {@link EChange#CHANGED} if the element was successfully added or if allow overwrite is active and the element was overwritten.
[ "Add", "a", "new", "element", "into", "the", "ring", "buffer" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-collection/src/main/java/com/helger/collection/ring/RingBufferFifo.java#L115-L138
train
phax/ph-commons
ph-collection/src/main/java/com/helger/collection/ring/RingBufferFifo.java
RingBufferFifo.take
@Nullable public ELEMENTTYPE take () { final int nAvailable = m_nAvailable; if (nAvailable == 0) return null; int nIndex = m_nWritePos - nAvailable; if (nIndex < 0) nIndex += m_nCapacity; final Object ret = m_aElements[nIndex]; m_nAvailable--; return GenericReflection.unche...
java
@Nullable public ELEMENTTYPE take () { final int nAvailable = m_nAvailable; if (nAvailable == 0) return null; int nIndex = m_nWritePos - nAvailable; if (nIndex < 0) nIndex += m_nCapacity; final Object ret = m_aElements[nIndex]; m_nAvailable--; return GenericReflection.unche...
[ "@", "Nullable", "public", "ELEMENTTYPE", "take", "(", ")", "{", "final", "int", "nAvailable", "=", "m_nAvailable", ";", "if", "(", "nAvailable", "==", "0", ")", "return", "null", ";", "int", "nIndex", "=", "m_nWritePos", "-", "nAvailable", ";", "if", "(...
Take an element from the ring buffer. @return <code>null</code> if no more element is available or if the current element is <code>null</code>.
[ "Take", "an", "element", "from", "the", "ring", "buffer", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-collection/src/main/java/com/helger/collection/ring/RingBufferFifo.java#L146-L160
train
phax/ph-commons
ph-jaxb/src/main/java/com/helger/jaxb/validation/AbstractValidationEventHandler.java
AbstractValidationEventHandler.getErrorLevel
@Nonnull @OverrideOnDemand protected IErrorLevel getErrorLevel (final int nSeverity) { switch (nSeverity) { case ValidationEvent.WARNING: return EErrorLevel.WARN; case ValidationEvent.ERROR: return EErrorLevel.ERROR; case ValidationEvent.FATAL_ERROR: return EError...
java
@Nonnull @OverrideOnDemand protected IErrorLevel getErrorLevel (final int nSeverity) { switch (nSeverity) { case ValidationEvent.WARNING: return EErrorLevel.WARN; case ValidationEvent.ERROR: return EErrorLevel.ERROR; case ValidationEvent.FATAL_ERROR: return EError...
[ "@", "Nonnull", "@", "OverrideOnDemand", "protected", "IErrorLevel", "getErrorLevel", "(", "final", "int", "nSeverity", ")", "{", "switch", "(", "nSeverity", ")", "{", "case", "ValidationEvent", ".", "WARNING", ":", "return", "EErrorLevel", ".", "WARN", ";", "...
Get the error level matching the passed JAXB severity. @param nSeverity The JAXB severity. @return The matching {@link IErrorLevel}. Never <code>null</code>.
[ "Get", "the", "error", "level", "matching", "the", "passed", "JAXB", "severity", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-jaxb/src/main/java/com/helger/jaxb/validation/AbstractValidationEventHandler.java#L67-L84
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/serialize/read/SAXReader.java
SAXReader.readXMLSAX
@Nonnull public static ESuccess readXMLSAX (@WillClose @Nonnull final InputSource aIS, @Nonnull final ISAXReaderSettings aSettings) { ValueEnforcer.notNull (aIS, "InputStream"); ValueEnforcer.notNull (aSettings, "Settings"); try { boolean bFromPool = false...
java
@Nonnull public static ESuccess readXMLSAX (@WillClose @Nonnull final InputSource aIS, @Nonnull final ISAXReaderSettings aSettings) { ValueEnforcer.notNull (aIS, "InputStream"); ValueEnforcer.notNull (aSettings, "Settings"); try { boolean bFromPool = false...
[ "@", "Nonnull", "public", "static", "ESuccess", "readXMLSAX", "(", "@", "WillClose", "@", "Nonnull", "final", "InputSource", "aIS", ",", "@", "Nonnull", "final", "ISAXReaderSettings", "aSettings", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aIS", ",", "\"...
Read an XML document via a SAX handler. The streams are closed after reading. @param aIS The input source to read from. Automatically closed upon success or error. May not be <code>null</code>. {@link com.helger.xml.sax.InputSourceFactory} may be used to create {@link InputSource} objects from different input types. @...
[ "Read", "an", "XML", "document", "via", "a", "SAX", "handler", ".", "The", "streams", "are", "closed", "after", "reading", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/serialize/read/SAXReader.java#L199-L275
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/log/InMemoryLogger.java
InMemoryLogger.createLogMessage
@Nullable @OverrideOnDemand protected LogMessage createLogMessage (@Nonnull final IErrorLevel eErrorLevel, @Nonnull final Serializable aMsg, @Nullable final Throwable t) { return new LogMessage (eErrorLevel, aMsg, t); }
java
@Nullable @OverrideOnDemand protected LogMessage createLogMessage (@Nonnull final IErrorLevel eErrorLevel, @Nonnull final Serializable aMsg, @Nullable final Throwable t) { return new LogMessage (eErrorLevel, aMsg, t); }
[ "@", "Nullable", "@", "OverrideOnDemand", "protected", "LogMessage", "createLogMessage", "(", "@", "Nonnull", "final", "IErrorLevel", "eErrorLevel", ",", "@", "Nonnull", "final", "Serializable", "aMsg", ",", "@", "Nullable", "final", "Throwable", "t", ")", "{", ...
Override this method to create a different LogMessage object or to filter certain log messages. @param eErrorLevel Error level. Never <code>null</code>. @param aMsg The message object. Never <code>null</code>. @param t An optional exception. May be <code>null</code>. @return The returned value. May be <code>null</code...
[ "Override", "this", "method", "to", "create", "a", "different", "LogMessage", "object", "or", "to", "filter", "certain", "log", "messages", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/log/InMemoryLogger.java#L63-L70
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/schema/SchemaCache.java
SchemaCache.getValidatorFromSchema
@Nonnull public final Validator getValidatorFromSchema (@Nonnull final Schema aSchema) { ValueEnforcer.notNull (aSchema, "Schema"); final Validator aValidator = aSchema.newValidator (); aValidator.setErrorHandler (m_aSchemaFactory.getErrorHandler ()); return aValidator; }
java
@Nonnull public final Validator getValidatorFromSchema (@Nonnull final Schema aSchema) { ValueEnforcer.notNull (aSchema, "Schema"); final Validator aValidator = aSchema.newValidator (); aValidator.setErrorHandler (m_aSchemaFactory.getErrorHandler ()); return aValidator; }
[ "@", "Nonnull", "public", "final", "Validator", "getValidatorFromSchema", "(", "@", "Nonnull", "final", "Schema", "aSchema", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aSchema", ",", "\"Schema\"", ")", ";", "final", "Validator", "aValidator", "=", "aSchema...
Utility method to get the validator for a given schema using the error handler provided in the constructor. @param aSchema The schema for which the validator is to be retrieved. May not be <code>null</code>. @return The validator and never <code>null</code>.
[ "Utility", "method", "to", "get", "the", "validator", "for", "a", "given", "schema", "using", "the", "error", "handler", "provided", "in", "the", "constructor", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/schema/SchemaCache.java#L183-L191
train
phax/ph-commons
ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java
CertificateHelper.convertByteArrayToCertficate
@Nullable public static X509Certificate convertByteArrayToCertficate (@Nullable final byte [] aCertBytes) throws CertificateException { if (ArrayHelper.isEmpty (aCertBytes)) return null; // Certificate is always ISO-8859-1 encoded return convertStringToCertficate (new String (aCertBytes, CERT_CHA...
java
@Nullable public static X509Certificate convertByteArrayToCertficate (@Nullable final byte [] aCertBytes) throws CertificateException { if (ArrayHelper.isEmpty (aCertBytes)) return null; // Certificate is always ISO-8859-1 encoded return convertStringToCertficate (new String (aCertBytes, CERT_CHA...
[ "@", "Nullable", "public", "static", "X509Certificate", "convertByteArrayToCertficate", "(", "@", "Nullable", "final", "byte", "[", "]", "aCertBytes", ")", "throws", "CertificateException", "{", "if", "(", "ArrayHelper", ".", "isEmpty", "(", "aCertBytes", ")", ")"...
Convert the passed byte array to an X.509 certificate object. @param aCertBytes The original certificate bytes. May be <code>null</code> or empty. @return <code>null</code> if the passed byte array is <code>null</code> or empty @throws CertificateException In case the passed string cannot be converted to an X.509 cert...
[ "Convert", "the", "passed", "byte", "array", "to", "an", "X", ".", "509", "certificate", "object", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java#L211-L219
train
phax/ph-commons
ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java
CertificateHelper.convertStringToCertficate
@Nullable public static X509Certificate convertStringToCertficate (@Nullable final String sCertString) throws CertificateException { if (StringHelper.hasNoText (sCertString)) { // No string -> no certificate return null; } final CertificateFactory aCertificateFactory = getX509Certificat...
java
@Nullable public static X509Certificate convertStringToCertficate (@Nullable final String sCertString) throws CertificateException { if (StringHelper.hasNoText (sCertString)) { // No string -> no certificate return null; } final CertificateFactory aCertificateFactory = getX509Certificat...
[ "@", "Nullable", "public", "static", "X509Certificate", "convertStringToCertficate", "(", "@", "Nullable", "final", "String", "sCertString", ")", "throws", "CertificateException", "{", "if", "(", "StringHelper", ".", "hasNoText", "(", "sCertString", ")", ")", "{", ...
Convert the passed String to an X.509 certificate. @param sCertString The original text string. May be <code>null</code> or empty. The String must be ISO-8859-1 encoded for the binary certificate to be read! @return <code>null</code> if the passed string is <code>null</code> or empty @throws CertificateException In ca...
[ "Convert", "the", "passed", "String", "to", "an", "X", ".", "509", "certificate", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java#L246-L284
train
phax/ph-commons
ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java
CertificateHelper.convertCertificateStringToByteArray
@Nullable public static byte [] convertCertificateStringToByteArray (@Nullable final String sCertificate) { // Remove prefix/suffix final String sPlainCert = getWithoutPEMHeader (sCertificate); if (StringHelper.hasNoText (sPlainCert)) return null; // The remaining string is supposed to be Bas...
java
@Nullable public static byte [] convertCertificateStringToByteArray (@Nullable final String sCertificate) { // Remove prefix/suffix final String sPlainCert = getWithoutPEMHeader (sCertificate); if (StringHelper.hasNoText (sPlainCert)) return null; // The remaining string is supposed to be Bas...
[ "@", "Nullable", "public", "static", "byte", "[", "]", "convertCertificateStringToByteArray", "(", "@", "Nullable", "final", "String", "sCertificate", ")", "{", "// Remove prefix/suffix", "final", "String", "sPlainCert", "=", "getWithoutPEMHeader", "(", "sCertificate", ...
Convert the passed X.509 certificate string to a byte array. @param sCertificate The original certificate string. May be <code>null</code> or empty. @return <code>null</code> if the passed string is <code>null</code> or empty or an invalid Base64 string
[ "Convert", "the", "passed", "X", ".", "509", "certificate", "string", "to", "a", "byte", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java#L294-L304
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/gfx/ImageDataManager.java
ImageDataManager.clearCachedSize
@Nonnull public EChange clearCachedSize (@Nullable final IReadableResource aRes) { if (aRes == null) return EChange.UNCHANGED; return m_aRWLock.writeLocked ( () -> { // Existing resource? if (m_aImageData.remove (aRes) != null) return EChange.CHANGED; // Non-existing resour...
java
@Nonnull public EChange clearCachedSize (@Nullable final IReadableResource aRes) { if (aRes == null) return EChange.UNCHANGED; return m_aRWLock.writeLocked ( () -> { // Existing resource? if (m_aImageData.remove (aRes) != null) return EChange.CHANGED; // Non-existing resour...
[ "@", "Nonnull", "public", "EChange", "clearCachedSize", "(", "@", "Nullable", "final", "IReadableResource", "aRes", ")", "{", "if", "(", "aRes", "==", "null", ")", "return", "EChange", ".", "UNCHANGED", ";", "return", "m_aRWLock", ".", "writeLocked", "(", "(...
Remove a single resource from the cache. @param aRes The resource to be removed. May be <code>null</code>. @return Never <code>null</code>.
[ "Remove", "a", "single", "resource", "from", "the", "cache", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/gfx/ImageDataManager.java#L208-L225
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/gfx/ImageDataManager.java
ImageDataManager.clearCache
@Nonnull public EChange clearCache () { return m_aRWLock.writeLocked ( () -> { if (m_aImageData.isEmpty () && m_aNonExistingResources.isEmpty ()) return EChange.UNCHANGED; m_aImageData.clear (); m_aNonExistingResources.clear (); if (LOGGER.isDebugEnabled ()) LOGGER.debu...
java
@Nonnull public EChange clearCache () { return m_aRWLock.writeLocked ( () -> { if (m_aImageData.isEmpty () && m_aNonExistingResources.isEmpty ()) return EChange.UNCHANGED; m_aImageData.clear (); m_aNonExistingResources.clear (); if (LOGGER.isDebugEnabled ()) LOGGER.debu...
[ "@", "Nonnull", "public", "EChange", "clearCache", "(", ")", "{", "return", "m_aRWLock", ".", "writeLocked", "(", "(", ")", "->", "{", "if", "(", "m_aImageData", ".", "isEmpty", "(", ")", "&&", "m_aNonExistingResources", ".", "isEmpty", "(", ")", ")", "r...
Remove all cached elements @return {@link EChange} - never null
[ "Remove", "all", "cached", "elements" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/gfx/ImageDataManager.java#L232-L246
train
phax/ph-commons
ph-jaxb/src/main/java/com/helger/jaxb/builder/AbstractWritingJAXBBuilder.java
AbstractWritingJAXBBuilder.createMarshaller
@Nonnull @OverrideOnDemand protected Marshaller createMarshaller () throws JAXBException { final JAXBContext aJAXBContext = getJAXBContext (); // create a Marshaller final Marshaller aMarshaller = aJAXBContext.createMarshaller (); // Validating (if possible) final Schema aSchema = getSchema ...
java
@Nonnull @OverrideOnDemand protected Marshaller createMarshaller () throws JAXBException { final JAXBContext aJAXBContext = getJAXBContext (); // create a Marshaller final Marshaller aMarshaller = aJAXBContext.createMarshaller (); // Validating (if possible) final Schema aSchema = getSchema ...
[ "@", "Nonnull", "@", "OverrideOnDemand", "protected", "Marshaller", "createMarshaller", "(", ")", "throws", "JAXBException", "{", "final", "JAXBContext", "aJAXBContext", "=", "getJAXBContext", "(", ")", ";", "// create a Marshaller", "final", "Marshaller", "aMarshaller"...
Create the main marshaller with the contained settings. @return The Marshaller and never <code>null</code>. @throws JAXBException In case creation fails
[ "Create", "the", "main", "marshaller", "with", "the", "contained", "settings", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-jaxb/src/main/java/com/helger/jaxb/builder/AbstractWritingJAXBBuilder.java#L77-L92
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/sax/DefaultEntityResolver.java
DefaultEntityResolver.createOnDemand
@Nullable public static DefaultEntityResolver createOnDemand (@Nonnull final IReadableResource aBaseResource) { final URL aURL = aBaseResource.getAsURL (); return aURL == null ? null : new DefaultEntityResolver (aURL); }
java
@Nullable public static DefaultEntityResolver createOnDemand (@Nonnull final IReadableResource aBaseResource) { final URL aURL = aBaseResource.getAsURL (); return aURL == null ? null : new DefaultEntityResolver (aURL); }
[ "@", "Nullable", "public", "static", "DefaultEntityResolver", "createOnDemand", "(", "@", "Nonnull", "final", "IReadableResource", "aBaseResource", ")", "{", "final", "URL", "aURL", "=", "aBaseResource", ".", "getAsURL", "(", ")", ";", "return", "aURL", "==", "n...
Factory method with a resource. @param aBaseResource The base resource. May not be <code>null</code>. @return <code>null</code> if the resource does not exist
[ "Factory", "method", "with", "a", "resource", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/sax/DefaultEntityResolver.java#L92-L97
train
phax/ph-commons
ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringDecoder.java
StringDecoder.reserve
public void reserve (@Nonnegative final int nExpectedLength) { ValueEnforcer.isGE0 (nExpectedLength, "ExpectedLength"); if (m_aBuffer.position () != 0) throw new IllegalStateException ("cannot be called except after finish()"); if (nExpectedLength > m_aBuffer.capacity ()) { // Allocate a ...
java
public void reserve (@Nonnegative final int nExpectedLength) { ValueEnforcer.isGE0 (nExpectedLength, "ExpectedLength"); if (m_aBuffer.position () != 0) throw new IllegalStateException ("cannot be called except after finish()"); if (nExpectedLength > m_aBuffer.capacity ()) { // Allocate a ...
[ "public", "void", "reserve", "(", "@", "Nonnegative", "final", "int", "nExpectedLength", ")", "{", "ValueEnforcer", ".", "isGE0", "(", "nExpectedLength", ",", "\"ExpectedLength\"", ")", ";", "if", "(", "m_aBuffer", ".", "position", "(", ")", "!=", "0", ")", ...
Reserve space for the next string that will be &le; expectedLength characters long. Must only be called when the buffer is empty. @param nExpectedLength The number of chars to reserve. Must be &ge; 0.
[ "Reserve", "space", "for", "the", "next", "string", "that", "will", "be", "&le", ";", "expectedLength", "characters", "long", ".", "Must", "only", "be", "called", "when", "the", "buffer", "is", "empty", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringDecoder.java#L66-L89
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/text/resourcebundle/ResourceBundleHelper.java
ResourceBundleHelper.clearCache
public static void clearCache (@Nonnull final ClassLoader aClassLoader) { ResourceBundle.clearCache (aClassLoader); if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Cache was cleared: " + ResourceBundle.class.getName () + "; classloader=" + aClassLoader); }
java
public static void clearCache (@Nonnull final ClassLoader aClassLoader) { ResourceBundle.clearCache (aClassLoader); if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Cache was cleared: " + ResourceBundle.class.getName () + "; classloader=" + aClassLoader); }
[ "public", "static", "void", "clearCache", "(", "@", "Nonnull", "final", "ClassLoader", "aClassLoader", ")", "{", "ResourceBundle", ".", "clearCache", "(", "aClassLoader", ")", ";", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", ")", ")", "LOGGER", ".", "de...
Clear the complete resource bundle cache using the specified class loader! @param aClassLoader The class loader to be used. May not be <code>null</code>.
[ "Clear", "the", "complete", "resource", "bundle", "cache", "using", "the", "specified", "class", "loader!" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/resourcebundle/ResourceBundleHelper.java#L167-L172
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/callback/exception/LoggingExceptionCallback.java
LoggingExceptionCallback.setErrorLevel
@Nonnull public final LoggingExceptionCallback setErrorLevel (@Nonnull final IErrorLevel aErrorLevel) { m_aErrorLevel = ValueEnforcer.notNull (aErrorLevel, "ErrorLevel"); return this; }
java
@Nonnull public final LoggingExceptionCallback setErrorLevel (@Nonnull final IErrorLevel aErrorLevel) { m_aErrorLevel = ValueEnforcer.notNull (aErrorLevel, "ErrorLevel"); return this; }
[ "@", "Nonnull", "public", "final", "LoggingExceptionCallback", "setErrorLevel", "(", "@", "Nonnull", "final", "IErrorLevel", "aErrorLevel", ")", "{", "m_aErrorLevel", "=", "ValueEnforcer", ".", "notNull", "(", "aErrorLevel", ",", "\"ErrorLevel\"", ")", ";", "return"...
Set the error level to be used. @param aErrorLevel Error level to use. May not be <code>null</code>. @return this for chaining
[ "Set", "the", "error", "level", "to", "be", "used", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/callback/exception/LoggingExceptionCallback.java#L68-L73
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/callback/exception/LoggingExceptionCallback.java
LoggingExceptionCallback.getLogMessage
@Nonnull @Nonempty @OverrideOnDemand protected String getLogMessage (@Nullable final Throwable t) { if (t == null) return "An error occurred"; return "An exception was thrown"; }
java
@Nonnull @Nonempty @OverrideOnDemand protected String getLogMessage (@Nullable final Throwable t) { if (t == null) return "An error occurred"; return "An exception was thrown"; }
[ "@", "Nonnull", "@", "Nonempty", "@", "OverrideOnDemand", "protected", "String", "getLogMessage", "(", "@", "Nullable", "final", "Throwable", "t", ")", "{", "if", "(", "t", "==", "null", ")", "return", "\"An error occurred\"", ";", "return", "\"An exception was ...
Get the text to be logged for a certain exception @param t The exception to be logged. May theoretically be <code>null</code>. @return The text to be logged. May neither be <code>null</code> nor empty.
[ "Get", "the", "text", "to", "be", "logged", "for", "a", "certain", "exception" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/callback/exception/LoggingExceptionCallback.java#L82-L90
train
phax/ph-commons
ph-tree/src/main/java/com/helger/tree/sort/TreeSorter.java
TreeSorter.sort
public static <DATATYPE, ITEMTYPE extends ITreeItem <DATATYPE, ITEMTYPE>> void sort (@Nonnull final IBasicTree <? extends DATATYPE, ITEMTYPE> aTree, @Nonnull final Comparator <? super DATATYPE> aValueComparator) { _sort (aTree,...
java
public static <DATATYPE, ITEMTYPE extends ITreeItem <DATATYPE, ITEMTYPE>> void sort (@Nonnull final IBasicTree <? extends DATATYPE, ITEMTYPE> aTree, @Nonnull final Comparator <? super DATATYPE> aValueComparator) { _sort (aTree,...
[ "public", "static", "<", "DATATYPE", ",", "ITEMTYPE", "extends", "ITreeItem", "<", "DATATYPE", ",", "ITEMTYPE", ">", ">", "void", "sort", "(", "@", "Nonnull", "final", "IBasicTree", "<", "?", "extends", "DATATYPE", ",", "ITEMTYPE", ">", "aTree", ",", "@", ...
Sort each level of the passed tree with the specified comparator. @param aTree The tree to be sorted. @param aValueComparator The comparator to be used for sorting the tree items on each level. @param <DATATYPE> The tree item data type @param <ITEMTYPE> The tree item type
[ "Sort", "each", "level", "of", "the", "passed", "tree", "with", "the", "specified", "comparator", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-tree/src/main/java/com/helger/tree/sort/TreeSorter.java#L80-L84
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/deadlock/ThreadDeadlockDetectionTimer.java
ThreadDeadlockDetectionTimer.stop
@Nonnull public EChange stop () { if (!m_aTimerTask.cancel ()) return EChange.UNCHANGED; LOGGER.info ("Deadlock detector stopped!"); return EChange.CHANGED; }
java
@Nonnull public EChange stop () { if (!m_aTimerTask.cancel ()) return EChange.UNCHANGED; LOGGER.info ("Deadlock detector stopped!"); return EChange.CHANGED; }
[ "@", "Nonnull", "public", "EChange", "stop", "(", ")", "{", "if", "(", "!", "m_aTimerTask", ".", "cancel", "(", ")", ")", "return", "EChange", ".", "UNCHANGED", ";", "LOGGER", ".", "info", "(", "\"Deadlock detector stopped!\"", ")", ";", "return", "EChange...
Stop the deadlock detection task @return {@link EChange}
[ "Stop", "the", "deadlock", "detection", "task" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/deadlock/ThreadDeadlockDetectionTimer.java#L80-L87
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java
DateTimeFormatterCache.getDateTimeFormatterStrict
@Nonnull public static DateTimeFormatter getDateTimeFormatterStrict (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.STRICT); }
java
@Nonnull public static DateTimeFormatter getDateTimeFormatterStrict (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.STRICT); }
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getDateTimeFormatterStrict", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPattern", ")", "{", "return", "getDateTimeFormatter", "(", "sPattern", ",", "ResolverStyle", ".", "STRICT", ")", ";", ...
Get the cached DateTimeFormatter using STRICT resolving. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @return The compiled DateTimeFormatter and never <code>null</code> . @throws IllegalArgumentException If the pattern is invalid
[ "Get", "the", "cached", "DateTimeFormatter", "using", "STRICT", "resolving", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java#L76-L80
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java
DateTimeFormatterCache.getDateTimeFormatterSmart
@Nonnull public static DateTimeFormatter getDateTimeFormatterSmart (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.SMART); }
java
@Nonnull public static DateTimeFormatter getDateTimeFormatterSmart (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.SMART); }
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getDateTimeFormatterSmart", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPattern", ")", "{", "return", "getDateTimeFormatter", "(", "sPattern", ",", "ResolverStyle", ".", "SMART", ")", ";", "}...
Get the cached DateTimeFormatter using SMART resolving. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @return The compiled DateTimeFormatter and never <code>null</code> . @throws IllegalArgumentException If the pattern is invalid
[ "Get", "the", "cached", "DateTimeFormatter", "using", "SMART", "resolving", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java#L91-L95
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java
DateTimeFormatterCache.getDateTimeFormatterLenient
@Nonnull public static DateTimeFormatter getDateTimeFormatterLenient (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.LENIENT); }
java
@Nonnull public static DateTimeFormatter getDateTimeFormatterLenient (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.LENIENT); }
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getDateTimeFormatterLenient", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPattern", ")", "{", "return", "getDateTimeFormatter", "(", "sPattern", ",", "ResolverStyle", ".", "LENIENT", ")", ";", ...
Get the cached DateTimeFormatter using LENIENT resolving. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @return The compiled DateTimeFormatter and never <code>null</code> . @throws IllegalArgumentException If the pattern is invalid
[ "Get", "the", "cached", "DateTimeFormatter", "using", "LENIENT", "resolving", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java#L106-L110
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java
DateTimeFormatterCache.getDateTimeFormatter
@Nonnull public static DateTimeFormatter getDateTimeFormatter (@Nonnull @Nonempty final String sPattern, @Nonnull final ResolverStyle eResolverStyle) { return getInstance ().getFromCache (new DateTimeFormatterPattern (sPattern, eResolverStyle)); }
java
@Nonnull public static DateTimeFormatter getDateTimeFormatter (@Nonnull @Nonempty final String sPattern, @Nonnull final ResolverStyle eResolverStyle) { return getInstance ().getFromCache (new DateTimeFormatterPattern (sPattern, eResolverStyle)); }
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getDateTimeFormatter", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPattern", ",", "@", "Nonnull", "final", "ResolverStyle", "eResolverStyle", ")", "{", "return", "getInstance", "(", ")", ".",...
Get the cached DateTimeFormatter using the provided resolver style. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @param eResolverStyle The resolver style to be used. May not be <code>null</code>. @return The compiled DateTimeFormatter and never <code>null</code>. @throws Illegal...
[ "Get", "the", "cached", "DateTimeFormatter", "using", "the", "provided", "resolver", "style", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java#L123-L128
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/regex/RegExCache.java
RegExCache.getPattern
@Nonnull public static Pattern getPattern (@Nonnull @Nonempty @RegEx final String sRegEx) { return getInstance ().getFromCache (new RegExPattern (sRegEx)); }
java
@Nonnull public static Pattern getPattern (@Nonnull @Nonempty @RegEx final String sRegEx) { return getInstance ().getFromCache (new RegExPattern (sRegEx)); }
[ "@", "Nonnull", "public", "static", "Pattern", "getPattern", "(", "@", "Nonnull", "@", "Nonempty", "@", "RegEx", "final", "String", "sRegEx", ")", "{", "return", "getInstance", "(", ")", ".", "getFromCache", "(", "new", "RegExPattern", "(", "sRegEx", ")", ...
Get the cached regular expression pattern. @param sRegEx The regular expression to retrieve. May neither be <code>null</code> nor empty. @return The compiled regular expression pattern and never <code>null</code> . @throws IllegalArgumentException If the passed regular expression has an illegal syntax
[ "Get", "the", "cached", "regular", "expression", "pattern", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/regex/RegExCache.java#L79-L83
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/log/LogHelper.java
LogHelper.isEnabled
public static boolean isEnabled (@Nonnull final Class <?> aLoggingClass, @Nonnull final IHasErrorLevel aErrorLevelProvider) { return isEnabled (LoggerFactory.getLogger (aLoggingClass), aErrorLevelProvider.getErrorLevel ()); }
java
public static boolean isEnabled (@Nonnull final Class <?> aLoggingClass, @Nonnull final IHasErrorLevel aErrorLevelProvider) { return isEnabled (LoggerFactory.getLogger (aLoggingClass), aErrorLevelProvider.getErrorLevel ()); }
[ "public", "static", "boolean", "isEnabled", "(", "@", "Nonnull", "final", "Class", "<", "?", ">", "aLoggingClass", ",", "@", "Nonnull", "final", "IHasErrorLevel", "aErrorLevelProvider", ")", "{", "return", "isEnabled", "(", "LoggerFactory", ".", "getLogger", "("...
Check if logging is enabled for the passed class based on the error level provider by the passed object @param aLoggingClass The class to determine the logger from. May not be <code>null</code> . @param aErrorLevelProvider The error level provider. May not be <code>null</code>. @return <code>true</code> if the respect...
[ "Check", "if", "logging", "is", "enabled", "for", "the", "passed", "class", "based", "on", "the", "error", "level", "provider", "by", "the", "passed", "object" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/log/LogHelper.java#L118-L122
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/log/LogHelper.java
LogHelper.isEnabled
public static boolean isEnabled (@Nonnull final Logger aLogger, @Nonnull final IHasErrorLevel aErrorLevelProvider) { return isEnabled (aLogger, aErrorLevelProvider.getErrorLevel ()); }
java
public static boolean isEnabled (@Nonnull final Logger aLogger, @Nonnull final IHasErrorLevel aErrorLevelProvider) { return isEnabled (aLogger, aErrorLevelProvider.getErrorLevel ()); }
[ "public", "static", "boolean", "isEnabled", "(", "@", "Nonnull", "final", "Logger", "aLogger", ",", "@", "Nonnull", "final", "IHasErrorLevel", "aErrorLevelProvider", ")", "{", "return", "isEnabled", "(", "aLogger", ",", "aErrorLevelProvider", ".", "getErrorLevel", ...
Check if logging is enabled for the passed logger based on the error level provider by the passed object @param aLogger The logger. May not be <code>null</code>. @param aErrorLevelProvider The error level provider. May not be <code>null</code>. @return <code>true</code> if the respective log level is allowed, <code>fa...
[ "Check", "if", "logging", "is", "enabled", "for", "the", "passed", "logger", "based", "on", "the", "error", "level", "provider", "by", "the", "passed", "object" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/log/LogHelper.java#L135-L138
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/log/LogHelper.java
LogHelper.isEnabled
public static boolean isEnabled (@Nonnull final Class <?> aLoggingClass, @Nonnull final IErrorLevel aErrorLevel) { return isEnabled (LoggerFactory.getLogger (aLoggingClass), aErrorLevel); }
java
public static boolean isEnabled (@Nonnull final Class <?> aLoggingClass, @Nonnull final IErrorLevel aErrorLevel) { return isEnabled (LoggerFactory.getLogger (aLoggingClass), aErrorLevel); }
[ "public", "static", "boolean", "isEnabled", "(", "@", "Nonnull", "final", "Class", "<", "?", ">", "aLoggingClass", ",", "@", "Nonnull", "final", "IErrorLevel", "aErrorLevel", ")", "{", "return", "isEnabled", "(", "LoggerFactory", ".", "getLogger", "(", "aLoggi...
Check if logging is enabled for the passed class based on the error level provided @param aLoggingClass The class to determine the logger from. May not be <code>null</code> . @param aErrorLevel The error level. May not be <code>null</code>. @return <code>true</code> if the respective log level is allowed, <code>false<...
[ "Check", "if", "logging", "is", "enabled", "for", "the", "passed", "class", "based", "on", "the", "error", "level", "provided" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/log/LogHelper.java#L152-L155
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/log/LogHelper.java
LogHelper.isEnabled
public static boolean isEnabled (@Nonnull final Logger aLogger, @Nonnull final IErrorLevel aErrorLevel) { return getFuncIsEnabled (aLogger, aErrorLevel).isEnabled (); }
java
public static boolean isEnabled (@Nonnull final Logger aLogger, @Nonnull final IErrorLevel aErrorLevel) { return getFuncIsEnabled (aLogger, aErrorLevel).isEnabled (); }
[ "public", "static", "boolean", "isEnabled", "(", "@", "Nonnull", "final", "Logger", "aLogger", ",", "@", "Nonnull", "final", "IErrorLevel", "aErrorLevel", ")", "{", "return", "getFuncIsEnabled", "(", "aLogger", ",", "aErrorLevel", ")", ".", "isEnabled", "(", "...
Check if logging is enabled for the passed logger based on the error level provided @param aLogger The logger. May not be <code>null</code>. @param aErrorLevel The error level. May not be <code>null</code>. @return <code>true</code> if the respective log level is allowed, <code>false</code> if not
[ "Check", "if", "logging", "is", "enabled", "for", "the", "passed", "logger", "based", "on", "the", "error", "level", "provided" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/log/LogHelper.java#L168-L171
train
phax/ph-commons
ph-security/src/main/java/com/helger/security/keystore/LoadedKey.java
LoadedKey.getErrorText
@Nullable public String getErrorText (@Nonnull final Locale aContentLocale) { return m_eError == null ? null : m_eError.getDisplayTextWithArgs (aContentLocale, (Object []) m_aErrorParams); }
java
@Nullable public String getErrorText (@Nonnull final Locale aContentLocale) { return m_eError == null ? null : m_eError.getDisplayTextWithArgs (aContentLocale, (Object []) m_aErrorParams); }
[ "@", "Nullable", "public", "String", "getErrorText", "(", "@", "Nonnull", "final", "Locale", "aContentLocale", ")", "{", "return", "m_eError", "==", "null", "?", "null", ":", "m_eError", ".", "getDisplayTextWithArgs", "(", "aContentLocale", ",", "(", "Object", ...
Get the error text @param aContentLocale The locale to use. May not be <code>null</code>. @return <code>null</code> if no error occurred, the error text otherwise.
[ "Get", "the", "error", "text" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/keystore/LoadedKey.java#L94-L98
train
phax/ph-commons
ph-wsclient/src/main/java/com/helger/wsclient/WSClientConfig.java
WSClientConfig.setCompressedRequest
@Nonnull public final WSClientConfig setCompressedRequest (final boolean bCompress) { if (bCompress) m_aHTTPHeaders.setHeader (CHttpHeader.CONTENT_ENCODING, "gzip"); else m_aHTTPHeaders.removeHeaders (CHttpHeader.CONTENT_ENCODING); return this; }
java
@Nonnull public final WSClientConfig setCompressedRequest (final boolean bCompress) { if (bCompress) m_aHTTPHeaders.setHeader (CHttpHeader.CONTENT_ENCODING, "gzip"); else m_aHTTPHeaders.removeHeaders (CHttpHeader.CONTENT_ENCODING); return this; }
[ "@", "Nonnull", "public", "final", "WSClientConfig", "setCompressedRequest", "(", "final", "boolean", "bCompress", ")", "{", "if", "(", "bCompress", ")", "m_aHTTPHeaders", ".", "setHeader", "(", "CHttpHeader", ".", "CONTENT_ENCODING", ",", "\"gzip\"", ")", ";", ...
Forces this client to send compressed HTTP content. Disabled by default. @param bCompress <code>true</code> to enable, <code>false</code> to disable. @return this for chaining
[ "Forces", "this", "client", "to", "send", "compressed", "HTTP", "content", ".", "Disabled", "by", "default", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-wsclient/src/main/java/com/helger/wsclient/WSClientConfig.java#L449-L457
train
phax/ph-commons
ph-wsclient/src/main/java/com/helger/wsclient/WSClientConfig.java
WSClientConfig.setCompressedResponse
@Nonnull public final WSClientConfig setCompressedResponse (final boolean bCompress) { if (bCompress) m_aHTTPHeaders.setHeader (CHttpHeader.ACCEPT_ENCODING, "gzip"); else m_aHTTPHeaders.removeHeaders (CHttpHeader.ACCEPT_ENCODING); return this; }
java
@Nonnull public final WSClientConfig setCompressedResponse (final boolean bCompress) { if (bCompress) m_aHTTPHeaders.setHeader (CHttpHeader.ACCEPT_ENCODING, "gzip"); else m_aHTTPHeaders.removeHeaders (CHttpHeader.ACCEPT_ENCODING); return this; }
[ "@", "Nonnull", "public", "final", "WSClientConfig", "setCompressedResponse", "(", "final", "boolean", "bCompress", ")", "{", "if", "(", "bCompress", ")", "m_aHTTPHeaders", ".", "setHeader", "(", "CHttpHeader", ".", "ACCEPT_ENCODING", ",", "\"gzip\"", ")", ";", ...
Add a hint that this client understands compressed HTTP content. Disabled by default. @param bCompress <code>true</code> to enable, <code>false</code> to disable. @return this for chaining
[ "Add", "a", "hint", "that", "this", "client", "understands", "compressed", "HTTP", "content", ".", "Disabled", "by", "default", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-wsclient/src/main/java/com/helger/wsclient/WSClientConfig.java#L467-L475
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/compare/CollatorHelper.java
CollatorHelper.getCollatorSpaceBeforeDot
@Nonnull @ReturnsMutableCopy public static Collator getCollatorSpaceBeforeDot (@Nullable final Locale aLocale) { // Ensure to not pass null locale in final Locale aRealLocale = aLocale == null ? SystemHelper.getSystemLocale () : aLocale; // Always create a clone! return (Collator) s_aCache.getFro...
java
@Nonnull @ReturnsMutableCopy public static Collator getCollatorSpaceBeforeDot (@Nullable final Locale aLocale) { // Ensure to not pass null locale in final Locale aRealLocale = aLocale == null ? SystemHelper.getSystemLocale () : aLocale; // Always create a clone! return (Collator) s_aCache.getFro...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "Collator", "getCollatorSpaceBeforeDot", "(", "@", "Nullable", "final", "Locale", "aLocale", ")", "{", "// Ensure to not pass null locale in", "final", "Locale", "aRealLocale", "=", "aLocale", "==", "null", ...
Create a collator that is based on the standard collator but sorts spaces before dots, because spaces are more important word separators than dots. Another example is the correct sorting of things like "1.1 a" vs. "1.1.1 b" . This is the default collator used for sorting by default! @param aLocale The locale for which...
[ "Create", "a", "collator", "that", "is", "based", "on", "the", "standard", "collator", "but", "sorts", "spaces", "before", "dots", "because", "spaces", "are", "more", "important", "word", "separators", "than", "dots", ".", "Another", "example", "is", "the", ...
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/compare/CollatorHelper.java#L119-L128
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/serialize/write/XMLMaskHelper.java
XMLMaskHelper.getAsCharArray
@Nonnull @ReturnsMutableCopy public static char [] getAsCharArray (@Nonnull final Set <Character> aChars) { ValueEnforcer.notNull (aChars, "Chars"); final char [] ret = new char [aChars.size ()]; int nIndex = 0; for (final Character aChar : aChars) ret[nIndex++] = aChar.charValue (); re...
java
@Nonnull @ReturnsMutableCopy public static char [] getAsCharArray (@Nonnull final Set <Character> aChars) { ValueEnforcer.notNull (aChars, "Chars"); final char [] ret = new char [aChars.size ()]; int nIndex = 0; for (final Character aChar : aChars) ret[nIndex++] = aChar.charValue (); re...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "char", "[", "]", "getAsCharArray", "(", "@", "Nonnull", "final", "Set", "<", "Character", ">", "aChars", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aChars", ",", "\"Chars\"", ")", ";", "...
Convert the passed set to an array @param aChars Character set to use. May not be <code>null</code>. @return A new array with the same length as the source set.
[ "Convert", "the", "passed", "set", "to", "an", "array" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/serialize/write/XMLMaskHelper.java#L565-L576
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/PDTWebDateHelper.java
PDTWebDateHelper.parseOffsetDateTimeUsingMask
@Nullable public static OffsetDateTime parseOffsetDateTimeUsingMask (@Nonnull final PDTMask <?> [] aMasks, @Nonnull @Nonempty final String sDate) { for (final PDTMask <?> aMask : aMasks) { final DateTimeFormatter aDTF = PDTFormatter.getForPa...
java
@Nullable public static OffsetDateTime parseOffsetDateTimeUsingMask (@Nonnull final PDTMask <?> [] aMasks, @Nonnull @Nonempty final String sDate) { for (final PDTMask <?> aMask : aMasks) { final DateTimeFormatter aDTF = PDTFormatter.getForPa...
[ "@", "Nullable", "public", "static", "OffsetDateTime", "parseOffsetDateTimeUsingMask", "(", "@", "Nonnull", "final", "PDTMask", "<", "?", ">", "[", "]", "aMasks", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sDate", ")", "{", "for", "(", "final"...
Parses a Date out of a string using an array of masks. It uses the masks in order until one of them succeeds or all fail. @param aMasks array of masks to use for parsing the string @param sDate string to parse for a date. @return the Date represented by the given string using one of the given masks. It returns <b>null...
[ "Parses", "a", "Date", "out", "of", "a", "string", "using", "an", "array", "of", "masks", ".", "It", "uses", "the", "masks", "in", "order", "until", "one", "of", "them", "succeeds", "or", "all", "fail", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/PDTWebDateHelper.java#L167-L188
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/PDTWebDateHelper.java
PDTWebDateHelper.extractDateTimeZone
@Nonnull public static WithZoneId extractDateTimeZone (@Nonnull final String sDate) { ValueEnforcer.notNull (sDate, "Date"); final int nDateLen = sDate.length (); for (final PDTZoneID aSupp : PDTZoneID.getDefaultZoneIDs ()) { final String sDTZ = aSupp.getZoneIDString (); if (sDate.endsW...
java
@Nonnull public static WithZoneId extractDateTimeZone (@Nonnull final String sDate) { ValueEnforcer.notNull (sDate, "Date"); final int nDateLen = sDate.length (); for (final PDTZoneID aSupp : PDTZoneID.getDefaultZoneIDs ()) { final String sDTZ = aSupp.getZoneIDString (); if (sDate.endsW...
[ "@", "Nonnull", "public", "static", "WithZoneId", "extractDateTimeZone", "(", "@", "Nonnull", "final", "String", "sDate", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sDate", ",", "\"Date\"", ")", ";", "final", "int", "nDateLen", "=", "sDate", ".", "leng...
Extract the time zone from the passed string. UTC and GMT are supported. @param sDate The date string. @return A non-<code>null</code> {@link WithZoneId}, where the remaining string to be parsed (never <code>null</code>) and and the extracted time zone (may be <code>null</code>) are contained.
[ "Extract", "the", "time", "zone", "from", "the", "passed", "string", ".", "UTC", "and", "GMT", "are", "supported", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/PDTWebDateHelper.java#L239-L254
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/PDTWebDateHelper.java
PDTWebDateHelper.getAsStringW3C
@Nullable public static String getAsStringW3C (@Nullable final LocalDateTime aDateTime) { if (aDateTime == null) return null; return getAsStringW3C (aDateTime.atOffset (ZoneOffset.UTC)); }
java
@Nullable public static String getAsStringW3C (@Nullable final LocalDateTime aDateTime) { if (aDateTime == null) return null; return getAsStringW3C (aDateTime.atOffset (ZoneOffset.UTC)); }
[ "@", "Nullable", "public", "static", "String", "getAsStringW3C", "(", "@", "Nullable", "final", "LocalDateTime", "aDateTime", ")", "{", "if", "(", "aDateTime", "==", "null", ")", "return", "null", ";", "return", "getAsStringW3C", "(", "aDateTime", ".", "atOffs...
create a W3C Date Time representation of a date. @param aDateTime Date to print. May not be <code>null</code>. @return the W3C Date Time represented by the given Date.
[ "create", "a", "W3C", "Date", "Time", "representation", "of", "a", "date", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/PDTWebDateHelper.java#L446-L452
train
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/wal/WALListener.java
WALListener.registerForLaterWriting
public void registerForLaterWriting (@Nonnull final AbstractWALDAO <?> aDAO, @Nonnull final String sWALFilename, @Nonnull final TimeValue aWaitingWime) { // In case many DAOs of the same class exist, the filename is also added final...
java
public void registerForLaterWriting (@Nonnull final AbstractWALDAO <?> aDAO, @Nonnull final String sWALFilename, @Nonnull final TimeValue aWaitingWime) { // In case many DAOs of the same class exist, the filename is also added final...
[ "public", "void", "registerForLaterWriting", "(", "@", "Nonnull", "final", "AbstractWALDAO", "<", "?", ">", "aDAO", ",", "@", "Nonnull", "final", "String", "sWALFilename", ",", "@", "Nonnull", "final", "TimeValue", "aWaitingWime", ")", "{", "// In case many DAOs o...
This is the main method for registration of later writing. @param aDAO The DAO to be written @param sWALFilename The filename of the WAL file for later deletion (in case the filename changes over time). @param aWaitingWime The time to wait, until the file is physically written. May not be <code>null</code>.
[ "This", "is", "the", "main", "method", "for", "registration", "of", "later", "writing", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/wal/WALListener.java#L128-L176
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/FileOperations.java
FileOperations.createDirRecursive
@Nonnull public static FileIOError createDirRecursive (@Nonnull final File aDir) { ValueEnforcer.notNull (aDir, "Directory"); // Does the directory already exist? if (aDir.exists ()) return EFileIOErrorCode.TARGET_ALREADY_EXISTS.getAsIOError (EFileIOOperation.CREATE_DIR_RECURSIVE, aDir); // ...
java
@Nonnull public static FileIOError createDirRecursive (@Nonnull final File aDir) { ValueEnforcer.notNull (aDir, "Directory"); // Does the directory already exist? if (aDir.exists ()) return EFileIOErrorCode.TARGET_ALREADY_EXISTS.getAsIOError (EFileIOOperation.CREATE_DIR_RECURSIVE, aDir); // ...
[ "@", "Nonnull", "public", "static", "FileIOError", "createDirRecursive", "(", "@", "Nonnull", "final", "File", "aDir", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aDir", ",", "\"Directory\"", ")", ";", "// Does the directory already exist?", "if", "(", "aDir"...
Create a new directory. The parent directories are created if they are missing. @param aDir The directory to be created. May not be <code>null</code>. @return A non-<code>null</code> error code.
[ "Create", "a", "new", "directory", ".", "The", "parent", "directories", "are", "created", "if", "they", "are", "missing", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/FileOperations.java#L135-L158
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/text/util/TextHelper.java
TextHelper.getCopyWithLocales
@Nonnull @ReturnsMutableCopy public static MultilingualText getCopyWithLocales (@Nonnull final IMultilingualText aMLT, @Nonnull final Collection <Locale> aContentLocales) { final MultilingualText ret = new MultilingualText (); for (final Locale aConrent...
java
@Nonnull @ReturnsMutableCopy public static MultilingualText getCopyWithLocales (@Nonnull final IMultilingualText aMLT, @Nonnull final Collection <Locale> aContentLocales) { final MultilingualText ret = new MultilingualText (); for (final Locale aConrent...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "MultilingualText", "getCopyWithLocales", "(", "@", "Nonnull", "final", "IMultilingualText", "aMLT", ",", "@", "Nonnull", "final", "Collection", "<", "Locale", ">", "aContentLocales", ")", "{", "final", ...
Get a copy of this object with the specified locales. The default locale is copied. @param aMLT The initial multilingual text. May not be <code>null</code>. @param aContentLocales The list of locales of which the strings are desired. May not be <code>null</code>. @return The object containing only the texts of the giv...
[ "Get", "a", "copy", "of", "this", "object", "with", "the", "specified", "locales", ".", "The", "default", "locale", "is", "copied", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/util/TextHelper.java#L137-L147
train
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/wal/AbstractWALDAO.java
AbstractWALDAO.onRecoveryErrorConvertToNative
@OverrideOnDemand protected void onRecoveryErrorConvertToNative (@Nonnull final EDAOActionType eActionType, @Nonnegative final int i, @Nonnull final String sElement) { if (LOGGER.isErrorEnabled ()) LOGGER.err...
java
@OverrideOnDemand protected void onRecoveryErrorConvertToNative (@Nonnull final EDAOActionType eActionType, @Nonnegative final int i, @Nonnull final String sElement) { if (LOGGER.isErrorEnabled ()) LOGGER.err...
[ "@", "OverrideOnDemand", "protected", "void", "onRecoveryErrorConvertToNative", "(", "@", "Nonnull", "final", "EDAOActionType", "eActionType", ",", "@", "Nonnegative", "final", "int", "i", ",", "@", "Nonnull", "final", "String", "sElement", ")", "{", "if", "(", ...
This method is called, when the conversion from the read XML string to the native type failed. By default an error message is logged and processing continues. @param eActionType The action type to recover. May not be <code>null</code> @param i The index of the element to recover. Always &ge; 0. @param sElement The str...
[ "This", "method", "is", "called", "when", "the", "conversion", "from", "the", "read", "XML", "string", "to", "the", "native", "type", "failed", ".", "By", "default", "an", "error", "message", "is", "logged", "and", "processing", "continues", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/wal/AbstractWALDAO.java#L384-L396
train
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/wal/AbstractWALDAO.java
AbstractWALDAO._deleteWALFileAfterProcessing
final void _deleteWALFileAfterProcessing (@Nonnull @Nonempty final String sWALFilename) { ValueEnforcer.notEmpty (sWALFilename, "WALFilename"); final File aWALFile = m_aIO.getFile (sWALFilename); if (FileOperationManager.INSTANCE.deleteFile (aWALFile).isFailure ()) { if (LOGGER.isErrorEnabled ()...
java
final void _deleteWALFileAfterProcessing (@Nonnull @Nonempty final String sWALFilename) { ValueEnforcer.notEmpty (sWALFilename, "WALFilename"); final File aWALFile = m_aIO.getFile (sWALFilename); if (FileOperationManager.INSTANCE.deleteFile (aWALFile).isFailure ()) { if (LOGGER.isErrorEnabled ()...
[ "final", "void", "_deleteWALFileAfterProcessing", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sWALFilename", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sWALFilename", ",", "\"WALFilename\"", ")", ";", "final", "File", "aWALFile", "=", "m_aIO",...
This method may only be triggered with valid WAL filenames, as the passed file is deleted!
[ "This", "method", "may", "only", "be", "triggered", "with", "valid", "WAL", "filenames", "as", "the", "passed", "file", "is", "deleted!" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/wal/AbstractWALDAO.java#L997-L1012
train
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/simple/AbstractSimpleDAO.java
AbstractSimpleDAO.initialRead
@MustBeLocked (ELockType.WRITE) protected final void initialRead () throws DAOException { File aFile = null; final String sFilename = m_aFilenameProvider.get (); if (sFilename == null) { // required for testing if (!isSilentMode ()) if (LOGGER.isWarnEnabled ()) LOGGER.w...
java
@MustBeLocked (ELockType.WRITE) protected final void initialRead () throws DAOException { File aFile = null; final String sFilename = m_aFilenameProvider.get (); if (sFilename == null) { // required for testing if (!isSilentMode ()) if (LOGGER.isWarnEnabled ()) LOGGER.w...
[ "@", "MustBeLocked", "(", "ELockType", ".", "WRITE", ")", "protected", "final", "void", "initialRead", "(", ")", "throws", "DAOException", "{", "File", "aFile", "=", "null", ";", "final", "String", "sFilename", "=", "m_aFilenameProvider", ".", "get", "(", ")...
Call this method inside the constructor to read the file contents directly. This method is write locked! @throws DAOException in case initialization or reading failed!
[ "Call", "this", "method", "inside", "the", "constructor", "to", "read", "the", "file", "contents", "directly", ".", "This", "method", "is", "write", "locked!" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/simple/AbstractSimpleDAO.java#L250-L368
train
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/simple/AbstractSimpleDAO.java
AbstractSimpleDAO.writeToFileOnPendingChanges
public final void writeToFileOnPendingChanges () { if (hasPendingChanges ()) { m_aRWLock.writeLocked ( () -> { // Write to file if (_writeToFile ().isSuccess ()) internalSetPendingChanges (false); else { if (LOGGER.isErrorEnabled ()) LOGGER...
java
public final void writeToFileOnPendingChanges () { if (hasPendingChanges ()) { m_aRWLock.writeLocked ( () -> { // Write to file if (_writeToFile ().isSuccess ()) internalSetPendingChanges (false); else { if (LOGGER.isErrorEnabled ()) LOGGER...
[ "public", "final", "void", "writeToFileOnPendingChanges", "(", ")", "{", "if", "(", "hasPendingChanges", "(", ")", ")", "{", "m_aRWLock", ".", "writeLocked", "(", "(", ")", "->", "{", "// Write to file", "if", "(", "_writeToFile", "(", ")", ".", "isSuccess",...
In case there are pending changes write them to the file. This method is write locked!
[ "In", "case", "there", "are", "pending", "changes", "write", "them", "to", "the", "file", ".", "This", "method", "is", "write", "locked!" ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/simple/AbstractSimpleDAO.java#L599-L616
train
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/microdom/util/XMLListHandler.java
XMLListHandler.writeList
@Nonnull public static ESuccess writeList (@Nonnull final Collection <String> aCollection, @Nonnull @WillClose final OutputStream aOS) { ValueEnforcer.notNull (aCollection, "Collection"); ValueEnforcer.notNull (aOS, "OutputStream"); try { final IMicroDocume...
java
@Nonnull public static ESuccess writeList (@Nonnull final Collection <String> aCollection, @Nonnull @WillClose final OutputStream aOS) { ValueEnforcer.notNull (aCollection, "Collection"); ValueEnforcer.notNull (aOS, "OutputStream"); try { final IMicroDocume...
[ "@", "Nonnull", "public", "static", "ESuccess", "writeList", "(", "@", "Nonnull", "final", "Collection", "<", "String", ">", "aCollection", ",", "@", "Nonnull", "@", "WillClose", "final", "OutputStream", "aOS", ")", "{", "ValueEnforcer", ".", "notNull", "(", ...
Write the passed collection to the passed output stream using the predefined XML layout. @param aCollection The map to be written. May not be <code>null</code>. @param aOS The output stream to write to. The stream is closed independent of success or failure. May not be <code>null</code>. @return {@link ESuccess#SUCCES...
[ "Write", "the", "passed", "collection", "to", "the", "passed", "output", "stream", "using", "the", "predefined", "XML", "layout", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/microdom/util/XMLListHandler.java#L224-L240
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/ByteBufferHelper.java
ByteBufferHelper.transfer
@Nonnegative public static int transfer (@Nonnull final ByteBuffer aSrcBuffer, @Nonnull final ByteBuffer aDstBuffer, final boolean bNeedsFlip) { ValueEnforcer.notNull (aSrcBuffer, "SourceBuffer"); ValueEnforcer.notNull (aDstBuffer, "DestinationBuff...
java
@Nonnegative public static int transfer (@Nonnull final ByteBuffer aSrcBuffer, @Nonnull final ByteBuffer aDstBuffer, final boolean bNeedsFlip) { ValueEnforcer.notNull (aSrcBuffer, "SourceBuffer"); ValueEnforcer.notNull (aDstBuffer, "DestinationBuff...
[ "@", "Nonnegative", "public", "static", "int", "transfer", "(", "@", "Nonnull", "final", "ByteBuffer", "aSrcBuffer", ",", "@", "Nonnull", "final", "ByteBuffer", "aDstBuffer", ",", "final", "boolean", "bNeedsFlip", ")", "{", "ValueEnforcer", ".", "notNull", "(", ...
Transfer as much as possible from source to dest buffer. @param aSrcBuffer Source buffer. May not be <code>null</code>. @param aDstBuffer Destination buffer. May not be <code>null</code>. @param bNeedsFlip whether or not to flip src @return The amount of data transferred. Always &ge; 0.
[ "Transfer", "as", "much", "as", "possible", "from", "source", "to", "dest", "buffer", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/ByteBufferHelper.java#L73-L100
train
phax/ph-commons
ph-security/src/main/java/com/helger/security/authentication/result/AuthIdentificationResult.java
AuthIdentificationResult.createSuccess
@Nonnull public static AuthIdentificationResult createSuccess (@Nonnull final IAuthToken aAuthToken) { ValueEnforcer.notNull (aAuthToken, "AuthToken"); return new AuthIdentificationResult (aAuthToken, null); }
java
@Nonnull public static AuthIdentificationResult createSuccess (@Nonnull final IAuthToken aAuthToken) { ValueEnforcer.notNull (aAuthToken, "AuthToken"); return new AuthIdentificationResult (aAuthToken, null); }
[ "@", "Nonnull", "public", "static", "AuthIdentificationResult", "createSuccess", "(", "@", "Nonnull", "final", "IAuthToken", "aAuthToken", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aAuthToken", ",", "\"AuthToken\"", ")", ";", "return", "new", "AuthIdentificat...
Factory method for success authentication. @param aAuthToken The auth token. May not be <code>null</code>. @return Never <code>null</code>.
[ "Factory", "method", "for", "success", "authentication", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/authentication/result/AuthIdentificationResult.java#L106-L111
train
phax/ph-commons
ph-security/src/main/java/com/helger/security/authentication/result/AuthIdentificationResult.java
AuthIdentificationResult.createFailure
@Nonnull public static AuthIdentificationResult createFailure (@Nonnull final ICredentialValidationResult aCredentialValidationFailure) { ValueEnforcer.notNull (aCredentialValidationFailure, "CredentialValidationFailure"); return new AuthIdentificationResult (null, aCredentialValidationFailure); }
java
@Nonnull public static AuthIdentificationResult createFailure (@Nonnull final ICredentialValidationResult aCredentialValidationFailure) { ValueEnforcer.notNull (aCredentialValidationFailure, "CredentialValidationFailure"); return new AuthIdentificationResult (null, aCredentialValidationFailure); }
[ "@", "Nonnull", "public", "static", "AuthIdentificationResult", "createFailure", "(", "@", "Nonnull", "final", "ICredentialValidationResult", "aCredentialValidationFailure", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aCredentialValidationFailure", ",", "\"CredentialVali...
Factory method for error in authentication. @param aCredentialValidationFailure The validation failure. May not be <code>null</code> in case of failure! @return Never <code>null</code>.
[ "Factory", "method", "for", "error", "in", "authentication", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/authentication/result/AuthIdentificationResult.java#L121-L126
train
phax/ph-commons
ph-settings/src/main/java/com/helger/settings/exchange/configfile/ConfigFile.java
ConfigFile.applyAsSystemProperties
public void applyAsSystemProperties (@Nullable final String... aPropertyNames) { if (isRead () && aPropertyNames != null) for (final String sProperty : aPropertyNames) { final String sConfigFileValue = getAsString (sProperty); if (sConfigFileValue != null) { SystemPro...
java
public void applyAsSystemProperties (@Nullable final String... aPropertyNames) { if (isRead () && aPropertyNames != null) for (final String sProperty : aPropertyNames) { final String sConfigFileValue = getAsString (sProperty); if (sConfigFileValue != null) { SystemPro...
[ "public", "void", "applyAsSystemProperties", "(", "@", "Nullable", "final", "String", "...", "aPropertyNames", ")", "{", "if", "(", "isRead", "(", ")", "&&", "aPropertyNames", "!=", "null", ")", "for", "(", "final", "String", "sProperty", ":", "aPropertyNames"...
This is a utility method, that takes the provided property names, checks if they are defined in the configuration and if so, applies applies them as System properties. It does it only when the configuration file was read correctly. @param aPropertyNames The property names to consider. @since 8.5.3
[ "This", "is", "a", "utility", "method", "that", "takes", "the", "provided", "property", "names", "checks", "if", "they", "are", "defined", "in", "the", "configuration", "and", "if", "so", "applies", "applies", "them", "as", "System", "properties", ".", "It",...
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-settings/src/main/java/com/helger/settings/exchange/configfile/ConfigFile.java#L117-L130
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java
CSVReader.setSkipLines
@Nonnull public CSVReader setSkipLines (@Nonnegative final int nSkipLines) { ValueEnforcer.isGE0 (nSkipLines, "SkipLines"); m_nSkipLines = nSkipLines; return this; }
java
@Nonnull public CSVReader setSkipLines (@Nonnegative final int nSkipLines) { ValueEnforcer.isGE0 (nSkipLines, "SkipLines"); m_nSkipLines = nSkipLines; return this; }
[ "@", "Nonnull", "public", "CSVReader", "setSkipLines", "(", "@", "Nonnegative", "final", "int", "nSkipLines", ")", "{", "ValueEnforcer", ".", "isGE0", "(", "nSkipLines", ",", "\"SkipLines\"", ")", ";", "m_nSkipLines", "=", "nSkipLines", ";", "return", "this", ...
Sets the line number to skip for start reading. @param nSkipLines the line number to skip for start reading. @return this
[ "Sets", "the", "line", "number", "to", "skip", "for", "start", "reading", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java#L281-L287
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java
CSVReader.readAll
public void readAll (@Nonnull final Consumer <? super ICommonsList <String>> aLineConsumer) throws IOException { while (m_bHasNext) { final ICommonsList <String> aNextLineAsTokens = readNext (); if (aNextLineAsTokens != null) aLineConsumer.accept (aNextLineAsTokens); } }
java
public void readAll (@Nonnull final Consumer <? super ICommonsList <String>> aLineConsumer) throws IOException { while (m_bHasNext) { final ICommonsList <String> aNextLineAsTokens = readNext (); if (aNextLineAsTokens != null) aLineConsumer.accept (aNextLineAsTokens); } }
[ "public", "void", "readAll", "(", "@", "Nonnull", "final", "Consumer", "<", "?", "super", "ICommonsList", "<", "String", ">", ">", "aLineConsumer", ")", "throws", "IOException", "{", "while", "(", "m_bHasNext", ")", "{", "final", "ICommonsList", "<", "String...
Reads the entire file line by line and invoke a callback for each line. @param aLineConsumer The consumer that is invoked for every line. May not be <code>null</code>. @throws IOException if bad things happen during the read
[ "Reads", "the", "entire", "file", "line", "by", "line", "and", "invoke", "a", "callback", "for", "each", "line", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java#L370-L378
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java
CSVReader.readNext
@Nullable public ICommonsList <String> readNext () throws IOException { ICommonsList <String> ret = null; do { final String sNextLine = _getNextLine (); if (!m_bHasNext) { // should throw if still pending? return ret; } final ICommonsList <String> r = m_aPar...
java
@Nullable public ICommonsList <String> readNext () throws IOException { ICommonsList <String> ret = null; do { final String sNextLine = _getNextLine (); if (!m_bHasNext) { // should throw if still pending? return ret; } final ICommonsList <String> r = m_aPar...
[ "@", "Nullable", "public", "ICommonsList", "<", "String", ">", "readNext", "(", ")", "throws", "IOException", "{", "ICommonsList", "<", "String", ">", "ret", "=", "null", ";", "do", "{", "final", "String", "sNextLine", "=", "_getNextLine", "(", ")", ";", ...
Reads the next line from the buffer and converts to a string array. @return a string array with each comma-separated element as a separate entry. @throws IOException if bad things happen during the read
[ "Reads", "the", "next", "line", "from", "the", "buffer", "and", "converts", "to", "a", "string", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java#L388-L407
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java
CSVReader.iterator
@Nonnull public Iterator <ICommonsList <String>> iterator () { try { return new CSVIterator (this); } catch (final IOException e) { throw new UncheckedIOException ("Error creating CSVIterator", e); } }
java
@Nonnull public Iterator <ICommonsList <String>> iterator () { try { return new CSVIterator (this); } catch (final IOException e) { throw new UncheckedIOException ("Error creating CSVIterator", e); } }
[ "@", "Nonnull", "public", "Iterator", "<", "ICommonsList", "<", "String", ">", ">", "iterator", "(", ")", "{", "try", "{", "return", "new", "CSVIterator", "(", "this", ")", ";", "}", "catch", "(", "final", "IOException", "e", ")", "{", "throw", "new", ...
Creates an Iterator for processing the csv data. @return an ICommonsList&lt;String&gt; iterator.
[ "Creates", "an", "Iterator", "for", "processing", "the", "csv", "data", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java#L479-L490
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/resource/ClassPathResource.java
ClassPathResource.getWithoutClassPathPrefix
@Nullable public static String getWithoutClassPathPrefix (@Nullable final String sPath) { if (StringHelper.startsWith (sPath, CLASSPATH_PREFIX_LONG)) return sPath.substring (CLASSPATH_PREFIX_LONG.length ()); if (StringHelper.startsWith (sPath, CLASSPATH_PREFIX_SHORT)) return sPath.substring (CLA...
java
@Nullable public static String getWithoutClassPathPrefix (@Nullable final String sPath) { if (StringHelper.startsWith (sPath, CLASSPATH_PREFIX_LONG)) return sPath.substring (CLASSPATH_PREFIX_LONG.length ()); if (StringHelper.startsWith (sPath, CLASSPATH_PREFIX_SHORT)) return sPath.substring (CLA...
[ "@", "Nullable", "public", "static", "String", "getWithoutClassPathPrefix", "(", "@", "Nullable", "final", "String", "sPath", ")", "{", "if", "(", "StringHelper", ".", "startsWith", "(", "sPath", ",", "CLASSPATH_PREFIX_LONG", ")", ")", "return", "sPath", ".", ...
Remove any leading explicit classpath resource prefixes. @param sPath The source path to strip the class path prefixes from. May be <code>null</code>. @return <code>null</code> if the parameter was <code>null</code>. @see #CLASSPATH_PREFIX_LONG @see #CLASSPATH_PREFIX_SHORT
[ "Remove", "any", "leading", "explicit", "classpath", "resource", "prefixes", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/resource/ClassPathResource.java#L150-L158
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/resource/ClassPathResource.java
ClassPathResource.getInputStream
@Nullable public static InputStream getInputStream (@Nonnull @Nonempty final String sPath, @Nonnull final ClassLoader aClassLoader) { final URL aURL = ClassLoaderHelper.getResource (aClassLoader, sPath); return _getInputStream (sPath, aURL, (ClassLoader) null); ...
java
@Nullable public static InputStream getInputStream (@Nonnull @Nonempty final String sPath, @Nonnull final ClassLoader aClassLoader) { final URL aURL = ClassLoaderHelper.getResource (aClassLoader, sPath); return _getInputStream (sPath, aURL, (ClassLoader) null); ...
[ "@", "Nullable", "public", "static", "InputStream", "getInputStream", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPath", ",", "@", "Nonnull", "final", "ClassLoader", "aClassLoader", ")", "{", "final", "URL", "aURL", "=", "ClassLoaderHelper", ".", ...
Get the input stream of the passed resource using the specified class loader only. @param sPath The path to be resolved. May neither be <code>null</code> nor empty. @param aClassLoader The class loader to be used. May not be <code>null</code>. @return <code>null</code> if the path could not be resolved using the speci...
[ "Get", "the", "input", "stream", "of", "the", "passed", "resource", "using", "the", "specified", "class", "loader", "only", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/resource/ClassPathResource.java#L250-L256
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/resource/ClassPathResource.java
ClassPathResource.getInputStreamNoCache
@Nullable public InputStream getInputStreamNoCache (@Nonnull final ClassLoader aClassLoader) { final URL aURL = getAsURLNoCache (aClassLoader); return _getInputStream (m_sPath, aURL, aClassLoader); }
java
@Nullable public InputStream getInputStreamNoCache (@Nonnull final ClassLoader aClassLoader) { final URL aURL = getAsURLNoCache (aClassLoader); return _getInputStream (m_sPath, aURL, aClassLoader); }
[ "@", "Nullable", "public", "InputStream", "getInputStreamNoCache", "(", "@", "Nonnull", "final", "ClassLoader", "aClassLoader", ")", "{", "final", "URL", "aURL", "=", "getAsURLNoCache", "(", "aClassLoader", ")", ";", "return", "_getInputStream", "(", "m_sPath", ",...
Get the input stream to the this resource, using the passed class loader only. @param aClassLoader The class loader to be used. May not be <code>null</code>. @return <code>null</code> if the path could not be resolved.
[ "Get", "the", "input", "stream", "to", "the", "this", "resource", "using", "the", "passed", "class", "loader", "only", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/resource/ClassPathResource.java#L290-L295
train
phax/ph-commons
ph-tree/src/main/java/com/helger/tree/util/TreeWithIDSearcher.java
TreeWithIDSearcher.findAllItemsWithIDRecursive
@Nonnull @ReturnsMutableCopy public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> ICommonsList <ITEMTYPE> findAllItemsWithIDRecursive (@Nonnull final IBasicTree <DATATYPE, ITEMTYPE> aTree, ...
java
@Nonnull @ReturnsMutableCopy public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> ICommonsList <ITEMTYPE> findAllItemsWithIDRecursive (@Nonnull final IBasicTree <DATATYPE, ITEMTYPE> aTree, ...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "KEYTYPE", ",", "DATATYPE", ",", "ITEMTYPE", "extends", "ITreeItemWithID", "<", "KEYTYPE", ",", "DATATYPE", ",", "ITEMTYPE", ">", ">", "ICommonsList", "<", "ITEMTYPE", ">", "findAllItemsWithIDRecu...
Fill all items with the same ID by linearly scanning of the tree. @param <KEYTYPE> tree ID type @param <DATATYPE> tree data type @param <ITEMTYPE> tree item type @param aTree The tree to search. May not be <code>null</code>. @param aSearchID The ID to search. May not be <code>null</code>. @return A non-<code>null</cod...
[ "Fill", "all", "items", "with", "the", "same", "ID", "by", "linearly", "scanning", "of", "the", "tree", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-tree/src/main/java/com/helger/tree/util/TreeWithIDSearcher.java#L61-L67
train
phax/ph-commons
ph-tree/src/main/java/com/helger/tree/util/TreeWithIDSearcher.java
TreeWithIDSearcher.findAllItemsWithIDRecursive
@Nonnull @ReturnsMutableCopy public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> ICommonsList <ITEMTYPE> findAllItemsWithIDRecursive (@Nonnull final ITEMTYPE aTreeItem, ...
java
@Nonnull @ReturnsMutableCopy public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> ICommonsList <ITEMTYPE> findAllItemsWithIDRecursive (@Nonnull final ITEMTYPE aTreeItem, ...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "KEYTYPE", ",", "DATATYPE", ",", "ITEMTYPE", "extends", "ITreeItemWithID", "<", "KEYTYPE", ",", "DATATYPE", ",", "ITEMTYPE", ">", ">", "ICommonsList", "<", "ITEMTYPE", ">", "findAllItemsWithIDRecu...
Fill all items with the same ID by linearly scanning the tree. @param <KEYTYPE> tree ID type @param <DATATYPE> tree data type @param <ITEMTYPE> tree item type @param aTreeItem The tree item to search. May not be <code>null</code>. @param aSearchID The ID to search. May not be <code>null</code>. @return A non-<code>nul...
[ "Fill", "all", "items", "with", "the", "same", "ID", "by", "linearly", "scanning", "the", "tree", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-tree/src/main/java/com/helger/tree/util/TreeWithIDSearcher.java#L84-L102
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/typeconvert/TypeConverter.java
TypeConverter.convert
@Nullable public static <DSTTYPE> DSTTYPE convert (@Nullable final Object aSrcValue, @Nonnull final Class <DSTTYPE> aDstClass) { return convert (TypeConverterProviderBestMatch.getInstance (), aSrcValue, aDstClass); }
java
@Nullable public static <DSTTYPE> DSTTYPE convert (@Nullable final Object aSrcValue, @Nonnull final Class <DSTTYPE> aDstClass) { return convert (TypeConverterProviderBestMatch.getInstance (), aSrcValue, aDstClass); }
[ "@", "Nullable", "public", "static", "<", "DSTTYPE", ">", "DSTTYPE", "convert", "(", "@", "Nullable", "final", "Object", "aSrcValue", ",", "@", "Nonnull", "final", "Class", "<", "DSTTYPE", ">", "aDstClass", ")", "{", "return", "convert", "(", "TypeConverterP...
Convert the passed source value to the destination class using the best match type converter provider, if a conversion is necessary. @param <DSTTYPE> The destination type. @param aSrcValue The source value. May be <code>null</code>. @param aDstClass The destination class to use. @return <code>null</code> if the source...
[ "Convert", "the", "passed", "source", "value", "to", "the", "destination", "class", "using", "the", "best", "match", "type", "converter", "provider", "if", "a", "conversion", "is", "necessary", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/typeconvert/TypeConverter.java#L439-L443
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/typeconvert/TypeConverter.java
TypeConverter._getUsableClass
@Nullable private static Class <?> _getUsableClass (@Nullable final Class <?> aClass) { final Class <?> aPrimitiveWrapperType = ClassHelper.getPrimitiveWrapperClass (aClass); return aPrimitiveWrapperType != null ? aPrimitiveWrapperType : aClass; }
java
@Nullable private static Class <?> _getUsableClass (@Nullable final Class <?> aClass) { final Class <?> aPrimitiveWrapperType = ClassHelper.getPrimitiveWrapperClass (aClass); return aPrimitiveWrapperType != null ? aPrimitiveWrapperType : aClass; }
[ "@", "Nullable", "private", "static", "Class", "<", "?", ">", "_getUsableClass", "(", "@", "Nullable", "final", "Class", "<", "?", ">", "aClass", ")", "{", "final", "Class", "<", "?", ">", "aPrimitiveWrapperType", "=", "ClassHelper", ".", "getPrimitiveWrappe...
Get the class to use. In case the passed class is a primitive type, the corresponding wrapper class is used. @param aClass The class to check. Can be <code>null</code> but should not be <code>null</code>. @return <code>null</code> if the parameter is <code>null</code>.
[ "Get", "the", "class", "to", "use", ".", "In", "case", "the", "passed", "class", "is", "a", "primitive", "type", "the", "corresponding", "wrapper", "class", "is", "used", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/typeconvert/TypeConverter.java#L454-L459
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/mime/MimeTypeHelper.java
MimeTypeHelper.getCharsetNameFromMimeType
@Nullable public static String getCharsetNameFromMimeType (@Nullable final IMimeType aMimeType) { return aMimeType == null ? null : aMimeType.getParameterValueWithName (CMimeType.PARAMETER_NAME_CHARSET); }
java
@Nullable public static String getCharsetNameFromMimeType (@Nullable final IMimeType aMimeType) { return aMimeType == null ? null : aMimeType.getParameterValueWithName (CMimeType.PARAMETER_NAME_CHARSET); }
[ "@", "Nullable", "public", "static", "String", "getCharsetNameFromMimeType", "(", "@", "Nullable", "final", "IMimeType", "aMimeType", ")", "{", "return", "aMimeType", "==", "null", "?", "null", ":", "aMimeType", ".", "getParameterValueWithName", "(", "CMimeType", ...
Determine the charset name from the provided MIME type. @param aMimeType The MIME type to query. May be <code>null</code>. @return <code>null</code> if no MIME type was provided or if the MIME type does not contain a "charset" parameter
[ "Determine", "the", "charset", "name", "from", "the", "provided", "MIME", "type", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/mime/MimeTypeHelper.java#L45-L49
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/mime/MimeTypeHelper.java
MimeTypeHelper.getCharsetFromMimeType
@Nullable public static Charset getCharsetFromMimeType (@Nullable final IMimeType aMimeType) { final String sCharsetName = getCharsetNameFromMimeType (aMimeType); return CharsetHelper.getCharsetFromNameOrNull (sCharsetName); }
java
@Nullable public static Charset getCharsetFromMimeType (@Nullable final IMimeType aMimeType) { final String sCharsetName = getCharsetNameFromMimeType (aMimeType); return CharsetHelper.getCharsetFromNameOrNull (sCharsetName); }
[ "@", "Nullable", "public", "static", "Charset", "getCharsetFromMimeType", "(", "@", "Nullable", "final", "IMimeType", "aMimeType", ")", "{", "final", "String", "sCharsetName", "=", "getCharsetNameFromMimeType", "(", "aMimeType", ")", ";", "return", "CharsetHelper", ...
Determine the charset from the provided MIME type. @param aMimeType The MIME type to query. May be <code>null</code>. @return <code>null</code> if no MIME type was provided or if the MIME type does not contain a "charset" parameter or if the provided charset name is invalid.
[ "Determine", "the", "charset", "from", "the", "provided", "MIME", "type", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/mime/MimeTypeHelper.java#L60-L65
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.isArray
public static boolean isArray (@Nullable final Object aObject) { return aObject != null && ClassHelper.isArrayClass (aObject.getClass ()); }
java
public static boolean isArray (@Nullable final Object aObject) { return aObject != null && ClassHelper.isArrayClass (aObject.getClass ()); }
[ "public", "static", "boolean", "isArray", "(", "@", "Nullable", "final", "Object", "aObject", ")", "{", "return", "aObject", "!=", "null", "&&", "ClassHelper", ".", "isArrayClass", "(", "aObject", ".", "getClass", "(", ")", ")", ";", "}" ]
Check if the passed object is an array or not. @param aObject The object to be checked. May be <code>null</code>. @return <code>true</code> if the passed object is not <code>null</code> and represents an array.
[ "Check", "if", "the", "passed", "object", "is", "an", "array", "or", "not", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L117-L120
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getFirstIndex
public static <ELEMENTTYPE> int getFirstIndex (@Nullable final ELEMENTTYPE [] aValues, @Nullable final ELEMENTTYPE aSearchValue) { final int nLength = getSize (aValues); if (nLength > 0) for (int nIndex = 0; nIndex < nLength; ++nIndex) if (EqualsH...
java
public static <ELEMENTTYPE> int getFirstIndex (@Nullable final ELEMENTTYPE [] aValues, @Nullable final ELEMENTTYPE aSearchValue) { final int nLength = getSize (aValues); if (nLength > 0) for (int nIndex = 0; nIndex < nLength; ++nIndex) if (EqualsH...
[ "public", "static", "<", "ELEMENTTYPE", ">", "int", "getFirstIndex", "(", "@", "Nullable", "final", "ELEMENTTYPE", "[", "]", "aValues", ",", "@", "Nullable", "final", "ELEMENTTYPE", "aSearchValue", ")", "{", "final", "int", "nLength", "=", "getSize", "(", "a...
Get the index of the passed search value in the passed value array. @param <ELEMENTTYPE> Array element type @param aValues The value array to be searched. May be <code>null</code>. @param aSearchValue The value to be searched. May be <code>null</code>. @return <code>-1</code> if the searched value is not contained, a ...
[ "Get", "the", "index", "of", "the", "passed", "search", "value", "in", "the", "passed", "value", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L440-L449
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.contains
public static <ELEMENTTYPE> boolean contains (@Nullable final ELEMENTTYPE [] aValues, @Nullable final ELEMENTTYPE aSearchValue) { return getFirstIndex (aValues, aSearchValue) >= 0; }
java
public static <ELEMENTTYPE> boolean contains (@Nullable final ELEMENTTYPE [] aValues, @Nullable final ELEMENTTYPE aSearchValue) { return getFirstIndex (aValues, aSearchValue) >= 0; }
[ "public", "static", "<", "ELEMENTTYPE", ">", "boolean", "contains", "(", "@", "Nullable", "final", "ELEMENTTYPE", "[", "]", "aValues", ",", "@", "Nullable", "final", "ELEMENTTYPE", "aSearchValue", ")", "{", "return", "getFirstIndex", "(", "aValues", ",", "aSea...
Check if the passed search value is contained in the passed value array. @param <ELEMENTTYPE> Array element type @param aValues The value array to be searched. May be <code>null</code>. @param aSearchValue The value to be searched. May be <code>null</code>. @return <code>true</code> if the value array is not empty and...
[ "Check", "if", "the", "passed", "search", "value", "is", "contained", "in", "the", "passed", "value", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L806-L810
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getFirst
@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getFirst (@Nullable final ELEMENTTYPE [] aArray, @Nullable final ELEMENTTYPE aDefaultValue) { return isEmpty (aArray) ? aDefaultValue : aArray[0]; }
java
@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getFirst (@Nullable final ELEMENTTYPE [] aArray, @Nullable final ELEMENTTYPE aDefaultValue) { return isEmpty (aArray) ? aDefaultValue : aArray[0]; }
[ "@", "Nullable", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "getFirst", "(", "@", "Nullable", "final", "ELEMENTTYPE", "[", "]", "aArray", ",", "@", "Nullable", "final", "ELEMENTTYPE", "aDefaultValue", ")", "{", "return", "isEmpty", "(", "aArra...
Get the first element of the array or the passed default if the passed array is empty. @param <ELEMENTTYPE> Array element type @param aArray The array who's first element is to be retrieved. May be <code>null</code> or empty. @param aDefaultValue The default value to be returned if the array is empty @return the first...
[ "Get", "the", "first", "element", "of", "the", "array", "or", "the", "passed", "default", "if", "the", "passed", "array", "is", "empty", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L1101-L1106
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getConcatenated
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] getConcatenated (@Nullable final ELEMENTTYPE aHead, @Nullable final ELEMENTTYPE [] aTailArray, @Nonnull final Class <ELE...
java
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] getConcatenated (@Nullable final ELEMENTTYPE aHead, @Nullable final ELEMENTTYPE [] aTailArray, @Nonnull final Class <ELE...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "getConcatenated", "(", "@", "Nullable", "final", "ELEMENTTYPE", "aHead", ",", "@", "Nullable", "final", "ELEMENTTYPE", "[", "]", "aTailArray", ",", ...
Get a new array that combines the passed head and the array. The head element will be the first element of the created array. @param <ELEMENTTYPE> Array element type @param aHead The first element of the result array. If this element is <code>null</code> it will be inserted as such into the array! @param aTailArray Th...
[ "Get", "a", "new", "array", "that", "combines", "the", "passed", "head", "and", "the", "array", ".", "The", "head", "element", "will", "be", "the", "first", "element", "of", "the", "created", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L1961-L1975
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getConcatenated
@Nonnull @ReturnsMutableCopy public static float [] getConcatenated (final float aHead, @Nullable final float... aTailArray) { if (isEmpty (aTailArray)) return new float [] { aHead }; final float [] ret = new float [1 + aTailArray.length]; ret[0] = aHead; System.arraycopy (aTailArray, 0, re...
java
@Nonnull @ReturnsMutableCopy public static float [] getConcatenated (final float aHead, @Nullable final float... aTailArray) { if (isEmpty (aTailArray)) return new float [] { aHead }; final float [] ret = new float [1 + aTailArray.length]; ret[0] = aHead; System.arraycopy (aTailArray, 0, re...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "float", "[", "]", "getConcatenated", "(", "final", "float", "aHead", ",", "@", "Nullable", "final", "float", "...", "aTailArray", ")", "{", "if", "(", "isEmpty", "(", "aTailArray", ")", ")", "...
Get a new array that combines the passed head element and the array. The head element will be the first element of the created array. @param aHead The first element of the result array. @param aTailArray The tail array. May be <code>null</code>. @return A non-<code>null</code> array with all elements in the correct or...
[ "Get", "a", "new", "array", "that", "combines", "the", "passed", "head", "element", "and", "the", "array", ".", "The", "head", "element", "will", "be", "the", "first", "element", "of", "the", "created", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L2385-L2396
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getAllExceptFirst
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExceptFirst (@Nullable final ELEMENTTYPE... aArray) { return getAllExceptFirst (aArray, 1); }
java
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExceptFirst (@Nullable final ELEMENTTYPE... aArray) { return getAllExceptFirst (aArray, 1); }
[ "@", "Nullable", "@", "ReturnsMutableCopy", "@", "SafeVarargs", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "getAllExceptFirst", "(", "@", "Nullable", "final", "ELEMENTTYPE", "...", "aArray", ")", "{", "return", "getAllExceptFirst", "(", ...
Get an array that contains all elements, except for the first element. @param <ELEMENTTYPE> Array element type @param aArray The source array. May be <code>null</code>. @return <code>null</code> if the passed array is <code>null</code> or has less than one element. A non-<code>null</code> copy of the array without the...
[ "Get", "an", "array", "that", "contains", "all", "elements", "except", "for", "the", "first", "element", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L2737-L2743
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getAllExcept
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExcept (@Nullable final ELEMENTTYPE [] aArray, @Nullable final ELEMENTTYPE... aElementsToRemove) { if (isEmpty (aArray) || isEmpty (aElementsToRemove)) ...
java
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExcept (@Nullable final ELEMENTTYPE [] aArray, @Nullable final ELEMENTTYPE... aElementsToRemove) { if (isEmpty (aArray) || isEmpty (aElementsToRemove)) ...
[ "@", "Nullable", "@", "ReturnsMutableCopy", "@", "SafeVarargs", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "getAllExcept", "(", "@", "Nullable", "final", "ELEMENTTYPE", "[", "]", "aArray", ",", "@", "Nullable", "final", "ELEMENTTYPE", ...
Get an array that contains all elements, except for the passed elements. @param <ELEMENTTYPE> Array element type @param aArray The source array. May be <code>null</code>. @param aElementsToRemove The elements to skip. @return <code>null</code> if the passed array is <code>null</code>. The original array, if no element...
[ "Get", "an", "array", "that", "contains", "all", "elements", "except", "for", "the", "passed", "elements", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L2787-L2802
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getAllExceptLast
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExceptLast (@Nullable final ELEMENTTYPE... aArray) { return getAllExceptLast (aArray, 1); }
java
@Nullable @ReturnsMutableCopy @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE [] getAllExceptLast (@Nullable final ELEMENTTYPE... aArray) { return getAllExceptLast (aArray, 1); }
[ "@", "Nullable", "@", "ReturnsMutableCopy", "@", "SafeVarargs", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "getAllExceptLast", "(", "@", "Nullable", "final", "ELEMENTTYPE", "...", "aArray", ")", "{", "return", "getAllExceptLast", "(", ...
Get an array that contains all elements, except for the last element. @param <ELEMENTTYPE> Array element type @param aArray The source array. May be <code>null</code>. @return <code>null</code> if the passed array is <code>null</code> or has less than one element. A non-<code>null</code> copy of the array without the ...
[ "Get", "an", "array", "that", "contains", "all", "elements", "except", "for", "the", "last", "element", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L3360-L3366
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.newArraySameType
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArraySameType (@Nonnull final ELEMENTTYPE [] aArray, @Nonnegative final int nSize) { return newArray (getComponentType (aArray), nSize); }
java
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArraySameType (@Nonnull final ELEMENTTYPE [] aArray, @Nonnegative final int nSize) { return newArray (getComponentType (aArray), nSize); }
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "newArraySameType", "(", "@", "Nonnull", "final", "ELEMENTTYPE", "[", "]", "aArray", ",", "@", "Nonnegative", "final", "int", "nSize", ")", "{", ...
Create a new empty array with the same type as the passed array. @param <ELEMENTTYPE> Type of element @param aArray Source array. May not be <code>null</code>. @param nSize Destination size. Must be &ge; 0. @return Never <code>null</code>.
[ "Create", "a", "new", "empty", "array", "with", "the", "same", "type", "as", "the", "passed", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L3869-L3875
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.newArray
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArray (@Nullable final Collection <? extends ELEMENTTYPE> aCollection, @Nonnull final Class <ELEMENTTYPE> aClass) { ValueEnforcer.notNull (aClass, "class"); if (CollectionHelp...
java
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArray (@Nullable final Collection <? extends ELEMENTTYPE> aCollection, @Nonnull final Class <ELEMENTTYPE> aClass) { ValueEnforcer.notNull (aClass, "class"); if (CollectionHelp...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "newArray", "(", "@", "Nullable", "final", "Collection", "<", "?", "extends", "ELEMENTTYPE", ">", "aCollection", ",", "@", "Nonnull", "final", "Cla...
Create a new array with the elements in the passed collection.. @param <ELEMENTTYPE> Type of element @param aCollection The collection to be converted to an array. May be <code>null</code> . @param aClass The class of the elements inside the collection. May not be <code>null</code>. @return <code>null</code> if the pa...
[ "Create", "a", "new", "array", "with", "the", "elements", "in", "the", "passed", "collection", ".." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L3892-L3904
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.newArraySingleElement
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArraySingleElement (@Nullable final ELEMENTTYPE aElement, @Nonnull final Class <ELEMENTTYPE> aClass) { ValueEnforcer.notNull (aClass, "class"); final ELEMENTTYPE ...
java
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArraySingleElement (@Nullable final ELEMENTTYPE aElement, @Nonnull final Class <ELEMENTTYPE> aClass) { ValueEnforcer.notNull (aClass, "class"); final ELEMENTTYPE ...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "newArraySingleElement", "(", "@", "Nullable", "final", "ELEMENTTYPE", "aElement", ",", "@", "Nonnull", "final", "Class", "<", "ELEMENTTYPE", ">", "a...
Wrapper that allows a single argument to be treated as an array. @param <ELEMENTTYPE> Type of element @param aElement The element to be converted to an array. May be <code>null</code>. @param aClass The class of the element. May not be <code>null</code>. Must be present because in case the passed element is <code>null...
[ "Wrapper", "that", "allows", "a", "single", "argument", "to", "be", "treated", "as", "an", "array", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L3919-L3929
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.newArray
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArray (@Nonnegative final int nArraySize, @Nonnull final ELEMENTTYPE aValue, @Nonnull final Class <ELEMENTTYPE> aClass) { Val...
java
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> ELEMENTTYPE [] newArray (@Nonnegative final int nArraySize, @Nonnull final ELEMENTTYPE aValue, @Nonnull final Class <ELEMENTTYPE> aClass) { Val...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "[", "]", "newArray", "(", "@", "Nonnegative", "final", "int", "nArraySize", ",", "@", "Nonnull", "final", "ELEMENTTYPE", "aValue", ",", "@", "Nonnull", "fin...
Create a new array with a predefined number of elements containing the passed value. @param <ELEMENTTYPE> The type of the array to be created. @param nArraySize The size of the array to be created. @param aValue The value to be set into each array element. May be <code>null</code>. @param aClass The value class. May n...
[ "Create", "a", "new", "array", "with", "a", "predefined", "number", "of", "elements", "containing", "the", "passed", "value", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L3968-L3980
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.isArrayEquals
public static boolean isArrayEquals (@Nullable final Object aHeadArray, @Nullable final Object aTailArray) { // Same objects? if (EqualsHelper.identityEqual (aHeadArray, aTailArray)) return true; // Any of the null -> different because they are not both null if (aHeadArray == null || aTailArray...
java
public static boolean isArrayEquals (@Nullable final Object aHeadArray, @Nullable final Object aTailArray) { // Same objects? if (EqualsHelper.identityEqual (aHeadArray, aTailArray)) return true; // Any of the null -> different because they are not both null if (aHeadArray == null || aTailArray...
[ "public", "static", "boolean", "isArrayEquals", "(", "@", "Nullable", "final", "Object", "aHeadArray", ",", "@", "Nullable", "final", "Object", "aTailArray", ")", "{", "// Same objects?", "if", "(", "EqualsHelper", ".", "identityEqual", "(", "aHeadArray", ",", "...
Recursive equal comparison for arrays. @param aHeadArray First array. May be <code>null</code>. @param aTailArray Second array. May be <code>null</code>. @return <code>true</code> only if the arrays and all contained elements are recursively equal.
[ "Recursive", "equal", "comparison", "for", "arrays", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L4061-L4106
train
phax/ph-commons
ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringEncoder.java
StringEncoder.encode
@Nonnull public EContinue encode (@Nonnull final String sSource, @Nonnull final ByteBuffer aDestBuffer) { ValueEnforcer.notNull (sSource, "Source"); ValueEnforcer.notNull (aDestBuffer, "DestBuffer"); // We need to special case the empty string if (sSource.length () == 0) return EContinue.BREA...
java
@Nonnull public EContinue encode (@Nonnull final String sSource, @Nonnull final ByteBuffer aDestBuffer) { ValueEnforcer.notNull (sSource, "Source"); ValueEnforcer.notNull (aDestBuffer, "DestBuffer"); // We need to special case the empty string if (sSource.length () == 0) return EContinue.BREA...
[ "@", "Nonnull", "public", "EContinue", "encode", "(", "@", "Nonnull", "final", "String", "sSource", ",", "@", "Nonnull", "final", "ByteBuffer", "aDestBuffer", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sSource", ",", "\"Source\"", ")", ";", "ValueEnforce...
Encodes string into destination. This must be called multiple times with the same string until it returns true. When this returns false, it must be called again with larger destination buffer space. It is possible that there are a few bytes of space remaining in the destination buffer, even though it must be refreshed....
[ "Encodes", "string", "into", "destination", ".", "This", "must", "be", "called", "multiple", "times", "with", "the", "same", "string", "until", "it", "returns", "true", ".", "When", "this", "returns", "false", "it", "must", "be", "called", "again", "with", ...
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringEncoder.java#L112-L176
train
phax/ph-commons
ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringEncoder.java
StringEncoder.getAsNewByteBuffer
@Nonnull public ByteBuffer getAsNewByteBuffer (@Nonnull final String sSource) { // Optimized for 1 byte per character strings (ASCII) ByteBuffer ret = ByteBuffer.allocate (sSource.length () + BUFFER_EXTRA_BYTES); while (encode (sSource, ret).isContinue ()) { // need a larger buffer // e...
java
@Nonnull public ByteBuffer getAsNewByteBuffer (@Nonnull final String sSource) { // Optimized for 1 byte per character strings (ASCII) ByteBuffer ret = ByteBuffer.allocate (sSource.length () + BUFFER_EXTRA_BYTES); while (encode (sSource, ret).isContinue ()) { // need a larger buffer // e...
[ "@", "Nonnull", "public", "ByteBuffer", "getAsNewByteBuffer", "(", "@", "Nonnull", "final", "String", "sSource", ")", "{", "// Optimized for 1 byte per character strings (ASCII)", "ByteBuffer", "ret", "=", "ByteBuffer", ".", "allocate", "(", "sSource", ".", "length", ...
Returns a ByteBuffer containing the encoded version of source. The position of the ByteBuffer will be 0, the limit is the length of the string. The capacity of the ByteBuffer may be larger than the string. @param sSource Source string @return The new byte buffer
[ "Returns", "a", "ByteBuffer", "containing", "the", "encoded", "version", "of", "source", ".", "The", "position", "of", "the", "ByteBuffer", "will", "be", "0", "the", "limit", "is", "the", "length", "of", "the", "string", ".", "The", "capacity", "of", "the"...
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringEncoder.java#L195-L233
train
phax/ph-commons
ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringEncoder.java
StringEncoder.getAsNewArray
@Nonnull @ReturnsMutableCopy public byte [] getAsNewArray (@Nonnull final String sSource) { // Optimized for short strings assert m_aArrayBuffer.remaining () == m_aArrayBuffer.capacity (); if (encode (sSource, m_aArrayBuffer).isBreak ()) { // copy the exact correct bytes out final byte...
java
@Nonnull @ReturnsMutableCopy public byte [] getAsNewArray (@Nonnull final String sSource) { // Optimized for short strings assert m_aArrayBuffer.remaining () == m_aArrayBuffer.capacity (); if (encode (sSource, m_aArrayBuffer).isBreak ()) { // copy the exact correct bytes out final byte...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "byte", "[", "]", "getAsNewArray", "(", "@", "Nonnull", "final", "String", "sSource", ")", "{", "// Optimized for short strings", "assert", "m_aArrayBuffer", ".", "remaining", "(", ")", "==", "m_aArrayBuffer", "...
Returns a new byte array containing the UTF-8 version of source. The array will be exactly the correct size for the string. @param sSource Source string @return as encoded array
[ "Returns", "a", "new", "byte", "array", "containing", "the", "UTF", "-", "8", "version", "of", "source", ".", "The", "array", "will", "be", "exactly", "the", "correct", "size", "for", "the", "string", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-less-commons/src/main/java/com/helger/lesscommons/charset/StringEncoder.java#L243-L272
train
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/concurrent/BasicThreadFactory.java
BasicThreadFactory.setDefaultUncaughtExceptionHandler
public static void setDefaultUncaughtExceptionHandler (@Nonnull final Thread.UncaughtExceptionHandler aHdl) { ValueEnforcer.notNull (aHdl, "DefaultUncaughtExceptionHandler"); s_aDefaultUncaughtExceptionHandler = aHdl; }
java
public static void setDefaultUncaughtExceptionHandler (@Nonnull final Thread.UncaughtExceptionHandler aHdl) { ValueEnforcer.notNull (aHdl, "DefaultUncaughtExceptionHandler"); s_aDefaultUncaughtExceptionHandler = aHdl; }
[ "public", "static", "void", "setDefaultUncaughtExceptionHandler", "(", "@", "Nonnull", "final", "Thread", ".", "UncaughtExceptionHandler", "aHdl", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aHdl", ",", "\"DefaultUncaughtExceptionHandler\"", ")", ";", "s_aDefaultUn...
Set the default uncaught exception handler for future instances of BasicThreadFactory. By default a logging exception handler is present. @param aHdl The handlers to be used. May not be <code>null</code>. @since 9.0.0
[ "Set", "the", "default", "uncaught", "exception", "handler", "for", "future", "instances", "of", "BasicThreadFactory", ".", "By", "default", "a", "logging", "exception", "handler", "is", "present", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/concurrent/BasicThreadFactory.java#L117-L121
train