id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
102,400
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/MultiPartFormInputStream.java
MultiPartFormInputStream.parse
protected void parse() { // have we already parsed the input? if (_parsed) return; _parsed = true; try { // initialize _parts = new MultiMap<>(); // if its not a multipart request, don't parse it if (_contentType == null || !_...
java
protected void parse() { // have we already parsed the input? if (_parsed) return; _parsed = true; try { // initialize _parts = new MultiMap<>(); // if its not a multipart request, don't parse it if (_contentType == null || !_...
[ "protected", "void", "parse", "(", ")", "{", "// have we already parsed the input?", "if", "(", "_parsed", ")", "return", ";", "_parsed", "=", "true", ";", "try", "{", "// initialize", "_parts", "=", "new", "MultiMap", "<>", "(", ")", ";", "// if its not a mul...
Parse, if necessary, the multipart stream.
[ "Parse", "if", "necessary", "the", "multipart", "stream", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/MultiPartFormInputStream.java#L406-L498
102,401
hypercube1024/firefly
firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java
AbstractSecureSession.doHandshake
protected boolean doHandshake(ByteBuffer receiveBuffer) throws IOException { if (!session.isOpen()) { close(); return (initialHSComplete = false); } if (initialHSComplete) { return true; } switch (initialHSStatus) { case NOT_HANDS...
java
protected boolean doHandshake(ByteBuffer receiveBuffer) throws IOException { if (!session.isOpen()) { close(); return (initialHSComplete = false); } if (initialHSComplete) { return true; } switch (initialHSStatus) { case NOT_HANDS...
[ "protected", "boolean", "doHandshake", "(", "ByteBuffer", "receiveBuffer", ")", "throws", "IOException", "{", "if", "(", "!", "session", ".", "isOpen", "(", ")", ")", "{", "close", "(", ")", ";", "return", "(", "initialHSComplete", "=", "false", ")", ";", ...
The initial handshake is a procedure by which the two peers exchange communication parameters until an SecureSession is established. Application data can not be sent during this phase. @param receiveBuffer Encrypted message @return True means handshake success @throws IOException The I/O exception
[ "The", "initial", "handshake", "is", "a", "procedure", "by", "which", "the", "two", "peers", "exchange", "communication", "parameters", "until", "an", "SecureSession", "is", "established", ".", "Application", "data", "can", "not", "be", "sent", "during", "this",...
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java#L74-L104
102,402
hypercube1024/firefly
firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java
AbstractSecureSession.doTasks
protected SSLEngineResult.HandshakeStatus doTasks() { Runnable runnable; // We could run this in a separate thread, but do in the current for // now. while ((runnable = sslEngine.getDelegatedTask()) != null) { runnable.run(); } return sslEngine.getHandshakeSt...
java
protected SSLEngineResult.HandshakeStatus doTasks() { Runnable runnable; // We could run this in a separate thread, but do in the current for // now. while ((runnable = sslEngine.getDelegatedTask()) != null) { runnable.run(); } return sslEngine.getHandshakeSt...
[ "protected", "SSLEngineResult", ".", "HandshakeStatus", "doTasks", "(", ")", "{", "Runnable", "runnable", ";", "// We could run this in a separate thread, but do in the current for", "// now.", "while", "(", "(", "runnable", "=", "sslEngine", ".", "getDelegatedTask", "(", ...
Do all the outstanding handshake tasks in the current Thread. @return The result of handshake
[ "Do", "all", "the", "outstanding", "handshake", "tasks", "in", "the", "current", "Thread", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java#L302-L311
102,403
hypercube1024/firefly
firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java
AbstractSecureSession.read
@Override public ByteBuffer read(ByteBuffer receiveBuffer) throws IOException { if (!doHandshake(receiveBuffer)) return null; if (!initialHSComplete) throw new IllegalStateException("The initial handshake is not complete."); if (log.isDebugEnabled()) { l...
java
@Override public ByteBuffer read(ByteBuffer receiveBuffer) throws IOException { if (!doHandshake(receiveBuffer)) return null; if (!initialHSComplete) throw new IllegalStateException("The initial handshake is not complete."); if (log.isDebugEnabled()) { l...
[ "@", "Override", "public", "ByteBuffer", "read", "(", "ByteBuffer", "receiveBuffer", ")", "throws", "IOException", "{", "if", "(", "!", "doHandshake", "(", "receiveBuffer", ")", ")", "return", "null", ";", "if", "(", "!", "initialHSComplete", ")", "throw", "...
This method is used to decrypt data, it implied do handshake @param receiveBuffer Encrypted message @return plaintext @throws IOException sslEngine error during data read
[ "This", "method", "is", "used", "to", "decrypt", "data", "it", "implied", "do", "handshake" ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java#L392-L458
102,404
hypercube1024/firefly
firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java
AbstractSecureSession.write
@Override public int write(ByteBuffer outAppBuf, Callback callback) throws IOException { if (!initialHSComplete) { IllegalStateException ex = new IllegalStateException("The initial handshake is not complete."); callback.failed(ex); throw ex; } int ret = 0...
java
@Override public int write(ByteBuffer outAppBuf, Callback callback) throws IOException { if (!initialHSComplete) { IllegalStateException ex = new IllegalStateException("The initial handshake is not complete."); callback.failed(ex); throw ex; } int ret = 0...
[ "@", "Override", "public", "int", "write", "(", "ByteBuffer", "outAppBuf", ",", "Callback", "callback", ")", "throws", "IOException", "{", "if", "(", "!", "initialHSComplete", ")", "{", "IllegalStateException", "ex", "=", "new", "IllegalStateException", "(", "\"...
This method is used to encrypt and flush to socket channel @param outAppBuf Plaintext message @return writen length @throws IOException sslEngine error during data write
[ "This", "method", "is", "used", "to", "encrypt", "and", "flush", "to", "socket", "channel" ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-nettool/src/main/java/com/firefly/net/tcp/secure/AbstractSecureSession.java#L477-L551
102,405
hypercube1024/firefly
firefly/src/main/java/com/firefly/core/AbstractApplicationContext.java
AbstractApplicationContext.beanDefinitionCheck
protected void beanDefinitionCheck() { for (int i = 0; i < beanDefinitions.size(); i++) { for (int j = i + 1; j < beanDefinitions.size(); j++) { BeanDefinition b1 = beanDefinitions.get(i); BeanDefinition b2 = beanDefinitions.get(j); // Two compo...
java
protected void beanDefinitionCheck() { for (int i = 0; i < beanDefinitions.size(); i++) { for (int j = i + 1; j < beanDefinitions.size(); j++) { BeanDefinition b1 = beanDefinitions.get(i); BeanDefinition b2 = beanDefinitions.get(j); // Two compo...
[ "protected", "void", "beanDefinitionCheck", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "beanDefinitions", ".", "size", "(", ")", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "i", "+", "1", ";", "j", "<", "beanDefi...
Bean definition conflict check
[ "Bean", "definition", "conflict", "check" ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/core/AbstractApplicationContext.java#L96-L137
102,406
hypercube1024/firefly
firefly/src/main/java/com/firefly/client/http2/SimpleHTTPClient.java
SimpleHTTPClient.registerHealthCheck
public void registerHealthCheck(Task task) { Optional.ofNullable(config.getHealthCheck()) .ifPresent(healthCheck -> healthCheck.register(task)); }
java
public void registerHealthCheck(Task task) { Optional.ofNullable(config.getHealthCheck()) .ifPresent(healthCheck -> healthCheck.register(task)); }
[ "public", "void", "registerHealthCheck", "(", "Task", "task", ")", "{", "Optional", ".", "ofNullable", "(", "config", ".", "getHealthCheck", "(", ")", ")", ".", "ifPresent", "(", "healthCheck", "->", "healthCheck", ".", "register", "(", "task", ")", ")", "...
Register an health check task. @param task The health check task.
[ "Register", "an", "health", "check", "task", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/client/http2/SimpleHTTPClient.java#L894-L897
102,407
hypercube1024/firefly
firefly/src/main/java/com/firefly/client/http2/SimpleHTTPClient.java
SimpleHTTPClient.clearHealthCheck
public void clearHealthCheck(String name) { Optional.ofNullable(config.getHealthCheck()) .ifPresent(healthCheck -> healthCheck.clear(name)); }
java
public void clearHealthCheck(String name) { Optional.ofNullable(config.getHealthCheck()) .ifPresent(healthCheck -> healthCheck.clear(name)); }
[ "public", "void", "clearHealthCheck", "(", "String", "name", ")", "{", "Optional", ".", "ofNullable", "(", "config", ".", "getHealthCheck", "(", ")", ")", ".", "ifPresent", "(", "healthCheck", "->", "healthCheck", ".", "clear", "(", "name", ")", ")", ";", ...
Clear the health check task. @param name The task name.
[ "Clear", "the", "health", "check", "task", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/client/http2/SimpleHTTPClient.java#L904-L907
102,408
hypercube1024/firefly
firefly-db/src/main/java/com/firefly/db/namedparam/NamedParameterParser.java
NamedParameterParser.skipCommentsAndQuotes
private static int skipCommentsAndQuotes(char[] statement, int position) { for (int i = 0; i < START_SKIP.length; i++) { if (statement[position] == START_SKIP[i].charAt(0)) { boolean match = true; for (int j = 1; j < START_SKIP[i].length(); j++) { ...
java
private static int skipCommentsAndQuotes(char[] statement, int position) { for (int i = 0; i < START_SKIP.length; i++) { if (statement[position] == START_SKIP[i].charAt(0)) { boolean match = true; for (int j = 1; j < START_SKIP[i].length(); j++) { ...
[ "private", "static", "int", "skipCommentsAndQuotes", "(", "char", "[", "]", "statement", ",", "int", "position", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "START_SKIP", ".", "length", ";", "i", "++", ")", "{", "if", "(", "statement",...
Skip over comments and quoted names present in an SQL statement @param statement character array containing SQL statement @param position current position of statement @return next position to process after any comments or quotes are skipped
[ "Skip", "over", "comments", "and", "quoted", "names", "present", "in", "an", "SQL", "statement" ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/namedparam/NamedParameterParser.java#L164-L204
102,409
hypercube1024/firefly
firefly-db/src/main/java/com/firefly/db/namedparam/NamedParameterParser.java
NamedParameterParser.isParameterSeparator
private static boolean isParameterSeparator(char c) { if (Character.isWhitespace(c)) { return true; } for (char separator : PARAMETER_SEPARATORS) { if (c == separator) { return true; } } return false; }
java
private static boolean isParameterSeparator(char c) { if (Character.isWhitespace(c)) { return true; } for (char separator : PARAMETER_SEPARATORS) { if (c == separator) { return true; } } return false; }
[ "private", "static", "boolean", "isParameterSeparator", "(", "char", "c", ")", "{", "if", "(", "Character", ".", "isWhitespace", "(", "c", ")", ")", "{", "return", "true", ";", "}", "for", "(", "char", "separator", ":", "PARAMETER_SEPARATORS", ")", "{", ...
Determine whether a parameter name ends at the current position, that is, whether the given character qualifies as a separator.
[ "Determine", "whether", "a", "parameter", "name", "ends", "at", "the", "current", "position", "that", "is", "whether", "the", "given", "character", "qualifies", "as", "a", "separator", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/namedparam/NamedParameterParser.java#L210-L220
102,410
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/decode/HttpParser.java
HttpParser.complianceViolation
protected boolean complianceViolation(HttpComplianceSection violation, String reason) { if (_compliances.contains(violation)) return true; if (reason == null) reason = violation.description; if (_complianceHandler != null) _complianceHandler.onComplianceViolat...
java
protected boolean complianceViolation(HttpComplianceSection violation, String reason) { if (_compliances.contains(violation)) return true; if (reason == null) reason = violation.description; if (_complianceHandler != null) _complianceHandler.onComplianceViolat...
[ "protected", "boolean", "complianceViolation", "(", "HttpComplianceSection", "violation", ",", "String", "reason", ")", "{", "if", "(", "_compliances", ".", "contains", "(", "violation", ")", ")", "return", "true", ";", "if", "(", "reason", "==", "null", ")", ...
Check RFC compliance violation @param violation The compliance section violation @param reason The reason for the violation @return True if the current compliance level is set so as to Not allow this violation
[ "Check", "RFC", "compliance", "violation" ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/decode/HttpParser.java#L304-L313
102,411
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/websocket/model/UpgradeRequestAdapter.java
UpgradeRequestAdapter.setSubProtocols
@Override public void setSubProtocols(String... protocols) { subProtocols.clear(); Collections.addAll(subProtocols, protocols); }
java
@Override public void setSubProtocols(String... protocols) { subProtocols.clear(); Collections.addAll(subProtocols, protocols); }
[ "@", "Override", "public", "void", "setSubProtocols", "(", "String", "...", "protocols", ")", "{", "subProtocols", ".", "clear", "(", ")", ";", "Collections", ".", "addAll", "(", "subProtocols", ",", "protocols", ")", ";", "}" ]
Set Sub Protocol request list. @param protocols the sub protocols desired
[ "Set", "Sub", "Protocol", "request", "list", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/websocket/model/UpgradeRequestAdapter.java#L292-L296
102,412
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java
HttpFields.getFieldNamesCollection
public Set<String> getFieldNamesCollection() { final Set<String> set = new HashSet<>(_size); for (HttpField f : this) { if (f != null) set.add(f.getName()); } return set; }
java
public Set<String> getFieldNamesCollection() { final Set<String> set = new HashSet<>(_size); for (HttpField f : this) { if (f != null) set.add(f.getName()); } return set; }
[ "public", "Set", "<", "String", ">", "getFieldNamesCollection", "(", ")", "{", "final", "Set", "<", "String", ">", "set", "=", "new", "HashSet", "<>", "(", "_size", ")", ";", "for", "(", "HttpField", "f", ":", "this", ")", "{", "if", "(", "f", "!="...
Get Collection of header names. @return the unique set of field names.
[ "Get", "Collection", "of", "header", "names", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java#L77-L84
102,413
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java
HttpFields.getLongField
public long getLongField(String name) throws NumberFormatException { HttpField field = getField(name); return field == null ? -1L : field.getLongValue(); }
java
public long getLongField(String name) throws NumberFormatException { HttpField field = getField(name); return field == null ? -1L : field.getLongValue(); }
[ "public", "long", "getLongField", "(", "String", "name", ")", "throws", "NumberFormatException", "{", "HttpField", "field", "=", "getField", "(", "name", ")", ";", "return", "field", "==", "null", "?", "-", "1L", ":", "field", ".", "getLongValue", "(", ")"...
Get a header as an long value. Returns the value of an integer field or -1 if not found. The case of the field name is ignored. @param name the case-insensitive field name @return the value of the field as a long @throws NumberFormatException If bad long found
[ "Get", "a", "header", "as", "an", "long", "value", ".", "Returns", "the", "value", "of", "an", "integer", "field", "or", "-", "1", "if", "not", "found", ".", "The", "case", "of", "the", "field", "name", "is", "ignored", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java#L617-L620
102,414
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java
HttpFields.putLongField
public void putLongField(HttpHeader name, long value) { String v = Long.toString(value); put(name, v); }
java
public void putLongField(HttpHeader name, long value) { String v = Long.toString(value); put(name, v); }
[ "public", "void", "putLongField", "(", "HttpHeader", "name", ",", "long", "value", ")", "{", "String", "v", "=", "Long", ".", "toString", "(", "value", ")", ";", "put", "(", "name", ",", "v", ")", ";", "}" ]
Sets the value of an long field. @param name the field name @param value the field long value
[ "Sets", "the", "value", "of", "an", "long", "field", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpFields.java#L651-L654
102,415
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/ClassUtils.java
ClassUtils.getAllInterfacesAsSet
public static Set<Class<?>> getAllInterfacesAsSet(Object instance) { Assert.notNull(instance, "Instance must not be null"); return getAllInterfacesForClassAsSet(instance.getClass()); }
java
public static Set<Class<?>> getAllInterfacesAsSet(Object instance) { Assert.notNull(instance, "Instance must not be null"); return getAllInterfacesForClassAsSet(instance.getClass()); }
[ "public", "static", "Set", "<", "Class", "<", "?", ">", ">", "getAllInterfacesAsSet", "(", "Object", "instance", ")", "{", "Assert", ".", "notNull", "(", "instance", ",", "\"Instance must not be null\"", ")", ";", "return", "getAllInterfacesForClassAsSet", "(", ...
Return all interfaces that the given instance implements as Set, including ones implemented by superclasses. @param instance the instance to analyze for interfaces @return all interfaces that the given instance implements as Set
[ "Return", "all", "interfaces", "that", "the", "given", "instance", "implements", "as", "Set", "including", "ones", "implemented", "by", "superclasses", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/ClassUtils.java#L1053-L1056
102,416
OpenSextant/SolrTextTagger
src/main/java/org/opensextant/solrtexttagger/TagLL.java
TagLL.removeLL
public void removeLL() { if (head[0] == this) head[0] = nextTag; if (prevTag != null) { prevTag.nextTag = nextTag; } if (nextTag != null) { nextTag.prevTag = prevTag; } }
java
public void removeLL() { if (head[0] == this) head[0] = nextTag; if (prevTag != null) { prevTag.nextTag = nextTag; } if (nextTag != null) { nextTag.prevTag = prevTag; } }
[ "public", "void", "removeLL", "(", ")", "{", "if", "(", "head", "[", "0", "]", "==", "this", ")", "head", "[", "0", "]", "=", "nextTag", ";", "if", "(", "prevTag", "!=", "null", ")", "{", "prevTag", ".", "nextTag", "=", "nextTag", ";", "}", "if...
Removes this tag from the chain, connecting prevTag and nextTag. Does not modify "this" object's pointers, so the caller can refer to nextTag after removing it.
[ "Removes", "this", "tag", "from", "the", "chain", "connecting", "prevTag", "and", "nextTag", ".", "Does", "not", "modify", "this", "object", "s", "pointers", "so", "the", "caller", "can", "refer", "to", "nextTag", "after", "removing", "it", "." ]
e7ae82b94f1490fa1b7882ada09b57071094b0a5
https://github.com/OpenSextant/SolrTextTagger/blob/e7ae82b94f1490fa1b7882ada09b57071094b0a5/src/main/java/org/opensextant/solrtexttagger/TagLL.java#L107-L116
102,417
OpenSextant/SolrTextTagger
src/main/java/org/opensextant/solrtexttagger/TermPrefixCursor.java
TermPrefixCursor.postingsEnumToIntsRef
private IntsRef postingsEnumToIntsRef(PostingsEnum postingsEnum, Bits liveDocs) throws IOException { // (The cache can have empty IntsRefs) //lookup prefixBuf in a cache if (docIdsCache != null) { docIds = docIdsCache.get(prefixBuf); if (docIds != null) { return docIds; } } ...
java
private IntsRef postingsEnumToIntsRef(PostingsEnum postingsEnum, Bits liveDocs) throws IOException { // (The cache can have empty IntsRefs) //lookup prefixBuf in a cache if (docIdsCache != null) { docIds = docIdsCache.get(prefixBuf); if (docIds != null) { return docIds; } } ...
[ "private", "IntsRef", "postingsEnumToIntsRef", "(", "PostingsEnum", "postingsEnum", ",", "Bits", "liveDocs", ")", "throws", "IOException", "{", "// (The cache can have empty IntsRefs)", "//lookup prefixBuf in a cache", "if", "(", "docIdsCache", "!=", "null", ")", "{", "do...
Returns an IntsRef either cached or reading postingsEnum. Not null. @param postingsEnum
[ "Returns", "an", "IntsRef", "either", "cached", "or", "reading", "postingsEnum", ".", "Not", "null", "." ]
e7ae82b94f1490fa1b7882ada09b57071094b0a5
https://github.com/OpenSextant/SolrTextTagger/blob/e7ae82b94f1490fa1b7882ada09b57071094b0a5/src/main/java/org/opensextant/solrtexttagger/TermPrefixCursor.java#L151-L181
102,418
OpenSextant/SolrTextTagger
src/main/java/org/opensextant/solrtexttagger/TaggerRequestHandler.java
TaggerRequestHandler.setTopInitArgsAsInvariants
private void setTopInitArgsAsInvariants(SolrQueryRequest req) { // First convert top level initArgs to SolrParams HashMap<String,String> map = new HashMap<>(initArgs.size()); for (int i=0; i<initArgs.size(); i++) { Object val = initArgs.getVal(i); if (val != null && !(val instanceof NamedList)) ...
java
private void setTopInitArgsAsInvariants(SolrQueryRequest req) { // First convert top level initArgs to SolrParams HashMap<String,String> map = new HashMap<>(initArgs.size()); for (int i=0; i<initArgs.size(); i++) { Object val = initArgs.getVal(i); if (val != null && !(val instanceof NamedList)) ...
[ "private", "void", "setTopInitArgsAsInvariants", "(", "SolrQueryRequest", "req", ")", "{", "// First convert top level initArgs to SolrParams", "HashMap", "<", "String", ",", "String", ">", "map", "=", "new", "HashMap", "<>", "(", "initArgs", ".", "size", "(", ")", ...
This request handler supports configuration options defined at the top level as well as those in typical Solr 'defaults', 'appends', and 'invariants'. The top level ones are treated as invariants.
[ "This", "request", "handler", "supports", "configuration", "options", "defined", "at", "the", "top", "level", "as", "well", "as", "those", "in", "typical", "Solr", "defaults", "appends", "and", "invariants", ".", "The", "top", "level", "ones", "are", "treated"...
e7ae82b94f1490fa1b7882ada09b57071094b0a5
https://github.com/OpenSextant/SolrTextTagger/blob/e7ae82b94f1490fa1b7882ada09b57071094b0a5/src/main/java/org/opensextant/solrtexttagger/TaggerRequestHandler.java#L372-L385
102,419
xdtianyu/PhoneNumber
phone-number/src/main/java/org/xdty/phone/number/util/Utils.java
Utils.unzip
public void unzip(String zipFile, String location) throws IOException { final int BUFFER_SIZE = 10240; int size; byte[] buffer = new byte[BUFFER_SIZE]; try { if (!location.endsWith("/")) { location += "/"; } File f = new File(location)...
java
public void unzip(String zipFile, String location) throws IOException { final int BUFFER_SIZE = 10240; int size; byte[] buffer = new byte[BUFFER_SIZE]; try { if (!location.endsWith("/")) { location += "/"; } File f = new File(location)...
[ "public", "void", "unzip", "(", "String", "zipFile", ",", "String", "location", ")", "throws", "IOException", "{", "final", "int", "BUFFER_SIZE", "=", "10240", ";", "int", "size", ";", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "BUFFER_SIZE", "...
Unzip a zip file. Will overwrite existing files. @param zipFile Full path of the zip file you'd like to unzip. @param location Full path of the directory you'd like to unzip to (will be created if it doesn't exist). @throws IOException
[ "Unzip", "a", "zip", "file", ".", "Will", "overwrite", "existing", "files", "." ]
5e9646ec84f4b390313e84a5214bd59c35b1adc5
https://github.com/xdtianyu/PhoneNumber/blob/5e9646ec84f4b390313e84a5214bd59c35b1adc5/phone-number/src/main/java/org/xdty/phone/number/util/Utils.java#L90-L145
102,420
solita/clamav-java
src/main/java/fi/solita/clamav/ClamAVClient.java
ClamAVClient.ping
public boolean ping() throws IOException { try (Socket s = new Socket(hostName,port); OutputStream outs = s.getOutputStream()) { s.setSoTimeout(timeout); outs.write(asBytes("zPING\0")); outs.flush(); byte[] b = new byte[PONG_REPLY_LEN]; InputStream inputStream = s.getInputStream(); ...
java
public boolean ping() throws IOException { try (Socket s = new Socket(hostName,port); OutputStream outs = s.getOutputStream()) { s.setSoTimeout(timeout); outs.write(asBytes("zPING\0")); outs.flush(); byte[] b = new byte[PONG_REPLY_LEN]; InputStream inputStream = s.getInputStream(); ...
[ "public", "boolean", "ping", "(", ")", "throws", "IOException", "{", "try", "(", "Socket", "s", "=", "new", "Socket", "(", "hostName", ",", "port", ")", ";", "OutputStream", "outs", "=", "s", ".", "getOutputStream", "(", ")", ")", "{", "s", ".", "set...
Run PING command to clamd to test it is responding. @return true if the server responded with proper ping reply.
[ "Run", "PING", "command", "to", "clamd", "to", "test", "it", "is", "responding", "." ]
4ff23d37fb0763862db76f2f3389f3e45e80dd09
https://github.com/solita/clamav-java/blob/4ff23d37fb0763862db76f2f3389f3e45e80dd09/src/main/java/fi/solita/clamav/ClamAVClient.java#L52-L67
102,421
solita/clamav-java
src/main/java/fi/solita/clamav/ClamAVClient.java
ClamAVClient.isCleanReply
public static boolean isCleanReply(byte[] reply) { String r = new String(reply, StandardCharsets.US_ASCII); return (r.contains("OK") && !r.contains("FOUND")); }
java
public static boolean isCleanReply(byte[] reply) { String r = new String(reply, StandardCharsets.US_ASCII); return (r.contains("OK") && !r.contains("FOUND")); }
[ "public", "static", "boolean", "isCleanReply", "(", "byte", "[", "]", "reply", ")", "{", "String", "r", "=", "new", "String", "(", "reply", ",", "StandardCharsets", ".", "US_ASCII", ")", ";", "return", "(", "r", ".", "contains", "(", "\"OK\"", ")", "&&...
Interpret the result from a ClamAV scan, and determine if the result means the data is clean @param reply The reply from the server after scanning @return true if no virus was found according to the clamd reply message
[ "Interpret", "the", "result", "from", "a", "ClamAV", "scan", "and", "determine", "if", "the", "result", "means", "the", "data", "is", "clean" ]
4ff23d37fb0763862db76f2f3389f3e45e80dd09
https://github.com/solita/clamav-java/blob/4ff23d37fb0763862db76f2f3389f3e45e80dd09/src/main/java/fi/solita/clamav/ClamAVClient.java#L133-L136
102,422
solita/clamav-java
src/main/java/fi/solita/clamav/ClamAVClient.java
ClamAVClient.readAll
private static byte[] readAll(InputStream is) throws IOException { ByteArrayOutputStream tmp = new ByteArrayOutputStream(); byte[] buf = new byte[2000]; int read = 0; do { read = is.read(buf); tmp.write(buf, 0, read); } while ((read > 0) && (is.available() > 0)); return tmp.toByteAr...
java
private static byte[] readAll(InputStream is) throws IOException { ByteArrayOutputStream tmp = new ByteArrayOutputStream(); byte[] buf = new byte[2000]; int read = 0; do { read = is.read(buf); tmp.write(buf, 0, read); } while ((read > 0) && (is.available() > 0)); return tmp.toByteAr...
[ "private", "static", "byte", "[", "]", "readAll", "(", "InputStream", "is", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "tmp", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "byte", "[", "]", "buf", "=", "new", "byte", "[", "2000", "]"...
reads all available bytes from the stream
[ "reads", "all", "available", "bytes", "from", "the", "stream" ]
4ff23d37fb0763862db76f2f3389f3e45e80dd09
https://github.com/solita/clamav-java/blob/4ff23d37fb0763862db76f2f3389f3e45e80dd09/src/main/java/fi/solita/clamav/ClamAVClient.java#L152-L162
102,423
jaydeepw/audio-wife
libAudioWife/app/src/main/java/nl/changer/audiowife/AudioWife.java
AudioWife.setViewsVisibility
private void setViewsVisibility() { if (mSeekBar != null) { mSeekBar.setVisibility(View.VISIBLE); } if (mPlaybackTime != null) { mPlaybackTime.setVisibility(View.VISIBLE); } if (mRunTime != null) { mRunTime.setVisibility(View.VISIBLE); } if (mTotalTime != null) { mTotalTime.setVisibility(V...
java
private void setViewsVisibility() { if (mSeekBar != null) { mSeekBar.setVisibility(View.VISIBLE); } if (mPlaybackTime != null) { mPlaybackTime.setVisibility(View.VISIBLE); } if (mRunTime != null) { mRunTime.setVisibility(View.VISIBLE); } if (mTotalTime != null) { mTotalTime.setVisibility(V...
[ "private", "void", "setViewsVisibility", "(", ")", "{", "if", "(", "mSeekBar", "!=", "null", ")", "{", "mSeekBar", ".", "setVisibility", "(", "View", ".", "VISIBLE", ")", ";", "}", "if", "(", "mPlaybackTime", "!=", "null", ")", "{", "mPlaybackTime", ".",...
Ensure the views are visible before playing the audio.
[ "Ensure", "the", "views", "are", "visible", "before", "playing", "the", "audio", "." ]
e5cf4d1306ff742e9c7fc0e3d990792f0b4e56d9
https://github.com/jaydeepw/audio-wife/blob/e5cf4d1306ff742e9c7fc0e3d990792f0b4e56d9/libAudioWife/app/src/main/java/nl/changer/audiowife/AudioWife.java#L182-L207
102,424
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/SecurityLoggingFactory.java
SecurityLoggingFactory.getControllerInstance
public synchronized static final IntervalLoggerController getControllerInstance() { IntervalLoggerController ic = null; // If no controller, create a bew instance. if( instance == null ) { instance = new DefaultIntervalLoggerController(); ic = new IntervalLoggerControllerWrapper( instance ); }else...
java
public synchronized static final IntervalLoggerController getControllerInstance() { IntervalLoggerController ic = null; // If no controller, create a bew instance. if( instance == null ) { instance = new DefaultIntervalLoggerController(); ic = new IntervalLoggerControllerWrapper( instance ); }else...
[ "public", "synchronized", "static", "final", "IntervalLoggerController", "getControllerInstance", "(", ")", "{", "IntervalLoggerController", "ic", "=", "null", ";", "// If no controller, create a bew instance.", "if", "(", "instance", "==", "null", ")", "{", "instance", ...
Return a single instance of the IntervalLoggerController. @return IntervalLoggerController instance to use.
[ "Return", "a", "single", "instance", "of", "the", "IntervalLoggerController", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/SecurityLoggingFactory.java#L21-L41
102,425
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/Utils.java
Utils.toSHA
public static String toSHA(byte[] input) { try { MessageDigest md = MessageDigest.getInstance("SHA-256"); return byteArray2Hex(md.digest(input)); } catch (NoSuchAlgorithmException nsae) { // this code should never be reached! } return null; }
java
public static String toSHA(byte[] input) { try { MessageDigest md = MessageDigest.getInstance("SHA-256"); return byteArray2Hex(md.digest(input)); } catch (NoSuchAlgorithmException nsae) { // this code should never be reached! } return null; }
[ "public", "static", "String", "toSHA", "(", "byte", "[", "]", "input", ")", "{", "try", "{", "MessageDigest", "md", "=", "MessageDigest", ".", "getInstance", "(", "\"SHA-256\"", ")", ";", "return", "byteArray2Hex", "(", "md", ".", "digest", "(", "input", ...
Converts an input byte array to a SHA hash. The actual hash strength is hidden by the method name to allow for future-proofing this API, but the current default is SHA-256. @param input Byte array to hash @return SHA hash of the input String, hex encoded.
[ "Converts", "an", "input", "byte", "array", "to", "a", "SHA", "hash", ".", "The", "actual", "hash", "strength", "is", "hidden", "by", "the", "method", "name", "to", "allow", "for", "future", "-", "proofing", "this", "API", "but", "the", "current", "defau...
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/Utils.java#L36-L44
102,426
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/Utils.java
Utils.byteArray2Hex
private static String byteArray2Hex(final byte[] hash) { try (Formatter formatter = new Formatter();) { for (byte b : hash) { formatter.format("%02x", b); } String hex = formatter.toString(); return hex; } }
java
private static String byteArray2Hex(final byte[] hash) { try (Formatter formatter = new Formatter();) { for (byte b : hash) { formatter.format("%02x", b); } String hex = formatter.toString(); return hex; } }
[ "private", "static", "String", "byteArray2Hex", "(", "final", "byte", "[", "]", "hash", ")", "{", "try", "(", "Formatter", "formatter", "=", "new", "Formatter", "(", ")", ";", ")", "{", "for", "(", "byte", "b", ":", "hash", ")", "{", "formatter", "."...
Converts an input byte array to a hex encoded String. @param input Byte array to hex encode @return Hex encoded String of the input byte array
[ "Converts", "an", "input", "byte", "array", "to", "a", "hex", "encoded", "String", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/Utils.java#L53-L61
102,427
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerView.java
DefaultIntervalLoggerView.formatStatusMessage
@Override public String formatStatusMessage(IntervalProperty[] properties) { StringBuffer buff = new StringBuffer(500); buff.append( "Watchdog: "); for( IntervalProperty p : properties ) { buff.append(p.getName()); buff.append("="); buff.append(p.getValue()); buff.append(", "); } if( buff...
java
@Override public String formatStatusMessage(IntervalProperty[] properties) { StringBuffer buff = new StringBuffer(500); buff.append( "Watchdog: "); for( IntervalProperty p : properties ) { buff.append(p.getName()); buff.append("="); buff.append(p.getValue()); buff.append(", "); } if( buff...
[ "@", "Override", "public", "String", "formatStatusMessage", "(", "IntervalProperty", "[", "]", "properties", ")", "{", "StringBuffer", "buff", "=", "new", "StringBuffer", "(", "500", ")", ";", "buff", ".", "append", "(", "\"Watchdog: \"", ")", ";", "for", "(...
Format the message to be logged. @param properties An array of properties to log. @return Formatted log message.
[ "Format", "the", "message", "to", "be", "logged", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerView.java#L25-L43
102,428
javabeanz/owasp-security-logging
owasp-security-logging-log4j/src/main/java/org/owasp/security/logging/log4j/mask/MaskingRewritePolicy.java
MaskingRewritePolicy.rewrite
@Override public LogEvent rewrite(LogEvent source) { // get the markers for the log event. If no markers, nothing can be // tagged confidential and we can return Marker sourceMarker = source.getMarker(); if (sourceMarker == null) { return source; } // get the message. If no message we can return fina...
java
@Override public LogEvent rewrite(LogEvent source) { // get the markers for the log event. If no markers, nothing can be // tagged confidential and we can return Marker sourceMarker = source.getMarker(); if (sourceMarker == null) { return source; } // get the message. If no message we can return fina...
[ "@", "Override", "public", "LogEvent", "rewrite", "(", "LogEvent", "source", ")", "{", "// get the markers for the log event. If no markers, nothing can be", "// tagged confidential and we can return", "Marker", "sourceMarker", "=", "source", ".", "getMarker", "(", ")", ";", ...
Rewrite the event. @param source a logging event that may be returned or used to create a new logging event. @return The LogEvent after rewriting.
[ "Rewrite", "the", "event", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-log4j/src/main/java/org/owasp/security/logging/log4j/mask/MaskingRewritePolicy.java#L48-L91
102,429
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/SecurityUtil.java
SecurityUtil.logShellEnvironmentVariables
public static void logShellEnvironmentVariables() { Map<String, String> env = System.getenv(); Iterator<String> keys = env.keySet().iterator(); while (keys.hasNext() ) { String key = keys.next(); String value = env.get(key); logMessage("Env, "+key+"="+value.trim()); } }
java
public static void logShellEnvironmentVariables() { Map<String, String> env = System.getenv(); Iterator<String> keys = env.keySet().iterator(); while (keys.hasNext() ) { String key = keys.next(); String value = env.get(key); logMessage("Env, "+key+"="+value.trim()); } }
[ "public", "static", "void", "logShellEnvironmentVariables", "(", ")", "{", "Map", "<", "String", ",", "String", ">", "env", "=", "System", ".", "getenv", "(", ")", ";", "Iterator", "<", "String", ">", "keys", "=", "env", ".", "keySet", "(", ")", ".", ...
Log shell environment variables associated with Java process.
[ "Log", "shell", "environment", "variables", "associated", "with", "Java", "process", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/SecurityUtil.java#L83-L91
102,430
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/SecurityUtil.java
SecurityUtil.logJavaSystemProperties
public static void logJavaSystemProperties() { Properties properties = System.getProperties(); Iterator<Object> keys = properties.keySet().iterator(); while (keys.hasNext() ) { Object key = keys.next(); Object value = properties.get(key); logMessage("SysProp, "+key+"="+value.toString().trim()); } }
java
public static void logJavaSystemProperties() { Properties properties = System.getProperties(); Iterator<Object> keys = properties.keySet().iterator(); while (keys.hasNext() ) { Object key = keys.next(); Object value = properties.get(key); logMessage("SysProp, "+key+"="+value.toString().trim()); } }
[ "public", "static", "void", "logJavaSystemProperties", "(", ")", "{", "Properties", "properties", "=", "System", ".", "getProperties", "(", ")", ";", "Iterator", "<", "Object", ">", "keys", "=", "properties", ".", "keySet", "(", ")", ".", "iterator", "(", ...
Log Java system properties.
[ "Log", "Java", "system", "properties", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/SecurityUtil.java#L96-L104
102,431
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerModel.java
DefaultIntervalLoggerModel.refresh
@Override public synchronized void refresh() { IntervalProperty[] properties = getProperties(); for(IntervalProperty p : properties ) { p.refresh(); } }
java
@Override public synchronized void refresh() { IntervalProperty[] properties = getProperties(); for(IntervalProperty p : properties ) { p.refresh(); } }
[ "@", "Override", "public", "synchronized", "void", "refresh", "(", ")", "{", "IntervalProperty", "[", "]", "properties", "=", "getProperties", "(", ")", ";", "for", "(", "IntervalProperty", "p", ":", "properties", ")", "{", "p", ".", "refresh", "(", ")", ...
Signal properties to update themselves.
[ "Signal", "properties", "to", "update", "themselves", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerModel.java#L152-L162
102,432
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerModel.java
DefaultIntervalLoggerModel.getThreadState
private int getThreadState( Thread.State state ) { Thread[] threads = getAllThreads(); int ct = 0; for( Thread thread : threads ) { if (state.equals(thread.getState()) ) ct++; } return ct; }
java
private int getThreadState( Thread.State state ) { Thread[] threads = getAllThreads(); int ct = 0; for( Thread thread : threads ) { if (state.equals(thread.getState()) ) ct++; } return ct; }
[ "private", "int", "getThreadState", "(", "Thread", ".", "State", "state", ")", "{", "Thread", "[", "]", "threads", "=", "getAllThreads", "(", ")", ";", "int", "ct", "=", "0", ";", "for", "(", "Thread", "thread", ":", "threads", ")", "{", "if", "(", ...
Utility method to retrieve the number of threads of a specified state. @param state Target Thread.State to retrieve. @return Total threads in specified state.
[ "Utility", "method", "to", "retrieve", "the", "number", "of", "threads", "of", "a", "specified", "state", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerModel.java#L170-L182
102,433
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerModel.java
DefaultIntervalLoggerModel.getAllThreads
private Thread[] getAllThreads() { final ThreadGroup root = getRootThreadGroup( ); int ct = Thread.activeCount(); int n = 0; Thread[] threads; do { ct *= 2; threads = new Thread[ ct ]; n = root.enumerate( threads, true ); } while ( n == ct ); return java....
java
private Thread[] getAllThreads() { final ThreadGroup root = getRootThreadGroup( ); int ct = Thread.activeCount(); int n = 0; Thread[] threads; do { ct *= 2; threads = new Thread[ ct ]; n = root.enumerate( threads, true ); } while ( n == ct ); return java....
[ "private", "Thread", "[", "]", "getAllThreads", "(", ")", "{", "final", "ThreadGroup", "root", "=", "getRootThreadGroup", "(", ")", ";", "int", "ct", "=", "Thread", ".", "activeCount", "(", ")", ";", "int", "n", "=", "0", ";", "Thread", "[", "]", "th...
Utility method to return all threads in system owned by the root ThreadGroup. @return Array of all threads.
[ "Utility", "method", "to", "return", "all", "threads", "in", "system", "owned", "by", "the", "root", "ThreadGroup", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/DefaultIntervalLoggerModel.java#L189-L202
102,434
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/ByteIntervalProperty.java
ByteIntervalProperty.getValue
public String getValue() { String results = super.getValue(); try { Long.parseLong(super.getValue()); results = addUnits(super.getValue()); }catch(NumberFormatException e) {} return results; }
java
public String getValue() { String results = super.getValue(); try { Long.parseLong(super.getValue()); results = addUnits(super.getValue()); }catch(NumberFormatException e) {} return results; }
[ "public", "String", "getValue", "(", ")", "{", "String", "results", "=", "super", ".", "getValue", "(", ")", ";", "try", "{", "Long", ".", "parseLong", "(", "super", ".", "getValue", "(", ")", ")", ";", "results", "=", "addUnits", "(", "super", ".", ...
Return the value in bytes with SI unit name includes. @return Value in bytes with SI unit name. @see #addUnits(String)
[ "Return", "the", "value", "in", "bytes", "with", "SI", "unit", "name", "includes", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/ByteIntervalProperty.java#L26-L37
102,435
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/ByteIntervalProperty.java
ByteIntervalProperty.addUnits
public String addUnits( String value ) { StringBuffer buff = new StringBuffer(100); long bytes = Long.parseLong(value); if( bytes < 1000000 ) { buff.append(value); buff.append("B"); } else { int unit = 1000; int exp = (int) (Math.log(bytes) / Math.log(unit)); String pre = "kMGTPE...
java
public String addUnits( String value ) { StringBuffer buff = new StringBuffer(100); long bytes = Long.parseLong(value); if( bytes < 1000000 ) { buff.append(value); buff.append("B"); } else { int unit = 1000; int exp = (int) (Math.log(bytes) / Math.log(unit)); String pre = "kMGTPE...
[ "public", "String", "addUnits", "(", "String", "value", ")", "{", "StringBuffer", "buff", "=", "new", "StringBuffer", "(", "100", ")", ";", "long", "bytes", "=", "Long", ".", "parseLong", "(", "value", ")", ";", "if", "(", "bytes", "<", "1000000", ")",...
Utility method to include the SI unit name. @param value The value of a Long in String form. @return Rounded value with appended SI units. For example, 45.3MB, 62B, 27.2GB, etc.
[ "Utility", "method", "to", "include", "the", "SI", "unit", "name", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/util/ByteIntervalProperty.java#L44-L67
102,436
javabeanz/owasp-security-logging
owasp-security-logging-common/src/main/java/org/owasp/security/logging/mdc/MDCFilter.java
MDCFilter.doFilter
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; // put values into MDC MDC.put(HOSTNAME, servletRequest.getServerName()); if (productName...
java
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; // put values into MDC MDC.put(HOSTNAME, servletRequest.getServerName()); if (productName...
[ "public", "void", "doFilter", "(", "ServletRequest", "servletRequest", ",", "ServletResponse", "servletResponse", ",", "FilterChain", "filterChain", ")", "throws", "IOException", ",", "ServletException", "{", "HttpServletRequest", "request", "=", "(", "HttpServletRequest"...
Sample filter that populates the MDC on every request. @param servletRequest The request to filter @param servletResponse The response to filter @param filterChain The filter chain for this context
[ "Sample", "filter", "that", "populates", "the", "MDC", "on", "every", "request", "." ]
060dcb1ab5f62aaea274597418ce41c8433a6c10
https://github.com/javabeanz/owasp-security-logging/blob/060dcb1ab5f62aaea274597418ce41c8433a6c10/owasp-security-logging-common/src/main/java/org/owasp/security/logging/mdc/MDCFilter.java#L90-L112
102,437
Alexey1Gavrilov/ExpectIt
expectit-core/src/main/java/net/sf/expectit/matcher/MultiMatcher.java
MultiMatcher.findResultWithMaxEnd
private static Result findResultWithMaxEnd(List<Result> successResults) { return Collections.max( successResults, new Comparator<Result>() { @Override public int compare(Result o1, Result o2) { return Integer.valueOf(o1.end()).compa...
java
private static Result findResultWithMaxEnd(List<Result> successResults) { return Collections.max( successResults, new Comparator<Result>() { @Override public int compare(Result o1, Result o2) { return Integer.valueOf(o1.end()).compa...
[ "private", "static", "Result", "findResultWithMaxEnd", "(", "List", "<", "Result", ">", "successResults", ")", "{", "return", "Collections", ".", "max", "(", "successResults", ",", "new", "Comparator", "<", "Result", ">", "(", ")", "{", "@", "Override", "pub...
Find the result with the maximum end position and use it as delegate.
[ "Find", "the", "result", "with", "the", "maximum", "end", "position", "and", "use", "it", "as", "delegate", "." ]
5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/matcher/MultiMatcher.java#L86-L94
102,438
Alexey1Gavrilov/ExpectIt
expectit-core/src/main/java/net/sf/expectit/matcher/Matchers.java
Matchers.sequence
public static Matcher<MultiResult> sequence(final Matcher<?>... matchers) { checkNotEmpty(matchers); return new Matcher<MultiResult>() { @Override public MultiResult matches(String input, boolean isEof) { int matchCount = 0; Result[] results = new ...
java
public static Matcher<MultiResult> sequence(final Matcher<?>... matchers) { checkNotEmpty(matchers); return new Matcher<MultiResult>() { @Override public MultiResult matches(String input, boolean isEof) { int matchCount = 0; Result[] results = new ...
[ "public", "static", "Matcher", "<", "MultiResult", ">", "sequence", "(", "final", "Matcher", "<", "?", ">", "...", "matchers", ")", "{", "checkNotEmpty", "(", "matchers", ")", ";", "return", "new", "Matcher", "<", "MultiResult", ">", "(", ")", "{", "@", ...
Matches the given matchers one by one. Every successful matches updates the internal buffer. The consequent match operation is performed after the previous match has succeeded. @param matchers the collection of matchers. @return the matcher.
[ "Matches", "the", "given", "matchers", "one", "by", "one", ".", "Every", "successful", "matches", "updates", "the", "internal", "buffer", ".", "The", "consequent", "match", "operation", "is", "performed", "after", "the", "previous", "match", "has", "succeeded", ...
5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/matcher/Matchers.java#L247-L285
102,439
Alexey1Gavrilov/ExpectIt
expectit-core/src/main/java/net/sf/expectit/ExpectBuilder.java
ExpectBuilder.withTimeout
public final ExpectBuilder withTimeout(long duration, TimeUnit unit) { validateDuration(duration); this.timeout = unit.toMillis(duration); return this; }
java
public final ExpectBuilder withTimeout(long duration, TimeUnit unit) { validateDuration(duration); this.timeout = unit.toMillis(duration); return this; }
[ "public", "final", "ExpectBuilder", "withTimeout", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "validateDuration", "(", "duration", ")", ";", "this", ".", "timeout", "=", "unit", ".", "toMillis", "(", "duration", ")", ";", "return", "this", ...
Sets the default timeout in the given unit for expect operations. Optional, the default value is 30 seconds. @param duration the timeout value @param unit the time unit @return this @throws java.lang.IllegalArgumentException if the timeout {@code <= 0}
[ "Sets", "the", "default", "timeout", "in", "the", "given", "unit", "for", "expect", "operations", ".", "Optional", "the", "default", "value", "is", "30", "seconds", "." ]
5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/ExpectBuilder.java#L104-L108
102,440
Alexey1Gavrilov/ExpectIt
expectit-ant/src/main/java/net/sf/expectit/ant/ExpectSupportImpl.java
ExpectSupportImpl.setInput
public void setInput(int index, InputStream is) { if (index >= inputStreams.length) { inputStreams = Arrays.copyOf(inputStreams, index + 1); } this.inputStreams[index] = is; }
java
public void setInput(int index, InputStream is) { if (index >= inputStreams.length) { inputStreams = Arrays.copyOf(inputStreams, index + 1); } this.inputStreams[index] = is; }
[ "public", "void", "setInput", "(", "int", "index", ",", "InputStream", "is", ")", "{", "if", "(", "index", ">=", "inputStreams", ".", "length", ")", "{", "inputStreams", "=", "Arrays", ".", "copyOf", "(", "inputStreams", ",", "index", "+", "1", ")", ";...
Sets the input streams for the expect instance. @param index the number of the input stream @param is the input stream @see net.sf.expectit.ExpectBuilder#withInputs(java.io.InputStream...)
[ "Sets", "the", "input", "streams", "for", "the", "expect", "instance", "." ]
5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-ant/src/main/java/net/sf/expectit/ant/ExpectSupportImpl.java#L144-L149
102,441
Alexey1Gavrilov/ExpectIt
expectit-ant/src/main/java/net/sf/expectit/ant/filter/FiltersElement.java
FiltersElement.toFilter
public Filter toFilter() { Filter[] result = new Filter[filters.size()]; for (int i = 0; i < result.length; i++) { result[i] = filters.get(i).createFilter(); } return chain(result); }
java
public Filter toFilter() { Filter[] result = new Filter[filters.size()]; for (int i = 0; i < result.length; i++) { result[i] = filters.get(i).createFilter(); } return chain(result); }
[ "public", "Filter", "toFilter", "(", ")", "{", "Filter", "[", "]", "result", "=", "new", "Filter", "[", "filters", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "result", ".", "length", ";", "i", "++", ")", ...
Creates a filter from the list of the children filter elements. @return the filter instance
[ "Creates", "a", "filter", "from", "the", "list", "of", "the", "children", "filter", "elements", "." ]
5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-ant/src/main/java/net/sf/expectit/ant/filter/FiltersElement.java#L50-L56
102,442
Alexey1Gavrilov/ExpectIt
expectit-ant/src/main/java/net/sf/expectit/ant/matcher/AbstractMultiMatcherElement.java
AbstractMultiMatcherElement.getMatchers
protected Matcher<?>[] getMatchers() { Matcher<?>[] matchers = new Matcher<?>[tasks.size()]; for (int i = 0; i < matchers.length; i++) { matchers[i] = tasks.get(i).createMatcher(); } return matchers; }
java
protected Matcher<?>[] getMatchers() { Matcher<?>[] matchers = new Matcher<?>[tasks.size()]; for (int i = 0; i < matchers.length; i++) { matchers[i] = tasks.get(i).createMatcher(); } return matchers; }
[ "protected", "Matcher", "<", "?", ">", "[", "]", "getMatchers", "(", ")", "{", "Matcher", "<", "?", ">", "[", "]", "matchers", "=", "new", "Matcher", "<", "?", ">", "[", "tasks", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "...
Creates and return all the children matchers. @return matcher array
[ "Creates", "and", "return", "all", "the", "children", "matchers", "." ]
5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-ant/src/main/java/net/sf/expectit/ant/matcher/AbstractMultiMatcherElement.java#L71-L77
102,443
Alexey1Gavrilov/ExpectIt
expectit-core/src/main/java/net/sf/expectit/matcher/SimpleResult.java
SimpleResult.failure
public static Result failure(String input, boolean canStopMatching) { return new SimpleResult(false, input, null, null, canStopMatching); }
java
public static Result failure(String input, boolean canStopMatching) { return new SimpleResult(false, input, null, null, canStopMatching); }
[ "public", "static", "Result", "failure", "(", "String", "input", ",", "boolean", "canStopMatching", ")", "{", "return", "new", "SimpleResult", "(", "false", ",", "input", ",", "null", ",", "null", ",", "canStopMatching", ")", ";", "}" ]
Creates an instance of an unsuccessful match. @param input the input string. @param canStopMatching indicates whether matching operation can be stopped. @return the result object.
[ "Creates", "an", "instance", "of", "an", "unsuccessful", "match", "." ]
5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/matcher/SimpleResult.java#L146-L148
102,444
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/preferences/PreferencesService.java
PreferencesService.savePreferences
@Destroy(priority = AutumnActionPriority.MIN_PRIORITY) public void savePreferences() { final ObjectSet<Preferences> preferencesToFlush = GdxSets.newSet(); for (final Entry<String, Preference<?>> preference : preferences) { final Preferences preferencesFile = namesToFiles.get(preference.k...
java
@Destroy(priority = AutumnActionPriority.MIN_PRIORITY) public void savePreferences() { final ObjectSet<Preferences> preferencesToFlush = GdxSets.newSet(); for (final Entry<String, Preference<?>> preference : preferences) { final Preferences preferencesFile = namesToFiles.get(preference.k...
[ "@", "Destroy", "(", "priority", "=", "AutumnActionPriority", ".", "MIN_PRIORITY", ")", "public", "void", "savePreferences", "(", ")", "{", "final", "ObjectSet", "<", "Preferences", ">", "preferencesToFlush", "=", "GdxSets", ".", "newSet", "(", ")", ";", "for"...
Saves all current preferences. This is a reasonably heavy operation, as it flushes all preferences files - by default, this is done once, before the application is closed.
[ "Saves", "all", "current", "preferences", ".", "This", "is", "a", "reasonably", "heavy", "operation", "as", "it", "flushes", "all", "preferences", "files", "-", "by", "default", "this", "is", "done", "once", "before", "the", "application", "is", "closed", "....
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/preferences/PreferencesService.java#L148-L159
102,445
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/asset/Disposables.java
Disposables.gracefullyDisposeOf
public static void gracefullyDisposeOf(final Disposable disposable) { try { if (disposable != null) { disposable.dispose(); } } catch (final Throwable exception) { Gdx.app.error("WARN", "Unable to dispose: " + disposable + ". Ignored.", exception); ...
java
public static void gracefullyDisposeOf(final Disposable disposable) { try { if (disposable != null) { disposable.dispose(); } } catch (final Throwable exception) { Gdx.app.error("WARN", "Unable to dispose: " + disposable + ". Ignored.", exception); ...
[ "public", "static", "void", "gracefullyDisposeOf", "(", "final", "Disposable", "disposable", ")", "{", "try", "{", "if", "(", "disposable", "!=", "null", ")", "{", "disposable", ".", "dispose", "(", ")", ";", "}", "}", "catch", "(", "final", "Throwable", ...
Performs null check and disposes of an asset. Ignores exceptions. @param disposable will be disposed of (if it exists).
[ "Performs", "null", "check", "and", "disposes", "of", "an", "asset", ".", "Ignores", "exceptions", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/asset/Disposables.java#L73-L81
102,446
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java
Dtd.saveSchema
public static void saveSchema(final LmlParser parser, final Appendable appendable) { try { new Dtd().getDtdSchema(parser, appendable); } catch (final IOException exception) { throw new GdxRuntimeException("Unable to append to file.", exception); } }
java
public static void saveSchema(final LmlParser parser, final Appendable appendable) { try { new Dtd().getDtdSchema(parser, appendable); } catch (final IOException exception) { throw new GdxRuntimeException("Unable to append to file.", exception); } }
[ "public", "static", "void", "saveSchema", "(", "final", "LmlParser", "parser", ",", "final", "Appendable", "appendable", ")", "{", "try", "{", "new", "Dtd", "(", ")", ".", "getDtdSchema", "(", "parser", ",", "appendable", ")", ";", "}", "catch", "(", "fi...
Saves DTD schema file containing all possible tags and their attributes. Any problems with the generation will be logged. This is a relatively heavy operation and should be done only during development. @param parser contains parsing data. Used to create mock-up actors. The skin MUST be fully loaded and contain all us...
[ "Saves", "DTD", "schema", "file", "containing", "all", "possible", "tags", "and", "their", "attributes", ".", "Any", "problems", "with", "the", "generation", "will", "be", "logged", ".", "This", "is", "a", "relatively", "heavy", "operation", "and", "should", ...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java#L54-L60
102,447
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java
Dtd.saveMinifiedSchema
public static void saveMinifiedSchema(final LmlParser parser, final Appendable appendable) { try { new Dtd().setAppendComments(false).getDtdSchema(parser, appendable); } catch (final IOException exception) { throw new GdxRuntimeException("Unable to append to file.", exception); ...
java
public static void saveMinifiedSchema(final LmlParser parser, final Appendable appendable) { try { new Dtd().setAppendComments(false).getDtdSchema(parser, appendable); } catch (final IOException exception) { throw new GdxRuntimeException("Unable to append to file.", exception); ...
[ "public", "static", "void", "saveMinifiedSchema", "(", "final", "LmlParser", "parser", ",", "final", "Appendable", "appendable", ")", "{", "try", "{", "new", "Dtd", "(", ")", ".", "setAppendComments", "(", "false", ")", ".", "getDtdSchema", "(", "parser", ",...
Saves DTD schema file containing all possible tags and their attributes. Any problems with the generation will be logged. This is a relatively heavy operation and should be done only during development. Comments will not be appended, which will reduce the size of DTD file. @param parser contains parsing data. Used to ...
[ "Saves", "DTD", "schema", "file", "containing", "all", "possible", "tags", "and", "their", "attributes", ".", "Any", "problems", "with", "the", "generation", "will", "be", "logged", ".", "This", "is", "a", "relatively", "heavy", "operation", "and", "should", ...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java#L71-L77
102,448
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java
Dtd.getDtdSchema
public void getDtdSchema(final LmlParser parser, final Appendable builder) throws IOException { appendActorTags(builder, parser); appendActorAttributes(parser, builder); appendMacroTags(builder, parser); appendMacroAttributes(parser, builder); }
java
public void getDtdSchema(final LmlParser parser, final Appendable builder) throws IOException { appendActorTags(builder, parser); appendActorAttributes(parser, builder); appendMacroTags(builder, parser); appendMacroAttributes(parser, builder); }
[ "public", "void", "getDtdSchema", "(", "final", "LmlParser", "parser", ",", "final", "Appendable", "builder", ")", "throws", "IOException", "{", "appendActorTags", "(", "builder", ",", "parser", ")", ";", "appendActorAttributes", "(", "parser", ",", "builder", "...
Creates DTD schema file containing all possible tags and their attributes. Any problems with the generation will be logged. This is a relatively heavy operation and should be done only during development. @param parser contains parsing data. Used to create mock-up actors. The skin MUST be fully loaded and contain all ...
[ "Creates", "DTD", "schema", "file", "containing", "all", "possible", "tags", "and", "their", "attributes", ".", "Any", "problems", "with", "the", "generation", "will", "be", "logged", ".", "This", "is", "a", "relatively", "heavy", "operation", "and", "should",...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java#L108-L113
102,449
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/controller/impl/AnnotatedViewDialogController.java
AnnotatedViewDialogController.prepareDialogInstance
public void prepareDialogInstance() { final LmlParser parser = interfaceService.getParser(); if (actionContainer != null) { parser.getData().addActionContainer(getId(), actionContainer); } dialog = (Window) parser.createView(wrappedObject, Gdx.files.internal(dialogData.value(...
java
public void prepareDialogInstance() { final LmlParser parser = interfaceService.getParser(); if (actionContainer != null) { parser.getData().addActionContainer(getId(), actionContainer); } dialog = (Window) parser.createView(wrappedObject, Gdx.files.internal(dialogData.value(...
[ "public", "void", "prepareDialogInstance", "(", ")", "{", "final", "LmlParser", "parser", "=", "interfaceService", ".", "getParser", "(", ")", ";", "if", "(", "actionContainer", "!=", "null", ")", "{", "parser", ".", "getData", "(", ")", ".", "addActionConta...
Creates instance of the managed dialog actor.
[ "Creates", "instance", "of", "the", "managed", "dialog", "actor", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/controller/impl/AnnotatedViewDialogController.java#L84-L93
102,450
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/i18n/LocaleService.java
LocaleService.saveLocaleInPreferences
public void saveLocaleInPreferences(final String preferencesPath, final String preferenceName) { if (Strings.isEmpty(preferencesPath) || Strings.isEmpty(preferenceName)) { throw new GdxRuntimeException( "Preference path and name cannot be empty! These are set automatically if you...
java
public void saveLocaleInPreferences(final String preferencesPath, final String preferenceName) { if (Strings.isEmpty(preferencesPath) || Strings.isEmpty(preferenceName)) { throw new GdxRuntimeException( "Preference path and name cannot be empty! These are set automatically if you...
[ "public", "void", "saveLocaleInPreferences", "(", "final", "String", "preferencesPath", ",", "final", "String", "preferenceName", ")", "{", "if", "(", "Strings", ".", "isEmpty", "(", "preferencesPath", ")", "||", "Strings", ".", "isEmpty", "(", "preferenceName", ...
Saves current locale in the selected preferences. @param preferencesPath used to retrieve preferences with {@link com.github.czyzby.kiwi.util.gdx.preference.ApplicationPreferences#getPreferences(String)} method. @param preferenceName name of the locale setting in the preferences.
[ "Saves", "current", "locale", "in", "the", "selected", "preferences", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/i18n/LocaleService.java#L178-L186
102,451
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/asset/AssetService.java
AssetService.load
public <Type> void load(final String assetPath, final Class<Type> assetClass, final AssetLoaderParameters<Type> loadingParameters) { if (isAssetNotScheduled(assetPath)) { assetManager.load(assetPath, assetClass, loadingParameters); } }
java
public <Type> void load(final String assetPath, final Class<Type> assetClass, final AssetLoaderParameters<Type> loadingParameters) { if (isAssetNotScheduled(assetPath)) { assetManager.load(assetPath, assetClass, loadingParameters); } }
[ "public", "<", "Type", ">", "void", "load", "(", "final", "String", "assetPath", ",", "final", "Class", "<", "Type", ">", "assetClass", ",", "final", "AssetLoaderParameters", "<", "Type", ">", "loadingParameters", ")", "{", "if", "(", "isAssetNotScheduled", ...
Schedules loading of the selected asset, if it was not scheduled already. @param assetPath assetPath internal path to the asset. @param assetClass assetClass class of the asset. @param loadingParameters specific loading parameters. @param <Type> type of asset class to load.
[ "Schedules", "loading", "of", "the", "selected", "asset", "if", "it", "was", "not", "scheduled", "already", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/asset/AssetService.java#L98-L103
102,452
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/asset/AssetService.java
AssetService.unload
public void unload(final String assetPath) { if (assetManager.isLoaded(assetPath) || scheduledAssets.contains(assetPath)) { assetManager.unload(assetPath); } else if (eagerAssetManager.isLoaded(assetPath)) { eagerAssetManager.unload(assetPath); } }
java
public void unload(final String assetPath) { if (assetManager.isLoaded(assetPath) || scheduledAssets.contains(assetPath)) { assetManager.unload(assetPath); } else if (eagerAssetManager.isLoaded(assetPath)) { eagerAssetManager.unload(assetPath); } }
[ "public", "void", "unload", "(", "final", "String", "assetPath", ")", "{", "if", "(", "assetManager", ".", "isLoaded", "(", "assetPath", ")", "||", "scheduledAssets", ".", "contains", "(", "assetPath", ")", ")", "{", "assetManager", ".", "unload", "(", "as...
Schedules disposing of the selected asset. @param assetPath internal path to the asset.
[ "Schedules", "disposing", "of", "the", "selected", "asset", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/asset/AssetService.java#L118-L124
102,453
czyzby/gdx-lml
lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java
VisLmlSyntax.overrideTableExtractors
protected void overrideTableExtractors() { StandardTableTarget.MAIN.setTableExtractor(new TableExtractor() { @Override public Table extract(final Table table) { if (table instanceof Dialog) { return ((Dialog) table).getContentTable(); }...
java
protected void overrideTableExtractors() { StandardTableTarget.MAIN.setTableExtractor(new TableExtractor() { @Override public Table extract(final Table table) { if (table instanceof Dialog) { return ((Dialog) table).getContentTable(); }...
[ "protected", "void", "overrideTableExtractors", "(", ")", "{", "StandardTableTarget", ".", "MAIN", ".", "setTableExtractor", "(", "new", "TableExtractor", "(", ")", "{", "@", "Override", "public", "Table", "extract", "(", "final", "Table", "table", ")", "{", "...
Since some multi-table Vis widgets do not extend standard Scene2D widgets, table extractors from multi-table actors need to be changed.
[ "Since", "some", "multi", "-", "table", "Vis", "widgets", "do", "not", "extend", "standard", "Scene2D", "widgets", "table", "extractors", "from", "multi", "-", "table", "actors", "need", "to", "be", "changed", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java#L169-L192
102,454
czyzby/gdx-lml
lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java
VisLmlSyntax.registerVisAttributes
protected void registerVisAttributes() { registerCollapsibleWidgetAttributes(); registerColorPickerAttributes(); registerDraggableAttributes(); registerDragPaneAttributes(); registerFloatingGroupAttributes(); registerFlowGroupsAttributes(); registerGridGroupAttrib...
java
protected void registerVisAttributes() { registerCollapsibleWidgetAttributes(); registerColorPickerAttributes(); registerDraggableAttributes(); registerDragPaneAttributes(); registerFloatingGroupAttributes(); registerFlowGroupsAttributes(); registerGridGroupAttrib...
[ "protected", "void", "registerVisAttributes", "(", ")", "{", "registerCollapsibleWidgetAttributes", "(", ")", ";", "registerColorPickerAttributes", "(", ")", ";", "registerDraggableAttributes", "(", ")", ";", "registerDragPaneAttributes", "(", ")", ";", "registerFloatingG...
Registers attributes of VisUI-specific actors.
[ "Registers", "attributes", "of", "VisUI", "-", "specific", "actors", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java#L290-L305
102,455
czyzby/gdx-lml
lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java
VisLmlSyntax.registerColorPickerAttributes
protected void registerColorPickerAttributes() { addAttributeProcessor(new CloseAfterPickingLmlAttribute(), "closeAfterPickingFinished", "closeAfter"); addAttributeProcessor(new ColorPickerListenerLmlAttribute(), "listener"); addAttributeProcessor(new ColorPickerResponsiveListenerLmlAttribute(),...
java
protected void registerColorPickerAttributes() { addAttributeProcessor(new CloseAfterPickingLmlAttribute(), "closeAfterPickingFinished", "closeAfter"); addAttributeProcessor(new ColorPickerListenerLmlAttribute(), "listener"); addAttributeProcessor(new ColorPickerResponsiveListenerLmlAttribute(),...
[ "protected", "void", "registerColorPickerAttributes", "(", ")", "{", "addAttributeProcessor", "(", "new", "CloseAfterPickingLmlAttribute", "(", ")", ",", "\"closeAfterPickingFinished\"", ",", "\"closeAfter\"", ")", ";", "addAttributeProcessor", "(", "new", "ColorPickerListe...
ColorPicker attributes.
[ "ColorPicker", "attributes", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java#L437-L445
102,456
czyzby/gdx-lml
lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java
VisLmlSyntax.registerDraggableAttributes
protected void registerDraggableAttributes() { addAttributeProcessor(new BlockInputLmlAttribute(), "blockInput"); addAttributeProcessor(new DeadzoneRadiusLmlAttribute(), "deadzone", "deadzoneRadius"); addAttributeProcessor(new DraggedAlphaLmlAttribute(), "alpha"); addAttributeProcessor(n...
java
protected void registerDraggableAttributes() { addAttributeProcessor(new BlockInputLmlAttribute(), "blockInput"); addAttributeProcessor(new DeadzoneRadiusLmlAttribute(), "deadzone", "deadzoneRadius"); addAttributeProcessor(new DraggedAlphaLmlAttribute(), "alpha"); addAttributeProcessor(n...
[ "protected", "void", "registerDraggableAttributes", "(", ")", "{", "addAttributeProcessor", "(", "new", "BlockInputLmlAttribute", "(", ")", ",", "\"blockInput\"", ")", ";", "addAttributeProcessor", "(", "new", "DeadzoneRadiusLmlAttribute", "(", ")", ",", "\"deadzone\"",...
Draggable listener attributes.
[ "Draggable", "listener", "attributes", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java#L448-L459
102,457
czyzby/gdx-lml
lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java
VisLmlSyntax.registerGridGroupAttributes
protected void registerGridGroupAttributes() { addAttributeProcessor(new GridSpacingLmlAttribute(), "spacing"); addAttributeProcessor(new ItemHeightLmlAttribute(), "itemHeight"); addAttributeProcessor(new ItemSizeLmlAttribute(), "itemSize"); addAttributeProcessor(new ItemWidthLmlAttribut...
java
protected void registerGridGroupAttributes() { addAttributeProcessor(new GridSpacingLmlAttribute(), "spacing"); addAttributeProcessor(new ItemHeightLmlAttribute(), "itemHeight"); addAttributeProcessor(new ItemSizeLmlAttribute(), "itemSize"); addAttributeProcessor(new ItemWidthLmlAttribut...
[ "protected", "void", "registerGridGroupAttributes", "(", ")", "{", "addAttributeProcessor", "(", "new", "GridSpacingLmlAttribute", "(", ")", ",", "\"spacing\"", ")", ";", "addAttributeProcessor", "(", "new", "ItemHeightLmlAttribute", "(", ")", ",", "\"itemHeight\"", "...
GridGroup attributes.
[ "GridGroup", "attributes", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java#L483-L491
102,458
czyzby/gdx-lml
lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java
VisLmlSyntax.registerSpinnerAttributes
protected void registerSpinnerAttributes() { addAttributeProcessor(new SpinnerArrayLmlAttribute(), "items"); addAttributeProcessor(new SpinnerDisabledLmlAttribute(), "disabled", "inputDisabled"); addAttributeProcessor(new SpinnerNameLmlAttribute(), "selectorName", "text"); addAttributePr...
java
protected void registerSpinnerAttributes() { addAttributeProcessor(new SpinnerArrayLmlAttribute(), "items"); addAttributeProcessor(new SpinnerDisabledLmlAttribute(), "disabled", "inputDisabled"); addAttributeProcessor(new SpinnerNameLmlAttribute(), "selectorName", "text"); addAttributePr...
[ "protected", "void", "registerSpinnerAttributes", "(", ")", "{", "addAttributeProcessor", "(", "new", "SpinnerArrayLmlAttribute", "(", ")", ",", "\"items\"", ")", ";", "addAttributeProcessor", "(", "new", "SpinnerDisabledLmlAttribute", "(", ")", ",", "\"disabled\"", "...
Spinner attributes.
[ "Spinner", "attributes", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java#L519-L528
102,459
czyzby/gdx-lml
lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java
VisLmlSyntax.registerValidatorAttributes
protected void registerValidatorAttributes() { // CustomValidator: addAttributeProcessor(new CustomValidatorLmlAttribute(), "validator", "validate", "method", "action", "check"); // FormInputValidator: addAttributeProcessor(new ErrorMessageLmlAttribute(), "error", "errorMsg", "errorMessa...
java
protected void registerValidatorAttributes() { // CustomValidator: addAttributeProcessor(new CustomValidatorLmlAttribute(), "validator", "validate", "method", "action", "check"); // FormInputValidator: addAttributeProcessor(new ErrorMessageLmlAttribute(), "error", "errorMsg", "errorMessa...
[ "protected", "void", "registerValidatorAttributes", "(", ")", "{", "// CustomValidator:", "addAttributeProcessor", "(", "new", "CustomValidatorLmlAttribute", "(", ")", ",", "\"validator\"", ",", "\"validate\"", ",", "\"method\"", ",", "\"action\"", ",", "\"check\"", ")"...
InputValidator implementations' attributes.
[ "InputValidator", "implementations", "attributes", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-vis/src/main/java/com/github/czyzby/lml/vis/parser/impl/VisLmlSyntax.java#L562-L587
102,460
czyzby/gdx-lml
examples/gdx-autumn-mvc-simple/core/src/com/github/czyzby/config/Configuration.java
Configuration.initiateSkin
@Initiate(priority = AutumnActionPriority.TOP_PRIORITY) public void initiateSkin(final SkinService skinService) { // Loading default VisUI skin with double scale: VisUI.load(VisUI.SkinScale.X2); // Registering VisUI skin with "default" name - skin with this ID will be used by default if no o...
java
@Initiate(priority = AutumnActionPriority.TOP_PRIORITY) public void initiateSkin(final SkinService skinService) { // Loading default VisUI skin with double scale: VisUI.load(VisUI.SkinScale.X2); // Registering VisUI skin with "default" name - skin with this ID will be used by default if no o...
[ "@", "Initiate", "(", "priority", "=", "AutumnActionPriority", ".", "TOP_PRIORITY", ")", "public", "void", "initiateSkin", "(", "final", "SkinService", "skinService", ")", "{", "// Loading default VisUI skin with double scale:", "VisUI", ".", "load", "(", "VisUI", "."...
This action will be invoked when the application is being initialized. Actions are sorted by their priority and invoked in descending order; by manipulating the priority values, you can fully control the flow of your application's initiation. @param skinService its instance will be injected into the method. We're usin...
[ "This", "action", "will", "be", "invoked", "when", "the", "application", "is", "being", "initialized", ".", "Actions", "are", "sorted", "by", "their", "priority", "and", "invoked", "in", "descending", "order", ";", "by", "manipulating", "the", "priority", "val...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/examples/gdx-autumn-mvc-simple/core/src/com/github/czyzby/config/Configuration.java#L75-L84
102,461
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/common/Strings.java
Strings.split
public static String[] split(final CharSequence charSequence, final char separator) { if (isEmpty(charSequence)) { return EMPTY_ARRAY; } final int originalSeparatorsCount = countSeparatedCharAppearances(charSequence, separator); int separatorsCount = originalSeparatorsCount; ...
java
public static String[] split(final CharSequence charSequence, final char separator) { if (isEmpty(charSequence)) { return EMPTY_ARRAY; } final int originalSeparatorsCount = countSeparatedCharAppearances(charSequence, separator); int separatorsCount = originalSeparatorsCount; ...
[ "public", "static", "String", "[", "]", "split", "(", "final", "CharSequence", "charSequence", ",", "final", "char", "separator", ")", "{", "if", "(", "isEmpty", "(", "charSequence", ")", ")", "{", "return", "EMPTY_ARRAY", ";", "}", "final", "int", "origin...
As opposed to string's split, this method allows to split a char sequence without a regex, provided that the separator is a single character. Since it does not require pattern compiling and is a simple iteration, this method should be always preferred when it can be used. @param charSequence will be split. Can be null...
[ "As", "opposed", "to", "string", "s", "split", "this", "method", "allows", "to", "split", "a", "char", "sequence", "without", "a", "regex", "provided", "that", "the", "separator", "is", "a", "single", "character", ".", "Since", "it", "does", "not", "requir...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/common/Strings.java#L439-L486
102,462
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/collection/GdxMaps.java
GdxMaps.putIfAbsent
public static <Key, Value> Value putIfAbsent(final ObjectMap<Key, Value> map, final Key key, final Value value) { if (!map.containsKey(key)) { map.put(key, value); return value; } return map.get(key); }
java
public static <Key, Value> Value putIfAbsent(final ObjectMap<Key, Value> map, final Key key, final Value value) { if (!map.containsKey(key)) { map.put(key, value); return value; } return map.get(key); }
[ "public", "static", "<", "Key", ",", "Value", ">", "Value", "putIfAbsent", "(", "final", "ObjectMap", "<", "Key", ",", "Value", ">", "map", ",", "final", "Key", "key", ",", "final", "Value", "value", ")", "{", "if", "(", "!", "map", ".", "containsKey...
Puts a value with the given key in the passed map, provided that the passed key isn't already present in the map. @param map may contain a value associated with the key. @param key map key. @param value map value to add. @return value associated with the key in the map (recently added or the previous one). @param <Key...
[ "Puts", "a", "value", "with", "the", "given", "key", "in", "the", "passed", "map", "provided", "that", "the", "passed", "key", "isn", "t", "already", "present", "in", "the", "map", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/collection/GdxMaps.java#L250-L256
102,463
czyzby/gdx-lml
autumn/src/main/java/com/github/czyzby/autumn/scanner/AbstractClassScanner.java
AbstractClassScanner.extractPackageName
protected String extractPackageName(final Class<?> root) { return root.getName().substring(0, root.getName().length() - root.getSimpleName().length() - 1); }
java
protected String extractPackageName(final Class<?> root) { return root.getName().substring(0, root.getName().length() - root.getSimpleName().length() - 1); }
[ "protected", "String", "extractPackageName", "(", "final", "Class", "<", "?", ">", "root", ")", "{", "return", "root", ".", "getName", "(", ")", ".", "substring", "(", "0", ",", "root", ".", "getName", "(", ")", ".", "length", "(", ")", "-", "root", ...
GWT-friendly method that extracts name of the package from class. @param root its package will be extracted. @return name of root's package.
[ "GWT", "-", "friendly", "method", "that", "extracts", "name", "of", "the", "package", "from", "class", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/autumn/src/main/java/com/github/czyzby/autumn/scanner/AbstractClassScanner.java#L16-L18
102,464
czyzby/gdx-lml
uedi/src/main/java/com/github/czyzby/uedi/scanner/nongwt/impl/AbstractClassScanner.java
AbstractClassScanner.getPackageName
protected String getPackageName(final Class<?> root) { return root.getName().substring(0, root.getName().length() - root.getSimpleName().length() - 1); }
java
protected String getPackageName(final Class<?> root) { return root.getName().substring(0, root.getName().length() - root.getSimpleName().length() - 1); }
[ "protected", "String", "getPackageName", "(", "final", "Class", "<", "?", ">", "root", ")", "{", "return", "root", ".", "getName", "(", ")", ".", "substring", "(", "0", ",", "root", ".", "getName", "(", ")", ".", "length", "(", ")", "-", "root", "....
GWT-friendly way of extracting package name. @param root scanning root. @return name of the package of the root class.
[ "GWT", "-", "friendly", "way", "of", "extracting", "package", "name", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/uedi/src/main/java/com/github/czyzby/uedi/scanner/nongwt/impl/AbstractClassScanner.java#L15-L17
102,465
czyzby/gdx-lml
websocket/natives/serialization/src/main/java/com/github/czyzby/websocket/serialization/impl/Serializer.java
Serializer.ensureCapacity
void ensureCapacity(final int bytesAmount) { if (currentByteArrayIndex + bytesAmount >= serializedData.length) { // +1 ensures proper behavior for 0 estimate. int newSerializedDataArrayLength = (serializedData.length + 1) * 2; while (currentByteArrayIndex + bytesAmount >= new...
java
void ensureCapacity(final int bytesAmount) { if (currentByteArrayIndex + bytesAmount >= serializedData.length) { // +1 ensures proper behavior for 0 estimate. int newSerializedDataArrayLength = (serializedData.length + 1) * 2; while (currentByteArrayIndex + bytesAmount >= new...
[ "void", "ensureCapacity", "(", "final", "int", "bytesAmount", ")", "{", "if", "(", "currentByteArrayIndex", "+", "bytesAmount", ">=", "serializedData", ".", "length", ")", "{", "// +1 ensures proper behavior for 0 estimate.", "int", "newSerializedDataArrayLength", "=", ...
Resizes original byte array if the object turns out to be bigger than expected. @param bytesAmount amount of bytes that needs to be added to the array.
[ "Resizes", "original", "byte", "array", "if", "the", "object", "turns", "out", "to", "be", "bigger", "than", "expected", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/websocket/natives/serialization/src/main/java/com/github/czyzby/websocket/serialization/impl/Serializer.java#L38-L50
102,466
czyzby/gdx-lml
websocket/natives/serialization/src/main/java/com/github/czyzby/websocket/serialization/impl/Serializer.java
Serializer.serialize
public byte[] serialize() { if (currentByteArrayIndex == 0) { return new byte[0]; } final byte[] extractedSerializedData = new byte[currentByteArrayIndex]; System.arraycopy(serializedData, 0, extractedSerializedData, 0, currentByteArrayIndex); return extractedSerializ...
java
public byte[] serialize() { if (currentByteArrayIndex == 0) { return new byte[0]; } final byte[] extractedSerializedData = new byte[currentByteArrayIndex]; System.arraycopy(serializedData, 0, extractedSerializedData, 0, currentByteArrayIndex); return extractedSerializ...
[ "public", "byte", "[", "]", "serialize", "(", ")", "{", "if", "(", "currentByteArrayIndex", "==", "0", ")", "{", "return", "new", "byte", "[", "0", "]", ";", "}", "final", "byte", "[", "]", "extractedSerializedData", "=", "new", "byte", "[", "currentBy...
Finishes serialization, returning the object as a byte array. @return serialized object as byte array.
[ "Finishes", "serialization", "returning", "the", "object", "as", "a", "byte", "array", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/websocket/natives/serialization/src/main/java/com/github/czyzby/websocket/serialization/impl/Serializer.java#L598-L605
102,467
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/util/LmlUtilities.java
LmlUtilities.processAttributes
public static <Type> void processAttributes(final Type widget, final LmlTag tag, final LmlParser parser, final ObjectSet<String> processedAttributes, final boolean throwExceptionIfAttributeUnknown) { if (GdxMaps.isEmpty(tag.getNamedAttributes())) { return; } final LmlSynt...
java
public static <Type> void processAttributes(final Type widget, final LmlTag tag, final LmlParser parser, final ObjectSet<String> processedAttributes, final boolean throwExceptionIfAttributeUnknown) { if (GdxMaps.isEmpty(tag.getNamedAttributes())) { return; } final LmlSynt...
[ "public", "static", "<", "Type", ">", "void", "processAttributes", "(", "final", "Type", "widget", ",", "final", "LmlTag", "tag", ",", "final", "LmlParser", "parser", ",", "final", "ObjectSet", "<", "String", ">", "processedAttributes", ",", "final", "boolean"...
Utility method that processes all named attributes of the selected type. @param widget widget (validator, actor - processed element) that will be used to process attributes. @param tag contains attributes. @param parser will be used to parse attributes. @param processedAttributes already processed attribute names. The...
[ "Utility", "method", "that", "processes", "all", "named", "attributes", "of", "the", "selected", "type", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/util/LmlUtilities.java#L431-L455
102,468
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/builder/FloatRangeLmlActorBuilder.java
FloatRangeLmlActorBuilder.validateRange
public void validateRange(final LmlParser parser) { if (min >= max || stepSize > max - min || value < min || value > max || stepSize <= 0f) { parser.throwError( "Range widget not properly constructed. Min value has to be lower than max and step size cannot be higher than the diff...
java
public void validateRange(final LmlParser parser) { if (min >= max || stepSize > max - min || value < min || value > max || stepSize <= 0f) { parser.throwError( "Range widget not properly constructed. Min value has to be lower than max and step size cannot be higher than the diff...
[ "public", "void", "validateRange", "(", "final", "LmlParser", "parser", ")", "{", "if", "(", "min", ">=", "max", "||", "stepSize", ">", "max", "-", "min", "||", "value", "<", "min", "||", "value", ">", "max", "||", "stepSize", "<=", "0f", ")", "{", ...
MUST be called before using range's numeric values. @param parser used to throw exception if range is invalid.
[ "MUST", "be", "called", "before", "using", "range", "s", "numeric", "values", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/builder/FloatRangeLmlActorBuilder.java#L17-L22
102,469
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.addViewActionContainer
public void addViewActionContainer(final String actionContainerId, final ActionContainer actionContainer) { parser.getData().addActionContainer(actionContainerId, actionContainer); }
java
public void addViewActionContainer(final String actionContainerId, final ActionContainer actionContainer) { parser.getData().addActionContainer(actionContainerId, actionContainer); }
[ "public", "void", "addViewActionContainer", "(", "final", "String", "actionContainerId", ",", "final", "ActionContainer", "actionContainer", ")", "{", "parser", ".", "getData", "(", ")", ".", "addActionContainer", "(", "actionContainerId", ",", "actionContainer", ")",...
Registers an action container globally for all views. @param actionContainerId ID of the action container as it appears in the views. @param actionContainer contains view actions.
[ "Registers", "an", "action", "container", "globally", "for", "all", "views", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L134-L136
102,470
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.addViewAction
public void addViewAction(final String actionId, final ActorConsumer<?, ?> action) { parser.getData().addActorConsumer(actionId, action); }
java
public void addViewAction(final String actionId, final ActorConsumer<?, ?> action) { parser.getData().addActorConsumer(actionId, action); }
[ "public", "void", "addViewAction", "(", "final", "String", "actionId", ",", "final", "ActorConsumer", "<", "?", ",", "?", ">", "action", ")", "{", "parser", ".", "getData", "(", ")", ".", "addActorConsumer", "(", "actionId", ",", "action", ")", ";", "}" ...
Registers an action globally for all views. @param actionId ID of the action. @param action will be available in views with the selected ID.
[ "Registers", "an", "action", "globally", "for", "all", "views", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L142-L144
102,471
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.registerController
public void registerController(final Class<?> mappedControllerClass, final ViewController controller) { controllers.put(mappedControllerClass, controller); if (Strings.isNotEmpty(controller.getViewId())) { parser.getData().addActorConsumer(SCREEN_TRANSITION_ACTION_PREFIX + controller.getView...
java
public void registerController(final Class<?> mappedControllerClass, final ViewController controller) { controllers.put(mappedControllerClass, controller); if (Strings.isNotEmpty(controller.getViewId())) { parser.getData().addActorConsumer(SCREEN_TRANSITION_ACTION_PREFIX + controller.getView...
[ "public", "void", "registerController", "(", "final", "Class", "<", "?", ">", "mappedControllerClass", ",", "final", "ViewController", "controller", ")", "{", "controllers", ".", "put", "(", "mappedControllerClass", ",", "controller", ")", ";", "if", "(", "Strin...
Allows to manually register a managed controller. For internal use mostly. @param mappedControllerClass class with which the controller is accessible. This does not have to be controller's actual class. @param controller controller implementation, managing a single view.
[ "Allows", "to", "manually", "register", "a", "managed", "controller", ".", "For", "internal", "use", "mostly", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L174-L180
102,472
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.showDialog
public void showDialog(final Class<?> dialogControllerClass) { if (currentController != null) { dialogControllers.get(dialogControllerClass).show(currentController.getStage()); } }
java
public void showDialog(final Class<?> dialogControllerClass) { if (currentController != null) { dialogControllers.get(dialogControllerClass).show(currentController.getStage()); } }
[ "public", "void", "showDialog", "(", "final", "Class", "<", "?", ">", "dialogControllerClass", ")", "{", "if", "(", "currentController", "!=", "null", ")", "{", "dialogControllers", ".", "get", "(", "dialogControllerClass", ")", ".", "show", "(", "currentContr...
Allows to show a globally registered dialog. @param dialogControllerClass class managing a single dialog.
[ "Allows", "to", "show", "a", "globally", "registered", "dialog", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L314-L318
102,473
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.initiateAllControllers
public void initiateAllControllers() { for (final ViewController controller : controllers.values()) { initiateView(controller); } for (final ViewDialogController controller : dialogControllers.values()) { if (controller instanceof AnnotatedViewDialogController) { ...
java
public void initiateAllControllers() { for (final ViewController controller : controllers.values()) { initiateView(controller); } for (final ViewDialogController controller : dialogControllers.values()) { if (controller instanceof AnnotatedViewDialogController) { ...
[ "public", "void", "initiateAllControllers", "(", ")", "{", "for", "(", "final", "ViewController", "controller", ":", "controllers", ".", "values", "(", ")", ")", "{", "initiateView", "(", "controller", ")", ";", "}", "for", "(", "final", "ViewDialogController"...
Forces eager initiation of all views managed by registered controllers. Initiates dialogs that cache and reuse their dialog actor instance.
[ "Forces", "eager", "initiation", "of", "all", "views", "managed", "by", "registered", "controllers", ".", "Initiates", "dialogs", "that", "cache", "and", "reuse", "their", "dialog", "actor", "instance", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L332-L344
102,474
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.reload
public void reload() { currentController .hide(Actions.sequence(hidingActionProvider.provideAction(currentController, currentController), Actions.run(CommonActionRunnables.getActionPosterRunnable(getViewReloadingRunnable())))); }
java
public void reload() { currentController .hide(Actions.sequence(hidingActionProvider.provideAction(currentController, currentController), Actions.run(CommonActionRunnables.getActionPosterRunnable(getViewReloadingRunnable())))); }
[ "public", "void", "reload", "(", ")", "{", "currentController", ".", "hide", "(", "Actions", ".", "sequence", "(", "hidingActionProvider", ".", "provideAction", "(", "currentController", ",", "currentController", ")", ",", "Actions", ".", "run", "(", "CommonActi...
Hides current view, destroys all screens and shows the recreated current view. Note that it won't recreate all views that were previously initiated, as views are constructed on demand. @see #initiateAllControllers()
[ "Hides", "current", "view", "destroys", "all", "screens", "and", "shows", "the", "recreated", "current", "view", ".", "Note", "that", "it", "won", "t", "recreate", "all", "views", "that", "were", "previously", "initiated", "as", "views", "are", "constructed", ...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L382-L386
102,475
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.resize
public void resize(final int width, final int height) { if (currentController != null) { currentController.resize(width, height); } messageDispatcher.postMessage(AutumnMessage.GAME_RESIZED); }
java
public void resize(final int width, final int height) { if (currentController != null) { currentController.resize(width, height); } messageDispatcher.postMessage(AutumnMessage.GAME_RESIZED); }
[ "public", "void", "resize", "(", "final", "int", "width", ",", "final", "int", "height", ")", "{", "if", "(", "currentController", "!=", "null", ")", "{", "currentController", ".", "resize", "(", "width", ",", "height", ")", ";", "}", "messageDispatcher", ...
Resizes the current view, if present. @param width new width of the screen. @param height new height of the screen.
[ "Resizes", "the", "current", "view", "if", "present", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L487-L492
102,476
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/collection/lazy/LazyObjectMap.java
LazyObjectMap.get
@Override @Deprecated public Value get(final Key key, final Value defaultValue) { return super.get(key, defaultValue); }
java
@Override @Deprecated public Value get(final Key key, final Value defaultValue) { return super.get(key, defaultValue); }
[ "@", "Override", "@", "Deprecated", "public", "Value", "get", "(", "final", "Key", "key", ",", "final", "Value", "defaultValue", ")", "{", "return", "super", ".", "get", "(", "key", ",", "defaultValue", ")", ";", "}" ]
LazyObjectMap initiates values on access. No need for default values, as nulls are impossible as long as the provided is correctly implemented and nulls are not put into the map. @param key selected key. @param defaultValue returned if no value is set for the key.
[ "LazyObjectMap", "initiates", "values", "on", "access", ".", "No", "need", "for", "default", "values", "as", "nulls", "are", "impossible", "as", "long", "as", "the", "provided", "is", "correctly", "implemented", "and", "nulls", "are", "not", "put", "into", "...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/collection/lazy/LazyObjectMap.java#L165-L169
102,477
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java
MusicService.setMusicVolumeFromPreferences
public void setMusicVolumeFromPreferences(final String preferences, final String preferenceName, final float defaultValue) { musicPreferences = preferences; musicVolumePreferenceName = preferenceName; setMusicVolume(readFromPreferences(preferences, preferenceName, defaultValue)); ...
java
public void setMusicVolumeFromPreferences(final String preferences, final String preferenceName, final float defaultValue) { musicPreferences = preferences; musicVolumePreferenceName = preferenceName; setMusicVolume(readFromPreferences(preferences, preferenceName, defaultValue)); ...
[ "public", "void", "setMusicVolumeFromPreferences", "(", "final", "String", "preferences", ",", "final", "String", "preferenceName", ",", "final", "float", "defaultValue", ")", "{", "musicPreferences", "=", "preferences", ";", "musicVolumePreferenceName", "=", "preferenc...
Sets the current music volume according to the values stored in preferences. Mostly for internal use. @param preferences path to the preferences. Will be set as global music preferences path. @param preferenceName name of the volume preference. @param defaultValue used if preference is not set.
[ "Sets", "the", "current", "music", "volume", "according", "to", "the", "values", "stored", "in", "preferences", ".", "Mostly", "for", "internal", "use", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java#L134-L139
102,478
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java
MusicService.setMusicEnabledFromPreferences
public void setMusicEnabledFromPreferences(final String preferences, final String preferenceName, final boolean defaultValue) { musicPreferences = preferences; musicEnabledPreferenceName = preferenceName; setMusicEnabled(readFromPreferences(preferences, preferenceName, defaultValue))...
java
public void setMusicEnabledFromPreferences(final String preferences, final String preferenceName, final boolean defaultValue) { musicPreferences = preferences; musicEnabledPreferenceName = preferenceName; setMusicEnabled(readFromPreferences(preferences, preferenceName, defaultValue))...
[ "public", "void", "setMusicEnabledFromPreferences", "(", "final", "String", "preferences", ",", "final", "String", "preferenceName", ",", "final", "boolean", "defaultValue", ")", "{", "musicPreferences", "=", "preferences", ";", "musicEnabledPreferenceName", "=", "prefe...
Sets the current music state according to the value stored in preferences. Mostly for internal use. @param preferences path to the preferences. Will be set as global music preferences path. @param preferenceName name of the state preference. @param defaultValue used if preference is not set.
[ "Sets", "the", "current", "music", "state", "according", "to", "the", "value", "stored", "in", "preferences", ".", "Mostly", "for", "internal", "use", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java#L146-L151
102,479
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java
MusicService.setSoundEnabledFromPreferences
public void setSoundEnabledFromPreferences(final String preferences, final String preferenceName, final boolean defaultValue) { musicPreferences = preferences; soundEnabledPreferenceName = preferenceName; setSoundEnabled(readFromPreferences(preferences, preferenceName, defaultValue))...
java
public void setSoundEnabledFromPreferences(final String preferences, final String preferenceName, final boolean defaultValue) { musicPreferences = preferences; soundEnabledPreferenceName = preferenceName; setSoundEnabled(readFromPreferences(preferences, preferenceName, defaultValue))...
[ "public", "void", "setSoundEnabledFromPreferences", "(", "final", "String", "preferences", ",", "final", "String", "preferenceName", ",", "final", "boolean", "defaultValue", ")", "{", "musicPreferences", "=", "preferences", ";", "soundEnabledPreferenceName", "=", "prefe...
Sets the current sound state according to the value stored in preferences. Mostly for internal use. @param preferences path to the preferences. Will be set as global music preferences path. @param preferenceName name of the state preference. @param defaultValue used if preference is not set.
[ "Sets", "the", "current", "sound", "state", "according", "to", "the", "value", "stored", "in", "preferences", ".", "Mostly", "for", "internal", "use", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java#L175-L180
102,480
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java
MusicService.setSoundVolumeFromPreferences
public void setSoundVolumeFromPreferences(final String preferences, final String preferenceName, final float defaultValue) { musicPreferences = preferences; soundVolumePreferenceName = preferenceName; setSoundVolume(readFromPreferences(preferences, preferenceName, defaultValue)); ...
java
public void setSoundVolumeFromPreferences(final String preferences, final String preferenceName, final float defaultValue) { musicPreferences = preferences; soundVolumePreferenceName = preferenceName; setSoundVolume(readFromPreferences(preferences, preferenceName, defaultValue)); ...
[ "public", "void", "setSoundVolumeFromPreferences", "(", "final", "String", "preferences", ",", "final", "String", "preferenceName", ",", "final", "float", "defaultValue", ")", "{", "musicPreferences", "=", "preferences", ";", "soundVolumePreferenceName", "=", "preferenc...
Sets the current sound volume according to the values stored in preferences. Mostly for internal use. @param preferences path to the preferences. Will be set as global music preferences path. @param preferenceName name of the volume preference. @param defaultValue used if preference is not set.
[ "Sets", "the", "current", "sound", "volume", "according", "to", "the", "values", "stored", "in", "preferences", ".", "Mostly", "for", "internal", "use", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java#L192-L197
102,481
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java
MusicService.saveMusicPreferences
public void saveMusicPreferences(final boolean flush) { if (Strings.isNotEmpty(musicPreferences)) { if (Strings.isNotEmpty(musicVolumePreferenceName)) { saveInPreferences(musicPreferences, musicVolumePreferenceName, musicVolume); } if (Strings.isNotEmpty(music...
java
public void saveMusicPreferences(final boolean flush) { if (Strings.isNotEmpty(musicPreferences)) { if (Strings.isNotEmpty(musicVolumePreferenceName)) { saveInPreferences(musicPreferences, musicVolumePreferenceName, musicVolume); } if (Strings.isNotEmpty(music...
[ "public", "void", "saveMusicPreferences", "(", "final", "boolean", "flush", ")", "{", "if", "(", "Strings", ".", "isNotEmpty", "(", "musicPreferences", ")", ")", "{", "if", "(", "Strings", ".", "isNotEmpty", "(", "musicVolumePreferenceName", ")", ")", "{", "...
Saves music volume and state in preferences. @param flush if true, preferences will be truly saved - otherwise it just sets them in the preferences map.
[ "Saves", "music", "volume", "and", "state", "in", "preferences", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java#L210-L222
102,482
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java
MusicService.saveSoundPreferences
public void saveSoundPreferences(final boolean flush) { if (Strings.isNotEmpty(musicPreferences)) { if (Strings.isNotEmpty(soundVolumePreferenceName)) { saveInPreferences(musicPreferences, soundVolumePreferenceName, soundVolume); } if (Strings.isNotEmpty(sound...
java
public void saveSoundPreferences(final boolean flush) { if (Strings.isNotEmpty(musicPreferences)) { if (Strings.isNotEmpty(soundVolumePreferenceName)) { saveInPreferences(musicPreferences, soundVolumePreferenceName, soundVolume); } if (Strings.isNotEmpty(sound...
[ "public", "void", "saveSoundPreferences", "(", "final", "boolean", "flush", ")", "{", "if", "(", "Strings", ".", "isNotEmpty", "(", "musicPreferences", ")", ")", "{", "if", "(", "Strings", ".", "isNotEmpty", "(", "soundVolumePreferenceName", ")", ")", "{", "...
Saves sound volume and state in preferences. @param flush if true, preferences will be truly saved - otherwise it just sets them in the preferences map.
[ "Saves", "sound", "volume", "and", "state", "in", "preferences", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/sfx/MusicService.java#L227-L239
102,483
czyzby/gdx-lml
autumn/natives/gwt/src/main/java/com/github/czyzby/autumn/gwt/reflection/generator/ReflectionPoolGenerator.java
ReflectionPoolGenerator.findReflectedClasses
private Set<JType> findReflectedClasses(final GeneratorContext context, final TypeOracle typeOracle, final TreeLogger logger) throws UnableToCompleteException { final Set<JType> types = new HashSet<JType>(); final JPackage[] packages = typeOracle.getPackages(); // gather all ty...
java
private Set<JType> findReflectedClasses(final GeneratorContext context, final TypeOracle typeOracle, final TreeLogger logger) throws UnableToCompleteException { final Set<JType> types = new HashSet<JType>(); final JPackage[] packages = typeOracle.getPackages(); // gather all ty...
[ "private", "Set", "<", "JType", ">", "findReflectedClasses", "(", "final", "GeneratorContext", "context", ",", "final", "TypeOracle", "typeOracle", ",", "final", "TreeLogger", "logger", ")", "throws", "UnableToCompleteException", "{", "final", "Set", "<", "JType", ...
LibGDX code goes here. Slightly modified, refactored and without unnecessary operations.
[ "LibGDX", "code", "goes", "here", ".", "Slightly", "modified", "refactored", "and", "without", "unnecessary", "operations", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/autumn/natives/gwt/src/main/java/com/github/czyzby/autumn/gwt/reflection/generator/ReflectionPoolGenerator.java#L78-L122
102,484
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java
DefaultLmlParser.parse
protected Array<Actor> parse() { actors = GdxArrays.newArray(Actor.class); invokePreListeners(actors); final StringBuilder builder = new StringBuilder(); while (templateReader.hasNextCharacter()) { final char character = templateReader.nextCharacter(); if (charact...
java
protected Array<Actor> parse() { actors = GdxArrays.newArray(Actor.class); invokePreListeners(actors); final StringBuilder builder = new StringBuilder(); while (templateReader.hasNextCharacter()) { final char character = templateReader.nextCharacter(); if (charact...
[ "protected", "Array", "<", "Actor", ">", "parse", "(", ")", "{", "actors", "=", "GdxArrays", ".", "newArray", "(", "Actor", ".", "class", ")", ";", "invokePreListeners", "(", "actors", ")", ";", "final", "StringBuilder", "builder", "=", "new", "StringBuild...
Does the actual parsing @return actor parsed from LML template currently stored in the template reader.
[ "Does", "the", "actual", "parsing" ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java#L119-L149
102,485
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java
DefaultLmlParser.processArgument
private void processArgument() { final StringBuilder argumentBuilder = new StringBuilder(); while (templateReader.hasNextCharacter()) { final char argumentCharacter = templateReader.nextCharacter(); if (argumentCharacter == syntax.getArgumentClosing()) { final Str...
java
private void processArgument() { final StringBuilder argumentBuilder = new StringBuilder(); while (templateReader.hasNextCharacter()) { final char argumentCharacter = templateReader.nextCharacter(); if (argumentCharacter == syntax.getArgumentClosing()) { final Str...
[ "private", "void", "processArgument", "(", ")", "{", "final", "StringBuilder", "argumentBuilder", "=", "new", "StringBuilder", "(", ")", ";", "while", "(", "templateReader", ".", "hasNextCharacter", "(", ")", ")", "{", "final", "char", "argumentCharacter", "=", ...
Found an argument opening sign. Have to find argument's name and replace it in the template.
[ "Found", "an", "argument", "opening", "sign", ".", "Have", "to", "find", "argument", "s", "name", "and", "replace", "it", "in", "the", "template", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java#L152-L172
102,486
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java
DefaultLmlParser.processComment
private void processComment() { templateReader.nextCharacter(); // Burning comment opening char. if (templateReader.startsWith(syntax.getDocumentTypeOpening())) { processSchemaComment(); return; } else if (nestedComments) { processNestedComment(); ...
java
private void processComment() { templateReader.nextCharacter(); // Burning comment opening char. if (templateReader.startsWith(syntax.getDocumentTypeOpening())) { processSchemaComment(); return; } else if (nestedComments) { processNestedComment(); ...
[ "private", "void", "processComment", "(", ")", "{", "templateReader", ".", "nextCharacter", "(", ")", ";", "// Burning comment opening char.", "if", "(", "templateReader", ".", "startsWith", "(", "syntax", ".", "getDocumentTypeOpening", "(", ")", ")", ")", "{", ...
Found an open tag starting with comment sign. Burning through characters up to the comment's end.
[ "Found", "an", "open", "tag", "starting", "with", "comment", "sign", ".", "Burning", "through", "characters", "up", "to", "the", "comment", "s", "end", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java#L226-L244
102,487
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java
DefaultLmlParser.processSchemaComment
private void processSchemaComment() { // Removing DOCTYPE: burnCharacters(syntax.getDocumentTypeOpening().length()); int tagsOpened = 1; while (templateReader.hasNextCharacter()) { final char character = templateReader.nextCharacter(); // Schema comment can define...
java
private void processSchemaComment() { // Removing DOCTYPE: burnCharacters(syntax.getDocumentTypeOpening().length()); int tagsOpened = 1; while (templateReader.hasNextCharacter()) { final char character = templateReader.nextCharacter(); // Schema comment can define...
[ "private", "void", "processSchemaComment", "(", ")", "{", "// Removing DOCTYPE:", "burnCharacters", "(", "syntax", ".", "getDocumentTypeOpening", "(", ")", ".", "length", "(", ")", ")", ";", "int", "tagsOpened", "=", "1", ";", "while", "(", "templateReader", "...
Found a comment starting with DOCTYPE. Burning through the characters.
[ "Found", "a", "comment", "starting", "with", "DOCTYPE", ".", "Burning", "through", "the", "characters", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java#L247-L262
102,488
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java
DefaultLmlParser.processNestedComment
private void processNestedComment() { int nestedCommentsAmount = 1; // Starting with just the initial comment. while (templateReader.hasNextCharacter()) { final char commentCharacter = templateReader.nextCharacter(); if (isCommentClosingMarker(commentCharacter) && templateReader....
java
private void processNestedComment() { int nestedCommentsAmount = 1; // Starting with just the initial comment. while (templateReader.hasNextCharacter()) { final char commentCharacter = templateReader.nextCharacter(); if (isCommentClosingMarker(commentCharacter) && templateReader....
[ "private", "void", "processNestedComment", "(", ")", "{", "int", "nestedCommentsAmount", "=", "1", ";", "// Starting with just the initial comment.", "while", "(", "templateReader", ".", "hasNextCharacter", "(", ")", ")", "{", "final", "char", "commentCharacter", "=",...
Found an open tag starting with comment sign and nested comments are on. Burning through characters up to the comment's end, honoring nested, commented-out comments.
[ "Found", "an", "open", "tag", "starting", "with", "comment", "sign", "and", "nested", "comments", "are", "on", ".", "Burning", "through", "characters", "up", "to", "the", "comment", "s", "end", "honoring", "nested", "commented", "-", "out", "comments", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java#L266-L286
102,489
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java
DefaultLmlParser.processTag
private void processTag(final StringBuilder builder) { boolean started = false; while (templateReader.hasNextCharacter()) { final char tagCharacter = templateReader.nextCharacter(); // Stripping whitespaces at the beginning of the tag data: if (!started && Strings.isW...
java
private void processTag(final StringBuilder builder) { boolean started = false; while (templateReader.hasNextCharacter()) { final char tagCharacter = templateReader.nextCharacter(); // Stripping whitespaces at the beginning of the tag data: if (!started && Strings.isW...
[ "private", "void", "processTag", "(", "final", "StringBuilder", "builder", ")", "{", "boolean", "started", "=", "false", ";", "while", "(", "templateReader", ".", "hasNextCharacter", "(", ")", ")", "{", "final", "char", "tagCharacter", "=", "templateReader", "...
Found an open tag that is not a comment. Collecting whole tag data. @param builder will be used to collect data.
[ "Found", "an", "open", "tag", "that", "is", "not", "a", "comment", ".", "Collecting", "whole", "tag", "data", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java#L291-L315
102,490
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/attribute/table/cell/AbstractCellLmlAttribute.java
AbstractCellLmlAttribute.processForActor
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) { parser.throwErrorIfStrict("\"" + tag.getTagName() + "\" tag has a table cell attribute, but is not directly in a table. Cannot set table cell attribute value w...
java
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) { parser.throwErrorIfStrict("\"" + tag.getTagName() + "\" tag has a table cell attribute, but is not directly in a table. Cannot set table cell attribute value w...
[ "protected", "void", "processForActor", "(", "final", "LmlParser", "parser", ",", "final", "LmlTag", "tag", ",", "final", "Actor", "actor", ",", "final", "String", "rawAttributeData", ")", "{", "parser", ".", "throwErrorIfStrict", "(", "\"\\\"\"", "+", "tag", ...
This method is called if the actor is not in a cell. It should set the property in the actor itself, provided that its correct and can be applied. By default, throws an exception if the parser is strict. @param parser handles LML template parsing. @param tag contains raw tag data. Allows to access actor's parent. @par...
[ "This", "method", "is", "called", "if", "the", "actor", "is", "not", "in", "a", "cell", ".", "It", "should", "set", "the", "property", "in", "the", "actor", "itself", "provided", "that", "its", "correct", "and", "can", "be", "applied", ".", "By", "defa...
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/attribute/table/cell/AbstractCellLmlAttribute.java#L54-L59
102,491
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/AbstractListenerLmlTag.java
AbstractListenerLmlTag.onEvent
@Override public boolean onEvent(final LmlParser parser, final Array<Actor> parsingResult) { final ObjectMap<String, Actor> actorsByIds = parser.getActorsMappedByIds(); for (final String id : ids) { final Actor actor = actorsByIds.get(id); if (actor != null) { ...
java
@Override public boolean onEvent(final LmlParser parser, final Array<Actor> parsingResult) { final ObjectMap<String, Actor> actorsByIds = parser.getActorsMappedByIds(); for (final String id : ids) { final Actor actor = actorsByIds.get(id); if (actor != null) { ...
[ "@", "Override", "public", "boolean", "onEvent", "(", "final", "LmlParser", "parser", ",", "final", "Array", "<", "Actor", ">", "parsingResult", ")", "{", "final", "ObjectMap", "<", "String", ",", "Actor", ">", "actorsByIds", "=", "parser", ".", "getActorsMa...
Invoked after template parsing. Hooks up the listener to actors registered by "attachTo" attribute. @param parser parsed the template. @param parsingResult parsed actors. @return {@link LmlParserListener#REMOVE} by default. See {@link #setKeepListener(boolean)}.
[ "Invoked", "after", "template", "parsing", ".", "Hooks", "up", "the", "listener", "to", "actors", "registered", "by", "attachTo", "attribute", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/AbstractListenerLmlTag.java#L114-L126
102,492
czyzby/gdx-lml
websocket/src/main/java/com/github/czyzby/websocket/impl/AbstractWebSocket.java
AbstractWebSocket.postCloseEvent
protected void postCloseEvent(final WebSocketCloseCode closeCode, final String reason) { for (final WebSocketListener listener : listeners) { if (listener.onClose(this, closeCode, reason)) { break; } } }
java
protected void postCloseEvent(final WebSocketCloseCode closeCode, final String reason) { for (final WebSocketListener listener : listeners) { if (listener.onClose(this, closeCode, reason)) { break; } } }
[ "protected", "void", "postCloseEvent", "(", "final", "WebSocketCloseCode", "closeCode", ",", "final", "String", "reason", ")", "{", "for", "(", "final", "WebSocketListener", "listener", ":", "listeners", ")", "{", "if", "(", "listener", ".", "onClose", "(", "t...
Listeners will be notified about socket closing. @param closeCode closing code. @param reason optional closing reason.
[ "Listeners", "will", "be", "notified", "about", "socket", "closing", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/websocket/src/main/java/com/github/czyzby/websocket/impl/AbstractWebSocket.java#L74-L80
102,493
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/AbstractLmlView.java
AbstractLmlView.resize
public void resize(final int width, final int height, final boolean centerCamera) { stage.getViewport().update(width, height, centerCamera); }
java
public void resize(final int width, final int height, final boolean centerCamera) { stage.getViewport().update(width, height, centerCamera); }
[ "public", "void", "resize", "(", "final", "int", "width", ",", "final", "int", "height", ",", "final", "boolean", "centerCamera", ")", "{", "stage", ".", "getViewport", "(", ")", ".", "update", "(", "width", ",", "height", ",", "centerCamera", ")", ";", ...
Updates stage's viewport. @param width new width of the screen. @param height new height of the screen. @param centerCamera false by default. Some viewports seem to require it to be true for proper behavior ( {@link com.badlogic.gdx.utils.viewport.ScreenViewport}, for example).
[ "Updates", "stage", "s", "viewport", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/AbstractLmlView.java#L63-L65
102,494
czyzby/gdx-lml
lml-uedi/src/main/java/com/github/czyzby/lml/uedi/i18n/I18NBundleProvider.java
I18NBundleProvider.fill
public void fill(final LmlParser parser) { this.parser = parser; for (final Entry<String, I18NBundle> bundle : bundles) { parser.getData().addI18nBundle(bundle.key, bundle.value); if (defaultBundle.equals(bundle.key)) { parser.getData().setDefaultI18nBundle(bundle...
java
public void fill(final LmlParser parser) { this.parser = parser; for (final Entry<String, I18NBundle> bundle : bundles) { parser.getData().addI18nBundle(bundle.key, bundle.value); if (defaultBundle.equals(bundle.key)) { parser.getData().setDefaultI18nBundle(bundle...
[ "public", "void", "fill", "(", "final", "LmlParser", "parser", ")", "{", "this", ".", "parser", "=", "parser", ";", "for", "(", "final", "Entry", "<", "String", ",", "I18NBundle", ">", "bundle", ":", "bundles", ")", "{", "parser", ".", "getData", "(", ...
Should be called after bundles are loaded. @param parser will have the bundles attached in its parsing data. Will be updated on bundle reloads.
[ "Should", "be", "called", "after", "bundles", "are", "loaded", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml-uedi/src/main/java/com/github/czyzby/lml/uedi/i18n/I18NBundleProvider.java#L141-L149
102,495
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java
LssParser.parseNames
protected void parseNames() { while (reader.hasNextCharacter()) { final char character = next(); if (Strings.isWhitespace(character)) { addName(); continue; } else if (character == blockOpening) { addName(); brea...
java
protected void parseNames() { while (reader.hasNextCharacter()) { final char character = next(); if (Strings.isWhitespace(character)) { addName(); continue; } else if (character == blockOpening) { addName(); brea...
[ "protected", "void", "parseNames", "(", ")", "{", "while", "(", "reader", ".", "hasNextCharacter", "(", ")", ")", "{", "final", "char", "character", "=", "next", "(", ")", ";", "if", "(", "Strings", ".", "isWhitespace", "(", "character", ")", ")", "{",...
Parses names proceeding styles block.
[ "Parses", "names", "proceeding", "styles", "block", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java#L83-L99
102,496
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java
LssParser.addName
protected void addName() { if (Strings.isNotEmpty(builder)) { int endOffset = 0; if (Strings.endsWith(builder, tagSeparator)) { // Ends with ','. endOffset = 1; } if (Strings.startsWith(builder, inheritanceMarker)) { // Starts with '.'. ...
java
protected void addName() { if (Strings.isNotEmpty(builder)) { int endOffset = 0; if (Strings.endsWith(builder, tagSeparator)) { // Ends with ','. endOffset = 1; } if (Strings.startsWith(builder, inheritanceMarker)) { // Starts with '.'. ...
[ "protected", "void", "addName", "(", ")", "{", "if", "(", "Strings", ".", "isNotEmpty", "(", "builder", ")", ")", "{", "int", "endOffset", "=", "0", ";", "if", "(", "Strings", ".", "endsWith", "(", "builder", ",", "tagSeparator", ")", ")", "{", "// E...
Appends tag or inheritance name from the current builder data.
[ "Appends", "tag", "or", "inheritance", "name", "from", "the", "current", "builder", "data", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java#L102-L115
102,497
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java
LssParser.parseAttributes
protected void parseAttributes() { burnWhitespaces(); attribute = null; while (reader.hasNextCharacter()) { char character = reader.peekCharacter(); if (Strings.isNewLine(character) && (attribute != null || Strings.isNotEmpty(builder))) { throwException("E...
java
protected void parseAttributes() { burnWhitespaces(); attribute = null; while (reader.hasNextCharacter()) { char character = reader.peekCharacter(); if (Strings.isNewLine(character) && (attribute != null || Strings.isNotEmpty(builder))) { throwException("E...
[ "protected", "void", "parseAttributes", "(", ")", "{", "burnWhitespaces", "(", ")", ";", "attribute", "=", "null", ";", "while", "(", "reader", ".", "hasNextCharacter", "(", ")", ")", "{", "char", "character", "=", "reader", ".", "peekCharacter", "(", ")",...
Parses attributes block.
[ "Parses", "attributes", "block", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java#L118-L150
102,498
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java
LssParser.addAttributeName
protected void addAttributeName() { if (Strings.isNotEmpty(builder)) { attribute = builder.toString(); Strings.clearBuilder(builder); } }
java
protected void addAttributeName() { if (Strings.isNotEmpty(builder)) { attribute = builder.toString(); Strings.clearBuilder(builder); } }
[ "protected", "void", "addAttributeName", "(", ")", "{", "if", "(", "Strings", ".", "isNotEmpty", "(", "builder", ")", ")", "{", "attribute", "=", "builder", ".", "toString", "(", ")", ";", "Strings", ".", "clearBuilder", "(", "builder", ")", ";", "}", ...
Caches currently parsed attribute name.
[ "Caches", "currently", "parsed", "attribute", "name", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java#L153-L158
102,499
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java
LssParser.addAttribute
protected void addAttribute() { attributes.put(attribute, builder.toString().trim()); attribute = null; Strings.clearBuilder(builder); }
java
protected void addAttribute() { attributes.put(attribute, builder.toString().trim()); attribute = null; Strings.clearBuilder(builder); }
[ "protected", "void", "addAttribute", "(", ")", "{", "attributes", ".", "put", "(", "attribute", ",", "builder", ".", "toString", "(", ")", ".", "trim", "(", ")", ")", ";", "attribute", "=", "null", ";", "Strings", ".", "clearBuilder", "(", "builder", "...
Clears attribute cache, adds default attribute value.
[ "Clears", "attribute", "cache", "adds", "default", "attribute", "value", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/LssParser.java#L161-L165