id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
59,000
contentful/contentful.java
src/main/java/com/contentful/java/cda/image/ImageOption.java
ImageOption.apply
public String apply(String url) { return format( getDefault(), "%s%s%s=%s", url, concatenationOperator(url), operation, argument); }
java
public String apply(String url) { return format( getDefault(), "%s%s%s=%s", url, concatenationOperator(url), operation, argument); }
[ "public", "String", "apply", "(", "String", "url", ")", "{", "return", "format", "(", "getDefault", "(", ")", ",", "\"%s%s%s=%s\"", ",", "url", ",", "concatenationOperator", "(", "url", ")", ",", "operation", ",", "argument", ")", ";", "}" ]
Apply this image option to a url, replacing and updating this url. @param url a url to be handled @return the changed url.
[ "Apply", "this", "image", "option", "to", "a", "url", "replacing", "and", "updating", "this", "url", "." ]
6ecc2ace454c674b218b99489dc50697b1dbffcb
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/image/ImageOption.java#L340-L348
59,001
contentful/contentful.java
src/main/java/com/contentful/java/cda/CDAClient.java
CDAClient.fetchSpace
@SuppressWarnings("unchecked") public <C extends CDACallback<CDASpace>> C fetchSpace(C callback) { return (C) Callbacks.subscribeAsync(observeSpace(), callback, this); }
java
@SuppressWarnings("unchecked") public <C extends CDACallback<CDASpace>> C fetchSpace(C callback) { return (C) Callbacks.subscribeAsync(observeSpace(), callback, this); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "C", "extends", "CDACallback", "<", "CDASpace", ">", ">", "C", "fetchSpace", "(", "C", "callback", ")", "{", "return", "(", "C", ")", "Callbacks", ".", "subscribeAsync", "(", "observeSpace", ...
Asynchronously fetch the space. @param <C> the type of the callback to be used. @param callback the value of the callback to be called back. @return the space for this client (asynchronously).
[ "Asynchronously", "fetch", "the", "space", "." ]
6ecc2ace454c674b218b99489dc50697b1dbffcb
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/CDAClient.java#L373-L376
59,002
contentful/contentful.java
src/main/java/com/contentful/java/cda/ResourceUtils.java
ResourceUtils.ensureContentType
public static void ensureContentType(CDAEntry entry, CDAClient client) { CDAContentType contentType = entry.contentType(); if (contentType != null) { return; } String contentTypeId = extractNested(entry.attrs(), "contentType", "sys", "id"); try { contentType = client.cacheTypeWithId(con...
java
public static void ensureContentType(CDAEntry entry, CDAClient client) { CDAContentType contentType = entry.contentType(); if (contentType != null) { return; } String contentTypeId = extractNested(entry.attrs(), "contentType", "sys", "id"); try { contentType = client.cacheTypeWithId(con...
[ "public", "static", "void", "ensureContentType", "(", "CDAEntry", "entry", ",", "CDAClient", "client", ")", "{", "CDAContentType", "contentType", "=", "entry", ".", "contentType", "(", ")", ";", "if", "(", "contentType", "!=", "null", ")", "{", "return", ";"...
Make sure that the given entry has a filled in content type. @param entry entry to be filled @param client to be used if more content types need to be requested.
[ "Make", "sure", "that", "the", "given", "entry", "has", "a", "filled", "in", "content", "type", "." ]
6ecc2ace454c674b218b99489dc50697b1dbffcb
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/ResourceUtils.java#L83-L97
59,003
contentful/contentful.java
src/main/java/com/contentful/java/cda/FetchQuery.java
FetchQuery.all
@SuppressWarnings("unchecked") public <C extends CDACallback<CDAArray>> C all(C callback) { return (C) Callbacks.subscribeAsync(baseQuery().all(), callback, client); }
java
@SuppressWarnings("unchecked") public <C extends CDACallback<CDAArray>> C all(C callback) { return (C) Callbacks.subscribeAsync(baseQuery().all(), callback, client); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "C", "extends", "CDACallback", "<", "CDAArray", ">", ">", "C", "all", "(", "C", "callback", ")", "{", "return", "(", "C", ")", "Callbacks", ".", "subscribeAsync", "(", "baseQuery", "(", "...
Async fetch all resources matching the type of this query. @param callback callback. @param <C> callback type. @return the given {@code callback} instance.
[ "Async", "fetch", "all", "resources", "matching", "the", "type", "of", "this", "query", "." ]
6ecc2ace454c674b218b99489dc50697b1dbffcb
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/FetchQuery.java#L61-L64
59,004
camunda/camunda-bpm-camel
camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/component/producer/CamundaBpmProducerFactory.java
CamundaBpmProducerFactory.createProducer
public static CamundaBpmProducer createProducer(final CamundaBpmEndpoint endpoint, final ParsedUri uri, final Map<String, Object> parameters) throws IllegalArgumentException { switch (uri.getType()) { case StartProcess: return new StartProcessProducer(endpoint, parameters); ...
java
public static CamundaBpmProducer createProducer(final CamundaBpmEndpoint endpoint, final ParsedUri uri, final Map<String, Object> parameters) throws IllegalArgumentException { switch (uri.getType()) { case StartProcess: return new StartProcessProducer(endpoint, parameters); ...
[ "public", "static", "CamundaBpmProducer", "createProducer", "(", "final", "CamundaBpmEndpoint", "endpoint", ",", "final", "ParsedUri", "uri", ",", "final", "Map", "<", "String", ",", "Object", ">", "parameters", ")", "throws", "IllegalArgumentException", "{", "switc...
Prevent instantiation of helper class
[ "Prevent", "instantiation", "of", "helper", "class" ]
224cd7563430f8792287022923ee27491f5a4b60
https://github.com/camunda/camunda-bpm-camel/blob/224cd7563430f8792287022923ee27491f5a4b60/camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/component/producer/CamundaBpmProducerFactory.java#L19-L33
59,005
camunda/camunda-bpm-camel
camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/component/externaltasks/BatchConsumer.java
BatchConsumer.removeExcessiveInProgressTasks
protected void removeExcessiveInProgressTasks(Queue<Exchange> exchanges, int limit) { while (exchanges.size() > limit) { // must remove last Exchange exchange = exchanges.poll(); releaseTask(exchange); } }
java
protected void removeExcessiveInProgressTasks(Queue<Exchange> exchanges, int limit) { while (exchanges.size() > limit) { // must remove last Exchange exchange = exchanges.poll(); releaseTask(exchange); } }
[ "protected", "void", "removeExcessiveInProgressTasks", "(", "Queue", "<", "Exchange", ">", "exchanges", ",", "int", "limit", ")", "{", "while", "(", "exchanges", ".", "size", "(", ")", ">", "limit", ")", "{", "// must remove last", "Exchange", "exchange", "=",...
Drain any in progress files as we are done with this batch @param exchanges the exchanges @param limit the limit
[ "Drain", "any", "in", "progress", "files", "as", "we", "are", "done", "with", "this", "batch" ]
224cd7563430f8792287022923ee27491f5a4b60
https://github.com/camunda/camunda-bpm-camel/blob/224cd7563430f8792287022923ee27491f5a4b60/camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/component/externaltasks/BatchConsumer.java#L177-L185
59,006
camunda/camunda-bpm-camel
camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/common/ExchangeUtils.java
ExchangeUtils.prepareVariables
@SuppressWarnings("rawtypes") public static Map<String, Object> prepareVariables(Exchange exchange, Map<String, Object> parameters) { Map<String, Object> processVariables = new HashMap<String, Object>(); Object camelBody = exchange.getIn().getBody(); if (camelBody instanceof String) { ...
java
@SuppressWarnings("rawtypes") public static Map<String, Object> prepareVariables(Exchange exchange, Map<String, Object> parameters) { Map<String, Object> processVariables = new HashMap<String, Object>(); Object camelBody = exchange.getIn().getBody(); if (camelBody instanceof String) { ...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "Map", "<", "String", ",", "Object", ">", "prepareVariables", "(", "Exchange", "exchange", ",", "Map", "<", "String", ",", "Object", ">", "parameters", ")", "{", "Map", "<", "String", "...
Copies variables from Camel into the process engine. This method will conditionally copy the Camel body to the "camelBody" variable if it is of type java.lang.String, OR it will copy the Camel body to individual variables within the process engine if it is of type Map<String,Object>. If the copyVariablesFromProperties...
[ "Copies", "variables", "from", "Camel", "into", "the", "process", "engine", "." ]
224cd7563430f8792287022923ee27491f5a4b60
https://github.com/camunda/camunda-bpm-camel/blob/224cd7563430f8792287022923ee27491f5a4b60/camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/common/ExchangeUtils.java#L49-L82
59,007
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Cursor.java
Cursor.close
@Override public void close() { if (closed) { return; } if (SHOULD_CHECK && !txn.isReadOnly()) { txn.checkReady(); } LIB.mdb_cursor_close(ptrCursor); kv.close(); closed = true; }
java
@Override public void close() { if (closed) { return; } if (SHOULD_CHECK && !txn.isReadOnly()) { txn.checkReady(); } LIB.mdb_cursor_close(ptrCursor); kv.close(); closed = true; }
[ "@", "Override", "public", "void", "close", "(", ")", "{", "if", "(", "closed", ")", "{", "return", ";", "}", "if", "(", "SHOULD_CHECK", "&&", "!", "txn", ".", "isReadOnly", "(", ")", ")", "{", "txn", ".", "checkReady", "(", ")", ";", "}", "LIB",...
Close a cursor handle. <p> The cursor handle will be freed and must not be used again after this call. Its transaction must still be live if it is a write-transaction.
[ "Close", "a", "cursor", "handle", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Cursor.java#L69-L80
59,008
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Cursor.java
Cursor.count
public long count() { if (SHOULD_CHECK) { checkNotClosed(); txn.checkReady(); } final NativeLongByReference longByReference = new NativeLongByReference(); checkRc(LIB.mdb_cursor_count(ptrCursor, longByReference)); return longByReference.longValue(); }
java
public long count() { if (SHOULD_CHECK) { checkNotClosed(); txn.checkReady(); } final NativeLongByReference longByReference = new NativeLongByReference(); checkRc(LIB.mdb_cursor_count(ptrCursor, longByReference)); return longByReference.longValue(); }
[ "public", "long", "count", "(", ")", "{", "if", "(", "SHOULD_CHECK", ")", "{", "checkNotClosed", "(", ")", ";", "txn", ".", "checkReady", "(", ")", ";", "}", "final", "NativeLongByReference", "longByReference", "=", "new", "NativeLongByReference", "(", ")", ...
Return count of duplicates for current key. <p> This call is only valid on databases that support sorted duplicate data items {@link DbiFlags#MDB_DUPSORT}. @return count of duplicates for current key
[ "Return", "count", "of", "duplicates", "for", "current", "key", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Cursor.java#L91-L99
59,009
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Cursor.java
Cursor.put
public boolean put(final T key, final T val, final PutFlags... op) { if (SHOULD_CHECK) { requireNonNull(key); requireNonNull(val); checkNotClosed(); txn.checkReady(); txn.checkWritesAllowed(); } kv.keyIn(key); kv.valIn(val); final int mask = mask(op); final int rc =...
java
public boolean put(final T key, final T val, final PutFlags... op) { if (SHOULD_CHECK) { requireNonNull(key); requireNonNull(val); checkNotClosed(); txn.checkReady(); txn.checkWritesAllowed(); } kv.keyIn(key); kv.valIn(val); final int mask = mask(op); final int rc =...
[ "public", "boolean", "put", "(", "final", "T", "key", ",", "final", "T", "val", ",", "final", "PutFlags", "...", "op", ")", "{", "if", "(", "SHOULD_CHECK", ")", "{", "requireNonNull", "(", "key", ")", ";", "requireNonNull", "(", "val", ")", ";", "che...
Store by cursor. <p> This function stores key/data pairs into the database. @param key key to store @param val data to store @param op options for this operation @return true if the value was put, false if MDB_NOOVERWRITE or MDB_NODUPDATA were set and the key/value existed already.
[ "Store", "by", "cursor", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Cursor.java#L205-L228
59,010
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Cursor.java
Cursor.renew
public void renew(final Txn<T> newTxn) { if (SHOULD_CHECK) { requireNonNull(newTxn); checkNotClosed(); this.txn.checkReadOnly(); // existing newTxn.checkReadOnly(); newTxn.checkReady(); } checkRc(LIB.mdb_cursor_renew(newTxn.pointer(), ptrCursor)); this.txn = newTxn; }
java
public void renew(final Txn<T> newTxn) { if (SHOULD_CHECK) { requireNonNull(newTxn); checkNotClosed(); this.txn.checkReadOnly(); // existing newTxn.checkReadOnly(); newTxn.checkReady(); } checkRc(LIB.mdb_cursor_renew(newTxn.pointer(), ptrCursor)); this.txn = newTxn; }
[ "public", "void", "renew", "(", "final", "Txn", "<", "T", ">", "newTxn", ")", "{", "if", "(", "SHOULD_CHECK", ")", "{", "requireNonNull", "(", "newTxn", ")", ";", "checkNotClosed", "(", ")", ";", "this", ".", "txn", ".", "checkReadOnly", "(", ")", ";...
Renew a cursor handle. <p> A cursor is associated with a specific transaction and database. Cursors that are only used in read-only transactions may be re-used, to avoid unnecessary malloc/free overhead. The cursor may be associated with a new read-only transaction, and referencing the same database handle as it was c...
[ "Renew", "a", "cursor", "handle", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Cursor.java#L279-L289
59,011
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Verifier.java
Verifier.runFor
public long runFor(final long duration, final TimeUnit unit) { final long deadline = System.currentTimeMillis() + unit.toMillis(duration); final ExecutorService es = Executors.newSingleThreadExecutor(); final Future<Long> future = es.submit(this); try { while (System.currentTimeMillis() < deadline...
java
public long runFor(final long duration, final TimeUnit unit) { final long deadline = System.currentTimeMillis() + unit.toMillis(duration); final ExecutorService es = Executors.newSingleThreadExecutor(); final Future<Long> future = es.submit(this); try { while (System.currentTimeMillis() < deadline...
[ "public", "long", "runFor", "(", "final", "long", "duration", ",", "final", "TimeUnit", "unit", ")", "{", "final", "long", "deadline", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "unit", ".", "toMillis", "(", "duration", ")", ";", "final", "E...
Execute the verifier for the given duration. <p> This provides a simple way to execute the verifier for those applications which do not wish to manage threads directly. @param duration amount of time to execute @param unit units used to express the duration @return number of database rows successfully verified
[ "Execute", "the", "verifier", "for", "the", "given", "duration", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Verifier.java#L166-L187
59,012
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Meta.java
Meta.version
public static Version version() { final IntByReference major = new IntByReference(); final IntByReference minor = new IntByReference(); final IntByReference patch = new IntByReference(); LIB.mdb_version(major, minor, patch); return new Version(major.intValue(), minor.intValue(), patch. ...
java
public static Version version() { final IntByReference major = new IntByReference(); final IntByReference minor = new IntByReference(); final IntByReference patch = new IntByReference(); LIB.mdb_version(major, minor, patch); return new Version(major.intValue(), minor.intValue(), patch. ...
[ "public", "static", "Version", "version", "(", ")", "{", "final", "IntByReference", "major", "=", "new", "IntByReference", "(", ")", ";", "final", "IntByReference", "minor", "=", "new", "IntByReference", "(", ")", ";", "final", "IntByReference", "patch", "=", ...
Obtains the LMDB C library version information. @return the version data
[ "Obtains", "the", "LMDB", "C", "library", "version", "information", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Meta.java#L56-L65
59,013
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
Env.copy
public void copy(final File path, final CopyFlags... flags) { requireNonNull(path); if (!path.exists()) { throw new InvalidCopyDestination("Path must exist"); } if (!path.isDirectory()) { throw new InvalidCopyDestination("Path must be a directory"); } final String[] files = path.list...
java
public void copy(final File path, final CopyFlags... flags) { requireNonNull(path); if (!path.exists()) { throw new InvalidCopyDestination("Path must exist"); } if (!path.isDirectory()) { throw new InvalidCopyDestination("Path must be a directory"); } final String[] files = path.list...
[ "public", "void", "copy", "(", "final", "File", "path", ",", "final", "CopyFlags", "...", "flags", ")", "{", "requireNonNull", "(", "path", ")", ";", "if", "(", "!", "path", ".", "exists", "(", ")", ")", "{", "throw", "new", "InvalidCopyDestination", "...
Copies an LMDB environment to the specified destination path. <p> This function may be used to make a backup of an existing environment. No lockfile is created, since it gets recreated at need. <p> Note: This call can trigger significant file size growth if run in parallel with write transactions, because it employs ...
[ "Copies", "an", "LMDB", "environment", "to", "the", "specified", "destination", "path", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Env.java#L147-L161
59,014
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
Env.getDbiNames
public List<byte[]> getDbiNames() { final List<byte[]> result = new ArrayList<>(); final Dbi<T> names = openDbi((byte[]) null); try (Txn<T> txn = txnRead(); Cursor<T> cursor = names.openCursor(txn)) { if (!cursor.first()) { return Collections.emptyList(); } do { fi...
java
public List<byte[]> getDbiNames() { final List<byte[]> result = new ArrayList<>(); final Dbi<T> names = openDbi((byte[]) null); try (Txn<T> txn = txnRead(); Cursor<T> cursor = names.openCursor(txn)) { if (!cursor.first()) { return Collections.emptyList(); } do { fi...
[ "public", "List", "<", "byte", "[", "]", ">", "getDbiNames", "(", ")", "{", "final", "List", "<", "byte", "[", "]", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "Dbi", "<", "T", ">", "names", "=", "openDbi", "(", "(", "...
Obtain the DBI names. <p> This method is only compatible with {@link Env}s that use named databases. If an unnamed {@link Dbi} is being used to store data, this method will attempt to return all such keys from the unnamed database. @return a list of DBI names (never null)
[ "Obtain", "the", "DBI", "names", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Env.java#L173-L188
59,015
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
Env.info
public EnvInfo info() { if (closed) { throw new AlreadyClosedException(); } final MDB_envinfo info = new MDB_envinfo(RUNTIME); checkRc(LIB.mdb_env_info(ptr, info)); final long mapAddress; if (info.f0_me_mapaddr.get() == null) { mapAddress = 0; } else { mapAddress = info.f0...
java
public EnvInfo info() { if (closed) { throw new AlreadyClosedException(); } final MDB_envinfo info = new MDB_envinfo(RUNTIME); checkRc(LIB.mdb_env_info(ptr, info)); final long mapAddress; if (info.f0_me_mapaddr.get() == null) { mapAddress = 0; } else { mapAddress = info.f0...
[ "public", "EnvInfo", "info", "(", ")", "{", "if", "(", "closed", ")", "{", "throw", "new", "AlreadyClosedException", "(", ")", ";", "}", "final", "MDB_envinfo", "info", "=", "new", "MDB_envinfo", "(", "RUNTIME", ")", ";", "checkRc", "(", "LIB", ".", "m...
Return information about this environment. @return an immutable information object.
[ "Return", "information", "about", "this", "environment", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Env.java#L213-L234
59,016
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
Env.stat
public Stat stat() { if (closed) { throw new AlreadyClosedException(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_env_stat(ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), stat.f2_ms_branch_pages.longValue(), ...
java
public Stat stat() { if (closed) { throw new AlreadyClosedException(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_env_stat(ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), stat.f2_ms_branch_pages.longValue(), ...
[ "public", "Stat", "stat", "(", ")", "{", "if", "(", "closed", ")", "{", "throw", "new", "AlreadyClosedException", "(", ")", ";", "}", "final", "MDB_stat", "stat", "=", "new", "MDB_stat", "(", "RUNTIME", ")", ";", "checkRc", "(", "LIB", ".", "mdb_env_st...
Return statistics about this environment. @return an immutable statistics object.
[ "Return", "statistics", "about", "this", "environment", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Env.java#L329-L342
59,017
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
Env.sync
public void sync(final boolean force) { if (closed) { throw new AlreadyClosedException(); } final int f = force ? 1 : 0; checkRc(LIB.mdb_env_sync(ptr, f)); }
java
public void sync(final boolean force) { if (closed) { throw new AlreadyClosedException(); } final int f = force ? 1 : 0; checkRc(LIB.mdb_env_sync(ptr, f)); }
[ "public", "void", "sync", "(", "final", "boolean", "force", ")", "{", "if", "(", "closed", ")", "{", "throw", "new", "AlreadyClosedException", "(", ")", ";", "}", "final", "int", "f", "=", "force", "?", "1", ":", "0", ";", "checkRc", "(", "LIB", "....
Flushes the data buffers to disk. @param force force a synchronous flush (otherwise if the environment has the MDB_NOSYNC flag set the flushes will be omitted, and with MDB_MAPASYNC they will be asynchronous)
[ "Flushes", "the", "data", "buffers", "to", "disk", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Env.java#L351-L357
59,018
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
Env.txn
public Txn<T> txn(final Txn<T> parent, final TxnFlags... flags) { if (closed) { throw new AlreadyClosedException(); } return new Txn<>(this, parent, proxy, flags); }
java
public Txn<T> txn(final Txn<T> parent, final TxnFlags... flags) { if (closed) { throw new AlreadyClosedException(); } return new Txn<>(this, parent, proxy, flags); }
[ "public", "Txn", "<", "T", ">", "txn", "(", "final", "Txn", "<", "T", ">", "parent", ",", "final", "TxnFlags", "...", "flags", ")", "{", "if", "(", "closed", ")", "{", "throw", "new", "AlreadyClosedException", "(", ")", ";", "}", "return", "new", "...
Obtain a transaction with the requested parent and flags. @param parent parent transaction (may be null if no parent) @param flags applicable flags (eg for a reusable, read-only transaction) @return a transaction (never null)
[ "Obtain", "a", "transaction", "with", "the", "requested", "parent", "and", "flags", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Env.java#L366-L371
59,019
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/DirectBufferProxy.java
DirectBufferProxy.compareBuff
@SuppressWarnings("checkstyle:ReturnCount") public static int compareBuff(final DirectBuffer o1, final DirectBuffer o2) { requireNonNull(o1); requireNonNull(o2); if (o1.equals(o2)) { return 0; } final int minLength = Math.min(o1.capacity(), o2.capacity()); final int minWords = minLength ...
java
@SuppressWarnings("checkstyle:ReturnCount") public static int compareBuff(final DirectBuffer o1, final DirectBuffer o2) { requireNonNull(o1); requireNonNull(o2); if (o1.equals(o2)) { return 0; } final int minLength = Math.min(o1.capacity(), o2.capacity()); final int minWords = minLength ...
[ "@", "SuppressWarnings", "(", "\"checkstyle:ReturnCount\"", ")", "public", "static", "int", "compareBuff", "(", "final", "DirectBuffer", "o1", ",", "final", "DirectBuffer", "o2", ")", "{", "requireNonNull", "(", "o1", ")", ";", "requireNonNull", "(", "o2", ")", ...
Lexicographically compare two buffers. @param o1 left operand (required) @param o2 right operand (required) @return as specified by {@link Comparable} interface
[ "Lexicographically", "compare", "two", "buffers", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/DirectBufferProxy.java#L66-L95
59,020
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Dbi.java
Dbi.delete
public boolean delete(final T key) { try (Txn<T> txn = env.txnWrite()) { final boolean ret = delete(txn, key); txn.commit(); return ret; } }
java
public boolean delete(final T key) { try (Txn<T> txn = env.txnWrite()) { final boolean ret = delete(txn, key); txn.commit(); return ret; } }
[ "public", "boolean", "delete", "(", "final", "T", "key", ")", "{", "try", "(", "Txn", "<", "T", ">", "txn", "=", "env", ".", "txnWrite", "(", ")", ")", "{", "final", "boolean", "ret", "=", "delete", "(", "txn", ",", "key", ")", ";", "txn", ".",...
Starts a new read-write transaction and deletes the key. @param key key to delete from the database (not null) @return true if the key/data pair was found, false otherwise @see #delete(org.lmdbjava.Txn, java.lang.Object, java.lang.Object)
[ "Starts", "a", "new", "read", "-", "write", "transaction", "and", "deletes", "the", "key", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Dbi.java#L119-L125
59,021
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Dbi.java
Dbi.delete
public boolean delete(final Txn<T> txn, final T key) { return delete(txn, key, null); }
java
public boolean delete(final Txn<T> txn, final T key) { return delete(txn, key, null); }
[ "public", "boolean", "delete", "(", "final", "Txn", "<", "T", ">", "txn", ",", "final", "T", "key", ")", "{", "return", "delete", "(", "txn", ",", "key", ",", "null", ")", ";", "}" ]
Deletes the key using the passed transaction. @param txn transaction handle (not null; not committed; must be R-W) @param key key to delete from the database (not null) @return true if the key/data pair was found, false otherwise @see #delete(org.lmdbjava.Txn, java.lang.Object, java.lang.Object)
[ "Deletes", "the", "key", "using", "the", "passed", "transaction", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Dbi.java#L136-L138
59,022
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Dbi.java
Dbi.openCursor
public Cursor<T> openCursor(final Txn<T> txn) { if (SHOULD_CHECK) { requireNonNull(txn); txn.checkReady(); } final PointerByReference cursorPtr = new PointerByReference(); checkRc(LIB.mdb_cursor_open(txn.pointer(), ptr, cursorPtr)); return new Cursor<>(cursorPtr.getValue(), txn); }
java
public Cursor<T> openCursor(final Txn<T> txn) { if (SHOULD_CHECK) { requireNonNull(txn); txn.checkReady(); } final PointerByReference cursorPtr = new PointerByReference(); checkRc(LIB.mdb_cursor_open(txn.pointer(), ptr, cursorPtr)); return new Cursor<>(cursorPtr.getValue(), txn); }
[ "public", "Cursor", "<", "T", ">", "openCursor", "(", "final", "Txn", "<", "T", ">", "txn", ")", "{", "if", "(", "SHOULD_CHECK", ")", "{", "requireNonNull", "(", "txn", ")", ";", "txn", ".", "checkReady", "(", ")", ";", "}", "final", "PointerByRefere...
Create a cursor handle. <p> A cursor is associated with a specific transaction and database. A cursor cannot be used when its database handle is closed. Nor when its transaction has ended, except with {@link Cursor#renew(org.lmdbjava.Txn)}. It can be discarded with {@link Cursor#close()}. A cursor in a write-transacti...
[ "Create", "a", "cursor", "handle", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Dbi.java#L370-L378
59,023
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Dbi.java
Dbi.stat
public Stat stat(final Txn<T> txn) { if (SHOULD_CHECK) { requireNonNull(txn); txn.checkReady(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_stat(txn.pointer(), ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), ...
java
public Stat stat(final Txn<T> txn) { if (SHOULD_CHECK) { requireNonNull(txn); txn.checkReady(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_stat(txn.pointer(), ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), ...
[ "public", "Stat", "stat", "(", "final", "Txn", "<", "T", ">", "txn", ")", "{", "if", "(", "SHOULD_CHECK", ")", "{", "requireNonNull", "(", "txn", ")", ";", "txn", ".", "checkReady", "(", ")", ";", "}", "final", "MDB_stat", "stat", "=", "new", "MDB_...
Return statistics about this database. @param txn transaction handle (not null; not committed) @return an immutable statistics object.
[ "Return", "statistics", "about", "this", "database", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Dbi.java#L477-L491
59,024
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Txn.java
Txn.close
@Override public void close() { if (state == RELEASED) { return; } if (state == READY) { LIB.mdb_txn_abort(ptr); } keyVal.close(); state = RELEASED; }
java
@Override public void close() { if (state == RELEASED) { return; } if (state == READY) { LIB.mdb_txn_abort(ptr); } keyVal.close(); state = RELEASED; }
[ "@", "Override", "public", "void", "close", "(", ")", "{", "if", "(", "state", "==", "RELEASED", ")", "{", "return", ";", "}", "if", "(", "state", "==", "READY", ")", "{", "LIB", ".", "mdb_txn_abort", "(", "ptr", ")", ";", "}", "keyVal", ".", "cl...
Closes this transaction by aborting if not already committed. <p> Closing the transaction will invoke {@link BufferProxy#deallocate(java.lang.Object)} for each read-only buffer (ie the key and value).
[ "Closes", "this", "transaction", "by", "aborting", "if", "not", "already", "committed", "." ]
5912beb1037722c71f3ddc05e70fcbe739dfa272
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Txn.java#L90-L100
59,025
undera/perfmon-agent
src/kg/apc/perfmon/client/AbstractTransport.java
AbstractTransport.getNextLine
protected String getNextLine(int newlineCount) throws IOException { if (newlineCount == 0) { return ""; } StringBuffer str = new StringBuffer(); int b; while (pis.available() > 0) { b = pis.read(); if (b == -1) { return ""; ...
java
protected String getNextLine(int newlineCount) throws IOException { if (newlineCount == 0) { return ""; } StringBuffer str = new StringBuffer(); int b; while (pis.available() > 0) { b = pis.read(); if (b == -1) { return ""; ...
[ "protected", "String", "getNextLine", "(", "int", "newlineCount", ")", "throws", "IOException", "{", "if", "(", "newlineCount", "==", "0", ")", "{", "return", "\"\"", ";", "}", "StringBuffer", "str", "=", "new", "StringBuffer", "(", ")", ";", "int", "b", ...
Method retrieves next line from received bytes sequence @param newlineCount @return next command line @throws IOException
[ "Method", "retrieves", "next", "line", "from", "received", "bytes", "sequence" ]
535c145e588d59acc88684115485d9170c6260fe
https://github.com/undera/perfmon-agent/blob/535c145e588d59acc88684115485d9170c6260fe/src/kg/apc/perfmon/client/AbstractTransport.java#L88-L111
59,026
undera/perfmon-agent
src/kg/apc/perfmon/client/TransportFactory.java
TransportFactory.getTransport
public static Transport getTransport(SocketAddress addr) throws IOException { Transport trans; try { log.debug("Connecting TCP"); trans = TCPInstance(addr); if (!trans.test()) { throw new IOException("Agent is unreachable via TCP"); } ...
java
public static Transport getTransport(SocketAddress addr) throws IOException { Transport trans; try { log.debug("Connecting TCP"); trans = TCPInstance(addr); if (!trans.test()) { throw new IOException("Agent is unreachable via TCP"); } ...
[ "public", "static", "Transport", "getTransport", "(", "SocketAddress", "addr", ")", "throws", "IOException", "{", "Transport", "trans", ";", "try", "{", "log", ".", "debug", "(", "\"Connecting TCP\"", ")", ";", "trans", "=", "TCPInstance", "(", "addr", ")", ...
Primary transport getting method. Tries to connect and test UDP Transport. If UDP failed, tries TCP transport. If it fails, too, throws IOException @param addr @return Transport instance @throws IOException
[ "Primary", "transport", "getting", "method", ".", "Tries", "to", "connect", "and", "test", "UDP", "Transport", ".", "If", "UDP", "failed", "tries", "TCP", "transport", ".", "If", "it", "fails", "too", "throws", "IOException" ]
535c145e588d59acc88684115485d9170c6260fe
https://github.com/undera/perfmon-agent/blob/535c145e588d59acc88684115485d9170c6260fe/src/kg/apc/perfmon/client/TransportFactory.java#L31-L54
59,027
undera/perfmon-agent
src/kg/apc/perfmon/client/TransportFactory.java
TransportFactory.TCPInstance
public static Transport TCPInstance(SocketAddress addr) throws IOException { Socket sock = new Socket(); sock.setSoTimeout(getTimeout()); sock.connect(addr); StreamTransport trans = new StreamTransport(); trans.setStreams(sock.getInputStream(), sock.getOutputStream()); t...
java
public static Transport TCPInstance(SocketAddress addr) throws IOException { Socket sock = new Socket(); sock.setSoTimeout(getTimeout()); sock.connect(addr); StreamTransport trans = new StreamTransport(); trans.setStreams(sock.getInputStream(), sock.getOutputStream()); t...
[ "public", "static", "Transport", "TCPInstance", "(", "SocketAddress", "addr", ")", "throws", "IOException", "{", "Socket", "sock", "=", "new", "Socket", "(", ")", ";", "sock", ".", "setSoTimeout", "(", "getTimeout", "(", ")", ")", ";", "sock", ".", "connec...
Returns TCP transport instance, connected to specified address @param addr @return Transport instance @throws IOException
[ "Returns", "TCP", "transport", "instance", "connected", "to", "specified", "address" ]
535c145e588d59acc88684115485d9170c6260fe
https://github.com/undera/perfmon-agent/blob/535c145e588d59acc88684115485d9170c6260fe/src/kg/apc/perfmon/client/TransportFactory.java#L92-L101
59,028
undera/perfmon-agent
src/kg/apc/perfmon/client/TransportFactory.java
TransportFactory.UDPInstance
public static Transport UDPInstance(SocketAddress addr) throws IOException { DatagramSocket sock = new DatagramSocket(); sock.setSoTimeout(getTimeout()); sock.connect(addr); StreamTransport trans = new StreamTransport(); trans.setStreams(new UDPInputStream(sock), new UDPOutputSt...
java
public static Transport UDPInstance(SocketAddress addr) throws IOException { DatagramSocket sock = new DatagramSocket(); sock.setSoTimeout(getTimeout()); sock.connect(addr); StreamTransport trans = new StreamTransport(); trans.setStreams(new UDPInputStream(sock), new UDPOutputSt...
[ "public", "static", "Transport", "UDPInstance", "(", "SocketAddress", "addr", ")", "throws", "IOException", "{", "DatagramSocket", "sock", "=", "new", "DatagramSocket", "(", ")", ";", "sock", ".", "setSoTimeout", "(", "getTimeout", "(", ")", ")", ";", "sock", ...
Returns new UDP Transport instance connected to specified socket address @param addr @return connected Transport @throws IOException
[ "Returns", "new", "UDP", "Transport", "instance", "connected", "to", "specified", "socket", "address" ]
535c145e588d59acc88684115485d9170c6260fe
https://github.com/undera/perfmon-agent/blob/535c145e588d59acc88684115485d9170c6260fe/src/kg/apc/perfmon/client/TransportFactory.java#L115-L124
59,029
ctongfei/progressbar
src/main/java/me/tongfei/progressbar/ProgressBar.java
ProgressBar.maxHint
public ProgressBar maxHint(long n) { if (n < 0) progress.setAsIndefinite(); else { progress.setAsDefinite(); progress.maxHint(n); } return this; }
java
public ProgressBar maxHint(long n) { if (n < 0) progress.setAsIndefinite(); else { progress.setAsDefinite(); progress.maxHint(n); } return this; }
[ "public", "ProgressBar", "maxHint", "(", "long", "n", ")", "{", "if", "(", "n", "<", "0", ")", "progress", ".", "setAsIndefinite", "(", ")", ";", "else", "{", "progress", ".", "setAsDefinite", "(", ")", ";", "progress", ".", "maxHint", "(", "n", ")",...
Gives a hint to the maximum value of the progress bar. @param n Hint of the maximum value
[ "Gives", "a", "hint", "to", "the", "maximum", "value", "of", "the", "progress", "bar", "." ]
dd4b49c73f7c0ebcc3b531a75d536625dd820c83
https://github.com/ctongfei/progressbar/blob/dd4b49c73f7c0ebcc3b531a75d536625dd820c83/src/main/java/me/tongfei/progressbar/ProgressBar.java#L140-L148
59,030
davidmoten/rxjava2-jdbc
rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/tuple/Tuple2.java
Tuple2.create
public static <R, S> Tuple2<R, S> create(R r, S s) { return new Tuple2<R, S>(r, s); }
java
public static <R, S> Tuple2<R, S> create(R r, S s) { return new Tuple2<R, S>(r, s); }
[ "public", "static", "<", "R", ",", "S", ">", "Tuple2", "<", "R", ",", "S", ">", "create", "(", "R", "r", ",", "S", "s", ")", "{", "return", "new", "Tuple2", "<", "R", ",", "S", ">", "(", "r", ",", "s", ")", ";", "}" ]
Returns a new instance. @param r first element @param s second element @param <R> type of first element @param <S> type of second element @return tuple
[ "Returns", "a", "new", "instance", "." ]
6f170806a7cd0fd2e40f3af3724ef77fbcdc757a
https://github.com/davidmoten/rxjava2-jdbc/blob/6f170806a7cd0fd2e40f3af3724ef77fbcdc757a/rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/tuple/Tuple2.java#L42-L44
59,031
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java
BigDecimalMath.factorial
public static BigDecimal factorial(int n) { if (n < 0) { throw new ArithmeticException("Illegal factorial(n) for n < 0: n = " + n); } if (n < factorialCache.length) { return factorialCache[n]; } BigDecimal result = factorialCache[factorialCache.length - 1]; return result.multiply(factorialRecursion(f...
java
public static BigDecimal factorial(int n) { if (n < 0) { throw new ArithmeticException("Illegal factorial(n) for n < 0: n = " + n); } if (n < factorialCache.length) { return factorialCache[n]; } BigDecimal result = factorialCache[factorialCache.length - 1]; return result.multiply(factorialRecursion(f...
[ "public", "static", "BigDecimal", "factorial", "(", "int", "n", ")", "{", "if", "(", "n", "<", "0", ")", "{", "throw", "new", "ArithmeticException", "(", "\"Illegal factorial(n) for n < 0: n = \"", "+", "n", ")", ";", "}", "if", "(", "n", "<", "factorialCa...
Calculates the factorial of the specified integer argument. <p>factorial = 1 * 2 * 3 * ... n</p> @param n the {@link BigDecimal} @return the factorial {@link BigDecimal} @throws ArithmeticException if x &lt; 0
[ "Calculates", "the", "factorial", "of", "the", "specified", "integer", "argument", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java#L477-L487
59,032
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java
BigDecimalMath.pi
public static BigDecimal pi(MathContext mathContext) { checkMathContext(mathContext); BigDecimal result = null; synchronized (piCacheLock) { if (piCache != null && mathContext.getPrecision() <= piCache.precision()) { result = piCache; } else { piCache = piChudnovski(mathContext); return piCac...
java
public static BigDecimal pi(MathContext mathContext) { checkMathContext(mathContext); BigDecimal result = null; synchronized (piCacheLock) { if (piCache != null && mathContext.getPrecision() <= piCache.precision()) { result = piCache; } else { piCache = piChudnovski(mathContext); return piCac...
[ "public", "static", "BigDecimal", "pi", "(", "MathContext", "mathContext", ")", "{", "checkMathContext", "(", "mathContext", ")", ";", "BigDecimal", "result", "=", "null", ";", "synchronized", "(", "piCacheLock", ")", "{", "if", "(", "piCache", "!=", "null", ...
Returns the number pi. <p>See <a href="https://en.wikipedia.org/wiki/Pi">Wikipedia: Pi</a></p> @param mathContext the {@link MathContext} used for the result @return the number pi with the precision specified in the <code>mathContext</code> @throws UnsupportedOperationException if the {@link MathContext} has unlimite...
[ "Returns", "the", "number", "pi", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java#L1118-L1132
59,033
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java
BigDecimalMath.e
public static BigDecimal e(MathContext mathContext) { checkMathContext(mathContext); BigDecimal result = null; synchronized (eCacheLock) { if (eCache != null && mathContext.getPrecision() <= eCache.precision()) { result = eCache; } else { eCache = exp(ONE, mathContext); return eCache; } ...
java
public static BigDecimal e(MathContext mathContext) { checkMathContext(mathContext); BigDecimal result = null; synchronized (eCacheLock) { if (eCache != null && mathContext.getPrecision() <= eCache.precision()) { result = eCache; } else { eCache = exp(ONE, mathContext); return eCache; } ...
[ "public", "static", "BigDecimal", "e", "(", "MathContext", "mathContext", ")", "{", "checkMathContext", "(", "mathContext", ")", ";", "BigDecimal", "result", "=", "null", ";", "synchronized", "(", "eCacheLock", ")", "{", "if", "(", "eCache", "!=", "null", "&...
Returns the number e. <p>See <a href="https://en.wikipedia.org/wiki/E_(mathematical_constant)">Wikipedia: E (mathematical_constant)</a></p> @param mathContext the {@link MathContext} used for the result @return the number e with the precision specified in the <code>mathContext</code> @throws UnsupportedOperationExcep...
[ "Returns", "the", "number", "e", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java#L1185-L1199
59,034
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.multiply
private BigRational multiply(BigDecimal value) { BigDecimal n = numerator.multiply(value); BigDecimal d = denominator; return of(n, d); }
java
private BigRational multiply(BigDecimal value) { BigDecimal n = numerator.multiply(value); BigDecimal d = denominator; return of(n, d); }
[ "private", "BigRational", "multiply", "(", "BigDecimal", "value", ")", "{", "BigDecimal", "n", "=", "numerator", ".", "multiply", "(", "value", ")", ";", "BigDecimal", "d", "=", "denominator", ";", "return", "of", "(", "n", ",", "d", ")", ";", "}" ]
private, because we want to hide that we use BigDecimal internally
[ "private", "because", "we", "want", "to", "hide", "that", "we", "use", "BigDecimal", "internally" ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L412-L416
59,035
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.valueOf
public static BigRational valueOf(int integer, int fractionNumerator, int fractionDenominator) { if (fractionNumerator < 0 || fractionDenominator < 0) { throw new ArithmeticException("Negative value"); } BigRational integerPart = valueOf(integer); BigRational fractionPart = valueOf(fractionNumerator...
java
public static BigRational valueOf(int integer, int fractionNumerator, int fractionDenominator) { if (fractionNumerator < 0 || fractionDenominator < 0) { throw new ArithmeticException("Negative value"); } BigRational integerPart = valueOf(integer); BigRational fractionPart = valueOf(fractionNumerator...
[ "public", "static", "BigRational", "valueOf", "(", "int", "integer", ",", "int", "fractionNumerator", ",", "int", "fractionDenominator", ")", "{", "if", "(", "fractionNumerator", "<", "0", "||", "fractionDenominator", "<", "0", ")", "{", "throw", "new", "Arith...
Creates a rational number of the specified integer and fraction parts. <p>Useful to create numbers like 3 1/2 (= three and a half = 3.5) by calling <code>BigRational.valueOf(3, 1, 2)</code>.</p> <p>To create a negative rational only the integer part argument is allowed to be negative: to create -3 1/2 (= minus three a...
[ "Creates", "a", "rational", "number", "of", "the", "specified", "integer", "and", "fraction", "parts", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L844-L852
59,036
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.valueOf
public static BigRational valueOf(double value) { if (value == 0.0) { return ZERO; } if (value == 1.0) { return ONE; } if (Double.isInfinite(value)) { throw new NumberFormatException("Infinite"); } if (Double.isNaN(value)) { throw new NumberFormatException("NaN"); } return val...
java
public static BigRational valueOf(double value) { if (value == 0.0) { return ZERO; } if (value == 1.0) { return ONE; } if (Double.isInfinite(value)) { throw new NumberFormatException("Infinite"); } if (Double.isNaN(value)) { throw new NumberFormatException("NaN"); } return val...
[ "public", "static", "BigRational", "valueOf", "(", "double", "value", ")", "{", "if", "(", "value", "==", "0.0", ")", "{", "return", "ZERO", ";", "}", "if", "(", "value", "==", "1.0", ")", "{", "return", "ONE", ";", "}", "if", "(", "Double", ".", ...
Creates a rational number of the specified double value. @param value the double value @return the rational number @throws NumberFormatException if the double value is Infinite or NaN.
[ "Creates", "a", "rational", "number", "of", "the", "specified", "double", "value", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L889-L903
59,037
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.valueOf
public static BigRational valueOf(String string) { String[] strings = string.split("/"); BigRational result = valueOfSimple(strings[0]); for (int i = 1; i < strings.length; i++) { result = result.divide(valueOfSimple(strings[i])); } return result; }
java
public static BigRational valueOf(String string) { String[] strings = string.split("/"); BigRational result = valueOfSimple(strings[0]); for (int i = 1; i < strings.length; i++) { result = result.divide(valueOfSimple(strings[i])); } return result; }
[ "public", "static", "BigRational", "valueOf", "(", "String", "string", ")", "{", "String", "[", "]", "strings", "=", "string", ".", "split", "(", "\"/\"", ")", ";", "BigRational", "result", "=", "valueOfSimple", "(", "strings", "[", "0", "]", ")", ";", ...
Creates a rational number of the specified string representation. <p>The accepted string representations are:</p> <ul> <li>Output of {@link BigRational#toString()} : "integerPart.fractionPart"</li> <li>Output of {@link BigRational#toRationalString()} : "numerator/denominator"</li> <li>Output of <code>toString()</code>...
[ "Creates", "a", "rational", "number", "of", "the", "specified", "string", "representation", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L948-L955
59,038
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.min
public static BigRational min(BigRational... values) { if (values.length == 0) { return BigRational.ZERO; } BigRational result = values[0]; for (int i = 1; i < values.length; i++) { result = result.min(values[i]); } return result; }
java
public static BigRational min(BigRational... values) { if (values.length == 0) { return BigRational.ZERO; } BigRational result = values[0]; for (int i = 1; i < values.length; i++) { result = result.min(values[i]); } return result; }
[ "public", "static", "BigRational", "min", "(", "BigRational", "...", "values", ")", "{", "if", "(", "values", ".", "length", "==", "0", ")", "{", "return", "BigRational", ".", "ZERO", ";", "}", "BigRational", "result", "=", "values", "[", "0", "]", ";"...
Returns the smallest of the specified rational numbers. @param values the rational numbers to compare @return the smallest rational number, 0 if no numbers are specified
[ "Returns", "the", "smallest", "of", "the", "specified", "rational", "numbers", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L1019-L1028
59,039
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.max
public static BigRational max(BigRational... values) { if (values.length == 0) { return BigRational.ZERO; } BigRational result = values[0]; for (int i = 1; i < values.length; i++) { result = result.max(values[i]); } return result; }
java
public static BigRational max(BigRational... values) { if (values.length == 0) { return BigRational.ZERO; } BigRational result = values[0]; for (int i = 1; i < values.length; i++) { result = result.max(values[i]); } return result; }
[ "public", "static", "BigRational", "max", "(", "BigRational", "...", "values", ")", "{", "if", "(", "values", ".", "length", "==", "0", ")", "{", "return", "BigRational", ".", "ZERO", ";", "}", "BigRational", "result", "=", "values", "[", "0", "]", ";"...
Returns the largest of the specified rational numbers. @param values the rational numbers to compare @return the largest rational number, 0 if no numbers are specified @see #max(BigRational)
[ "Returns", "the", "largest", "of", "the", "specified", "rational", "numbers", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L1037-L1046
59,040
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java
BigComplex.add
public BigComplex add(BigComplex value) { return valueOf( re.add(value.re), im.add(value.im)); }
java
public BigComplex add(BigComplex value) { return valueOf( re.add(value.re), im.add(value.im)); }
[ "public", "BigComplex", "add", "(", "BigComplex", "value", ")", "{", "return", "valueOf", "(", "re", ".", "add", "(", "value", ".", "re", ")", ",", "im", ".", "add", "(", "value", ".", "im", ")", ")", ";", "}" ]
Calculates the addition of the given complex value to this complex number. <p>This methods <strong>does not</strong> modify this instance.</p> @param value the {@link BigComplex} value to add @return the calculated {@link BigComplex} result
[ "Calculates", "the", "addition", "of", "the", "given", "complex", "value", "to", "this", "complex", "number", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java#L61-L65
59,041
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java
BigComplex.subtract
public BigComplex subtract(BigComplex value) { return valueOf( re.subtract(value.re), im.subtract(value.im)); }
java
public BigComplex subtract(BigComplex value) { return valueOf( re.subtract(value.re), im.subtract(value.im)); }
[ "public", "BigComplex", "subtract", "(", "BigComplex", "value", ")", "{", "return", "valueOf", "(", "re", ".", "subtract", "(", "value", ".", "re", ")", ",", "im", ".", "subtract", "(", "value", ".", "im", ")", ")", ";", "}" ]
Calculates the subtraction of the given complex value from this complex number. <p>This methods <strong>does not</strong> modify this instance.</p> @param value the {@link BigComplex} value to subtract @return the calculated {@link BigComplex} result
[ "Calculates", "the", "subtraction", "of", "the", "given", "complex", "value", "from", "this", "complex", "number", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java#L131-L135
59,042
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java
BigComplex.multiply
public BigComplex multiply(BigComplex value) { return valueOf( re.multiply(value.re).subtract(im.multiply(value.im)), re.multiply(value.im).add(im.multiply(value.re))); }
java
public BigComplex multiply(BigComplex value) { return valueOf( re.multiply(value.re).subtract(im.multiply(value.im)), re.multiply(value.im).add(im.multiply(value.re))); }
[ "public", "BigComplex", "multiply", "(", "BigComplex", "value", ")", "{", "return", "valueOf", "(", "re", ".", "multiply", "(", "value", ".", "re", ")", ".", "subtract", "(", "im", ".", "multiply", "(", "value", ".", "im", ")", ")", ",", "re", ".", ...
Calculates the multiplication of the given complex value to this complex number. <p>This methods <strong>does not</strong> modify this instance.</p> @param value the {@link BigComplex} value to multiply @return the calculated {@link BigComplex} result
[ "Calculates", "the", "multiplication", "of", "the", "given", "complex", "value", "to", "this", "complex", "number", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java#L201-L205
59,043
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java
BigComplex.absSquare
public BigDecimal absSquare(MathContext mathContext) { return re.multiply(re, mathContext).add(im.multiply(im, mathContext), mathContext); }
java
public BigDecimal absSquare(MathContext mathContext) { return re.multiply(re, mathContext).add(im.multiply(im, mathContext), mathContext); }
[ "public", "BigDecimal", "absSquare", "(", "MathContext", "mathContext", ")", "{", "return", "re", ".", "multiply", "(", "re", ",", "mathContext", ")", ".", "add", "(", "im", ".", "multiply", "(", "im", ",", "mathContext", ")", ",", "mathContext", ")", ";...
Calculates the square of the absolute value of this complex number. <p>This method is faster than {@link #abs(MathContext)} since it does not need to calculate the {@link BigDecimalMath#sqrt(BigDecimal, MathContext)}.</p> <p>This methods <strong>does not</strong> modify this instance.</p> @param mathContext the {@li...
[ "Calculates", "the", "square", "of", "the", "absolute", "value", "of", "this", "complex", "number", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java#L379-L381
59,044
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java
BigComplex.round
public BigComplex round(MathContext mathContext) { return valueOf(re.round(mathContext), im.round(mathContext)); }
java
public BigComplex round(MathContext mathContext) { return valueOf(re.round(mathContext), im.round(mathContext)); }
[ "public", "BigComplex", "round", "(", "MathContext", "mathContext", ")", "{", "return", "valueOf", "(", "re", ".", "round", "(", "mathContext", ")", ",", "im", ".", "round", "(", "mathContext", ")", ")", ";", "}" ]
Returns this complex nuber rounded to the specified precision. <p>This methods <strong>does not</strong> modify this instance.</p> @param mathContext the {@link MathContext} used to calculate the result @return the rounded {@link BigComplex} result
[ "Returns", "this", "complex", "nuber", "rounded", "to", "the", "specified", "precision", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java#L418-L420
59,045
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java
BigComplex.strictEquals
public boolean strictEquals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; BigComplex other = (BigComplex) obj; return re.equals(other.re) && im.equals(other.im); }
java
public boolean strictEquals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; BigComplex other = (BigComplex) obj; return re.equals(other.re) && im.equals(other.im); }
[ "public", "boolean", "strictEquals", "(", "Object", "obj", ")", "{", "if", "(", "this", "==", "obj", ")", "return", "true", ";", "if", "(", "obj", "==", "null", ")", "return", "false", ";", "if", "(", "getClass", "(", ")", "!=", "obj", ".", "getCla...
Returns whether the real and imaginary parts of this complex number are strictly equal. <p>This method uses the strict equality as defined by {@link BigDecimal#equals(Object)} on the real and imaginary parts.</p> <p>Please note that {@link #equals(Object) BigComplex.equals(Object)} implements <strong>mathematical</str...
[ "Returns", "whether", "the", "real", "and", "imaginary", "parts", "of", "this", "complex", "number", "are", "strictly", "equal", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java#L460-L470
59,046
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/internal/SeriesCalculator.java
SeriesCalculator.getFactor
protected BigRational getFactor(int index) { while (factors.size() <= index) { BigRational factor = getCurrentFactor(); factors.add(factor); calculateNextFactor(); } return factors.get(index); }
java
protected BigRational getFactor(int index) { while (factors.size() <= index) { BigRational factor = getCurrentFactor(); factors.add(factor); calculateNextFactor(); } return factors.get(index); }
[ "protected", "BigRational", "getFactor", "(", "int", "index", ")", "{", "while", "(", "factors", ".", "size", "(", ")", "<=", "index", ")", "{", "BigRational", "factor", "=", "getCurrentFactor", "(", ")", ";", "factors", ".", "add", "(", "factor", ")", ...
Returns the factor of the term with specified index. @param index the index (starting with 0) @return the factor of the specified term
[ "Returns", "the", "factor", "of", "the", "term", "with", "specified", "index", "." ]
52c4fc334d0d722b295de740c1018ee400e3e8f2
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/internal/SeriesCalculator.java#L95-L102
59,047
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFField.java
DBFField.createField
protected static DBFField createField(DataInput in, Charset charset, boolean useFieldFlags) throws IOException { DBFField field = new DBFField(); byte t_byte = in.readByte(); /* 0 */ if (t_byte == (byte) 0x0d) { return null; } byte[] fieldName = new byte[11]; in.readFully(fieldName, 1, 10); /* 1-10 */ ...
java
protected static DBFField createField(DataInput in, Charset charset, boolean useFieldFlags) throws IOException { DBFField field = new DBFField(); byte t_byte = in.readByte(); /* 0 */ if (t_byte == (byte) 0x0d) { return null; } byte[] fieldName = new byte[11]; in.readFully(fieldName, 1, 10); /* 1-10 */ ...
[ "protected", "static", "DBFField", "createField", "(", "DataInput", "in", ",", "Charset", "charset", ",", "boolean", "useFieldFlags", ")", "throws", "IOException", "{", "DBFField", "field", "=", "new", "DBFField", "(", ")", ";", "byte", "t_byte", "=", "in", ...
Creates a DBFField object from the data read from the given DataInputStream. The data in the DataInputStream object is supposed to be organised correctly and the stream "pointer" is supposed to be positioned properly. @param in DataInputStream @param charset charset to use @param useFieldFlags If the file can store f...
[ "Creates", "a", "DBFField", "object", "from", "the", "data", "read", "from", "the", "given", "DataInputStream", "." ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFField.java#L173-L213
59,048
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFField.java
DBFField.write
protected void write(DataOutput out, Charset charset) throws IOException { // Field Name out.write(this.name.getBytes(charset)); /* 0-10 */ out.write(new byte[11 - this.name.length()]); // data type out.writeByte(this.type.getCode()); /* 11 */ out.writeInt(0x00); /* 12-15 */ out.writeByte(this.length); /...
java
protected void write(DataOutput out, Charset charset) throws IOException { // Field Name out.write(this.name.getBytes(charset)); /* 0-10 */ out.write(new byte[11 - this.name.length()]); // data type out.writeByte(this.type.getCode()); /* 11 */ out.writeInt(0x00); /* 12-15 */ out.writeByte(this.length); /...
[ "protected", "void", "write", "(", "DataOutput", "out", ",", "Charset", "charset", ")", "throws", "IOException", "{", "// Field Name", "out", ".", "write", "(", "this", ".", "name", ".", "getBytes", "(", "charset", ")", ")", ";", "/* 0-10 */", "out", ".", ...
Writes the content of DBFField object into the stream as per DBF format specifications. @param out OutputStream @param charset dbf file's charset @throws IOException if any stream related issues occur.
[ "Writes", "the", "content", "of", "DBFField", "object", "into", "the", "stream", "as", "per", "DBF", "format", "specifications", "." ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFField.java#L271-L287
59,049
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFField.java
DBFField.setName
public void setName(String name) { if (name == null) { throw new IllegalArgumentException("Field name cannot be null"); } if (name.length() == 0 || name.length() > 10) { throw new IllegalArgumentException("Field name should be of length 0-10"); } if (!DBFUtils.isPureAscii(name)) { throw new IllegalA...
java
public void setName(String name) { if (name == null) { throw new IllegalArgumentException("Field name cannot be null"); } if (name.length() == 0 || name.length() > 10) { throw new IllegalArgumentException("Field name should be of length 0-10"); } if (!DBFUtils.isPureAscii(name)) { throw new IllegalA...
[ "public", "void", "setName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field name cannot be null\"", ")", ";", "}", "if", "(", "name", ".", "length", "(", ")", "==", "0...
Sets the name of the field. @param name of the field as String. @since 0.3.3.1
[ "Sets", "the", "name", "of", "the", "field", "." ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFField.java#L333-L345
59,050
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFField.java
DBFField.setType
public void setType(DBFDataType type) { if (!type.isWriteSupported()) { throw new IllegalArgumentException("No support for writting " + type); } this.type = type; if (type.getDefaultSize() > 0) { this.length = type.getDefaultSize(); } }
java
public void setType(DBFDataType type) { if (!type.isWriteSupported()) { throw new IllegalArgumentException("No support for writting " + type); } this.type = type; if (type.getDefaultSize() > 0) { this.length = type.getDefaultSize(); } }
[ "public", "void", "setType", "(", "DBFDataType", "type", ")", "{", "if", "(", "!", "type", ".", "isWriteSupported", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"No support for writting \"", "+", "type", ")", ";", "}", "this", ".", ...
Set the type for this field @param type The type for this field @throws IllegalArgumentException if type is not write supported
[ "Set", "the", "type", "for", "this", "field" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFField.java#L424-L433
59,051
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFCharsetHelper.java
DBFCharsetHelper.getCharsetByByte
public static Charset getCharsetByByte(int b) { switch (b) { case 0x01: // U.S. MS-DOS return forName("IBM437"); case 0x02: // International MS-DOS return forName("IBM850"); case 0x03: // Windows ANSI return forName("windows-1252"); case 0x04: // Standard Macintosh return forName("Mac...
java
public static Charset getCharsetByByte(int b) { switch (b) { case 0x01: // U.S. MS-DOS return forName("IBM437"); case 0x02: // International MS-DOS return forName("IBM850"); case 0x03: // Windows ANSI return forName("windows-1252"); case 0x04: // Standard Macintosh return forName("Mac...
[ "public", "static", "Charset", "getCharsetByByte", "(", "int", "b", ")", "{", "switch", "(", "b", ")", "{", "case", "0x01", ":", "// U.S. MS-DOS", "return", "forName", "(", "\"IBM437\"", ")", ";", "case", "0x02", ":", "// International MS-DOS", "return", "fo...
Gets Java charset from DBF code @param b the code stored in DBF file @return Java charset, null if unknown.
[ "Gets", "Java", "charset", "from", "DBF", "code" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFCharsetHelper.java#L47-L138
59,052
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFCharsetHelper.java
DBFCharsetHelper.getDBFCodeForCharset
public static int getDBFCodeForCharset(Charset charset) { if (charset == null) { return 0; } String charsetName = charset.toString(); if ("ibm437".equalsIgnoreCase(charsetName)) { return 0x01; } if ("ibm850".equalsIgnoreCase(charsetName)) { return 0x02; } if ("windows-1252".equalsIgnoreCase(ch...
java
public static int getDBFCodeForCharset(Charset charset) { if (charset == null) { return 0; } String charsetName = charset.toString(); if ("ibm437".equalsIgnoreCase(charsetName)) { return 0x01; } if ("ibm850".equalsIgnoreCase(charsetName)) { return 0x02; } if ("windows-1252".equalsIgnoreCase(ch...
[ "public", "static", "int", "getDBFCodeForCharset", "(", "Charset", "charset", ")", "{", "if", "(", "charset", "==", "null", ")", "{", "return", "0", ";", "}", "String", "charsetName", "=", "charset", ".", "toString", "(", ")", ";", "if", "(", "\"ibm437\"...
gets the DBF code for a given Java charset @param charset the Java charset @return the DBF code, 0 if unknown
[ "gets", "the", "DBF", "code", "for", "a", "given", "Java", "charset" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFCharsetHelper.java#L153-L242
59,053
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFHeader.java
DBFHeader.getLastModificationDate
public Date getLastModificationDate() { if (this.year == 0 || this.month == 0 || this.day == 0){ return null; } try { Calendar calendar = Calendar.getInstance(); calendar.set(this.year, this.month, this.day, 0, 0, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); } catch (Ex...
java
public Date getLastModificationDate() { if (this.year == 0 || this.month == 0 || this.day == 0){ return null; } try { Calendar calendar = Calendar.getInstance(); calendar.set(this.year, this.month, this.day, 0, 0, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); } catch (Ex...
[ "public", "Date", "getLastModificationDate", "(", ")", "{", "if", "(", "this", ".", "year", "==", "0", "||", "this", ".", "month", "==", "0", "||", "this", ".", "day", "==", "0", ")", "{", "return", "null", ";", "}", "try", "{", "Calendar", "calend...
Gets the date the file was modified @return The date de file was created
[ "Gets", "the", "date", "the", "file", "was", "modified" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFHeader.java#L281-L294
59,054
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.readNumericStoredAsText
public static Number readNumericStoredAsText(DataInputStream dataInput, int length) throws IOException { try { byte t_float[] = new byte[length]; int readed = dataInput.read(t_float); if (readed != length) { throw new EOFException("failed to read:" + length + " bytes"); } t_float = DBFUtils.removeS...
java
public static Number readNumericStoredAsText(DataInputStream dataInput, int length) throws IOException { try { byte t_float[] = new byte[length]; int readed = dataInput.read(t_float); if (readed != length) { throw new EOFException("failed to read:" + length + " bytes"); } t_float = DBFUtils.removeS...
[ "public", "static", "Number", "readNumericStoredAsText", "(", "DataInputStream", "dataInput", ",", "int", "length", ")", "throws", "IOException", "{", "try", "{", "byte", "t_float", "[", "]", "=", "new", "byte", "[", "length", "]", ";", "int", "readed", "=",...
Reads a number from a stream, @param dataInput the stream data @param length the legth of the number @return The number as a Number (BigDecimal) @throws IOException if an IO error happens @throws EOFException if reached end of file before length bytes
[ "Reads", "a", "number", "from", "a", "stream" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L62-L83
59,055
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.littleEndian
public static int littleEndian(int value) { int num1 = value; int mask = 0xff; int num2 = 0x00; num2 |= num1 & mask; for (int i = 1; i < 4; i++) { num2 <<= 8; mask <<= 8; num2 |= (num1 & mask) >> (8 * i); } return num2; }
java
public static int littleEndian(int value) { int num1 = value; int mask = 0xff; int num2 = 0x00; num2 |= num1 & mask; for (int i = 1; i < 4; i++) { num2 <<= 8; mask <<= 8; num2 |= (num1 & mask) >> (8 * i); } return num2; }
[ "public", "static", "int", "littleEndian", "(", "int", "value", ")", "{", "int", "num1", "=", "value", ";", "int", "mask", "=", "0xff", ";", "int", "num2", "=", "0x00", ";", "num2", "|=", "num1", "&", "mask", ";", "for", "(", "int", "i", "=", "1"...
Convert an int value to littleEndian @param value value to be converted @return littleEndian int
[ "Convert", "an", "int", "value", "to", "littleEndian" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L166-L181
59,056
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.doubleFormating
public static byte[] doubleFormating(Number num, Charset charset, int fieldLength, int sizeDecimalPart) { int sizeWholePart = fieldLength - (sizeDecimalPart > 0 ? (sizeDecimalPart + 1) : 0); StringBuilder format = new StringBuilder(fieldLength); for (int i = 0; i < sizeWholePart-1; i++) { format.append("#"); ...
java
public static byte[] doubleFormating(Number num, Charset charset, int fieldLength, int sizeDecimalPart) { int sizeWholePart = fieldLength - (sizeDecimalPart > 0 ? (sizeDecimalPart + 1) : 0); StringBuilder format = new StringBuilder(fieldLength); for (int i = 0; i < sizeWholePart-1; i++) { format.append("#"); ...
[ "public", "static", "byte", "[", "]", "doubleFormating", "(", "Number", "num", ",", "Charset", "charset", ",", "int", "fieldLength", ",", "int", "sizeDecimalPart", ")", "{", "int", "sizeWholePart", "=", "fieldLength", "-", "(", "sizeDecimalPart", ">", "0", "...
Format a double number to write to a dbf file @param num number to format @param charset charset to use @param fieldLength field length @param sizeDecimalPart decimal part size @return bytes to write to the dbf file
[ "Format", "a", "double", "number", "to", "write", "to", "a", "dbf", "file" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L237-L258
59,057
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.contains
public static boolean contains(byte[] array, byte value) { if (array != null) { for (byte data : array) { if (data == value) { return true; } } } return false; }
java
public static boolean contains(byte[] array, byte value) { if (array != null) { for (byte data : array) { if (data == value) { return true; } } } return false; }
[ "public", "static", "boolean", "contains", "(", "byte", "[", "]", "array", ",", "byte", "value", ")", "{", "if", "(", "array", "!=", "null", ")", "{", "for", "(", "byte", "data", ":", "array", ")", "{", "if", "(", "data", "==", "value", ")", "{",...
Checks that a byte array contains some specific byte @param array The array to search in @param value The byte to search for @return true if the array contains spcified value
[ "Checks", "that", "a", "byte", "array", "contains", "some", "specific", "byte" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L266-L275
59,058
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.isPureAscii
public static boolean isPureAscii(String stringToCheck) { if (stringToCheck == null || stringToCheck.length() == 0) { return true; } synchronized (ASCII_ENCODER) { return ASCII_ENCODER.canEncode(stringToCheck); } }
java
public static boolean isPureAscii(String stringToCheck) { if (stringToCheck == null || stringToCheck.length() == 0) { return true; } synchronized (ASCII_ENCODER) { return ASCII_ENCODER.canEncode(stringToCheck); } }
[ "public", "static", "boolean", "isPureAscii", "(", "String", "stringToCheck", ")", "{", "if", "(", "stringToCheck", "==", "null", "||", "stringToCheck", ".", "length", "(", ")", "==", "0", ")", "{", "return", "true", ";", "}", "synchronized", "(", "ASCII_E...
Checks if a string is pure Ascii @param stringToCheck the string @return true if is ascci
[ "Checks", "if", "a", "string", "is", "pure", "Ascii" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L282-L289
59,059
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.isPureAscii
public static boolean isPureAscii(byte[] data) { if (data == null) { return false; } for (byte b : data) { if (b < 0x20) { return false; } } return true; }
java
public static boolean isPureAscii(byte[] data) { if (data == null) { return false; } for (byte b : data) { if (b < 0x20) { return false; } } return true; }
[ "public", "static", "boolean", "isPureAscii", "(", "byte", "[", "]", "data", ")", "{", "if", "(", "data", "==", "null", ")", "{", "return", "false", ";", "}", "for", "(", "byte", "b", ":", "data", ")", "{", "if", "(", "b", "<", "0x20", ")", "{"...
Test if the data in the array is pure ASCII @param data data to check @return true if there are only ASCII characters
[ "Test", "if", "the", "data", "in", "the", "array", "is", "pure", "ASCII" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L296-L306
59,060
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.trimRightSpaces
public static byte[] trimRightSpaces(byte[] b_array) { if (b_array == null || b_array.length == 0) { return new byte[0]; } int pos = getRightPos(b_array); int length = pos + 1; byte[] newBytes = new byte[length]; System.arraycopy(b_array, 0, newBytes, 0, length); return newBytes; }
java
public static byte[] trimRightSpaces(byte[] b_array) { if (b_array == null || b_array.length == 0) { return new byte[0]; } int pos = getRightPos(b_array); int length = pos + 1; byte[] newBytes = new byte[length]; System.arraycopy(b_array, 0, newBytes, 0, length); return newBytes; }
[ "public", "static", "byte", "[", "]", "trimRightSpaces", "(", "byte", "[", "]", "b_array", ")", "{", "if", "(", "b_array", "==", "null", "||", "b_array", ".", "length", "==", "0", ")", "{", "return", "new", "byte", "[", "0", "]", ";", "}", "int", ...
Trims right spaces from string @param b_array the string @return the string without right spaces
[ "Trims", "right", "spaces", "from", "string" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L327-L336
59,061
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFWriter.java
DBFWriter.setFields
public void setFields(DBFField[] fields) { if (this.closed) { throw new IllegalStateException("You can not set fields to a closed DBFWriter"); } if (this.header.fieldArray != null) { throw new DBFException("Fields has already been set"); } if (fields == null || fields.length == 0) { throw new DBFExce...
java
public void setFields(DBFField[] fields) { if (this.closed) { throw new IllegalStateException("You can not set fields to a closed DBFWriter"); } if (this.header.fieldArray != null) { throw new DBFException("Fields has already been set"); } if (fields == null || fields.length == 0) { throw new DBFExce...
[ "public", "void", "setFields", "(", "DBFField", "[", "]", "fields", ")", "{", "if", "(", "this", ".", "closed", ")", "{", "throw", "new", "IllegalStateException", "(", "\"You can not set fields to a closed DBFWriter\"", ")", ";", "}", "if", "(", "this", ".", ...
Sets fields definition @param fields fields definition
[ "Sets", "fields", "definition" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFWriter.java#L183-L210
59,062
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFWriter.java
DBFWriter.addRecord
public void addRecord(Object[] values) { if (this.closed) { throw new IllegalStateException("You can add records a closed DBFWriter"); } if (this.header.fieldArray == null) { throw new DBFException("Fields should be set before adding records"); } if (values == null) { throw new DBFException("Null ca...
java
public void addRecord(Object[] values) { if (this.closed) { throw new IllegalStateException("You can add records a closed DBFWriter"); } if (this.header.fieldArray == null) { throw new DBFException("Fields should be set before adding records"); } if (values == null) { throw new DBFException("Null ca...
[ "public", "void", "addRecord", "(", "Object", "[", "]", "values", ")", "{", "if", "(", "this", ".", "closed", ")", "{", "throw", "new", "IllegalStateException", "(", "\"You can add records a closed DBFWriter\"", ")", ";", "}", "if", "(", "this", ".", "header...
Add a record. @param values fields of the record
[ "Add", "a", "record", "." ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFWriter.java#L216-L280
59,063
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFWriter.java
DBFWriter.close
@Override public void close() { if (this.closed) { return; } this.closed = true; if (this.raf != null) { /* * everything is written already. just update the header for * record count and the END_OF_DATA mark */ try { this.header.numberOfRecords = this.recordCount; this.raf.seek(0);...
java
@Override public void close() { if (this.closed) { return; } this.closed = true; if (this.raf != null) { /* * everything is written already. just update the header for * record count and the END_OF_DATA mark */ try { this.header.numberOfRecords = this.recordCount; this.raf.seek(0);...
[ "@", "Override", "public", "void", "close", "(", ")", "{", "if", "(", "this", ".", "closed", ")", "{", "return", ";", "}", "this", ".", "closed", "=", "true", ";", "if", "(", "this", ".", "raf", "!=", "null", ")", "{", "/*\n\t\t\t * everything is wri...
In sync mode, write the header and close the file
[ "In", "sync", "mode", "write", "the", "header", "and", "close", "the", "file" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFWriter.java#L306-L340
59,064
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getString
public String getString(int columnIndex) { if (columnIndex < 0 || columnIndex >= data.length) { throw new IllegalArgumentException("Invalid index field: (" + columnIndex+"). Valid range is 0 to " + (data.length - 1)); } Object fieldValue = data[columnIndex]; if (fieldValue == null) { return null; } ...
java
public String getString(int columnIndex) { if (columnIndex < 0 || columnIndex >= data.length) { throw new IllegalArgumentException("Invalid index field: (" + columnIndex+"). Valid range is 0 to " + (data.length - 1)); } Object fieldValue = data[columnIndex]; if (fieldValue == null) { return null; } ...
[ "public", "String", "getString", "(", "int", "columnIndex", ")", "{", "if", "(", "columnIndex", "<", "0", "||", "columnIndex", ">=", "data", ".", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid index field: (\"", "+", "columnIndex...
Reads the data as string @param columnIndex columnIndex @return the value converted to String
[ "Reads", "the", "data", "as", "string" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L106-L118
59,065
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getBigDecimal
public BigDecimal getBigDecimal(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return null; } if (fieldValue instanceof BigDecimal) { return (BigDecimal) fieldValue; } throw new DBFException("Unsupported type for BigDecimal at column:" + columnIndex + " " + fie...
java
public BigDecimal getBigDecimal(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return null; } if (fieldValue instanceof BigDecimal) { return (BigDecimal) fieldValue; } throw new DBFException("Unsupported type for BigDecimal at column:" + columnIndex + " " + fie...
[ "public", "BigDecimal", "getBigDecimal", "(", "int", "columnIndex", ")", "{", "Object", "fieldValue", "=", "data", "[", "columnIndex", "]", ";", "if", "(", "fieldValue", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "fieldValue", "instance...
Reads the data as BigDecimal @param columnIndex columnIndex @return the data as BigDecimal
[ "Reads", "the", "data", "as", "BigDecimal" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L138-L148
59,066
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getBoolean
public boolean getBoolean(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return Boolean.FALSE; } if (fieldValue instanceof Boolean) { return (Boolean) fieldValue; } throw new DBFException("Unsupported type for Boolean at column:" + columnIndex + " " + fieldValu...
java
public boolean getBoolean(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return Boolean.FALSE; } if (fieldValue instanceof Boolean) { return (Boolean) fieldValue; } throw new DBFException("Unsupported type for Boolean at column:" + columnIndex + " " + fieldValu...
[ "public", "boolean", "getBoolean", "(", "int", "columnIndex", ")", "{", "Object", "fieldValue", "=", "data", "[", "columnIndex", "]", ";", "if", "(", "fieldValue", "==", "null", ")", "{", "return", "Boolean", ".", "FALSE", ";", "}", "if", "(", "fieldValu...
Reads the data as Boolean @param columnIndex columnIndex @return the data as Boolean
[ "Reads", "the", "data", "as", "Boolean" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L168-L178
59,067
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getDate
public Date getDate(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return null; } if (fieldValue instanceof Date) { return (Date) fieldValue; } throw new DBFException( "Unsupported type for Date at column:" + columnIndex + " " + fieldValue.getClass().getCanonic...
java
public Date getDate(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return null; } if (fieldValue instanceof Date) { return (Date) fieldValue; } throw new DBFException( "Unsupported type for Date at column:" + columnIndex + " " + fieldValue.getClass().getCanonic...
[ "public", "Date", "getDate", "(", "int", "columnIndex", ")", "{", "Object", "fieldValue", "=", "data", "[", "columnIndex", "]", ";", "if", "(", "fieldValue", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "fieldValue", "instanceof", "Date...
Reads the data as Date @param columnIndex columnIndex @return the data as Date
[ "Reads", "the", "data", "as", "Date" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L230-L240
59,068
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getDouble
public double getDouble(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0.0; } if (fieldValue instanceof Number) { return ((Number) fieldValue).doubleValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldVal...
java
public double getDouble(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0.0; } if (fieldValue instanceof Number) { return ((Number) fieldValue).doubleValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldVal...
[ "public", "double", "getDouble", "(", "int", "columnIndex", ")", "{", "Object", "fieldValue", "=", "data", "[", "columnIndex", "]", ";", "if", "(", "fieldValue", "==", "null", ")", "{", "return", "0.0", ";", "}", "if", "(", "fieldValue", "instanceof", "N...
Reads the data as Double @param columnIndex columnIndex @return the data as Double
[ "Reads", "the", "data", "as", "Double" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L261-L271
59,069
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getFloat
public float getFloat(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0.0f; } if (fieldValue instanceof Number) { return ((Number) fieldValue).floatValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldValue...
java
public float getFloat(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0.0f; } if (fieldValue instanceof Number) { return ((Number) fieldValue).floatValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldValue...
[ "public", "float", "getFloat", "(", "int", "columnIndex", ")", "{", "Object", "fieldValue", "=", "data", "[", "columnIndex", "]", ";", "if", "(", "fieldValue", "==", "null", ")", "{", "return", "0.0f", ";", "}", "if", "(", "fieldValue", "instanceof", "Nu...
Reads the data as Float @param columnIndex columnIndex @return the data as Float
[ "Reads", "the", "data", "as", "Float" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L291-L301
59,070
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getInt
public int getInt(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0; } if (fieldValue instanceof Number) { return ((Number) fieldValue).intValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldValue.getClass...
java
public int getInt(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0; } if (fieldValue instanceof Number) { return ((Number) fieldValue).intValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldValue.getClass...
[ "public", "int", "getInt", "(", "int", "columnIndex", ")", "{", "Object", "fieldValue", "=", "data", "[", "columnIndex", "]", ";", "if", "(", "fieldValue", "==", "null", ")", "{", "return", "0", ";", "}", "if", "(", "fieldValue", "instanceof", "Number", ...
Reads the data as int @param columnIndex columnIndex @return the data as int
[ "Reads", "the", "data", "as", "int" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L321-L331
59,071
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFRow.java
DBFRow.getLong
public long getLong(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0; } if (fieldValue instanceof Number) { return ((Number) fieldValue).longValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldValue.getCl...
java
public long getLong(int columnIndex) { Object fieldValue = data[columnIndex]; if (fieldValue == null) { return 0; } if (fieldValue instanceof Number) { return ((Number) fieldValue).longValue(); } throw new DBFException("Unsupported type for Number at column:" + columnIndex + " " + fieldValue.getCl...
[ "public", "long", "getLong", "(", "int", "columnIndex", ")", "{", "Object", "fieldValue", "=", "data", "[", "columnIndex", "]", ";", "if", "(", "fieldValue", "==", "null", ")", "{", "return", "0", ";", "}", "if", "(", "fieldValue", "instanceof", "Number"...
Reads the data as long @param columnIndex columnIndex @return the data as long
[ "Reads", "the", "data", "as", "long" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFRow.java#L351-L361
59,072
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/Utils.java
Utils.textPadding
@Deprecated public static byte[] textPadding(String text, String characterSetName, int length, int alignment, byte paddingByte) throws UnsupportedEncodingException { DBFAlignment align = DBFAlignment.RIGHT; if (alignment == ALIGN_LEFT) { align = DBFAlignment.LEFT; } return textPadding(text, characterSetN...
java
@Deprecated public static byte[] textPadding(String text, String characterSetName, int length, int alignment, byte paddingByte) throws UnsupportedEncodingException { DBFAlignment align = DBFAlignment.RIGHT; if (alignment == ALIGN_LEFT) { align = DBFAlignment.LEFT; } return textPadding(text, characterSetN...
[ "@", "Deprecated", "public", "static", "byte", "[", "]", "textPadding", "(", "String", "text", ",", "String", "characterSetName", ",", "int", "length", ",", "int", "alignment", ",", "byte", "paddingByte", ")", "throws", "UnsupportedEncodingException", "{", "DBFA...
Text is truncated if exceed field capacity. Uses spaces as padding @param text the text to write @param characterSetName The charset to use @param length field length @param alignment where to align the data @param paddingByte the byte to use for padding @return byte[] to store in the file @throws UnsupportedEncodingEx...
[ "Text", "is", "truncated", "if", "exceed", "field", "capacity", ".", "Uses", "spaces", "as", "padding" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/Utils.java#L264-L273
59,073
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/Utils.java
Utils.textPadding
@Deprecated public static byte[] textPadding(String text, String characterSetName, int length, DBFAlignment alignment, byte paddingByte) throws UnsupportedEncodingException { return textPadding(text, Charset.forName(characterSetName), length, alignment, paddingByte); }
java
@Deprecated public static byte[] textPadding(String text, String characterSetName, int length, DBFAlignment alignment, byte paddingByte) throws UnsupportedEncodingException { return textPadding(text, Charset.forName(characterSetName), length, alignment, paddingByte); }
[ "@", "Deprecated", "public", "static", "byte", "[", "]", "textPadding", "(", "String", "text", ",", "String", "characterSetName", ",", "int", "length", ",", "DBFAlignment", "alignment", ",", "byte", "paddingByte", ")", "throws", "UnsupportedEncodingException", "{"...
Obtais the data to store in file for a text field. Text is truncated if exceed field capacity @param text the text to write @param characterSetName The charset to use @param length field length @param alignment where to align the data @param paddingByte the byte to use for padding @return byte[] to store in the file @t...
[ "Obtais", "the", "data", "to", "store", "in", "file", "for", "a", "text", "field", ".", "Text", "is", "truncated", "if", "exceed", "field", "capacity" ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/Utils.java#L323-L327
59,074
joinfaces/joinfaces
joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/tomcat/JsfTomcatApplicationListener.java
JsfTomcatApplicationListener.getTomcatRuntime
TomcatRuntime getTomcatRuntime(WebResourceRoot resources) { TomcatRuntime result = null; if (isUberJar(resources)) { result = TomcatRuntime.UBER_JAR; } else if (isUberWar(resources)) { result = TomcatRuntime.UBER_WAR; } else if (isTesting(resources)) { result = TomcatRuntime.TEST; } else if (i...
java
TomcatRuntime getTomcatRuntime(WebResourceRoot resources) { TomcatRuntime result = null; if (isUberJar(resources)) { result = TomcatRuntime.UBER_JAR; } else if (isUberWar(resources)) { result = TomcatRuntime.UBER_WAR; } else if (isTesting(resources)) { result = TomcatRuntime.TEST; } else if (i...
[ "TomcatRuntime", "getTomcatRuntime", "(", "WebResourceRoot", "resources", ")", "{", "TomcatRuntime", "result", "=", "null", ";", "if", "(", "isUberJar", "(", "resources", ")", ")", "{", "result", "=", "TomcatRuntime", ".", "UBER_JAR", ";", "}", "else", "if", ...
Inform tomcat runtime setup. UNPACKAGED_WAR not covered yet. @param resources of the tomcat @return tomcat runtime
[ "Inform", "tomcat", "runtime", "setup", ".", "UNPACKAGED_WAR", "not", "covered", "yet", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/tomcat/JsfTomcatApplicationListener.java#L122-L139
59,075
joinfaces/joinfaces
joinfaces-tools/joinfaces-scan-tools/src/main/java/org/joinfaces/tools/ScanResultHandler.java
ScanResultHandler.writeClassList
protected void writeClassList(File file, Collection<String> classNames) throws IOException { File baseDir = file.getParentFile(); if (baseDir.isDirectory() || baseDir.mkdirs()) { Files.write(file.toPath(), classNames, StandardCharsets.UTF_8); } else { throw new IOException(baseDir + " does not exist and ...
java
protected void writeClassList(File file, Collection<String> classNames) throws IOException { File baseDir = file.getParentFile(); if (baseDir.isDirectory() || baseDir.mkdirs()) { Files.write(file.toPath(), classNames, StandardCharsets.UTF_8); } else { throw new IOException(baseDir + " does not exist and ...
[ "protected", "void", "writeClassList", "(", "File", "file", ",", "Collection", "<", "String", ">", "classNames", ")", "throws", "IOException", "{", "File", "baseDir", "=", "file", ".", "getParentFile", "(", ")", ";", "if", "(", "baseDir", ".", "isDirectory",...
Helper method which writes a list of class names to the given file. @param file The target file in which the class names should be written. @param classNames The class names which should be written in the target file. @throws IOException when the class names could not be written to the target file.
[ "Helper", "method", "which", "writes", "a", "list", "of", "class", "names", "to", "the", "given", "file", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-tools/joinfaces-scan-tools/src/main/java/org/joinfaces/tools/ScanResultHandler.java#L58-L67
59,076
joinfaces/joinfaces
joinfaces-tools/joinfaces-scan-tools/src/main/java/org/joinfaces/tools/ScanResultHandler.java
ScanResultHandler.writeClassMap
protected void writeClassMap(File file, Map<String, ? extends Collection<String>> classMap) throws IOException { File baseDir = file.getParentFile(); if (baseDir.isDirectory() || baseDir.mkdirs()) { //noinspection CharsetObjectCanBeUsed try (PrintWriter printWriter = new PrintWriter(file, "UTF-8")) { cla...
java
protected void writeClassMap(File file, Map<String, ? extends Collection<String>> classMap) throws IOException { File baseDir = file.getParentFile(); if (baseDir.isDirectory() || baseDir.mkdirs()) { //noinspection CharsetObjectCanBeUsed try (PrintWriter printWriter = new PrintWriter(file, "UTF-8")) { cla...
[ "protected", "void", "writeClassMap", "(", "File", "file", ",", "Map", "<", "String", ",", "?", "extends", "Collection", "<", "String", ">", ">", "classMap", ")", "throws", "IOException", "{", "File", "baseDir", "=", "file", ".", "getParentFile", "(", ")",...
Helper method which writes a map of class names to the given file. @param file The target file in which the class names should be written. @param classMap The class names which should be written in the target file. @throws IOException when the class names could not be written to the target file.
[ "Helper", "method", "which", "writes", "a", "map", "of", "class", "names", "to", "the", "given", "file", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-tools/joinfaces-scan-tools/src/main/java/org/joinfaces/tools/ScanResultHandler.java#L76-L93
59,077
joinfaces/joinfaces
joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java
FaceletsTagUtils.areAllGranted
public static boolean areAllGranted(String authorities) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setIfAllGranted(authorities); return authorizeTag.authorize(); }
java
public static boolean areAllGranted(String authorities) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setIfAllGranted(authorities); return authorizeTag.authorize(); }
[ "public", "static", "boolean", "areAllGranted", "(", "String", "authorities", ")", "throws", "IOException", "{", "AuthorizeFaceletsTag", "authorizeTag", "=", "new", "AuthorizeFaceletsTag", "(", ")", ";", "authorizeTag", ".", "setIfAllGranted", "(", "authorities", ")",...
Returns true if the user has all of of the given authorities. @param authorities a comma-separated list of user authorities. @return computation if the user has all of of the given authorities @throws IOException io exception
[ "Returns", "true", "if", "the", "user", "has", "all", "of", "of", "the", "given", "authorities", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java#L38-L42
59,078
joinfaces/joinfaces
joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java
FaceletsTagUtils.areAnyGranted
public static boolean areAnyGranted(String authorities) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setIfAnyGranted(authorities); return authorizeTag.authorize(); }
java
public static boolean areAnyGranted(String authorities) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setIfAnyGranted(authorities); return authorizeTag.authorize(); }
[ "public", "static", "boolean", "areAnyGranted", "(", "String", "authorities", ")", "throws", "IOException", "{", "AuthorizeFaceletsTag", "authorizeTag", "=", "new", "AuthorizeFaceletsTag", "(", ")", ";", "authorizeTag", ".", "setIfAnyGranted", "(", "authorities", ")",...
Returns true if the user has any of the given authorities. @param authorities a comma-separated list of user authorities. @return computation if the user has any of the given authorities. @throws IOException io exception
[ "Returns", "true", "if", "the", "user", "has", "any", "of", "the", "given", "authorities", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java#L51-L55
59,079
joinfaces/joinfaces
joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java
FaceletsTagUtils.areNotGranted
public static boolean areNotGranted(String authorities) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setIfNotGranted(authorities); return authorizeTag.authorize(); }
java
public static boolean areNotGranted(String authorities) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setIfNotGranted(authorities); return authorizeTag.authorize(); }
[ "public", "static", "boolean", "areNotGranted", "(", "String", "authorities", ")", "throws", "IOException", "{", "AuthorizeFaceletsTag", "authorizeTag", "=", "new", "AuthorizeFaceletsTag", "(", ")", ";", "authorizeTag", ".", "setIfNotGranted", "(", "authorities", ")",...
Returns true if the user does not have any of the given authorities. @param authorities a comma-separated list of user authorities. @return computation if the user does not have any of the given authorities. @throws IOException io exception
[ "Returns", "true", "if", "the", "user", "does", "not", "have", "any", "of", "the", "given", "authorities", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java#L64-L68
59,080
joinfaces/joinfaces
joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java
FaceletsTagUtils.isAllowed
public static boolean isAllowed(String url, String method) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setUrl(url); authorizeTag.setMethod(method); return authorizeTag.authorizeUsingUrlCheck(); }
java
public static boolean isAllowed(String url, String method) throws IOException { AuthorizeFaceletsTag authorizeTag = new AuthorizeFaceletsTag(); authorizeTag.setUrl(url); authorizeTag.setMethod(method); return authorizeTag.authorizeUsingUrlCheck(); }
[ "public", "static", "boolean", "isAllowed", "(", "String", "url", ",", "String", "method", ")", "throws", "IOException", "{", "AuthorizeFaceletsTag", "authorizeTag", "=", "new", "AuthorizeFaceletsTag", "(", ")", ";", "authorizeTag", ".", "setUrl", "(", "url", ")...
Returns true if the user is allowed to access the given URL and HTTP method combination. The HTTP method is optional and case insensitive. @param url to be accessed. @param method to be called. @return computation if the user is allowed to access the given URL and HTTP method. @throws IOException io exception
[ "Returns", "true", "if", "the", "user", "is", "allowed", "to", "access", "the", "given", "URL", "and", "HTTP", "method", "combination", ".", "The", "HTTP", "method", "is", "optional", "and", "case", "insensitive", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-security-taglib/src/main/java/org/joinfaces/security/FaceletsTagUtils.java#L78-L83
59,081
joinfaces/joinfaces
joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/scopemapping/CustomScopeAnnotationConfigurer.java
CustomScopeAnnotationConfigurer.registerJsfCdiToSpring
private void registerJsfCdiToSpring(BeanDefinition definition) { if (definition instanceof AnnotatedBeanDefinition) { AnnotatedBeanDefinition annDef = (AnnotatedBeanDefinition) definition; String scopeName = null; // firstly check whether bean is defined via configuration if (annDef.getFactoryMethodMeta...
java
private void registerJsfCdiToSpring(BeanDefinition definition) { if (definition instanceof AnnotatedBeanDefinition) { AnnotatedBeanDefinition annDef = (AnnotatedBeanDefinition) definition; String scopeName = null; // firstly check whether bean is defined via configuration if (annDef.getFactoryMethodMeta...
[ "private", "void", "registerJsfCdiToSpring", "(", "BeanDefinition", "definition", ")", "{", "if", "(", "definition", "instanceof", "AnnotatedBeanDefinition", ")", "{", "AnnotatedBeanDefinition", "annDef", "=", "(", "AnnotatedBeanDefinition", ")", "definition", ";", "Str...
Checks how is bean defined and deduces scope name from JSF CDI annotations. @param definition beanDefinition
[ "Checks", "how", "is", "bean", "defined", "and", "deduces", "scope", "name", "from", "JSF", "CDI", "annotations", "." ]
c9fc811a9eaf695820951f2c04715297dd1e6d66
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/scopemapping/CustomScopeAnnotationConfigurer.java#L69-L90
59,082
cqframework/clinical_quality_language
Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java
Cql2ElmVisitor.getPropertyPath
private String getPropertyPath(Expression reference, String alias) { if (reference instanceof Property) { Property property = (Property)reference; if (alias.equals(property.getScope())) { return property.getPath(); } else if (property.getSource() !...
java
private String getPropertyPath(Expression reference, String alias) { if (reference instanceof Property) { Property property = (Property)reference; if (alias.equals(property.getScope())) { return property.getPath(); } else if (property.getSource() !...
[ "private", "String", "getPropertyPath", "(", "Expression", "reference", ",", "String", "alias", ")", "{", "if", "(", "reference", "instanceof", "Property", ")", "{", "Property", "property", "=", "(", "Property", ")", "reference", ";", "if", "(", "alias", "."...
Collapse a property path expression back to it's qualified form for use as the path attribute of the retrieve. @param reference the <code>Expression</code> to collapse @param alias the alias of the <code>Retrieve</code> in the query. @return The collapsed path operands (or sub-operands) were modified; <code>false</...
[ "Collapse", "a", "property", "path", "expression", "back", "to", "it", "s", "qualified", "form", "for", "use", "as", "the", "path", "attribute", "of", "the", "retrieve", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java#L3058-L3073
59,083
cqframework/clinical_quality_language
Src/java/model/src/main/java/org/hl7/cql/model/DataType.java
DataType.isCompatibleWith
public boolean isCompatibleWith(DataType other) { // A type is compatible with a choice type if it is a subtype of one of the choice types if (other instanceof ChoiceType) { for (DataType choice : ((ChoiceType)other).getTypes()) { if (this.isSubTypeOf(choice)) { ...
java
public boolean isCompatibleWith(DataType other) { // A type is compatible with a choice type if it is a subtype of one of the choice types if (other instanceof ChoiceType) { for (DataType choice : ((ChoiceType)other).getTypes()) { if (this.isSubTypeOf(choice)) { ...
[ "public", "boolean", "isCompatibleWith", "(", "DataType", "other", ")", "{", "// A type is compatible with a choice type if it is a subtype of one of the choice types", "if", "(", "other", "instanceof", "ChoiceType", ")", "{", "for", "(", "DataType", "choice", ":", "(", "...
literal to any other type, or casting a class to an equivalent tuple.
[ "literal", "to", "any", "other", "type", "or", "casting", "a", "class", "to", "an", "equivalent", "tuple", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/model/src/main/java/org/hl7/cql/model/DataType.java#L62-L73
59,084
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitTypeSpecifier
public T visitTypeSpecifier(TypeSpecifier elm, C context) { if (elm instanceof NamedTypeSpecifier) return visitNamedTypeSpecifier((NamedTypeSpecifier)elm, context); else if (elm instanceof IntervalTypeSpecifier) return visitIntervalTypeSpecifier((IntervalTypeSpecifier)elm, context); else if (elm...
java
public T visitTypeSpecifier(TypeSpecifier elm, C context) { if (elm instanceof NamedTypeSpecifier) return visitNamedTypeSpecifier((NamedTypeSpecifier)elm, context); else if (elm instanceof IntervalTypeSpecifier) return visitIntervalTypeSpecifier((IntervalTypeSpecifier)elm, context); else if (elm...
[ "public", "T", "visitTypeSpecifier", "(", "TypeSpecifier", "elm", ",", "C", "context", ")", "{", "if", "(", "elm", "instanceof", "NamedTypeSpecifier", ")", "return", "visitNamedTypeSpecifier", "(", "(", "NamedTypeSpecifier", ")", "elm", ",", "context", ")", ";",...
Visit a TypeSpecifier. This method will be called for every node in the tree that is a descendant of the TypeSpecifier type. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "TypeSpecifier", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "descendant", "of", "the", "TypeSpecifier", "type", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L43-L49
59,085
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitIntervalTypeSpecifier
public T visitIntervalTypeSpecifier(IntervalTypeSpecifier elm, C context) { visitElement(elm.getPointType(), context); return null; }
java
public T visitIntervalTypeSpecifier(IntervalTypeSpecifier elm, C context) { visitElement(elm.getPointType(), context); return null; }
[ "public", "T", "visitIntervalTypeSpecifier", "(", "IntervalTypeSpecifier", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getPointType", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a IntervalTypeSpecifier. This method will be called for every node in the tree that is a IntervalTypeSpecifier. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "IntervalTypeSpecifier", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "IntervalTypeSpecifier", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L71-L74
59,086
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitListTypeSpecifier
public T visitListTypeSpecifier(ListTypeSpecifier elm, C context) { visitElement(elm.getElementType(), context); return null; }
java
public T visitListTypeSpecifier(ListTypeSpecifier elm, C context) { visitElement(elm.getElementType(), context); return null; }
[ "public", "T", "visitListTypeSpecifier", "(", "ListTypeSpecifier", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getElementType", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a ListTypeSpecifier. This method will be called for every node in the tree that is a ListTypeSpecifier. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "ListTypeSpecifier", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "ListTypeSpecifier", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L84-L87
59,087
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitTupleElementDefinition
public T visitTupleElementDefinition(TupleElementDefinition elm, C context) { visitElement(elm.getType(), context); return null; }
java
public T visitTupleElementDefinition(TupleElementDefinition elm, C context) { visitElement(elm.getType(), context); return null; }
[ "public", "T", "visitTupleElementDefinition", "(", "TupleElementDefinition", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getType", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a TupleElementDefinition. This method will be called for every node in the tree that is a TupleElementDefinition. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "TupleElementDefinition", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "TupleElementDefinition", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L97-L100
59,088
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitTupleTypeSpecifier
public T visitTupleTypeSpecifier(TupleTypeSpecifier elm, C context) { for (TupleElementDefinition element : elm.getElement()) { visitElement(element, context); } return null; }
java
public T visitTupleTypeSpecifier(TupleTypeSpecifier elm, C context) { for (TupleElementDefinition element : elm.getElement()) { visitElement(element, context); } return null; }
[ "public", "T", "visitTupleTypeSpecifier", "(", "TupleTypeSpecifier", "elm", ",", "C", "context", ")", "{", "for", "(", "TupleElementDefinition", "element", ":", "elm", ".", "getElement", "(", ")", ")", "{", "visitElement", "(", "element", ",", "context", ")", ...
Visit a TupleTypeSpecifier. This method will be called for every node in the tree that is a TupleTypeSpecifier. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "TupleTypeSpecifier", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "TupleTypeSpecifier", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L110-L115
59,089
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitTernaryExpression
public T visitTernaryExpression(TernaryExpression elm, C context) { for (Expression element : elm.getOperand()) { visitElement(element, context); } return null; }
java
public T visitTernaryExpression(TernaryExpression elm, C context) { for (Expression element : elm.getOperand()) { visitElement(element, context); } return null; }
[ "public", "T", "visitTernaryExpression", "(", "TernaryExpression", "elm", ",", "C", "context", ")", "{", "for", "(", "Expression", "element", ":", "elm", ".", "getOperand", "(", ")", ")", "{", "visitElement", "(", "element", ",", "context", ")", ";", "}", ...
Visit a TernaryExpression. This method will be called for every node in the tree that is a TernaryExpression. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "TernaryExpression", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "TernaryExpression", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L284-L289
59,090
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitNaryExpression
public T visitNaryExpression(NaryExpression elm, C context) { if (elm instanceof Coalesce) return visitCoalesce((Coalesce)elm, context); else if (elm instanceof Concatenate) return visitConcatenate((Concatenate)elm, context); else if (elm instanceof Except) return visitExcept((Except)elm, contex...
java
public T visitNaryExpression(NaryExpression elm, C context) { if (elm instanceof Coalesce) return visitCoalesce((Coalesce)elm, context); else if (elm instanceof Concatenate) return visitConcatenate((Concatenate)elm, context); else if (elm instanceof Except) return visitExcept((Except)elm, contex...
[ "public", "T", "visitNaryExpression", "(", "NaryExpression", "elm", ",", "C", "context", ")", "{", "if", "(", "elm", "instanceof", "Coalesce", ")", "return", "visitCoalesce", "(", "(", "Coalesce", ")", "elm", ",", "context", ")", ";", "else", "if", "(", ...
Visit a NaryExpression. This method will be called for every node in the tree that is a NaryExpression. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "NaryExpression", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "NaryExpression", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L299-L306
59,091
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitExpressionDef
public T visitExpressionDef(ExpressionDef elm, C context) { visitElement(elm.getExpression(), context); return null; }
java
public T visitExpressionDef(ExpressionDef elm, C context) { visitElement(elm.getExpression(), context); return null; }
[ "public", "T", "visitExpressionDef", "(", "ExpressionDef", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getExpression", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a ExpressionDef. This method will be called for every node in the tree that is a ExpressionDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "ExpressionDef", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "ExpressionDef", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L316-L319
59,092
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitFunctionDef
public T visitFunctionDef(FunctionDef elm, C context) { for (OperandDef element : elm.getOperand()) { visitElement(element, context); } visitElement(elm.getExpression(), context); return null; }
java
public T visitFunctionDef(FunctionDef elm, C context) { for (OperandDef element : elm.getOperand()) { visitElement(element, context); } visitElement(elm.getExpression(), context); return null; }
[ "public", "T", "visitFunctionDef", "(", "FunctionDef", "elm", ",", "C", "context", ")", "{", "for", "(", "OperandDef", "element", ":", "elm", ".", "getOperand", "(", ")", ")", "{", "visitElement", "(", "element", ",", "context", ")", ";", "}", "visitElem...
Visit a FunctionDef. This method will be called for every node in the tree that is a FunctionDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "FunctionDef", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "FunctionDef", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L329-L335
59,093
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitFunctionRef
public T visitFunctionRef(FunctionRef elm, C context) { for (Expression element : elm.getOperand()) { visitElement(element, context); } return null; }
java
public T visitFunctionRef(FunctionRef elm, C context) { for (Expression element : elm.getOperand()) { visitElement(element, context); } return null; }
[ "public", "T", "visitFunctionRef", "(", "FunctionRef", "elm", ",", "C", "context", ")", "{", "for", "(", "Expression", "element", ":", "elm", ".", "getOperand", "(", ")", ")", "{", "visitElement", "(", "element", ",", "context", ")", ";", "}", "return", ...
Visit a FunctionRef. This method will be called for every node in the tree that is a FunctionRef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "FunctionRef", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "FunctionRef", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L357-L362
59,094
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitParameterDef
public T visitParameterDef(ParameterDef elm, C context) { if (elm.getParameterTypeSpecifier() != null) { visitElement(elm.getParameterTypeSpecifier(), context); } if (elm.getDefault() != null) { visitElement(elm.getDefault(), context); } return null; ...
java
public T visitParameterDef(ParameterDef elm, C context) { if (elm.getParameterTypeSpecifier() != null) { visitElement(elm.getParameterTypeSpecifier(), context); } if (elm.getDefault() != null) { visitElement(elm.getDefault(), context); } return null; ...
[ "public", "T", "visitParameterDef", "(", "ParameterDef", "elm", ",", "C", "context", ")", "{", "if", "(", "elm", ".", "getParameterTypeSpecifier", "(", ")", "!=", "null", ")", "{", "visitElement", "(", "elm", ".", "getParameterTypeSpecifier", "(", ")", ",", ...
Visit a ParameterDef. This method will be called for every node in the tree that is a ParameterDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "ParameterDef", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "ParameterDef", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L372-L382
59,095
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitOperandDef
public T visitOperandDef(OperandDef elm, C context) { if (elm.getOperandTypeSpecifier() != null) { visitElement(elm.getOperandTypeSpecifier(), context); } return null; }
java
public T visitOperandDef(OperandDef elm, C context) { if (elm.getOperandTypeSpecifier() != null) { visitElement(elm.getOperandTypeSpecifier(), context); } return null; }
[ "public", "T", "visitOperandDef", "(", "OperandDef", "elm", ",", "C", "context", ")", "{", "if", "(", "elm", ".", "getOperandTypeSpecifier", "(", ")", "!=", "null", ")", "{", "visitElement", "(", "elm", ".", "getOperandTypeSpecifier", "(", ")", ",", "conte...
Visit a OperandDef. This method will be called for every node in the tree that is a OperandDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "OperandDef", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "OperandDef", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L404-L409
59,096
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitTupleElement
public T visitTupleElement(TupleElement elm, C context) { visitElement(elm.getValue(), context); return null; }
java
public T visitTupleElement(TupleElement elm, C context) { visitElement(elm.getValue(), context); return null; }
[ "public", "T", "visitTupleElement", "(", "TupleElement", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getValue", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a TupleElement. This method will be called for every node in the tree that is a TupleElement. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "TupleElement", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "TupleElement", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L455-L458
59,097
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitTuple
public T visitTuple(Tuple elm, C context) { for (TupleElement element : elm.getElement()) { visitTupleElement(element, context); } return null; }
java
public T visitTuple(Tuple elm, C context) { for (TupleElement element : elm.getElement()) { visitTupleElement(element, context); } return null; }
[ "public", "T", "visitTuple", "(", "Tuple", "elm", ",", "C", "context", ")", "{", "for", "(", "TupleElement", "element", ":", "elm", ".", "getElement", "(", ")", ")", "{", "visitTupleElement", "(", "element", ",", "context", ")", ";", "}", "return", "nu...
Visit a Tuple. This method will be called for every node in the tree that is a Tuple. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "Tuple", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "Tuple", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L468-L473
59,098
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitInstanceElement
public T visitInstanceElement(InstanceElement elm, C context) { visitElement(elm.getValue(), context); return null; }
java
public T visitInstanceElement(InstanceElement elm, C context) { visitElement(elm.getValue(), context); return null; }
[ "public", "T", "visitInstanceElement", "(", "InstanceElement", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getValue", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a InstanceElement. This method will be called for every node in the tree that is a InstanceElement. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "InstanceElement", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "InstanceElement", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L483-L486
59,099
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitInstance
public T visitInstance(Instance elm, C context) { for (InstanceElement element : elm.getElement()) { visitInstanceElement(element, context); } return null; }
java
public T visitInstance(Instance elm, C context) { for (InstanceElement element : elm.getElement()) { visitInstanceElement(element, context); } return null; }
[ "public", "T", "visitInstance", "(", "Instance", "elm", ",", "C", "context", ")", "{", "for", "(", "InstanceElement", "element", ":", "elm", ".", "getElement", "(", ")", ")", "{", "visitInstanceElement", "(", "element", ",", "context", ")", ";", "}", "re...
Visit a Instance. This method will be called for every node in the tree that is a Instance. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "Instance", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "Instance", "." ]
67459d1ef453e49db8d7c5c86e87278377ed0a0b
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L496-L501