repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
iipc/webarchive-commons
src/main/java/org/archive/io/ArchiveRecord.java
ArchiveRecord.available
public int available() { long amount = getHeader().getLength() - getPosition(); return (amount > Integer.MAX_VALUE? Integer.MAX_VALUE: (int)amount); }
java
public int available() { long amount = getHeader().getLength() - getPosition(); return (amount > Integer.MAX_VALUE? Integer.MAX_VALUE: (int)amount); }
[ "public", "int", "available", "(", ")", "{", "long", "amount", "=", "getHeader", "(", ")", ".", "getLength", "(", ")", "-", "getPosition", "(", ")", ";", "return", "(", "amount", ">", "Integer", ".", "MAX_VALUE", "?", "Integer", ".", "MAX_VALUE", ":", ...
This available is not the stream's available. Its an available based on what the stated Archive record length is minus what we've read to date. @return True if bytes remaining in record content.
[ "This", "available", "is", "not", "the", "stream", "s", "available", ".", "Its", "an", "available", "based", "on", "what", "the", "stated", "Archive", "record", "length", "is", "minus", "what", "we", "ve", "read", "to", "date", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/ArchiveRecord.java#L228-L231
train
iipc/webarchive-commons
src/main/java/org/archive/io/ArchiveRecord.java
ArchiveRecord.skip
protected void skip() throws IOException { if (this.eor) { return; } // Read to the end of the body of the record. Exhaust the stream. // Can't skip direct to end because underlying stream may be compressed // and we're calculating the digest for the record. ...
java
protected void skip() throws IOException { if (this.eor) { return; } // Read to the end of the body of the record. Exhaust the stream. // Can't skip direct to end because underlying stream may be compressed // and we're calculating the digest for the record. ...
[ "protected", "void", "skip", "(", ")", "throws", "IOException", "{", "if", "(", "this", ".", "eor", ")", "{", "return", ";", "}", "// Read to the end of the body of the record. Exhaust the stream.", "// Can't skip direct to end because underlying stream may be compressed", "...
Skip over this records content. @throws IOException
[ "Skip", "over", "this", "records", "content", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/ArchiveRecord.java#L238-L251
train
iipc/webarchive-commons
src/main/java/org/archive/io/GenerationFileHandler.java
GenerationFileHandler.rotate
public GenerationFileHandler rotate(String storeSuffix, String activeSuffix) throws IOException { return rotate(storeSuffix, activeSuffix, false); }
java
public GenerationFileHandler rotate(String storeSuffix, String activeSuffix) throws IOException { return rotate(storeSuffix, activeSuffix, false); }
[ "public", "GenerationFileHandler", "rotate", "(", "String", "storeSuffix", ",", "String", "activeSuffix", ")", "throws", "IOException", "{", "return", "rotate", "(", "storeSuffix", ",", "activeSuffix", ",", "false", ")", ";", "}" ]
Move the current file to a new filename with the storeSuffix in place of the activeSuffix; continuing logging to a new file under the original filename. @param storeSuffix Suffix to put in place of <code>activeSuffix</code> @param activeSuffix Suffix to replace with <code>storeSuffix</code>. @return GenerationFileHand...
[ "Move", "the", "current", "file", "to", "a", "new", "filename", "with", "the", "storeSuffix", "in", "place", "of", "the", "activeSuffix", ";", "continuing", "logging", "to", "a", "new", "file", "under", "the", "original", "filename", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/GenerationFileHandler.java#L91-L95
train
iipc/webarchive-commons
src/main/java/org/archive/io/GenerationFileHandler.java
GenerationFileHandler.makeNew
public static GenerationFileHandler makeNew(String filename, boolean append, boolean shouldManifest) throws SecurityException, IOException { FileUtils.moveAsideIfExists(new File(filename)); return new GenerationFileHandler(filename, append, shouldManifest); }
java
public static GenerationFileHandler makeNew(String filename, boolean append, boolean shouldManifest) throws SecurityException, IOException { FileUtils.moveAsideIfExists(new File(filename)); return new GenerationFileHandler(filename, append, shouldManifest); }
[ "public", "static", "GenerationFileHandler", "makeNew", "(", "String", "filename", ",", "boolean", "append", ",", "boolean", "shouldManifest", ")", "throws", "SecurityException", ",", "IOException", "{", "FileUtils", ".", "moveAsideIfExists", "(", "new", "File", "("...
Constructor-helper that rather than clobbering any existing file, moves it aside with a timestamp suffix. @param filename @param append @param shouldManifest @return @throws SecurityException @throws IOException
[ "Constructor", "-", "helper", "that", "rather", "than", "clobbering", "any", "existing", "file", "moves", "it", "aside", "with", "a", "timestamp", "suffix", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/GenerationFileHandler.java#L156-L159
train
iipc/webarchive-commons
src/main/java/org/archive/util/iterator/LookaheadIterator.java
LookaheadIterator.next
public T next() { if (!hasNext()) { throw new NoSuchElementException(); } // 'next' is guaranteed non-null by a hasNext() which returned true T returnObj = this.next; this.next = null; return returnObj; }
java
public T next() { if (!hasNext()) { throw new NoSuchElementException(); } // 'next' is guaranteed non-null by a hasNext() which returned true T returnObj = this.next; this.next = null; return returnObj; }
[ "public", "T", "next", "(", ")", "{", "if", "(", "!", "hasNext", "(", ")", ")", "{", "throw", "new", "NoSuchElementException", "(", ")", ";", "}", "// 'next' is guaranteed non-null by a hasNext() which returned true", "T", "returnObj", "=", "this", ".", "next", ...
Return the next item. @see java.util.Iterator#next()
[ "Return", "the", "next", "item", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/iterator/LookaheadIterator.java#L57-L65
train
iipc/webarchive-commons
src/main/java/org/archive/util/ByteOp.java
ByteOp.readToNull
public static byte[] readToNull(InputStream is, int maxSize) throws IOException { byte[] bytes = new byte[maxSize]; int i = 0; while(i < maxSize) { int b = is.read(); if(b == -1) { throw new EOFException("NO NULL"); } bytes[i] = (byte) (b & 0xff); i++; if(b == 0) { return copy(bytes,0...
java
public static byte[] readToNull(InputStream is, int maxSize) throws IOException { byte[] bytes = new byte[maxSize]; int i = 0; while(i < maxSize) { int b = is.read(); if(b == -1) { throw new EOFException("NO NULL"); } bytes[i] = (byte) (b & 0xff); i++; if(b == 0) { return copy(bytes,0...
[ "public", "static", "byte", "[", "]", "readToNull", "(", "InputStream", "is", ",", "int", "maxSize", ")", "throws", "IOException", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "maxSize", "]", ";", "int", "i", "=", "0", ";", "while", "(", ...
Read, buffer, and return bytes from is until a null byte is encountered @param is InputStream to read from @param maxSize maximum number of bytes to search for the null @return array of bytes read, INCLUDING TRAILING NULL @throws IOException if the underlying stream throws on, OR if the specified maximum buffer size is...
[ "Read", "buffer", "and", "return", "bytes", "from", "is", "until", "a", "null", "byte", "is", "encountered" ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/ByteOp.java#L196-L216
train
iipc/webarchive-commons
src/main/java/org/archive/util/Base32.java
Base32.main
static public void main(String[] args) { if (args.length == 0) { System.out.println("Supply a Base32-encoded argument."); return; } System.out.println(" Original: " + args[0]); byte[] decoded = Base32.decode(args[0]); System.out.print(" Hex: "); ...
java
static public void main(String[] args) { if (args.length == 0) { System.out.println("Supply a Base32-encoded argument."); return; } System.out.println(" Original: " + args[0]); byte[] decoded = Base32.decode(args[0]); System.out.print(" Hex: "); ...
[ "static", "public", "void", "main", "(", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", "==", "0", ")", "{", "System", ".", "out", ".", "println", "(", "\"Supply a Base32-encoded argument.\"", ")", ";", "return", ";", "}", "Sys...
For testing, take a command-line argument in Base32, decode, print in hex, encode, print @param args
[ "For", "testing", "take", "a", "command", "-", "line", "argument", "in", "Base32", "decode", "print", "in", "hex", "encode", "print" ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/Base32.java#L141-L158
train
iipc/webarchive-commons
src/main/java/org/archive/util/zip/GzipHeader.java
GzipHeader.readHeader
public void readHeader(InputStream in) throws IOException { CRC32 crc = new CRC32(); crc.reset(); if (!testGzipMagic(in, crc)) { throw new NoGzipMagicException(); } this.length += 2; if (readByte(in, crc) != Deflater.DEFLATED) { throw new IOExcepti...
java
public void readHeader(InputStream in) throws IOException { CRC32 crc = new CRC32(); crc.reset(); if (!testGzipMagic(in, crc)) { throw new NoGzipMagicException(); } this.length += 2; if (readByte(in, crc) != Deflater.DEFLATED) { throw new IOExcepti...
[ "public", "void", "readHeader", "(", "InputStream", "in", ")", "throws", "IOException", "{", "CRC32", "crc", "=", "new", "CRC32", "(", ")", ";", "crc", ".", "reset", "(", ")", ";", "if", "(", "!", "testGzipMagic", "(", "in", ",", "crc", ")", ")", "...
Read in gzip header. Advances the stream past the gzip header. @param in InputStream. @throws IOException Throws if does not start with GZIP Header.
[ "Read", "in", "gzip", "header", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/zip/GzipHeader.java#L112-L173
train
iipc/webarchive-commons
src/main/java/org/archive/util/zip/GzipHeader.java
GzipHeader.readInt
private int readInt(InputStream in, CRC32 crc) throws IOException { int s = readShort(in, crc); return ((readShort(in, crc) << 16) & 0xffff0000) | s; }
java
private int readInt(InputStream in, CRC32 crc) throws IOException { int s = readShort(in, crc); return ((readShort(in, crc) << 16) & 0xffff0000) | s; }
[ "private", "int", "readInt", "(", "InputStream", "in", ",", "CRC32", "crc", ")", "throws", "IOException", "{", "int", "s", "=", "readShort", "(", "in", ",", "crc", ")", ";", "return", "(", "(", "readShort", "(", "in", ",", "crc", ")", "<<", "16", "...
Read an int. We do not expect to get a -1 reading. If we do, we throw exception. Update the crc as we go. @param in InputStream to read. @param crc CRC to update. @return int read. @throws IOException
[ "Read", "an", "int", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/zip/GzipHeader.java#L213-L216
train
iipc/webarchive-commons
src/main/java/org/archive/url/UsableURI.java
UsableURI.getHostBasename
public String getHostBasename() throws URIException { // caching eliminated because this is rarely used // (only benefits legacy DomainScope, which should // be retired). Saves 4-byte object pointer in UURI // instances. return (this.getReferencedHost() == null) ? nu...
java
public String getHostBasename() throws URIException { // caching eliminated because this is rarely used // (only benefits legacy DomainScope, which should // be retired). Saves 4-byte object pointer in UURI // instances. return (this.getReferencedHost() == null) ? nu...
[ "public", "String", "getHostBasename", "(", ")", "throws", "URIException", "{", "// caching eliminated because this is rarely used", "// (only benefits legacy DomainScope, which should", "// be retired). Saves 4-byte object pointer in UURI", "// instances.", "return", "(", "this", ".",...
Strips www variants from the host. Strips www[0-9]*\. from the host. If calling getHostBaseName becomes a performance issue we should consider adding the hostBasename member that is set on initialization. @return Host's basename. @throws URIException
[ "Strips", "www", "variants", "from", "the", "host", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/url/UsableURI.java#L238-L247
train
iipc/webarchive-commons
src/main/java/org/archive/url/UsableURI.java
UsableURI.coalesceUriStrings
protected void coalesceUriStrings() { if (this.cachedString != null && this.cachedEscapedURI != null && this.cachedString.length() == this.cachedEscapedURI.length()) { // lengths will only be identical if contents are identical // (deescaping will always shrink length), s...
java
protected void coalesceUriStrings() { if (this.cachedString != null && this.cachedEscapedURI != null && this.cachedString.length() == this.cachedEscapedURI.length()) { // lengths will only be identical if contents are identical // (deescaping will always shrink length), s...
[ "protected", "void", "coalesceUriStrings", "(", ")", "{", "if", "(", "this", ".", "cachedString", "!=", "null", "&&", "this", ".", "cachedEscapedURI", "!=", "null", "&&", "this", ".", "cachedString", ".", "length", "(", ")", "==", "this", ".", "cachedEscap...
The two String fields cachedString and cachedEscapedURI are usually identical; if so, coalesce into a single instance.
[ "The", "two", "String", "fields", "cachedString", "and", "cachedEscapedURI", "are", "usually", "identical", ";", "if", "so", "coalesce", "into", "a", "single", "instance", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/url/UsableURI.java#L336-L344
train
iipc/webarchive-commons
src/main/java/org/archive/url/UsableURI.java
UsableURI.coalesceHostAuthorityStrings
protected void coalesceHostAuthorityStrings() { if (this.cachedAuthorityMinusUserinfo != null && this.cachedHost != null && this.cachedHost.length() == this.cachedAuthorityMinusUserinfo.length()) { // lengths can only be identical if contents ...
java
protected void coalesceHostAuthorityStrings() { if (this.cachedAuthorityMinusUserinfo != null && this.cachedHost != null && this.cachedHost.length() == this.cachedAuthorityMinusUserinfo.length()) { // lengths can only be identical if contents ...
[ "protected", "void", "coalesceHostAuthorityStrings", "(", ")", "{", "if", "(", "this", ".", "cachedAuthorityMinusUserinfo", "!=", "null", "&&", "this", ".", "cachedHost", "!=", "null", "&&", "this", ".", "cachedHost", ".", "length", "(", ")", "==", "this", "...
The two String fields cachedHost and cachedAuthorityMinusUserInfo are usually identical; if so, coalesce into a single instance.
[ "The", "two", "String", "fields", "cachedHost", "and", "cachedAuthorityMinusUserInfo", "are", "usually", "identical", ";", "if", "so", "coalesce", "into", "a", "single", "instance", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/url/UsableURI.java#L362-L371
train
iipc/webarchive-commons
src/main/java/org/archive/url/UsableURI.java
UsableURI.getReferencedHost
public String getReferencedHost() throws URIException { String referencedHost = this.getHost(); if(referencedHost==null && this.getScheme().equals("dns")) { // extract target domain of DNS lookup String possibleHost = this.getCurrentHierPath(); if(possibleHost != null...
java
public String getReferencedHost() throws URIException { String referencedHost = this.getHost(); if(referencedHost==null && this.getScheme().equals("dns")) { // extract target domain of DNS lookup String possibleHost = this.getCurrentHierPath(); if(possibleHost != null...
[ "public", "String", "getReferencedHost", "(", ")", "throws", "URIException", "{", "String", "referencedHost", "=", "this", ".", "getHost", "(", ")", ";", "if", "(", "referencedHost", "==", "null", "&&", "this", ".", "getScheme", "(", ")", ".", "equals", "(...
Return the referenced host in the UURI, if any, also extracting the host of a DNS-lookup URI where necessary. @return the target or topic host of the URI @throws URIException
[ "Return", "the", "referenced", "host", "in", "the", "UURI", "if", "any", "also", "extracting", "the", "host", "of", "a", "DNS", "-", "lookup", "URI", "where", "necessary", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/url/UsableURI.java#L380-L390
train
iipc/webarchive-commons
src/main/java/org/archive/url/UsableURI.java
UsableURI.hasScheme
public static boolean hasScheme(String possibleUrl) { boolean result = false; for (int i = 0; i < possibleUrl.length(); i++) { char c = possibleUrl.charAt(i); if (c == ':') { if (i != 0) { result = true; } break;...
java
public static boolean hasScheme(String possibleUrl) { boolean result = false; for (int i = 0; i < possibleUrl.length(); i++) { char c = possibleUrl.charAt(i); if (c == ':') { if (i != 0) { result = true; } break;...
[ "public", "static", "boolean", "hasScheme", "(", "String", "possibleUrl", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "possibleUrl", ".", "length", "(", ")", ";", "i", "++", ")", "{", "char", "...
Test if passed String has likely URI scheme prefix. @param possibleUrl URL string to examine. @return True if passed string looks like it could be an URL.
[ "Test", "if", "passed", "String", "has", "likely", "URI", "scheme", "prefix", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/url/UsableURI.java#L461-L476
train
iipc/webarchive-commons
src/main/java/org/archive/format/http/HttpHeaders.java
HttpHeaders.write
public void write(OutputStream out) throws IOException { for(HttpHeader header: this) { header.write(out); } out.write(CR); out.write(LF); }
java
public void write(OutputStream out) throws IOException { for(HttpHeader header: this) { header.write(out); } out.write(CR); out.write(LF); }
[ "public", "void", "write", "(", "OutputStream", "out", ")", "throws", "IOException", "{", "for", "(", "HttpHeader", "header", ":", "this", ")", "{", "header", ".", "write", "(", "out", ")", ";", "}", "out", ".", "write", "(", "CR", ")", ";", "out", ...
Write all Headers and a trailing CRLF, CRLF @param out @throws IOException
[ "Write", "all", "Headers", "and", "a", "trailing", "CRLF", "CRLF" ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/format/http/HttpHeaders.java#L143-L149
train
iipc/webarchive-commons
src/main/java/org/archive/httpclient/ThreadLocalHttpConnectionManager.java
ThreadLocalHttpConnectionManager.finishLastResponse
private static boolean finishLastResponse(final HttpConnection conn) { InputStream lastResponse = conn.getLastResponseInputStream(); if(lastResponse != null) { conn.setLastResponseInputStream(null); try { lastResponse.close(); return true; ...
java
private static boolean finishLastResponse(final HttpConnection conn) { InputStream lastResponse = conn.getLastResponseInputStream(); if(lastResponse != null) { conn.setLastResponseInputStream(null); try { lastResponse.close(); return true; ...
[ "private", "static", "boolean", "finishLastResponse", "(", "final", "HttpConnection", "conn", ")", "{", "InputStream", "lastResponse", "=", "conn", ".", "getLastResponseInputStream", "(", ")", ";", "if", "(", "lastResponse", "!=", "null", ")", "{", "conn", ".", ...
Since the same connection is about to be reused, make sure the previous request was completely processed, and if not consume it now. @param conn The connection @return true, if the connection is reusable
[ "Since", "the", "same", "connection", "is", "about", "to", "be", "reused", "make", "sure", "the", "previous", "request", "was", "completely", "processed", "and", "if", "not", "consume", "it", "now", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/httpclient/ThreadLocalHttpConnectionManager.java#L78-L92
train
iipc/webarchive-commons
src/main/java/org/archive/io/arc/ARCWriter.java
ARCWriter.generateARCFileMetaData
private byte [] generateARCFileMetaData(String date) throws IOException { if(date!=null && date.length()>14) { date = date.substring(0,14); } int metadataBodyLength = getMetadataLength(); // If metadata body, then the minor part of the version is '1' rather // tha...
java
private byte [] generateARCFileMetaData(String date) throws IOException { if(date!=null && date.length()>14) { date = date.substring(0,14); } int metadataBodyLength = getMetadataLength(); // If metadata body, then the minor part of the version is '1' rather // tha...
[ "private", "byte", "[", "]", "generateARCFileMetaData", "(", "String", "date", ")", "throws", "IOException", "{", "if", "(", "date", "!=", "null", "&&", "date", ".", "length", "(", ")", ">", "14", ")", "{", "date", "=", "date", ".", "substring", "(", ...
Write out the ARCMetaData. <p>Generate ARC file meta data. Currently we only do version 1 of the ARC file formats or version 1.1 when metadata has been supplied (We write it into the body of the first record in the arc file). <p>Version 1 metadata looks roughly like this: <pre>filedesc://testWriteRecord-JunitIAH200...
[ "Write", "out", "the", "ARCMetaData", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/arc/ARCWriter.java#L202-L266
train
iipc/webarchive-commons
src/main/java/org/archive/io/arc/ARCWriter.java
ARCWriter.validateMetaLine
protected String validateMetaLine(String metaLineStr) throws IOException { if (metaLineStr.length() > MAX_METADATA_LINE_LENGTH) { throw new IOException("Metadata line too long (" + metaLineStr.length() + ">" + MAX_METADATA_LINE_LENGTH + "): " + metaLineStr); ...
java
protected String validateMetaLine(String metaLineStr) throws IOException { if (metaLineStr.length() > MAX_METADATA_LINE_LENGTH) { throw new IOException("Metadata line too long (" + metaLineStr.length() + ">" + MAX_METADATA_LINE_LENGTH + "): " + metaLineStr); ...
[ "protected", "String", "validateMetaLine", "(", "String", "metaLineStr", ")", "throws", "IOException", "{", "if", "(", "metaLineStr", ".", "length", "(", ")", ">", "MAX_METADATA_LINE_LENGTH", ")", "{", "throw", "new", "IOException", "(", "\"Metadata line too long (\...
Test that the metadata line is valid before writing. @param metaLineStr @throws IOException @return The passed in metaline.
[ "Test", "that", "the", "metadata", "line", "is", "valid", "before", "writing", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/arc/ARCWriter.java#L445-L458
train
iipc/webarchive-commons
src/main/java/org/archive/format/warc/WARCRecordWriter.java
WARCRecordWriter.writeRecord
private void writeRecord( OutputStream out, HttpHeaders headers, byte[] contents) throws IOException { if ( contents == null ) { headers.add(CONTENT_LENGTH, "0"); } else { headers.add(CONTENT_LENGTH,String.valueOf(con...
java
private void writeRecord( OutputStream out, HttpHeaders headers, byte[] contents) throws IOException { if ( contents == null ) { headers.add(CONTENT_LENGTH, "0"); } else { headers.add(CONTENT_LENGTH,String.valueOf(con...
[ "private", "void", "writeRecord", "(", "OutputStream", "out", ",", "HttpHeaders", "headers", ",", "byte", "[", "]", "contents", ")", "throws", "IOException", "{", "if", "(", "contents", "==", "null", ")", "{", "headers", ".", "add", "(", "CONTENT_LENGTH", ...
Write the headers and contents as a WARC record to the given output stream. WARC record format: <pre>warc-file = 1*warc-record warc-record = header CRLF block CRLF CRLF header = version warc-fields version = "WARC/0.18" CRLF warc-fields = *named-field CRLF block = *OCTET</pre>
[ "Write", "the", "headers", "and", "contents", "as", "a", "WARC", "record", "to", "the", "given", "output", "stream", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/format/warc/WARCRecordWriter.java#L29-L60
train
iipc/webarchive-commons
src/main/java/org/archive/io/ArchiveReaderFactory.java
ArchiveReaderFactory.get
public static ArchiveReader get(final String arcFileOrUrl) throws MalformedURLException, IOException { return ArchiveReaderFactory.factory.getArchiveReader(arcFileOrUrl); }
java
public static ArchiveReader get(final String arcFileOrUrl) throws MalformedURLException, IOException { return ArchiveReaderFactory.factory.getArchiveReader(arcFileOrUrl); }
[ "public", "static", "ArchiveReader", "get", "(", "final", "String", "arcFileOrUrl", ")", "throws", "MalformedURLException", ",", "IOException", "{", "return", "ArchiveReaderFactory", ".", "factory", ".", "getArchiveReader", "(", "arcFileOrUrl", ")", ";", "}" ]
Get an Archive file Reader on passed path or url. Does primitive heuristic figuring if path or URL. @param arcFileOrUrl File path or URL pointing at an Archive file. @return An Archive file Reader. @throws IOException @throws MalformedURLException @throws IOException
[ "Get", "an", "Archive", "file", "Reader", "on", "passed", "path", "or", "url", ".", "Does", "primitive", "heuristic", "figuring", "if", "path", "or", "URL", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/ArchiveReaderFactory.java#L74-L77
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneOption.java
SaneOption.getIntegerValue
public int getIntegerValue() throws IOException, SaneException { // check for type agreement Preconditions.checkState(getValueType() == OptionValueType.INT, "option is not an integer"); Preconditions.checkState(getValueCount() == 1, "option is an integer array, not integer"); // Send RCP corresponding ...
java
public int getIntegerValue() throws IOException, SaneException { // check for type agreement Preconditions.checkState(getValueType() == OptionValueType.INT, "option is not an integer"); Preconditions.checkState(getValueCount() == 1, "option is an integer array, not integer"); // Send RCP corresponding ...
[ "public", "int", "getIntegerValue", "(", ")", "throws", "IOException", ",", "SaneException", "{", "// check for type agreement", "Preconditions", ".", "checkState", "(", "getValueType", "(", ")", "==", "OptionValueType", ".", "INT", ",", "\"option is not an integer\"", ...
Reads the current Integer value option. We do not cache value from previous get or set operations so each get involves a round trip to the server. TODO: consider caching the returned value for "fast read" later @return the value of the option @throws IOException if a problem occurred while talking to SANE
[ "Reads", "the", "current", "Integer", "value", "option", ".", "We", "do", "not", "cache", "value", "from", "previous", "get", "or", "set", "operations", "so", "each", "get", "involves", "a", "round", "trip", "to", "the", "server", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneOption.java#L343-L364
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneOption.java
SaneOption.setBooleanValue
public boolean setBooleanValue(boolean value) throws IOException, SaneException { ControlOptionResult result = writeOption(SaneWord.forInt(value ? 1 : 0)); Preconditions.checkState(result.getType() == OptionValueType.BOOLEAN); return SaneWord.fromBytes(result.getValue()).integerValue() != 0; }
java
public boolean setBooleanValue(boolean value) throws IOException, SaneException { ControlOptionResult result = writeOption(SaneWord.forInt(value ? 1 : 0)); Preconditions.checkState(result.getType() == OptionValueType.BOOLEAN); return SaneWord.fromBytes(result.getValue()).integerValue() != 0; }
[ "public", "boolean", "setBooleanValue", "(", "boolean", "value", ")", "throws", "IOException", ",", "SaneException", "{", "ControlOptionResult", "result", "=", "writeOption", "(", "SaneWord", ".", "forInt", "(", "value", "?", "1", ":", "0", ")", ")", ";", "P...
Sets the value of the current option to the supplied boolean value. Option value must be of boolean type. SANE may ignore your preference, so if you need to ensure the value has been set correctly, you should examine the return value of this method. @return the value that the option now has according to SANE
[ "Sets", "the", "value", "of", "the", "current", "option", "to", "the", "supplied", "boolean", "value", ".", "Option", "value", "must", "be", "of", "boolean", "type", ".", "SANE", "may", "ignore", "your", "preference", "so", "if", "you", "need", "to", "en...
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneOption.java#L473-L478
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneOption.java
SaneOption.setFixedValue
public double setFixedValue(double value) throws IOException, SaneException { Preconditions.checkArgument( value >= -32768 && value <= 32767.9999, "value " + value + " is out of range"); SaneWord wordValue = SaneWord.forFixedPrecision(value); ControlOptionResult result = writeOption(wordValue); ...
java
public double setFixedValue(double value) throws IOException, SaneException { Preconditions.checkArgument( value >= -32768 && value <= 32767.9999, "value " + value + " is out of range"); SaneWord wordValue = SaneWord.forFixedPrecision(value); ControlOptionResult result = writeOption(wordValue); ...
[ "public", "double", "setFixedValue", "(", "double", "value", ")", "throws", "IOException", ",", "SaneException", "{", "Preconditions", ".", "checkArgument", "(", "value", ">=", "-", "32768", "&&", "value", "<=", "32767.9999", ",", "\"value \"", "+", "value", "...
Sets the value of the current option to the supplied fixed-precision value. Option value must be of fixed-precision type.
[ "Sets", "the", "value", "of", "the", "current", "option", "to", "the", "supplied", "fixed", "-", "precision", "value", ".", "Option", "value", "must", "be", "of", "fixed", "-", "precision", "type", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneOption.java#L488-L498
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneOption.java
SaneOption.setIntegerValue
public int setIntegerValue(int newValue) throws IOException, SaneException { Preconditions.checkState(getValueCount() == 1, "option is an array"); // check that this option is readable Preconditions.checkState(isWriteable()); // Send RPC corresponding to: // // SANE_Status sane_control_option ...
java
public int setIntegerValue(int newValue) throws IOException, SaneException { Preconditions.checkState(getValueCount() == 1, "option is an array"); // check that this option is readable Preconditions.checkState(isWriteable()); // Send RPC corresponding to: // // SANE_Status sane_control_option ...
[ "public", "int", "setIntegerValue", "(", "int", "newValue", ")", "throws", "IOException", ",", "SaneException", "{", "Preconditions", ".", "checkState", "(", "getValueCount", "(", ")", "==", "1", ",", "\"option is an array\"", ")", ";", "// check that this option is...
Set the value of the current option to the supplied value. Option value must be of integer type TODO: consider caching the returned value for "fast read" later @param newValue for the option @return the value actually set @throws IOException
[ "Set", "the", "value", "of", "the", "current", "option", "to", "the", "supplied", "value", ".", "Option", "value", "must", "be", "of", "integer", "type" ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneOption.java#L571-L588
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneDevice.java
SaneDevice.close
@Override public void close() throws IOException { if (!isOpen()) { throw new IOException("device is already closed"); } session.closeDevice(handle); handle = null; }
java
@Override public void close() throws IOException { if (!isOpen()) { throw new IOException("device is already closed"); } session.closeDevice(handle); handle = null; }
[ "@", "Override", "public", "void", "close", "(", ")", "throws", "IOException", "{", "if", "(", "!", "isOpen", "(", ")", ")", "{", "throw", "new", "IOException", "(", "\"device is already closed\"", ")", ";", "}", "session", ".", "closeDevice", "(", "handle...
Closes the device. @throws IOException if an error occurs talking to the SANE backend @throws IllegalStateException if the device is already closed
[ "Closes", "the", "device", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneDevice.java#L130-L138
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneDevice.java
SaneDevice.listOptions
public List<SaneOption> listOptions() throws IOException { if (optionTitleMap == null) { groups.clear(); optionTitleMap = Maps.uniqueIndex( SaneOption.optionsFor(this), new Function<SaneOption, String>() { @Override public String appl...
java
public List<SaneOption> listOptions() throws IOException { if (optionTitleMap == null) { groups.clear(); optionTitleMap = Maps.uniqueIndex( SaneOption.optionsFor(this), new Function<SaneOption, String>() { @Override public String appl...
[ "public", "List", "<", "SaneOption", ">", "listOptions", "(", ")", "throws", "IOException", "{", "if", "(", "optionTitleMap", "==", "null", ")", "{", "groups", ".", "clear", "(", ")", ";", "optionTitleMap", "=", "Maps", ".", "uniqueIndex", "(", "SaneOption...
Returns the list of options applicable to this device. @return a list of {@link SaneOption} instances @throws IOException if a problem occurred talking to the SANE backend
[ "Returns", "the", "list", "of", "options", "applicable", "to", "this", "device", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneDevice.java#L167-L183
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/OptionGroup.java
OptionGroup.addOption
void addOption(SaneOption option) { Preconditions.checkState(option.getGroup() == this); options.add(option); }
java
void addOption(SaneOption option) { Preconditions.checkState(option.getGroup() == this); options.add(option); }
[ "void", "addOption", "(", "SaneOption", "option", ")", "{", "Preconditions", ".", "checkState", "(", "option", ".", "getGroup", "(", ")", "==", "this", ")", ";", "options", ".", "add", "(", "option", ")", ";", "}" ]
Adds an option to the group.
[ "Adds", "an", "option", "to", "the", "group", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/OptionGroup.java#L42-L45
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneSession.java
SaneSession.withRemoteSane
public static SaneSession withRemoteSane(InetAddress saneAddress, int port) throws IOException { return withRemoteSane(saneAddress, port, 0, TimeUnit.MILLISECONDS, 0, TimeUnit.MILLISECONDS); }
java
public static SaneSession withRemoteSane(InetAddress saneAddress, int port) throws IOException { return withRemoteSane(saneAddress, port, 0, TimeUnit.MILLISECONDS, 0, TimeUnit.MILLISECONDS); }
[ "public", "static", "SaneSession", "withRemoteSane", "(", "InetAddress", "saneAddress", ",", "int", "port", ")", "throws", "IOException", "{", "return", "withRemoteSane", "(", "saneAddress", ",", "port", ",", "0", ",", "TimeUnit", ".", "MILLISECONDS", ",", "0", ...
Establishes a connection to the SANE daemon running on the given host on the given port with no connection timeout.
[ "Establishes", "a", "connection", "to", "the", "SANE", "daemon", "running", "on", "the", "given", "host", "on", "the", "given", "port", "with", "no", "connection", "timeout", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneSession.java#L86-L88
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneSession.java
SaneSession.listDevices
public List<SaneDevice> listDevices() throws IOException, SaneException { outputStream.write(SaneRpcCode.SANE_NET_GET_DEVICES); outputStream.flush(); return inputStream.readDeviceList(); }
java
public List<SaneDevice> listDevices() throws IOException, SaneException { outputStream.write(SaneRpcCode.SANE_NET_GET_DEVICES); outputStream.flush(); return inputStream.readDeviceList(); }
[ "public", "List", "<", "SaneDevice", ">", "listDevices", "(", ")", "throws", "IOException", ",", "SaneException", "{", "outputStream", ".", "write", "(", "SaneRpcCode", ".", "SANE_NET_GET_DEVICES", ")", ";", "outputStream", ".", "flush", "(", ")", ";", "return...
Lists the devices known to the SANE daemon. @return a list of devices that may be opened, see {@link SaneDevice#open} @throws IOException if an error occurs while communicating with the SANE daemon @throws SaneException if the SANE backend returns an error in response to this request
[ "Lists", "the", "devices", "known", "to", "the", "SANE", "daemon", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneSession.java#L160-L164
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneSession.java
SaneSession.close
@Override public void close() throws IOException { try { outputStream.write(SaneRpcCode.SANE_NET_EXIT); outputStream.close(); } finally { socket.close(); } }
java
@Override public void close() throws IOException { try { outputStream.write(SaneRpcCode.SANE_NET_EXIT); outputStream.close(); } finally { socket.close(); } }
[ "@", "Override", "public", "void", "close", "(", ")", "throws", "IOException", "{", "try", "{", "outputStream", ".", "write", "(", "SaneRpcCode", ".", "SANE_NET_EXIT", ")", ";", "outputStream", ".", "close", "(", ")", ";", "}", "finally", "{", "socket", ...
Closes the connection to the SANE server. This is done immediately by closing the socket. @throws IOException if an error occurred while closing the connection
[ "Closes", "the", "connection", "to", "the", "SANE", "server", ".", "This", "is", "done", "immediately", "by", "closing", "the", "socket", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneSession.java#L171-L179
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneSession.java
SaneSession.authorize
boolean authorize(String resource) throws IOException { if (passwordProvider == null) { throw new IOException( "Authorization failed - no password provider present " + "(you must call setPasswordProvider)"); } if (passwordProvider.canAuthenticate(resource)) { // RPC code...
java
boolean authorize(String resource) throws IOException { if (passwordProvider == null) { throw new IOException( "Authorization failed - no password provider present " + "(you must call setPasswordProvider)"); } if (passwordProvider.canAuthenticate(resource)) { // RPC code...
[ "boolean", "authorize", "(", "String", "resource", ")", "throws", "IOException", "{", "if", "(", "passwordProvider", "==", "null", ")", "{", "throw", "new", "IOException", "(", "\"Authorization failed - no password provider present \"", "+", "\"(you must call setPasswordP...
Authorize the resource for access. @throws IOException if an error occurs while communicating with the SANE daemon
[ "Authorize", "the", "resource", "for", "access", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneSession.java#L345-L366
train
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneSession.java
SaneSession.writePassword
private void writePassword(String resource, String password) throws IOException { String[] resourceParts = resource.split("\\$MD5\\$"); if (resourceParts.length == 1) { // Write in clean outputStream.write(password); } else { outputStream.write("$MD5$" + SanePasswordEncoder.derivePassword(...
java
private void writePassword(String resource, String password) throws IOException { String[] resourceParts = resource.split("\\$MD5\\$"); if (resourceParts.length == 1) { // Write in clean outputStream.write(password); } else { outputStream.write("$MD5$" + SanePasswordEncoder.derivePassword(...
[ "private", "void", "writePassword", "(", "String", "resource", ",", "String", "password", ")", "throws", "IOException", "{", "String", "[", "]", "resourceParts", "=", "resource", ".", "split", "(", "\"\\\\$MD5\\\\$\"", ")", ";", "if", "(", "resourceParts", "."...
Write password to outputstream depending on resource provided by saned. @param resource as provided by sane in authorization request @param password @throws IOException
[ "Write", "password", "to", "outputstream", "depending", "on", "resource", "provided", "by", "saned", "." ]
15ad0f73df0a8d0efec5167a2141cbd53afd862d
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneSession.java#L375-L383
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlay.java
FeatureOverlay.ignoreTileDao
public void ignoreTileDao(TileDao tileDao) { GeoPackageOverlay tileOverlay = new GeoPackageOverlay(tileDao); linkedOverlays.add(tileOverlay); }
java
public void ignoreTileDao(TileDao tileDao) { GeoPackageOverlay tileOverlay = new GeoPackageOverlay(tileDao); linkedOverlays.add(tileOverlay); }
[ "public", "void", "ignoreTileDao", "(", "TileDao", "tileDao", ")", "{", "GeoPackageOverlay", "tileOverlay", "=", "new", "GeoPackageOverlay", "(", "tileDao", ")", ";", "linkedOverlays", ".", "add", "(", "tileOverlay", ")", ";", "}" ]
Ignore drawing tiles if they exist in the tile table represented by the tile dao @param tileDao tile data access object @since 1.2.6
[ "Ignore", "drawing", "tiles", "if", "they", "exist", "in", "the", "tile", "table", "represented", "by", "the", "tile", "dao" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlay.java#L112-L116
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.simplifyPoints
private List<Point> simplifyPoints(List<Point> points) { List<Point> simplifiedPoints = null; if (simplifyTolerance != null) { // Reproject to web mercator if not in meters if (projection != null && !projection.isUnit(Units.METRES)) { points = toWebMercator.tran...
java
private List<Point> simplifyPoints(List<Point> points) { List<Point> simplifiedPoints = null; if (simplifyTolerance != null) { // Reproject to web mercator if not in meters if (projection != null && !projection.isUnit(Units.METRES)) { points = toWebMercator.tran...
[ "private", "List", "<", "Point", ">", "simplifyPoints", "(", "List", "<", "Point", ">", "points", ")", "{", "List", "<", "Point", ">", "simplifiedPoints", "=", "null", ";", "if", "(", "simplifyTolerance", "!=", "null", ")", "{", "// Reproject to web mercator...
When the simplify tolerance is set, simplify the points to a similar curve with fewer points. @param points ordered points @return simplified points
[ "When", "the", "simplify", "tolerance", "is", "set", "simplify", "the", "points", "to", "a", "similar", "curve", "with", "fewer", "points", "." ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L565-L588
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.getOrientation
public PolygonOrientation getOrientation(List<LatLng> points) { return SphericalUtil.computeSignedArea(points) >= 0 ? PolygonOrientation.COUNTERCLOCKWISE : PolygonOrientation.CLOCKWISE; }
java
public PolygonOrientation getOrientation(List<LatLng> points) { return SphericalUtil.computeSignedArea(points) >= 0 ? PolygonOrientation.COUNTERCLOCKWISE : PolygonOrientation.CLOCKWISE; }
[ "public", "PolygonOrientation", "getOrientation", "(", "List", "<", "LatLng", ">", "points", ")", "{", "return", "SphericalUtil", ".", "computeSignedArea", "(", "points", ")", ">=", "0", "?", "PolygonOrientation", ".", "COUNTERCLOCKWISE", ":", "PolygonOrientation", ...
Determine the closed points orientation @param points closed points @return orientation @since 1.3.2
[ "Determine", "the", "closed", "points", "orientation" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L728-L730
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.addShapeToMap
public static GoogleMapShape addShapeToMap(GoogleMap map, GoogleMapShape shape) { GoogleMapShape addedShape = null; switch (shape.getShapeType()) { case LAT_LNG: addedShape = new GoogleMapShape(shape.getGeometryType(), ...
java
public static GoogleMapShape addShapeToMap(GoogleMap map, GoogleMapShape shape) { GoogleMapShape addedShape = null; switch (shape.getShapeType()) { case LAT_LNG: addedShape = new GoogleMapShape(shape.getGeometryType(), ...
[ "public", "static", "GoogleMapShape", "addShapeToMap", "(", "GoogleMap", "map", ",", "GoogleMapShape", "shape", ")", "{", "GoogleMapShape", "addedShape", "=", "null", ";", "switch", "(", "shape", ".", "getShapeType", "(", ")", ")", "{", "case", "LAT_LNG", ":",...
Add a shape to the map @param map google map @param shape google map shape @return google map shape
[ "Add", "a", "shape", "to", "the", "map" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1464-L1524
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.addPolygonsToMap
public static mil.nga.geopackage.map.geom.MultiPolygon addPolygonsToMap( GoogleMap map, MultiPolygonOptions polygons) { mil.nga.geopackage.map.geom.MultiPolygon multiPolygon = new mil.nga.geopackage.map.geom.MultiPolygon(); for (PolygonOptions polygonOption : polygons.getPolygonOptions()) { ...
java
public static mil.nga.geopackage.map.geom.MultiPolygon addPolygonsToMap( GoogleMap map, MultiPolygonOptions polygons) { mil.nga.geopackage.map.geom.MultiPolygon multiPolygon = new mil.nga.geopackage.map.geom.MultiPolygon(); for (PolygonOptions polygonOption : polygons.getPolygonOptions()) { ...
[ "public", "static", "mil", ".", "nga", ".", "geopackage", ".", "map", ".", "geom", ".", "MultiPolygon", "addPolygonsToMap", "(", "GoogleMap", "map", ",", "MultiPolygonOptions", "polygons", ")", "{", "mil", ".", "nga", ".", "geopackage", ".", "map", ".", "g...
Add a list of Polygons to the map @param map google map @param polygons multi polygon options @return multi polygon
[ "Add", "a", "list", "of", "Polygons", "to", "the", "map" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1643-L1661
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.addPointsToMapAsMarkers
public List<Marker> addPointsToMapAsMarkers(GoogleMap map, List<LatLng> points, MarkerOptions customMarkerOptions, boolean ignoreIdenticalEnds) { List<Marker> markers = new ArrayList<Marker>(); for (int i = ...
java
public List<Marker> addPointsToMapAsMarkers(GoogleMap map, List<LatLng> points, MarkerOptions customMarkerOptions, boolean ignoreIdenticalEnds) { List<Marker> markers = new ArrayList<Marker>(); for (int i = ...
[ "public", "List", "<", "Marker", ">", "addPointsToMapAsMarkers", "(", "GoogleMap", "map", ",", "List", "<", "LatLng", ">", "points", ",", "MarkerOptions", "customMarkerOptions", ",", "boolean", "ignoreIdenticalEnds", ")", "{", "List", "<", "Marker", ">", "marker...
Add the list of points as markers @param map google map @param points points @param customMarkerOptions custom marker options @param ignoreIdenticalEnds ignore identical ends flag @return list of markers
[ "Add", "the", "list", "of", "points", "as", "markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1817-L1846
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.addPolylineToMapAsMarkers
public PolylineMarkers addPolylineToMapAsMarkers(GoogleMap map, PolylineOptions polylineOptions, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolyl...
java
public PolylineMarkers addPolylineToMapAsMarkers(GoogleMap map, PolylineOptions polylineOptions, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolyl...
[ "public", "PolylineMarkers", "addPolylineToMapAsMarkers", "(", "GoogleMap", "map", ",", "PolylineOptions", "polylineOptions", ",", "MarkerOptions", "polylineMarkerOptions", ",", "PolylineOptions", "globalPolylineOptions", ")", "{", "PolylineMarkers", "polylineMarkers", "=", "...
Add a Polyline to the map as markers @param map google map @param polylineOptions polyline options @param polylineMarkerOptions polyline marker options @param globalPolylineOptions global polyline options @return polyline markers
[ "Add", "a", "Polyline", "to", "the", "map", "as", "markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1857-L1880
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.addPolygonToMapAsMarkers
public PolygonMarkers addPolygonToMapAsMarkers( GoogleMapShapeMarkers shapeMarkers, GoogleMap map, PolygonOptions polygonOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions) { PolygonMarkers pol...
java
public PolygonMarkers addPolygonToMapAsMarkers( GoogleMapShapeMarkers shapeMarkers, GoogleMap map, PolygonOptions polygonOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions) { PolygonMarkers pol...
[ "public", "PolygonMarkers", "addPolygonToMapAsMarkers", "(", "GoogleMapShapeMarkers", "shapeMarkers", ",", "GoogleMap", "map", ",", "PolygonOptions", "polygonOptions", ",", "MarkerOptions", "polygonMarkerOptions", ",", "MarkerOptions", "polygonMarkerHoleOptions", ",", "PolygonO...
Add a Polygon to the map as markers @param shapeMarkers google map shape markers @param map google map @param polygonOptions polygon options @param polygonMarkerOptions polygon marker options @param polygonMarkerHoleOptions polygon marker hole options @param globalPolygon...
[ "Add", "a", "Polygon", "to", "the", "map", "as", "markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1893-L1929
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.addMultiPolylineToMapAsMarkers
public MultiPolylineMarkers addMultiPolylineToMapAsMarkers( GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolylineOptions multiPolyline, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions) { MultiPolylineMarkers polylines = new Mu...
java
public MultiPolylineMarkers addMultiPolylineToMapAsMarkers( GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolylineOptions multiPolyline, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions) { MultiPolylineMarkers polylines = new Mu...
[ "public", "MultiPolylineMarkers", "addMultiPolylineToMapAsMarkers", "(", "GoogleMapShapeMarkers", "shapeMarkers", ",", "GoogleMap", "map", ",", "MultiPolylineOptions", "multiPolyline", ",", "MarkerOptions", "polylineMarkerOptions", ",", "PolylineOptions", "globalPolylineOptions", ...
Add a MultiPolylineOptions to the map as markers @param shapeMarkers google map shape markers @param map google map @param multiPolyline multi polyline options @param polylineMarkerOptions polyline marker options @param globalPolylineOptions global polyline options @return multi poly...
[ "Add", "a", "MultiPolylineOptions", "to", "the", "map", "as", "markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1941-L1956
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.addMultiPolygonToMapAsMarkers
public MultiPolygonMarkers addMultiPolygonToMapAsMarkers( GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolygonOptions multiPolygon, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions) { ...
java
public MultiPolygonMarkers addMultiPolygonToMapAsMarkers( GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolygonOptions multiPolygon, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions) { ...
[ "public", "MultiPolygonMarkers", "addMultiPolygonToMapAsMarkers", "(", "GoogleMapShapeMarkers", "shapeMarkers", ",", "GoogleMap", "map", ",", "MultiPolygonOptions", "multiPolygon", ",", "MarkerOptions", "polygonMarkerOptions", ",", "MarkerOptions", "polygonMarkerHoleOptions", ","...
Add a MultiPolygonOptions to the map as markers @param shapeMarkers google map shape markers @param map google map @param multiPolygon multi polygon options @param polygonMarkerOptions polygon marker options @param polygonMarkerHoleOptions polygon marker hole options @p...
[ "Add", "a", "MultiPolygonOptions", "to", "the", "map", "as", "markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1969-L1984
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.getPointsFromMarkers
public List<LatLng> getPointsFromMarkers(List<Marker> markers) { List<LatLng> points = new ArrayList<LatLng>(); for (Marker marker : markers) { points.add(marker.getPosition()); } return points; }
java
public List<LatLng> getPointsFromMarkers(List<Marker> markers) { List<LatLng> points = new ArrayList<LatLng>(); for (Marker marker : markers) { points.add(marker.getPosition()); } return points; }
[ "public", "List", "<", "LatLng", ">", "getPointsFromMarkers", "(", "List", "<", "Marker", ">", "markers", ")", "{", "List", "<", "LatLng", ">", "points", "=", "new", "ArrayList", "<", "LatLng", ">", "(", ")", ";", "for", "(", "Marker", "marker", ":", ...
Get a list of points as LatLng from a list of Markers @param markers list of markers @return lat lngs
[ "Get", "a", "list", "of", "points", "as", "LatLng", "from", "a", "list", "of", "Markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1992-L1998
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.boundingBoxToWebMercator
public BoundingBox boundingBoxToWebMercator(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(toWebMercator); }
java
public BoundingBox boundingBoxToWebMercator(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(toWebMercator); }
[ "public", "BoundingBox", "boundingBoxToWebMercator", "(", "BoundingBox", "boundingBox", ")", "{", "if", "(", "projection", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Shape Converter projection is null\"", ")", ";", "}", "return", "boundingB...
Transform the bounding box in the feature projection to web mercator @param boundingBox bounding box in feature projection @return bounding box in web mercator
[ "Transform", "the", "bounding", "box", "in", "the", "feature", "projection", "to", "web", "mercator" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L2302-L2307
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.boundingBoxToWgs84
public BoundingBox boundingBoxToWgs84(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(toWgs84); }
java
public BoundingBox boundingBoxToWgs84(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(toWgs84); }
[ "public", "BoundingBox", "boundingBoxToWgs84", "(", "BoundingBox", "boundingBox", ")", "{", "if", "(", "projection", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Shape Converter projection is null\"", ")", ";", "}", "return", "boundingBox", ...
Transform the bounding box in the feature projection to WGS84 @param boundingBox bounding box in feature projection @return bounding box in WGS84
[ "Transform", "the", "bounding", "box", "in", "the", "feature", "projection", "to", "WGS84" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L2315-L2320
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.boundingBoxFromWebMercator
public BoundingBox boundingBoxFromWebMercator(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(fromWebMercator); }
java
public BoundingBox boundingBoxFromWebMercator(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(fromWebMercator); }
[ "public", "BoundingBox", "boundingBoxFromWebMercator", "(", "BoundingBox", "boundingBox", ")", "{", "if", "(", "projection", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Shape Converter projection is null\"", ")", ";", "}", "return", "boundin...
Transform the bounding box in web mercator to the feature projection @param boundingBox bounding box in web mercator @return bounding box in the feature projection
[ "Transform", "the", "bounding", "box", "in", "web", "mercator", "to", "the", "feature", "projection" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L2328-L2333
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.boundingBoxFromWgs84
public BoundingBox boundingBoxFromWgs84(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(fromWgs84); }
java
public BoundingBox boundingBoxFromWgs84(BoundingBox boundingBox) { if (projection == null) { throw new GeoPackageException("Shape Converter projection is null"); } return boundingBox.transform(fromWgs84); }
[ "public", "BoundingBox", "boundingBoxFromWgs84", "(", "BoundingBox", "boundingBox", ")", "{", "if", "(", "projection", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Shape Converter projection is null\"", ")", ";", "}", "return", "boundingBox",...
Transform the bounding box in WGS84 to the feature projection @param boundingBox bounding box in WGS84 @return bounding box in the feature projection
[ "Transform", "the", "bounding", "box", "in", "WGS84", "to", "the", "feature", "projection" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L2341-L2346
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java
DateSpinner.setDateFormat
public void setDateFormat(java.text.DateFormat dateFormat, java.text.DateFormat numbersDateFormat) { this.customDateFormat = dateFormat; this.secondaryDateFormat = numbersDateFormat; // update the spinner with the new date format: // the only spinner item that will be affected is the mo...
java
public void setDateFormat(java.text.DateFormat dateFormat, java.text.DateFormat numbersDateFormat) { this.customDateFormat = dateFormat; this.secondaryDateFormat = numbersDateFormat; // update the spinner with the new date format: // the only spinner item that will be affected is the mo...
[ "public", "void", "setDateFormat", "(", "java", ".", "text", ".", "DateFormat", "dateFormat", ",", "java", ".", "text", ".", "DateFormat", "numbersDateFormat", ")", "{", "this", ".", "customDateFormat", "=", "dateFormat", ";", "this", ".", "secondaryDateFormat",...
Sets the custom date format to use for formatting Calendar objects to displayable strings. @param dateFormat The new DateFormat, or null to use the default format. @param numbersDateFormat The DateFormat for formatting the secondary date when both FLAG_NUMBERS and FLAG_WEEKDAY_NAMES are set, or null to use the default ...
[ "Sets", "the", "custom", "date", "format", "to", "use", "for", "formatting", "Calendar", "objects", "to", "displayable", "strings", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java#L333-L351
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java
DateSpinner.setShowPastItems
public void setShowPastItems(boolean enable) { if(enable && !showPastItems) { // first reset the minimum date if necessary: if(getMinDate() != null && compareCalendarDates(getMinDate(), Calendar.getInstance()) == 0) setMinDate(null); // create the yesterday a...
java
public void setShowPastItems(boolean enable) { if(enable && !showPastItems) { // first reset the minimum date if necessary: if(getMinDate() != null && compareCalendarDates(getMinDate(), Calendar.getInstance()) == 0) setMinDate(null); // create the yesterday a...
[ "public", "void", "setShowPastItems", "(", "boolean", "enable", ")", "{", "if", "(", "enable", "&&", "!", "showPastItems", ")", "{", "// first reset the minimum date if necessary:", "if", "(", "getMinDate", "(", ")", "!=", "null", "&&", "compareCalendarDates", "("...
Toggles showing the past items. Past mode shows the yesterday and last weekday item. @param enable True to enable, false to disable past mode.
[ "Toggles", "showing", "the", "past", "items", ".", "Past", "mode", "shows", "the", "yesterday", "and", "last", "weekday", "item", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java#L488-L515
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java
DateSpinner.setShowMonthItem
public void setShowMonthItem(boolean enable) { if(enable && !showMonthItem) { // create the in 1 month item final Calendar date = Calendar.getInstance(); date.add(Calendar.MONTH, 1); addAdapterItem(new DateItem(formatDate(date), date, R.id.date_month)); } ...
java
public void setShowMonthItem(boolean enable) { if(enable && !showMonthItem) { // create the in 1 month item final Calendar date = Calendar.getInstance(); date.add(Calendar.MONTH, 1); addAdapterItem(new DateItem(formatDate(date), date, R.id.date_month)); } ...
[ "public", "void", "setShowMonthItem", "(", "boolean", "enable", ")", "{", "if", "(", "enable", "&&", "!", "showMonthItem", ")", "{", "// create the in 1 month item", "final", "Calendar", "date", "=", "Calendar", ".", "getInstance", "(", ")", ";", "date", ".", ...
Toggles showing the month item. Month mode an item in exactly one month from now. @param enable True to enable, false to disable month mode.
[ "Toggles", "showing", "the", "month", "item", ".", "Month", "mode", "an", "item", "in", "exactly", "one", "month", "from", "now", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java#L521-L532
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java
DateSpinner.setFlags
public void setFlags(int modeOrFlags) { setShowPastItems((modeOrFlags & ReminderDatePicker.FLAG_PAST) != 0); setShowMonthItem((modeOrFlags & ReminderDatePicker.FLAG_MONTH) != 0); setShowWeekdayNames((modeOrFlags & ReminderDatePicker.FLAG_WEEKDAY_NAMES) != 0); setShowNumbersInView((modeOr...
java
public void setFlags(int modeOrFlags) { setShowPastItems((modeOrFlags & ReminderDatePicker.FLAG_PAST) != 0); setShowMonthItem((modeOrFlags & ReminderDatePicker.FLAG_MONTH) != 0); setShowWeekdayNames((modeOrFlags & ReminderDatePicker.FLAG_WEEKDAY_NAMES) != 0); setShowNumbersInView((modeOr...
[ "public", "void", "setFlags", "(", "int", "modeOrFlags", ")", "{", "setShowPastItems", "(", "(", "modeOrFlags", "&", "ReminderDatePicker", ".", "FLAG_PAST", ")", "!=", "0", ")", ";", "setShowMonthItem", "(", "(", "modeOrFlags", "&", "ReminderDatePicker", ".", ...
Set the flags to use for this date spinner. @param modeOrFlags A mode of ReminderDatePicker.MODE_... or multiple ReminderDatePicker.FLAG_... combined with the | operator.
[ "Set", "the", "flags", "to", "use", "for", "this", "date", "spinner", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/DateSpinner.java#L575-L580
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/PickerSpinnerAdapter.java
PickerSpinnerAdapter.brightness
private float brightness(int color) { int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; int b = color & 0xFF; int V = Math.max(b, Math.max(r, g)); return (V / 255.f); }
java
private float brightness(int color) { int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; int b = color & 0xFF; int V = Math.max(b, Math.max(r, g)); return (V / 255.f); }
[ "private", "float", "brightness", "(", "int", "color", ")", "{", "int", "r", "=", "(", "color", ">>", "16", ")", "&", "0xFF", ";", "int", "g", "=", "(", "color", ">>", "8", ")", "&", "0xFF", ";", "int", "b", "=", "color", "&", "0xFF", ";", "i...
Returns the brightness component of a color int. Taken from android.graphics.Color. @return A value between 0.0f and 1.0f
[ "Returns", "the", "brightness", "component", "of", "a", "color", "int", ".", "Taken", "from", "android", ".", "graphics", ".", "Color", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/PickerSpinnerAdapter.java#L313-L320
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java
ReminderDatePicker.getNextItemDate
private @Nullable Calendar getNextItemDate(Calendar searchDate) { final int last = dateSpinner.getLastItemPosition(); for (int i=0; i<=last; i++) { final Calendar date = ((DateItem) dateSpinner.getItemAtPosition(i)).getDate(); // use the DateSpinner's compare method so hours and ...
java
private @Nullable Calendar getNextItemDate(Calendar searchDate) { final int last = dateSpinner.getLastItemPosition(); for (int i=0; i<=last; i++) { final Calendar date = ((DateItem) dateSpinner.getItemAtPosition(i)).getDate(); // use the DateSpinner's compare method so hours and ...
[ "private", "@", "Nullable", "Calendar", "getNextItemDate", "(", "Calendar", "searchDate", ")", "{", "final", "int", "last", "=", "dateSpinner", ".", "getLastItemPosition", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "last", ";", "i",...
Gets the next date item's date equal to or later than the given date in the DateSpinner. Requires that the items are in ascending order. @return A date from the next item in the DateSpinner, or no such date was found.
[ "Gets", "the", "next", "date", "item", "s", "date", "equal", "to", "or", "later", "than", "the", "given", "date", "in", "the", "DateSpinner", ".", "Requires", "that", "the", "items", "are", "in", "ascending", "order", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java#L216-L226
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java
ReminderDatePicker.setSelectedDate
public void setSelectedDate(Calendar date) { if(date!=null) { dateSpinner.setSelectedDate(date); timeSpinner.setSelectedTime(date.get(Calendar.HOUR_OF_DAY), date.get(Calendar.MINUTE)); // a custom selection has been set, don't select the default date: shouldSelect...
java
public void setSelectedDate(Calendar date) { if(date!=null) { dateSpinner.setSelectedDate(date); timeSpinner.setSelectedTime(date.get(Calendar.HOUR_OF_DAY), date.get(Calendar.MINUTE)); // a custom selection has been set, don't select the default date: shouldSelect...
[ "public", "void", "setSelectedDate", "(", "Calendar", "date", ")", "{", "if", "(", "date", "!=", "null", ")", "{", "dateSpinner", ".", "setSelectedDate", "(", "date", ")", ";", "timeSpinner", ".", "setSelectedTime", "(", "date", ".", "get", "(", "Calendar"...
Sets the Spinners' selection as date considering both time and day. @param date The date to be selected.
[ "Sets", "the", "Spinners", "selection", "as", "date", "considering", "both", "time", "and", "day", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java#L247-L254
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java
ReminderDatePicker.setSelectedDate
public void setSelectedDate(int year, int month, int day) { dateSpinner.setSelectedDate(new GregorianCalendar(year, month, day)); // a custom selection has been set, don't select the default date: shouldSelectDefault = false; }
java
public void setSelectedDate(int year, int month, int day) { dateSpinner.setSelectedDate(new GregorianCalendar(year, month, day)); // a custom selection has been set, don't select the default date: shouldSelectDefault = false; }
[ "public", "void", "setSelectedDate", "(", "int", "year", ",", "int", "month", ",", "int", "day", ")", "{", "dateSpinner", ".", "setSelectedDate", "(", "new", "GregorianCalendar", "(", "year", ",", "month", ",", "day", ")", ")", ";", "// a custom selection ha...
Sets the Spinners' date selection as integers considering only day.
[ "Sets", "the", "Spinners", "date", "selection", "as", "integers", "considering", "only", "day", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java#L259-L263
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java
ReminderDatePicker.setHideTime
public void setHideTime(boolean enable, final boolean useDarkTheme) { if(enable && !shouldHideTime) { // hide the time spinner and show a button to show it instead timeSpinner.setVisibility(GONE); ImageButton timeButton = (ImageButton) LayoutInflater.from(getContext()).inflat...
java
public void setHideTime(boolean enable, final boolean useDarkTheme) { if(enable && !shouldHideTime) { // hide the time spinner and show a button to show it instead timeSpinner.setVisibility(GONE); ImageButton timeButton = (ImageButton) LayoutInflater.from(getContext()).inflat...
[ "public", "void", "setHideTime", "(", "boolean", "enable", ",", "final", "boolean", "useDarkTheme", ")", "{", "if", "(", "enable", "&&", "!", "shouldHideTime", ")", "{", "// hide the time spinner and show a button to show it instead", "timeSpinner", ".", "setVisibility"...
Toggles hiding the Time Spinner and replaces it with a Button. @param enable True to hide the Spinner, false to show it. @param useDarkTheme True if a white icon shall be used, false for a dark one.
[ "Toggles", "hiding", "the", "Time", "Spinner", "and", "replaces", "it", "with", "a", "Button", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java#L330-L348
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java
ReminderDatePicker.setFlags
public void setFlags(int modeOrFlags) { // check each flag and pass it on if needed: setHideTime((modeOrFlags & FLAG_HIDE_TIME) != 0, isActivityUsingDarkTheme()); dateSpinner.setFlags(modeOrFlags); timeSpinner.setFlags(modeOrFlags); }
java
public void setFlags(int modeOrFlags) { // check each flag and pass it on if needed: setHideTime((modeOrFlags & FLAG_HIDE_TIME) != 0, isActivityUsingDarkTheme()); dateSpinner.setFlags(modeOrFlags); timeSpinner.setFlags(modeOrFlags); }
[ "public", "void", "setFlags", "(", "int", "modeOrFlags", ")", "{", "// check each flag and pass it on if needed:", "setHideTime", "(", "(", "modeOrFlags", "&", "FLAG_HIDE_TIME", ")", "!=", "0", ",", "isActivityUsingDarkTheme", "(", ")", ")", ";", "dateSpinner", ".",...
Set the flags to use for the picker. @param modeOrFlags A mode of ReminderDatePicker.MODE_... or multiple ReminderDatePicker.FLAG_... combined with the | operator.
[ "Set", "the", "flags", "to", "use", "for", "the", "picker", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java#L448-L453
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/TimeSpinner.java
TimeSpinner.setTimeFormat
public void setTimeFormat(java.text.DateFormat timeFormat) { this.timeFormat = timeFormat; // update our pre-built timePickerDialog with the new timeFormat: initTimePickerDialog(getContext()); // save the flags and selection first: final PickerSpinnerAdapter adapter = ((PickerSp...
java
public void setTimeFormat(java.text.DateFormat timeFormat) { this.timeFormat = timeFormat; // update our pre-built timePickerDialog with the new timeFormat: initTimePickerDialog(getContext()); // save the flags and selection first: final PickerSpinnerAdapter adapter = ((PickerSp...
[ "public", "void", "setTimeFormat", "(", "java", ".", "text", ".", "DateFormat", "timeFormat", ")", "{", "this", ".", "timeFormat", "=", "timeFormat", ";", "// update our pre-built timePickerDialog with the new timeFormat:", "initTimePickerDialog", "(", "getContext", "(", ...
Sets the time format to use for formatting Calendar objects to displayable strings. @param timeFormat The new time format (as java.text.DateFormat), or null to use the default format.
[ "Sets", "the", "time", "format", "to", "use", "for", "formatting", "Calendar", "objects", "to", "displayable", "strings", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/TimeSpinner.java#L264-L292
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/TimeSpinner.java
TimeSpinner.setShowMoreTimeItems
public void setShowMoreTimeItems(boolean enable) { if(enable && !showMoreTimeItems) { // create the noon and late night item: final Resources res = getResources(); // switch the afternoon item to 2pm: insertAdapterItem(new TimeItem(res.getString(R.string.time_afte...
java
public void setShowMoreTimeItems(boolean enable) { if(enable && !showMoreTimeItems) { // create the noon and late night item: final Resources res = getResources(); // switch the afternoon item to 2pm: insertAdapterItem(new TimeItem(res.getString(R.string.time_afte...
[ "public", "void", "setShowMoreTimeItems", "(", "boolean", "enable", ")", "{", "if", "(", "enable", "&&", "!", "showMoreTimeItems", ")", "{", "// create the noon and late night item:", "final", "Resources", "res", "=", "getResources", "(", ")", ";", "// switch the af...
Toggles showing more time items. If enabled, a noon and a late night time item are shown. @param enable True to enable, false to disable more time items.
[ "Toggles", "showing", "more", "time", "items", ".", "If", "enabled", "a", "noon", "and", "a", "late", "night", "time", "item", "are", "shown", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/TimeSpinner.java#L333-L353
train
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/TimeSpinner.java
TimeSpinner.setFlags
public void setFlags(int modeOrFlags) { setShowMoreTimeItems((modeOrFlags & ReminderDatePicker.FLAG_MORE_TIME) != 0); setShowNumbersInView((modeOrFlags & ReminderDatePicker.FLAG_NUMBERS) != 0); }
java
public void setFlags(int modeOrFlags) { setShowMoreTimeItems((modeOrFlags & ReminderDatePicker.FLAG_MORE_TIME) != 0); setShowNumbersInView((modeOrFlags & ReminderDatePicker.FLAG_NUMBERS) != 0); }
[ "public", "void", "setFlags", "(", "int", "modeOrFlags", ")", "{", "setShowMoreTimeItems", "(", "(", "modeOrFlags", "&", "ReminderDatePicker", ".", "FLAG_MORE_TIME", ")", "!=", "0", ")", ";", "setShowNumbersInView", "(", "(", "modeOrFlags", "&", "ReminderDatePicke...
Set the flags to use for this time spinner. @param modeOrFlags A mode of ReminderDatePicker.MODE_... or multiple ReminderDatePicker.FLAG_... combined with the | operator.
[ "Set", "the", "flags", "to", "use", "for", "this", "time", "spinner", "." ]
7596fbac77a5d26f687fec11758935a2b7db156f
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/TimeSpinner.java#L372-L375
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getTables
public Map<String, Map<Long, FeatureShape>> getTables(String database) { Map<String, Map<Long, FeatureShape>> tables = databases.get(database); if (tables == null) { tables = new HashMap<>(); databases.put(database, tables); } return tables; }
java
public Map<String, Map<Long, FeatureShape>> getTables(String database) { Map<String, Map<Long, FeatureShape>> tables = databases.get(database); if (tables == null) { tables = new HashMap<>(); databases.put(database, tables); } return tables; }
[ "public", "Map", "<", "String", ",", "Map", "<", "Long", ",", "FeatureShape", ">", ">", "getTables", "(", "String", "database", ")", "{", "Map", "<", "String", ",", "Map", "<", "Long", ",", "FeatureShape", ">", ">", "tables", "=", "databases", ".", "...
Get the mapping between tables and feature ids for the database @param database GeoPackage database @return tables to features ids mapping @since 3.2.0
[ "Get", "the", "mapping", "between", "tables", "and", "feature", "ids", "for", "the", "database" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L65-L73
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getFeatureIds
public Map<Long, FeatureShape> getFeatureIds(String database, String table) { Map<String, Map<Long, FeatureShape>> tables = getTables(database); Map<Long, FeatureShape> featureIds = getFeatureIds(tables, table); return featureIds; }
java
public Map<Long, FeatureShape> getFeatureIds(String database, String table) { Map<String, Map<Long, FeatureShape>> tables = getTables(database); Map<Long, FeatureShape> featureIds = getFeatureIds(tables, table); return featureIds; }
[ "public", "Map", "<", "Long", ",", "FeatureShape", ">", "getFeatureIds", "(", "String", "database", ",", "String", "table", ")", "{", "Map", "<", "String", ",", "Map", "<", "Long", ",", "FeatureShape", ">", ">", "tables", "=", "getTables", "(", "database...
Get the mapping between feature ids and map shapes for the database and table @param database GeoPackage database @param table table name @return feature ids to map shapes mapping @since 3.2.0
[ "Get", "the", "mapping", "between", "feature", "ids", "and", "map", "shapes", "for", "the", "database", "and", "table" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L93-L97
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getFeatureIds
private Map<Long, FeatureShape> getFeatureIds(Map<String, Map<Long, FeatureShape>> tables, String table) { Map<Long, FeatureShape> featureIds = tables.get(table); if (featureIds == null) { featureIds = new HashMap<>(); tables.put(table, featureIds); } return feat...
java
private Map<Long, FeatureShape> getFeatureIds(Map<String, Map<Long, FeatureShape>> tables, String table) { Map<Long, FeatureShape> featureIds = tables.get(table); if (featureIds == null) { featureIds = new HashMap<>(); tables.put(table, featureIds); } return feat...
[ "private", "Map", "<", "Long", ",", "FeatureShape", ">", "getFeatureIds", "(", "Map", "<", "String", ",", "Map", "<", "Long", ",", "FeatureShape", ">", ">", "tables", ",", "String", "table", ")", "{", "Map", "<", "Long", ",", "FeatureShape", ">", "feat...
Get the feature ids and map shapes for the tables and table @param tables tables @param table table name @return feature ids to map shapes mapping
[ "Get", "the", "feature", "ids", "and", "map", "shapes", "for", "the", "tables", "and", "table" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L117-L125
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getFeatureShape
public FeatureShape getFeatureShape(String database, String table, long featureId) { Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); FeatureShape featureShape = getFeatureShape(featureIds, featureId); return featureShape; }
java
public FeatureShape getFeatureShape(String database, String table, long featureId) { Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); FeatureShape featureShape = getFeatureShape(featureIds, featureId); return featureShape; }
[ "public", "FeatureShape", "getFeatureShape", "(", "String", "database", ",", "String", "table", ",", "long", "featureId", ")", "{", "Map", "<", "Long", ",", "FeatureShape", ">", "featureIds", "=", "getFeatureIds", "(", "database", ",", "table", ")", ";", "Fe...
Get the feature shape for the database, table, and feature id @param database GeoPackage database @param table table name @param featureId feature id @return feature shape @since 3.2.0
[ "Get", "the", "feature", "shape", "for", "the", "database", "table", "and", "feature", "id" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L136-L140
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getFeatureShapeCount
public int getFeatureShapeCount(String database, String table, long featureId) { return getFeatureShape(database, table, featureId).count(); }
java
public int getFeatureShapeCount(String database, String table, long featureId) { return getFeatureShape(database, table, featureId).count(); }
[ "public", "int", "getFeatureShapeCount", "(", "String", "database", ",", "String", "table", ",", "long", "featureId", ")", "{", "return", "getFeatureShape", "(", "database", ",", "table", ",", "featureId", ")", ".", "count", "(", ")", ";", "}" ]
Get the feature shape count for the database, table, and feature id @param database GeoPackage database @param table table name @param featureId feature id @return map shapes count @since 3.2.0
[ "Get", "the", "feature", "shape", "count", "for", "the", "database", "table", "and", "feature", "id" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L151-L153
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getFeatureShape
private FeatureShape getFeatureShape(Map<Long, FeatureShape> featureIds, long featureId) { FeatureShape featureShape = featureIds.get(featureId); if (featureShape == null) { featureShape = new FeatureShape(featureId); featureIds.put(featureId, featureShape); } re...
java
private FeatureShape getFeatureShape(Map<Long, FeatureShape> featureIds, long featureId) { FeatureShape featureShape = featureIds.get(featureId); if (featureShape == null) { featureShape = new FeatureShape(featureId); featureIds.put(featureId, featureShape); } re...
[ "private", "FeatureShape", "getFeatureShape", "(", "Map", "<", "Long", ",", "FeatureShape", ">", "featureIds", ",", "long", "featureId", ")", "{", "FeatureShape", "featureShape", "=", "featureIds", ".", "get", "(", "featureId", ")", ";", "if", "(", "featureSha...
Get the map shapes for the feature ids and feature id @param featureIds feature ids @param featureId feature id @return feature shape
[ "Get", "the", "map", "shapes", "for", "the", "feature", "ids", "and", "feature", "id" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L162-L170
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.addMapShape
public void addMapShape(GoogleMapShape mapShape, long featureId, String database, String table) { FeatureShape featureShape = getFeatureShape(database, table, featureId); featureShape.addShape(mapShape); }
java
public void addMapShape(GoogleMapShape mapShape, long featureId, String database, String table) { FeatureShape featureShape = getFeatureShape(database, table, featureId); featureShape.addShape(mapShape); }
[ "public", "void", "addMapShape", "(", "GoogleMapShape", "mapShape", ",", "long", "featureId", ",", "String", "database", ",", "String", "table", ")", "{", "FeatureShape", "featureShape", "=", "getFeatureShape", "(", "database", ",", "table", ",", "featureId", ")...
Add a map shape with the feature id, database, and table @param mapShape map shape @param featureId feature id @param database GeoPackage database @param table table name
[ "Add", "a", "map", "shape", "with", "the", "feature", "id", "database", "and", "table" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L180-L183
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.addMapMetadataShape
public void addMapMetadataShape(GoogleMapShape mapShape, long featureId, String database, String table) { FeatureShape featureShape = getFeatureShape(database, table, featureId); featureShape.addMetadataShape(mapShape); }
java
public void addMapMetadataShape(GoogleMapShape mapShape, long featureId, String database, String table) { FeatureShape featureShape = getFeatureShape(database, table, featureId); featureShape.addMetadataShape(mapShape); }
[ "public", "void", "addMapMetadataShape", "(", "GoogleMapShape", "mapShape", ",", "long", "featureId", ",", "String", "database", ",", "String", "table", ")", "{", "FeatureShape", "featureShape", "=", "getFeatureShape", "(", "database", ",", "table", ",", "featureI...
Add a map metadata shape with the feature id, database, and table @param mapShape map metadata shape @param featureId feature id @param database GeoPackage database @param table table name @since 3.2.0
[ "Add", "a", "map", "metadata", "shape", "with", "the", "feature", "id", "database", "and", "table" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L194-L197
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.exists
public boolean exists(long featureId, String database, String table) { boolean exists = false; Map<String, Map<Long, FeatureShape>> tables = databases.get(database); if (tables != null) { Map<Long, FeatureShape> featureIds = tables.get(table); if (featureIds != null) { ...
java
public boolean exists(long featureId, String database, String table) { boolean exists = false; Map<String, Map<Long, FeatureShape>> tables = databases.get(database); if (tables != null) { Map<Long, FeatureShape> featureIds = tables.get(table); if (featureIds != null) { ...
[ "public", "boolean", "exists", "(", "long", "featureId", ",", "String", "database", ",", "String", "table", ")", "{", "boolean", "exists", "=", "false", ";", "Map", "<", "String", ",", "Map", "<", "Long", ",", "FeatureShape", ">", ">", "tables", "=", "...
Check if map shapes exist for the feature id, database, and table @param featureId feature id @param database GeoPackage database @param table table name @return true if exists
[ "Check", "if", "map", "shapes", "exist", "for", "the", "feature", "id", "database", "and", "table" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L207-L219
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.removeShapesWithExclusions
public int removeShapesWithExclusions(String database, Set<GoogleMapShapeType> excludedTypes) { int count = 0; Map<String, Map<Long, FeatureShape>> tables = getTables(database); if (tables != null) { Iterator<String> iterator = tables.keySet().iterator(); while (itera...
java
public int removeShapesWithExclusions(String database, Set<GoogleMapShapeType> excludedTypes) { int count = 0; Map<String, Map<Long, FeatureShape>> tables = getTables(database); if (tables != null) { Iterator<String> iterator = tables.keySet().iterator(); while (itera...
[ "public", "int", "removeShapesWithExclusions", "(", "String", "database", ",", "Set", "<", "GoogleMapShapeType", ">", "excludedTypes", ")", "{", "int", "count", "=", "0", ";", "Map", "<", "String", ",", "Map", "<", "Long", ",", "FeatureShape", ">", ">", "t...
Remove all map shapes in the database from the map, excluding shapes with the excluded types @param database GeoPackage database @param excludedTypes Google Map Shape Types to exclude from map removal @return count of removed features @since 3.2.0
[ "Remove", "all", "map", "shapes", "in", "the", "database", "from", "the", "map", "excluding", "shapes", "with", "the", "excluded", "types" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L329-L351
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.removeShapesWithExclusion
public int removeShapesWithExclusion(String database, String table, GoogleMapShapeType excludedType) { Set<GoogleMapShapeType> excludedTypes = new HashSet<>(); excludedTypes.add(excludedType); return removeShapesWithExclusions(database, table, excludedTypes); }
java
public int removeShapesWithExclusion(String database, String table, GoogleMapShapeType excludedType) { Set<GoogleMapShapeType> excludedTypes = new HashSet<>(); excludedTypes.add(excludedType); return removeShapesWithExclusions(database, table, excludedTypes); }
[ "public", "int", "removeShapesWithExclusion", "(", "String", "database", ",", "String", "table", ",", "GoogleMapShapeType", "excludedType", ")", "{", "Set", "<", "GoogleMapShapeType", ">", "excludedTypes", "=", "new", "HashSet", "<>", "(", ")", ";", "excludedTypes...
Remove all map shapes in the database and table from the map, excluding shapes with the excluded type @param database GeoPackage database @param table table name @param excludedType Google Map Shape Type to exclude from map removal @return count of removed features @since 3.2.0
[ "Remove", "all", "map", "shapes", "in", "the", "database", "and", "table", "from", "the", "map", "excluding", "shapes", "with", "the", "excluded", "type" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L373-L377
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.removeShapesWithExclusions
public int removeShapesWithExclusions(String database, String table, Set<GoogleMapShapeType> excludedTypes) { int count = 0; Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); if (featureIds != null) { Iterator<Long> iterator = featureIds.keySet().iterator(); ...
java
public int removeShapesWithExclusions(String database, String table, Set<GoogleMapShapeType> excludedTypes) { int count = 0; Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); if (featureIds != null) { Iterator<Long> iterator = featureIds.keySet().iterator(); ...
[ "public", "int", "removeShapesWithExclusions", "(", "String", "database", ",", "String", "table", ",", "Set", "<", "GoogleMapShapeType", ">", "excludedTypes", ")", "{", "int", "count", "=", "0", ";", "Map", "<", "Long", ",", "FeatureShape", ">", "featureIds", ...
Remove all map shapes in the database and table from the map, excluding shapes with the excluded types @param database GeoPackage database @param table table name @param excludedTypes Google Map Shape Types to exclude from map removal @return count of removed features @since 3.2.0
[ "Remove", "all", "map", "shapes", "in", "the", "database", "and", "table", "from", "the", "map", "excluding", "shapes", "with", "the", "excluded", "types" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L405-L445
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.removeShapesNotWithinMap
public int removeShapesNotWithinMap(GoogleMap map) { int count = 0; BoundingBox boundingBox = MapUtils.getBoundingBox(map); for (String database : databases.keySet()) { count += removeShapesNotWithinMap(boundingBox, database); } return count; }
java
public int removeShapesNotWithinMap(GoogleMap map) { int count = 0; BoundingBox boundingBox = MapUtils.getBoundingBox(map); for (String database : databases.keySet()) { count += removeShapesNotWithinMap(boundingBox, database); } return count; }
[ "public", "int", "removeShapesNotWithinMap", "(", "GoogleMap", "map", ")", "{", "int", "count", "=", "0", ";", "BoundingBox", "boundingBox", "=", "MapUtils", ".", "getBoundingBox", "(", "map", ")", ";", "for", "(", "String", "database", ":", "databases", "."...
Remove all map shapes that are not visible in the map @param map map @return count of removed features
[ "Remove", "all", "map", "shapes", "that", "are", "not", "visible", "in", "the", "map" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L453-L464
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.removeShapesNotWithinMap
public int removeShapesNotWithinMap(BoundingBox boundingBox, String database) { int count = 0; Map<String, Map<Long, FeatureShape>> tables = getTables(database); if (tables != null) { for (String table : tables.keySet()) { count += removeShapesNotWithinMap(boundin...
java
public int removeShapesNotWithinMap(BoundingBox boundingBox, String database) { int count = 0; Map<String, Map<Long, FeatureShape>> tables = getTables(database); if (tables != null) { for (String table : tables.keySet()) { count += removeShapesNotWithinMap(boundin...
[ "public", "int", "removeShapesNotWithinMap", "(", "BoundingBox", "boundingBox", ",", "String", "database", ")", "{", "int", "count", "=", "0", ";", "Map", "<", "String", ",", "Map", "<", "Long", ",", "FeatureShape", ">", ">", "tables", "=", "getTables", "(...
Remove all map shapes in the database that are not visible in the bounding box @param boundingBox bounding box @param database GeoPackage database @return count of removed features @since 3.2.0
[ "Remove", "all", "map", "shapes", "in", "the", "database", "that", "are", "not", "visible", "in", "the", "bounding", "box" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L490-L504
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.removeShapesNotWithinMap
public int removeShapesNotWithinMap(BoundingBox boundingBox, String database, String table) { int count = 0; Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); if (featureIds != null) { List<Long> deleteFeatureIds = new ArrayList<>(); for (long feat...
java
public int removeShapesNotWithinMap(BoundingBox boundingBox, String database, String table) { int count = 0; Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); if (featureIds != null) { List<Long> deleteFeatureIds = new ArrayList<>(); for (long feat...
[ "public", "int", "removeShapesNotWithinMap", "(", "BoundingBox", "boundingBox", ",", "String", "database", ",", "String", "table", ")", "{", "int", "count", "=", "0", ";", "Map", "<", "Long", ",", "FeatureShape", ">", "featureIds", "=", "getFeatureIds", "(", ...
Remove all map shapes in the database and table that are not visible in the bounding box @param boundingBox bounding box @param database GeoPackage database @return count of removed features
[ "Remove", "all", "map", "shapes", "in", "the", "database", "and", "table", "that", "are", "not", "visible", "in", "the", "bounding", "box" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L530-L574
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.removeFeatureShape
public boolean removeFeatureShape(String database, String table, long featureId) { boolean removed = false; Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); if (featureIds != null) { FeatureShape featureShape = featureIds.remove(featureId); if (featu...
java
public boolean removeFeatureShape(String database, String table, long featureId) { boolean removed = false; Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); if (featureIds != null) { FeatureShape featureShape = featureIds.remove(featureId); if (featu...
[ "public", "boolean", "removeFeatureShape", "(", "String", "database", ",", "String", "table", ",", "long", "featureId", ")", "{", "boolean", "removed", "=", "false", ";", "Map", "<", "Long", ",", "FeatureShape", ">", "featureIds", "=", "getFeatureIds", "(", ...
Remove the feature shape from the database and table @param database GeoPackage database @param table table name @param featureId feature id @return true if removed @since 3.2.0
[ "Remove", "the", "feature", "shape", "from", "the", "database", "and", "table" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L585-L599
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.remove
public void remove() { switch (shapeType) { case MARKER: ((Marker) shape).remove(); break; case POLYGON: ((Polygon) shape).remove(); break; case POLYLINE: ((Polyline) shape).remove(); ...
java
public void remove() { switch (shapeType) { case MARKER: ((Marker) shape).remove(); break; case POLYGON: ((Polygon) shape).remove(); break; case POLYLINE: ((Polyline) shape).remove(); ...
[ "public", "void", "remove", "(", ")", "{", "switch", "(", "shapeType", ")", "{", "case", "MARKER", ":", "(", "(", "Marker", ")", "shape", ")", ".", "remove", "(", ")", ";", "break", ";", "case", "POLYGON", ":", "(", "(", "Polygon", ")", "shape", ...
Removes all objects added to the map
[ "Removes", "all", "objects", "added", "to", "the", "map" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L110-L154
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.setVisible
public void setVisible(boolean visible) { switch (shapeType) { case MARKER_OPTIONS: ((MarkerOptions) shape).visible(visible); break; case POLYLINE_OPTIONS: ((PolylineOptions) shape).visible(visible); break; cas...
java
public void setVisible(boolean visible) { switch (shapeType) { case MARKER_OPTIONS: ((MarkerOptions) shape).visible(visible); break; case POLYLINE_OPTIONS: ((PolylineOptions) shape).visible(visible); break; cas...
[ "public", "void", "setVisible", "(", "boolean", "visible", ")", "{", "switch", "(", "shapeType", ")", "{", "case", "MARKER_OPTIONS", ":", "(", "(", "MarkerOptions", ")", "shape", ")", ".", "visible", "(", "visible", ")", ";", "break", ";", "case", "POLYL...
Updates visibility of all objects @param visible visible flag @since 1.3.2
[ "Updates", "visibility", "of", "all", "objects" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L162-L221
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.update
public void update() { switch (shapeType) { case POLYLINE_MARKERS: ((PolylineMarkers) shape).update(); break; case POLYGON_MARKERS: ((PolygonMarkers) shape).update(); break; case MULTI_POLYLINE_MARKERS: ...
java
public void update() { switch (shapeType) { case POLYLINE_MARKERS: ((PolylineMarkers) shape).update(); break; case POLYGON_MARKERS: ((PolygonMarkers) shape).update(); break; case MULTI_POLYLINE_MARKERS: ...
[ "public", "void", "update", "(", ")", "{", "switch", "(", "shapeType", ")", "{", "case", "POLYLINE_MARKERS", ":", "(", "(", "PolylineMarkers", ")", "shape", ")", ".", "update", "(", ")", ";", "break", ";", "case", "POLYGON_MARKERS", ":", "(", "(", "Pol...
Updates all objects that could have changed from moved markers
[ "Updates", "all", "objects", "that", "could", "have", "changed", "from", "moved", "markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L293-L319
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.isValid
public boolean isValid() { boolean valid = true; switch (shapeType) { case POLYLINE_MARKERS: valid = ((PolylineMarkers) shape).isValid(); break; case POLYGON_MARKERS: valid = ((PolygonMarkers) shape).isValid(); br...
java
public boolean isValid() { boolean valid = true; switch (shapeType) { case POLYLINE_MARKERS: valid = ((PolylineMarkers) shape).isValid(); break; case POLYGON_MARKERS: valid = ((PolygonMarkers) shape).isValid(); br...
[ "public", "boolean", "isValid", "(", ")", "{", "boolean", "valid", "=", "true", ";", "switch", "(", "shapeType", ")", "{", "case", "POLYLINE_MARKERS", ":", "valid", "=", "(", "(", "PolylineMarkers", ")", "shape", ")", ".", "isValid", "(", ")", ";", "br...
Determines if the shape is in a valid state
[ "Determines", "if", "the", "shape", "is", "in", "a", "valid", "state" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L324-L356
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.boundingBox
public BoundingBox boundingBox() { BoundingBox boundingBox = new BoundingBox(Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE, -Double.MAX_VALUE); expandBoundingBox(boundingBox); return boundingBox; }
java
public BoundingBox boundingBox() { BoundingBox boundingBox = new BoundingBox(Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE, -Double.MAX_VALUE); expandBoundingBox(boundingBox); return boundingBox; }
[ "public", "BoundingBox", "boundingBox", "(", ")", "{", "BoundingBox", "boundingBox", "=", "new", "BoundingBox", "(", "Double", ".", "MAX_VALUE", ",", "Double", ".", "MAX_VALUE", ",", "-", "Double", ".", "MAX_VALUE", ",", "-", "Double", ".", "MAX_VALUE", ")",...
Get a bounding box that includes the shape @return bounding box
[ "Get", "a", "bounding", "box", "that", "includes", "the", "shape" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L363-L367
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.expandBoundingBox
public void expandBoundingBox(BoundingBox boundingBox) { switch (shapeType) { case LAT_LNG: expandBoundingBox(boundingBox, (LatLng) shape); break; case MARKER_OPTIONS: expandBoundingBox(boundingBox, ((MarkerOptions...
java
public void expandBoundingBox(BoundingBox boundingBox) { switch (shapeType) { case LAT_LNG: expandBoundingBox(boundingBox, (LatLng) shape); break; case MARKER_OPTIONS: expandBoundingBox(boundingBox, ((MarkerOptions...
[ "public", "void", "expandBoundingBox", "(", "BoundingBox", "boundingBox", ")", "{", "switch", "(", "shapeType", ")", "{", "case", "LAT_LNG", ":", "expandBoundingBox", "(", "boundingBox", ",", "(", "LatLng", ")", "shape", ")", ";", "break", ";", "case", "MARK...
Expand the bounding box to include the shape @param boundingBox bounding box
[ "Expand", "the", "bounding", "box", "to", "include", "the", "shape" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L374-L467
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.expandBoundingBox
private void expandBoundingBox(BoundingBox boundingBox, LatLng latLng) { double latitude = latLng.latitude; double longitude = latLng.longitude; if (boundingBox.getMinLongitude() <= 3 * ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH && boundingBox.getMaxLongitude() >= 3 * -ProjectionConstants....
java
private void expandBoundingBox(BoundingBox boundingBox, LatLng latLng) { double latitude = latLng.latitude; double longitude = latLng.longitude; if (boundingBox.getMinLongitude() <= 3 * ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH && boundingBox.getMaxLongitude() >= 3 * -ProjectionConstants....
[ "private", "void", "expandBoundingBox", "(", "BoundingBox", "boundingBox", ",", "LatLng", "latLng", ")", "{", "double", "latitude", "=", "latLng", ".", "latitude", ";", "double", "longitude", "=", "latLng", ".", "longitude", ";", "if", "(", "boundingBox", ".",...
Expand the bounding box by the LatLng @param boundingBox bounding box @param latLng lat lng
[ "Expand", "the", "bounding", "box", "by", "the", "LatLng" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L475-L507
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.expandBoundingBox
private void expandBoundingBox(BoundingBox boundingBox, List<LatLng> latLngs) { for (LatLng latLng : latLngs) { expandBoundingBox(boundingBox, latLng); } }
java
private void expandBoundingBox(BoundingBox boundingBox, List<LatLng> latLngs) { for (LatLng latLng : latLngs) { expandBoundingBox(boundingBox, latLng); } }
[ "private", "void", "expandBoundingBox", "(", "BoundingBox", "boundingBox", ",", "List", "<", "LatLng", ">", "latLngs", ")", "{", "for", "(", "LatLng", "latLng", ":", "latLngs", ")", "{", "expandBoundingBox", "(", "boundingBox", ",", "latLng", ")", ";", "}", ...
Expand the bounding box by the LatLngs @param boundingBox bounding box @param latLngs lat lngs
[ "Expand", "the", "bounding", "box", "by", "the", "LatLngs" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L515-L519
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java
GoogleMapShape.expandBoundingBoxMarkers
private void expandBoundingBoxMarkers(BoundingBox boundingBox, List<Marker> markers) { for (Marker marker : markers) { expandBoundingBox(boundingBox, marker.getPosition()); } }
java
private void expandBoundingBoxMarkers(BoundingBox boundingBox, List<Marker> markers) { for (Marker marker : markers) { expandBoundingBox(boundingBox, marker.getPosition()); } }
[ "private", "void", "expandBoundingBoxMarkers", "(", "BoundingBox", "boundingBox", ",", "List", "<", "Marker", ">", "markers", ")", "{", "for", "(", "Marker", "marker", ":", "markers", ")", "{", "expandBoundingBox", "(", "boundingBox", ",", "marker", ".", "getP...
Expand the bounding box by the markers @param boundingBox bounding box @param markers list of markers
[ "Expand", "the", "bounding", "box", "by", "the", "markers" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShape.java#L527-L532
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.setBoundingBox
public void setBoundingBox(BoundingBox boundingBox, Projection projection) { ProjectionTransform projectionToWebMercator = projection .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR); webMercatorBoundingBox = boundingBox .transform(projectionToWebMercator); }
java
public void setBoundingBox(BoundingBox boundingBox, Projection projection) { ProjectionTransform projectionToWebMercator = projection .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR); webMercatorBoundingBox = boundingBox .transform(projectionToWebMercator); }
[ "public", "void", "setBoundingBox", "(", "BoundingBox", "boundingBox", ",", "Projection", "projection", ")", "{", "ProjectionTransform", "projectionToWebMercator", "=", "projection", ".", "getTransformation", "(", "ProjectionConstants", ".", "EPSG_WEB_MERCATOR", ")", ";",...
Set the bounding box, provided as the indicated projection @param boundingBox bounding box @param projection projection
[ "Set", "the", "bounding", "box", "provided", "as", "the", "indicated", "projection" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L85-L90
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.getBoundingBox
public BoundingBox getBoundingBox(Projection projection) { ProjectionTransform webMercatorToProjection = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WEB_MERCATOR) .getTransformation(projection); return webMercatorBoundingBox .transform(webMer...
java
public BoundingBox getBoundingBox(Projection projection) { ProjectionTransform webMercatorToProjection = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WEB_MERCATOR) .getTransformation(projection); return webMercatorBoundingBox .transform(webMer...
[ "public", "BoundingBox", "getBoundingBox", "(", "Projection", "projection", ")", "{", "ProjectionTransform", "webMercatorToProjection", "=", "ProjectionFactory", ".", "getProjection", "(", "ProjectionConstants", ".", "EPSG_WEB_MERCATOR", ")", ".", "getTransformation", "(", ...
Get the bounding box as the provided projection @param projection projection
[ "Get", "the", "bounding", "box", "as", "the", "provided", "projection" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L106-L112
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.hasTile
public boolean hasTile(int x, int y, int zoom) { // Check if generating tiles for the zoom level and is within the bounding box boolean hasTile = isWithinBounds(x, y, zoom); if (hasTile) { // Check if there is a tile to retrieve hasTile = hasTileToRetrieve(x, y, zoom); ...
java
public boolean hasTile(int x, int y, int zoom) { // Check if generating tiles for the zoom level and is within the bounding box boolean hasTile = isWithinBounds(x, y, zoom); if (hasTile) { // Check if there is a tile to retrieve hasTile = hasTileToRetrieve(x, y, zoom); ...
[ "public", "boolean", "hasTile", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "// Check if generating tiles for the zoom level and is within the bounding box", "boolean", "hasTile", "=", "isWithinBounds", "(", "x", ",", "y", ",", "zoom", ")", ";"...
Determine if there is a tile for the x, y, and zoom @param x x coordinate @param y y coordinate @param zoom zoom value @return true if there is a tile @since 1.2.6
[ "Determine", "if", "there", "is", "a", "tile", "for", "the", "x", "y", "and", "zoom" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L151-L161
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.isWithinBounds
public boolean isWithinBounds(int x, int y, int zoom) { return isWithinZoom(zoom) && isWithinBoundingBox(x, y, zoom); }
java
public boolean isWithinBounds(int x, int y, int zoom) { return isWithinZoom(zoom) && isWithinBoundingBox(x, y, zoom); }
[ "public", "boolean", "isWithinBounds", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "return", "isWithinZoom", "(", "zoom", ")", "&&", "isWithinBoundingBox", "(", "x", ",", "y", ",", "zoom", ")", ";", "}" ]
Is the tile within the zoom and bounding box bounds @param x x coordinate @param y y coordinate @param zoom zoom value @return true if within bounds
[ "Is", "the", "tile", "within", "the", "zoom", "and", "bounding", "box", "bounds" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L191-L193
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.isWithinZoom
public boolean isWithinZoom(float zoom) { return (minZoom == null || zoom >= minZoom) && (maxZoom == null || zoom <= maxZoom); }
java
public boolean isWithinZoom(float zoom) { return (minZoom == null || zoom >= minZoom) && (maxZoom == null || zoom <= maxZoom); }
[ "public", "boolean", "isWithinZoom", "(", "float", "zoom", ")", "{", "return", "(", "minZoom", "==", "null", "||", "zoom", ">=", "minZoom", ")", "&&", "(", "maxZoom", "==", "null", "||", "zoom", "<=", "maxZoom", ")", ";", "}" ]
Check if the zoom is within the overlay zoom range @param zoom zoom value @return true if within zoom
[ "Check", "if", "the", "zoom", "is", "within", "the", "overlay", "zoom", "range" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L201-L203
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.isWithinBoundingBox
public boolean isWithinBoundingBox(int x, int y, int zoom) { boolean withinBounds = true; // If a bounding box is set, check if it overlaps with the request if (webMercatorBoundingBox != null) { // Get the bounding box of the requested tile BoundingBox tileWebMercatorBo...
java
public boolean isWithinBoundingBox(int x, int y, int zoom) { boolean withinBounds = true; // If a bounding box is set, check if it overlaps with the request if (webMercatorBoundingBox != null) { // Get the bounding box of the requested tile BoundingBox tileWebMercatorBo...
[ "public", "boolean", "isWithinBoundingBox", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "boolean", "withinBounds", "=", "true", ";", "// If a bounding box is set, check if it overlaps with the request", "if", "(", "webMercatorBoundingBox", "!=", "n...
Check if the tile request is within the desired tile bounds @param x x coordinate @param y y coordinate @param zoom zoom value @return true if within bounds
[ "Check", "if", "the", "tile", "request", "is", "within", "the", "desired", "tile", "bounds" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L213-L232
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.isOnAtCurrentZoom
public boolean isOnAtCurrentZoom(GoogleMap map, LatLng latLng) { float zoom = MapUtils.getCurrentZoom(map); boolean on = isOnAtCurrentZoom(zoom, latLng); return on; }
java
public boolean isOnAtCurrentZoom(GoogleMap map, LatLng latLng) { float zoom = MapUtils.getCurrentZoom(map); boolean on = isOnAtCurrentZoom(zoom, latLng); return on; }
[ "public", "boolean", "isOnAtCurrentZoom", "(", "GoogleMap", "map", ",", "LatLng", "latLng", ")", "{", "float", "zoom", "=", "MapUtils", ".", "getCurrentZoom", "(", "map", ")", ";", "boolean", "on", "=", "isOnAtCurrentZoom", "(", "zoom", ",", "latLng", ")", ...
Determine if the the feature overlay is on for the current zoom level of the map at the location @param map google map @param latLng lat lon location @return true if on @since 1.2.6
[ "Determine", "if", "the", "the", "feature", "overlay", "is", "on", "for", "the", "current", "zoom", "level", "of", "the", "map", "at", "the", "location" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L173-L177
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.isOnAtCurrentZoom
public boolean isOnAtCurrentZoom(double zoom, LatLng latLng) { Point point = new Point(latLng.longitude, latLng.latitude); TileGrid tileGrid = TileBoundingBoxUtils.getTileGridFromWGS84(point, (int) zoom); boolean on = boundedOverlay.hasTile((int) tileGrid.getMinX(), (int) tileGrid.getMinY(), (...
java
public boolean isOnAtCurrentZoom(double zoom, LatLng latLng) { Point point = new Point(latLng.longitude, latLng.latitude); TileGrid tileGrid = TileBoundingBoxUtils.getTileGridFromWGS84(point, (int) zoom); boolean on = boundedOverlay.hasTile((int) tileGrid.getMinX(), (int) tileGrid.getMinY(), (...
[ "public", "boolean", "isOnAtCurrentZoom", "(", "double", "zoom", ",", "LatLng", "latLng", ")", "{", "Point", "point", "=", "new", "Point", "(", "latLng", ".", "longitude", ",", "latLng", ".", "latitude", ")", ";", "TileGrid", "tileGrid", "=", "TileBoundingBo...
Determine if the feature overlay is on for the provided zoom level at the location @param zoom zoom level @param latLng lat lon location @return true if on @since 1.2.6
[ "Determine", "if", "the", "feature", "overlay", "is", "on", "for", "the", "provided", "zoom", "level", "at", "the", "location" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L187-L194
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.buildClickBoundingBox
public BoundingBox buildClickBoundingBox(LatLng latLng, BoundingBox mapBounds) { // Get the screen width and height a click occurs from a feature double width = TileBoundingBoxMapUtils.getLongitudeDistance(mapBounds) * screenClickPercentage; double height = TileBoundingBoxMapUtils.getLatitudeDi...
java
public BoundingBox buildClickBoundingBox(LatLng latLng, BoundingBox mapBounds) { // Get the screen width and height a click occurs from a feature double width = TileBoundingBoxMapUtils.getLongitudeDistance(mapBounds) * screenClickPercentage; double height = TileBoundingBoxMapUtils.getLatitudeDi...
[ "public", "BoundingBox", "buildClickBoundingBox", "(", "LatLng", "latLng", ",", "BoundingBox", "mapBounds", ")", "{", "// Get the screen width and height a click occurs from a feature", "double", "width", "=", "TileBoundingBoxMapUtils", ".", "getLongitudeDistance", "(", "mapBou...
Build a bounding box using the location coordinate click location and map view bounds @param latLng click location @param mapBounds map bounds @return bounding box @since 1.2.7
[ "Build", "a", "bounding", "box", "using", "the", "location", "coordinate", "click", "location", "and", "map", "view", "bounds" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L265-L279
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.queryFeatures
public FeatureIndexResults queryFeatures(BoundingBox boundingBox) { FeatureIndexResults results = queryFeatures(boundingBox, null); return results; }
java
public FeatureIndexResults queryFeatures(BoundingBox boundingBox) { FeatureIndexResults results = queryFeatures(boundingBox, null); return results; }
[ "public", "FeatureIndexResults", "queryFeatures", "(", "BoundingBox", "boundingBox", ")", "{", "FeatureIndexResults", "results", "=", "queryFeatures", "(", "boundingBox", ",", "null", ")", ";", "return", "results", ";", "}" ]
Query for features in the WGS84 projected bounding box @param boundingBox query bounding box in WGS84 projection @return feature index results, must be closed
[ "Query", "for", "features", "in", "the", "WGS84", "projected", "bounding", "box" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L287-L290
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.queryFeatures
public FeatureIndexResults queryFeatures(BoundingBox boundingBox, Projection projection) { if (projection == null) { projection = ProjectionFactory.getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM); } // Query for features FeatureIndexManager indexManager = feat...
java
public FeatureIndexResults queryFeatures(BoundingBox boundingBox, Projection projection) { if (projection == null) { projection = ProjectionFactory.getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM); } // Query for features FeatureIndexManager indexManager = feat...
[ "public", "FeatureIndexResults", "queryFeatures", "(", "BoundingBox", "boundingBox", ",", "Projection", "projection", ")", "{", "if", "(", "projection", "==", "null", ")", "{", "projection", "=", "ProjectionFactory", ".", "getProjection", "(", "ProjectionConstants", ...
Query for features in the bounding box @param boundingBox query bounding box @param projection bounding box projection @return feature index results, must be closed
[ "Query", "for", "features", "in", "the", "bounding", "box" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L299-L312
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.getToleranceDistance
public static double getToleranceDistance(View view, GoogleMap map) { BoundingBox boundingBox = getBoundingBox(map); double boundingBoxWidth = TileBoundingBoxMapUtils.getLongitudeDistance(boundingBox); double boundingBoxHeight = TileBoundingBoxMapUtils.getLatitudeDistance(boundingBox); ...
java
public static double getToleranceDistance(View view, GoogleMap map) { BoundingBox boundingBox = getBoundingBox(map); double boundingBoxWidth = TileBoundingBoxMapUtils.getLongitudeDistance(boundingBox); double boundingBoxHeight = TileBoundingBoxMapUtils.getLatitudeDistance(boundingBox); ...
[ "public", "static", "double", "getToleranceDistance", "(", "View", "view", ",", "GoogleMap", "map", ")", "{", "BoundingBox", "boundingBox", "=", "getBoundingBox", "(", "map", ")", ";", "double", "boundingBoxWidth", "=", "TileBoundingBoxMapUtils", ".", "getLongitudeD...
Get the tolerance distance meters in the current region of the map @param view view @param map google map @return tolerance distance in meters
[ "Get", "the", "tolerance", "distance", "meters", "in", "the", "current", "region", "of", "the", "map" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L51-L72
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.getBoundingBox
public static BoundingBox getBoundingBox(GoogleMap map) { LatLngBounds visibleBounds = map.getProjection() .getVisibleRegion().latLngBounds; LatLng southwest = visibleBounds.southwest; LatLng northeast = visibleBounds.northeast; double minLatitude = southwest.latitude; ...
java
public static BoundingBox getBoundingBox(GoogleMap map) { LatLngBounds visibleBounds = map.getProjection() .getVisibleRegion().latLngBounds; LatLng southwest = visibleBounds.southwest; LatLng northeast = visibleBounds.northeast; double minLatitude = southwest.latitude; ...
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "GoogleMap", "map", ")", "{", "LatLngBounds", "visibleBounds", "=", "map", ".", "getProjection", "(", ")", ".", "getVisibleRegion", "(", ")", ".", "latLngBounds", ";", "LatLng", "southwest", "=", "visible...
Get the WGS84 bounding box of the current map view screen. The max longitude will be larger than the min resulting in values larger than 180.0. @param map google map @return current bounding box
[ "Get", "the", "WGS84", "bounding", "box", "of", "the", "current", "map", "view", "screen", ".", "The", "max", "longitude", "will", "be", "larger", "than", "the", "min", "resulting", "in", "values", "larger", "than", "180", ".", "0", "." ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L81-L100
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.buildClickBoundingBox
public static BoundingBox buildClickBoundingBox(LatLng latLng, View view, GoogleMap map, float screenClickPercentage) { LatLngBoundingBox latLngBoundingBox = buildClickLatLngBoundingBox(latLng, view, map, screenClickPercentage); // Create the bounding box to query for features BoundingBox boun...
java
public static BoundingBox buildClickBoundingBox(LatLng latLng, View view, GoogleMap map, float screenClickPercentage) { LatLngBoundingBox latLngBoundingBox = buildClickLatLngBoundingBox(latLng, view, map, screenClickPercentage); // Create the bounding box to query for features BoundingBox boun...
[ "public", "static", "BoundingBox", "buildClickBoundingBox", "(", "LatLng", "latLng", ",", "View", "view", ",", "GoogleMap", "map", ",", "float", "screenClickPercentage", ")", "{", "LatLngBoundingBox", "latLngBoundingBox", "=", "buildClickLatLngBoundingBox", "(", "latLng...
Build a bounding box using the click location, map view, map, and screen percentage tolerance. The bounding box can be used to query for features that were clicked @param latLng click location @param view view @param map Google map @param screenClickPercentage screen c...
[ "Build", "a", "bounding", "box", "using", "the", "click", "location", "map", "view", "map", "and", "screen", "percentage", "tolerance", ".", "The", "bounding", "box", "can", "be", "used", "to", "query", "for", "features", "that", "were", "clicked" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L113-L125
train
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.buildClickLatLngBounds
public static LatLngBounds buildClickLatLngBounds(LatLng latLng, View view, GoogleMap map, float screenClickPercentage) { LatLngBoundingBox latLngBoundingBox = buildClickLatLngBoundingBox(latLng, view, map, screenClickPercentage); double southWestLongitude = Math.min(latLngBoundingBox.getLeftCoordinat...
java
public static LatLngBounds buildClickLatLngBounds(LatLng latLng, View view, GoogleMap map, float screenClickPercentage) { LatLngBoundingBox latLngBoundingBox = buildClickLatLngBoundingBox(latLng, view, map, screenClickPercentage); double southWestLongitude = Math.min(latLngBoundingBox.getLeftCoordinat...
[ "public", "static", "LatLngBounds", "buildClickLatLngBounds", "(", "LatLng", "latLng", ",", "View", "view", ",", "GoogleMap", "map", ",", "float", "screenClickPercentage", ")", "{", "LatLngBoundingBox", "latLngBoundingBox", "=", "buildClickLatLngBoundingBox", "(", "latL...
Build a lat lng bounds using the click location, map view, map, and screen percentage tolerance. The bounding box can be used to query for features that were clicked @param latLng click location @param view view @param map Google map @param screenClickPercentage screen...
[ "Build", "a", "lat", "lng", "bounds", "using", "the", "click", "location", "map", "view", "map", "and", "screen", "percentage", "tolerance", ".", "The", "bounding", "box", "can", "be", "used", "to", "query", "for", "features", "that", "were", "clicked" ]
634d78468a5c52d2bc98791cc7ff03981ebf573b
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L138-L150
train