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
31,000
sarxos/webcam-capture
webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamDriverUtils.java
WebcamDriverUtils.findClasses
private static List<Class<?>> findClasses(File dir, String pkgname, boolean flat) throws ClassNotFoundException { List<Class<?>> classes = new ArrayList<Class<?>>(); if (!dir.exists()) { return classes; } File[] files = dir.listFiles(); for (File file : files) { if (file.isDirectory() && !fla...
java
private static List<Class<?>> findClasses(File dir, String pkgname, boolean flat) throws ClassNotFoundException { List<Class<?>> classes = new ArrayList<Class<?>>(); if (!dir.exists()) { return classes; } File[] files = dir.listFiles(); for (File file : files) { if (file.isDirectory() && !fla...
[ "private", "static", "List", "<", "Class", "<", "?", ">", ">", "findClasses", "(", "File", "dir", ",", "String", "pkgname", ",", "boolean", "flat", ")", "throws", "ClassNotFoundException", "{", "List", "<", "Class", "<", "?", ">", ">", "classes", "=", ...
Recursive method used to find all classes in a given directory and subdirectories. @param dir base directory @param pkgname package name for classes found inside the base directory @param flat scan only one package level, do not dive into subdirectories @return Classes list @throws ClassNotFoundException
[ "Recursive", "method", "used", "to", "find", "all", "classes", "in", "a", "given", "directory", "and", "subdirectories", "." ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamDriverUtils.java#L122-L139
31,001
sarxos/webcam-capture
webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamProcessor.java
WebcamProcessor.process
public void process(WebcamTask task) throws InterruptedException { if (started.compareAndSet(false, true)) { runner = Executors.newSingleThreadExecutor(new ProcessorThreadFactory()); runner.execute(processor); } if (!runner.isShutdown()) { processor.process(task); } else { throw new RejectedExecut...
java
public void process(WebcamTask task) throws InterruptedException { if (started.compareAndSet(false, true)) { runner = Executors.newSingleThreadExecutor(new ProcessorThreadFactory()); runner.execute(processor); } if (!runner.isShutdown()) { processor.process(task); } else { throw new RejectedExecut...
[ "public", "void", "process", "(", "WebcamTask", "task", ")", "throws", "InterruptedException", "{", "if", "(", "started", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "runner", "=", "Executors", ".", "newSingleThreadExecutor", "(", "new", ...
Process single webcam task. @param task the task to be processed @throws InterruptedException when thread has been interrupted
[ "Process", "single", "webcam", "task", "." ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamProcessor.java#L132-L144
31,002
sarxos/webcam-capture
webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java
IpCamDeviceRegistry.register
public static IpCamDevice register(IpCamDevice ipcam) { for (WebcamDevice d : DEVICES) { String name = ipcam.getName(); if (d.getName().equals(name)) { throw new WebcamException(String.format("Webcam with name '%s' is already registered", name)); } } DEVICES.add(ipcam); rescan(); ...
java
public static IpCamDevice register(IpCamDevice ipcam) { for (WebcamDevice d : DEVICES) { String name = ipcam.getName(); if (d.getName().equals(name)) { throw new WebcamException(String.format("Webcam with name '%s' is already registered", name)); } } DEVICES.add(ipcam); rescan(); ...
[ "public", "static", "IpCamDevice", "register", "(", "IpCamDevice", "ipcam", ")", "{", "for", "(", "WebcamDevice", "d", ":", "DEVICES", ")", "{", "String", "name", "=", "ipcam", ".", "getName", "(", ")", ";", "if", "(", "d", ".", "getName", "(", ")", ...
Register IP camera. @param ipcam the IP camera to be register @return IP camera device
[ "Register", "IP", "camera", "." ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java#L36-L50
31,003
sarxos/webcam-capture
webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java
IpCamDeviceRegistry.isRegistered
public static boolean isRegistered(IpCamDevice ipcam) { if (ipcam == null) { throw new IllegalArgumentException("IP camera device cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(ipcam.getName())) { return true; } ...
java
public static boolean isRegistered(IpCamDevice ipcam) { if (ipcam == null) { throw new IllegalArgumentException("IP camera device cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(ipcam.getName())) { return true; } ...
[ "public", "static", "boolean", "isRegistered", "(", "IpCamDevice", "ipcam", ")", "{", "if", "(", "ipcam", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"IP camera device cannot be null\"", ")", ";", "}", "Iterator", "<", "IpCamDevice",...
Is device registered? @param ipcam the IP camera device @return True if device is registsred, false otherwise
[ "Is", "device", "registered?" ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java#L83-L97
31,004
sarxos/webcam-capture
webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java
IpCamDeviceRegistry.isRegistered
public static boolean isRegistered(String name) { if (name == null) { throw new IllegalArgumentException("Device name cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(name)) { return true; } } return false; ...
java
public static boolean isRegistered(String name) { if (name == null) { throw new IllegalArgumentException("Device name cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(name)) { return true; } } return false; ...
[ "public", "static", "boolean", "isRegistered", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Device name cannot be null\"", ")", ";", "}", "Iterator", "<", "IpCamDevice", ">", "d...
Is device with given name registered? @param name the name of device @return True if device is registered, false otherwise
[ "Is", "device", "with", "given", "name", "registered?" ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java#L105-L119
31,005
sarxos/webcam-capture
webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java
IpCamDeviceRegistry.unregister
public static boolean unregister(String name) { Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { IpCamDevice d = di.next(); if (d.getName().equals(name)) { di.remove(); rescan(); return true; } } return false; }
java
public static boolean unregister(String name) { Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { IpCamDevice d = di.next(); if (d.getName().equals(name)) { di.remove(); rescan(); return true; } } return false; }
[ "public", "static", "boolean", "unregister", "(", "String", "name", ")", "{", "Iterator", "<", "IpCamDevice", ">", "di", "=", "DEVICES", ".", "iterator", "(", ")", ";", "while", "(", "di", ".", "hasNext", "(", ")", ")", "{", "IpCamDevice", "d", "=", ...
Unregister IP camera with given name. @param name the name of IP camera to be unregister @return True if device has been registered, false otherwise
[ "Unregister", "IP", "camera", "with", "given", "name", "." ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture-drivers/driver-ipcam/src/main/java/com/github/sarxos/webcam/ds/ipcam/IpCamDeviceRegistry.java#L200-L211
31,006
sarxos/webcam-capture
webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamDeallocator.java
WebcamDeallocator.store
protected static void store(Webcam[] webcams) { if (HANDLER.get() == null) { HANDLER.set(new WebcamDeallocator(webcams)); } else { throw new IllegalStateException("Deallocator is already set!"); } }
java
protected static void store(Webcam[] webcams) { if (HANDLER.get() == null) { HANDLER.set(new WebcamDeallocator(webcams)); } else { throw new IllegalStateException("Deallocator is already set!"); } }
[ "protected", "static", "void", "store", "(", "Webcam", "[", "]", "webcams", ")", "{", "if", "(", "HANDLER", ".", "get", "(", ")", "==", "null", ")", "{", "HANDLER", ".", "set", "(", "new", "WebcamDeallocator", "(", "webcams", ")", ")", ";", "}", "e...
Store devices to be deallocated when TERM signal has been received. @param webcams the webcams array to be stored in deallocator
[ "Store", "devices", "to", "be", "deallocated", "when", "TERM", "signal", "has", "been", "received", "." ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamDeallocator.java#L35-L41
31,007
sarxos/webcam-capture
webcam-capture/src/example/java/MultipointMotionDetectionExample.java
MultipointMotionDetectionExample.motionDetected
@Override public void motionDetected(WebcamMotionEvent wme) { for (Point p : wme.getPoints()) { motionPoints.put(p, 0); } }
java
@Override public void motionDetected(WebcamMotionEvent wme) { for (Point p : wme.getPoints()) { motionPoints.put(p, 0); } }
[ "@", "Override", "public", "void", "motionDetected", "(", "WebcamMotionEvent", "wme", ")", "{", "for", "(", "Point", "p", ":", "wme", ".", "getPoints", "(", ")", ")", "{", "motionPoints", ".", "put", "(", "p", ",", "0", ")", ";", "}", "}" ]
Gets the motion points from the motion detector and adds it to the HashMap
[ "Gets", "the", "motion", "points", "from", "the", "motion", "detector", "and", "adds", "it", "to", "the", "HashMap" ]
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture/src/example/java/MultipointMotionDetectionExample.java#L80-L85
31,008
j-easy/easy-batch
easybatch-core/src/main/java/org/easybatch/core/job/JobExecutor.java
JobExecutor.execute
public JobReport execute(Job job) { try { return executorService.submit(job).get(); } catch (InterruptedException | ExecutionException e) { throw new RuntimeException("Unable to execute job " + job.getName(), e); } }
java
public JobReport execute(Job job) { try { return executorService.submit(job).get(); } catch (InterruptedException | ExecutionException e) { throw new RuntimeException("Unable to execute job " + job.getName(), e); } }
[ "public", "JobReport", "execute", "(", "Job", "job", ")", "{", "try", "{", "return", "executorService", ".", "submit", "(", "job", ")", ".", "get", "(", ")", ";", "}", "catch", "(", "InterruptedException", "|", "ExecutionException", "e", ")", "{", "throw...
Execute a job synchronously. @param job to execute @return the job report
[ "Execute", "a", "job", "synchronously", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-core/src/main/java/org/easybatch/core/job/JobExecutor.java#L81-L87
31,009
j-easy/easy-batch
easybatch-core/src/main/java/org/easybatch/core/job/JobExecutor.java
JobExecutor.awaitTermination
public void awaitTermination(long timeout, TimeUnit unit) { try { executorService.awaitTermination(timeout, unit); } catch (InterruptedException e) { throw new RuntimeException("Job executor was interrupted while waiting"); } }
java
public void awaitTermination(long timeout, TimeUnit unit) { try { executorService.awaitTermination(timeout, unit); } catch (InterruptedException e) { throw new RuntimeException("Job executor was interrupted while waiting"); } }
[ "public", "void", "awaitTermination", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "try", "{", "executorService", ".", "awaitTermination", "(", "timeout", ",", "unit", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "throw",...
Wait for jobs to terminate.
[ "Wait", "for", "jobs", "to", "terminate", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-core/src/main/java/org/easybatch/core/job/JobExecutor.java#L133-L139
31,010
j-easy/easy-batch
easybatch-core/src/main/java/org/easybatch/core/mapper/ObjectMapper.java
ObjectMapper.mapObject
public T mapObject(final Map<String, String> values) throws Exception { T result = createInstance(); // for each field for (Map.Entry<String, String> entry : values.entrySet()) { String field = entry.getKey(); //get field raw value String value = values.get...
java
public T mapObject(final Map<String, String> values) throws Exception { T result = createInstance(); // for each field for (Map.Entry<String, String> entry : values.entrySet()) { String field = entry.getKey(); //get field raw value String value = values.get...
[ "public", "T", "mapObject", "(", "final", "Map", "<", "String", ",", "String", ">", "values", ")", "throws", "Exception", "{", "T", "result", "=", "createInstance", "(", ")", ";", "// for each field", "for", "(", "Map", ".", "Entry", "<", "String", ",", ...
Map values to fields of the target object type. @param values fields values @return A populated instance of the target type. @throws Exception if values cannot be mapped to target object fields
[ "Map", "values", "to", "fields", "of", "the", "target", "object", "type", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-core/src/main/java/org/easybatch/core/mapper/ObjectMapper.java#L77-L118
31,011
j-easy/easy-batch
easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java
JobScheduler.scheduleAtWithInterval
public void scheduleAtWithInterval(final org.easybatch.core.job.Job job, final Date startTime, final int interval) throws JobSchedulerException { checkNotNull(job, "job"); checkNotNull(startTime, "startTime"); String name = job.getName(); String jobName = JOB_NAME_PREFIX + name; ...
java
public void scheduleAtWithInterval(final org.easybatch.core.job.Job job, final Date startTime, final int interval) throws JobSchedulerException { checkNotNull(job, "job"); checkNotNull(startTime, "startTime"); String name = job.getName(); String jobName = JOB_NAME_PREFIX + name; ...
[ "public", "void", "scheduleAtWithInterval", "(", "final", "org", ".", "easybatch", ".", "core", ".", "job", ".", "Job", "job", ",", "final", "Date", "startTime", ",", "final", "int", "interval", ")", "throws", "JobSchedulerException", "{", "checkNotNull", "(",...
Schedule a job to start at a fixed point of time and repeat with interval period. @param job the job to schedule @param startTime the start time @param interval the repeat interval in seconds
[ "Schedule", "a", "job", "to", "start", "at", "a", "fixed", "point", "of", "time", "and", "repeat", "with", "interval", "period", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java#L174-L201
31,012
j-easy/easy-batch
easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java
JobScheduler.unschedule
public void unschedule(final org.easybatch.core.job.Job job) throws JobSchedulerException { String jobName = job.getName(); LOGGER.info("Unscheduling job ''{}'' ", jobName); try { scheduler.unscheduleJob(TriggerKey.triggerKey(TRIGGER_NAME_PREFIX + jobName)); } catch (Schedule...
java
public void unschedule(final org.easybatch.core.job.Job job) throws JobSchedulerException { String jobName = job.getName(); LOGGER.info("Unscheduling job ''{}'' ", jobName); try { scheduler.unscheduleJob(TriggerKey.triggerKey(TRIGGER_NAME_PREFIX + jobName)); } catch (Schedule...
[ "public", "void", "unschedule", "(", "final", "org", ".", "easybatch", ".", "core", ".", "job", ".", "Job", "job", ")", "throws", "JobSchedulerException", "{", "String", "jobName", "=", "job", ".", "getName", "(", ")", ";", "LOGGER", ".", "info", "(", ...
Unschedule the given job. @param job the job to unschedule @throws JobSchedulerException thrown if an exception occurs during job unscheduling
[ "Unschedule", "the", "given", "job", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java#L348-L356
31,013
j-easy/easy-batch
easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java
JobScheduler.isScheduled
public boolean isScheduled(final org.easybatch.core.job.Job job) throws JobSchedulerException { String jobName = job.getName(); try { return scheduler.checkExists(TriggerKey.triggerKey(TRIGGER_NAME_PREFIX + jobName)); } catch (SchedulerException e) { throw new JobSchedule...
java
public boolean isScheduled(final org.easybatch.core.job.Job job) throws JobSchedulerException { String jobName = job.getName(); try { return scheduler.checkExists(TriggerKey.triggerKey(TRIGGER_NAME_PREFIX + jobName)); } catch (SchedulerException e) { throw new JobSchedule...
[ "public", "boolean", "isScheduled", "(", "final", "org", ".", "easybatch", ".", "core", ".", "job", ".", "Job", "job", ")", "throws", "JobSchedulerException", "{", "String", "jobName", "=", "job", ".", "getName", "(", ")", ";", "try", "{", "return", "sch...
Check if the given job is scheduled. @param job the job to check @return true if the job is scheduled, false else @throws JobSchedulerException thrown if an exception occurs while checking if the job is scheduled
[ "Check", "if", "the", "given", "job", "is", "scheduled", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java#L365-L372
31,014
j-easy/easy-batch
easybatch-core/src/main/java/org/easybatch/core/job/DefaultJobReportMerger.java
DefaultJobReportMerger.mergerReports
@Override public JobReport mergerReports(JobReport... jobReports) { List<Long> startTimes = new ArrayList<>(); List<Long> endTimes = new ArrayList<>(); List<String> jobNames = new ArrayList<>(); JobParameters parameters = new JobParameters(); JobMetrics metrics = new JobMet...
java
@Override public JobReport mergerReports(JobReport... jobReports) { List<Long> startTimes = new ArrayList<>(); List<Long> endTimes = new ArrayList<>(); List<String> jobNames = new ArrayList<>(); JobParameters parameters = new JobParameters(); JobMetrics metrics = new JobMet...
[ "@", "Override", "public", "JobReport", "mergerReports", "(", "JobReport", "...", "jobReports", ")", "{", "List", "<", "Long", ">", "startTimes", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "Long", ">", "endTimes", "=", "new", "ArrayList", ...
Merge multiple reports into a consolidated one. @param jobReports reports to merge @return a merged report
[ "Merge", "multiple", "reports", "into", "a", "consolidated", "one", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-core/src/main/java/org/easybatch/core/job/DefaultJobReportMerger.java#L54-L88
31,015
j-easy/easy-batch
easybatch-core/src/main/java/org/easybatch/core/retry/RetryTemplate.java
RetryTemplate.execute
public <T> T execute(final Callable<T> callable) throws Exception { int attempts = 0; int maxAttempts = retryPolicy.getMaxAttempts(); long delay = retryPolicy.getDelay(); TimeUnit timeUnit = retryPolicy.getTimeUnit(); while(attempts < maxAttempts) { try { ...
java
public <T> T execute(final Callable<T> callable) throws Exception { int attempts = 0; int maxAttempts = retryPolicy.getMaxAttempts(); long delay = retryPolicy.getDelay(); TimeUnit timeUnit = retryPolicy.getTimeUnit(); while(attempts < maxAttempts) { try { ...
[ "public", "<", "T", ">", "T", "execute", "(", "final", "Callable", "<", "T", ">", "callable", ")", "throws", "Exception", "{", "int", "attempts", "=", "0", ";", "int", "maxAttempts", "=", "retryPolicy", ".", "getMaxAttempts", "(", ")", ";", "long", "de...
Execute the callable with retries. @param callable to execute @param <T> the return type of the callable @return the result of the callable @throws Exception if the callable still throw an exception after all retries
[ "Execute", "the", "callable", "with", "retries", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-core/src/main/java/org/easybatch/core/retry/RetryTemplate.java#L57-L81
31,016
j-easy/easy-batch
easybatch-core/src/main/java/org/easybatch/core/record/PayloadExtractor.java
PayloadExtractor.extractPayloads
public static <P> List<P> extractPayloads(final List<? extends Record<P>> records) { List<P> payloads = new ArrayList<>(); for (Record<P> record : records) { payloads.add(record.getPayload()); } return payloads; }
java
public static <P> List<P> extractPayloads(final List<? extends Record<P>> records) { List<P> payloads = new ArrayList<>(); for (Record<P> record : records) { payloads.add(record.getPayload()); } return payloads; }
[ "public", "static", "<", "P", ">", "List", "<", "P", ">", "extractPayloads", "(", "final", "List", "<", "?", "extends", "Record", "<", "P", ">", ">", "records", ")", "{", "List", "<", "P", ">", "payloads", "=", "new", "ArrayList", "<>", "(", ")", ...
Extract the payload form each record. @param records the list of records @param <P> the type of payload @return the list of payloads
[ "Extract", "the", "payload", "form", "each", "record", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-core/src/main/java/org/easybatch/core/record/PayloadExtractor.java#L47-L53
31,017
j-easy/easy-batch
easybatch-flatfile/src/main/java/org/easybatch/flatfile/FixedLengthRecordMapper.java
FixedLengthRecordMapper.calculateOffsets
private int[] calculateOffsets(final int[] lengths) { int[] offsets = new int[lengths.length + 1]; offsets[0] = 0; for (int i = 0; i < lengths.length; i++) { offsets[i + 1] = offsets[i] + lengths[i]; } return offsets; }
java
private int[] calculateOffsets(final int[] lengths) { int[] offsets = new int[lengths.length + 1]; offsets[0] = 0; for (int i = 0; i < lengths.length; i++) { offsets[i + 1] = offsets[i] + lengths[i]; } return offsets; }
[ "private", "int", "[", "]", "calculateOffsets", "(", "final", "int", "[", "]", "lengths", ")", "{", "int", "[", "]", "offsets", "=", "new", "int", "[", "lengths", ".", "length", "+", "1", "]", ";", "offsets", "[", "0", "]", "=", "0", ";", "for", ...
utility method to calculate field offsets used to extract fields from record.
[ "utility", "method", "to", "calculate", "field", "offsets", "used", "to", "extract", "fields", "from", "record", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-flatfile/src/main/java/org/easybatch/flatfile/FixedLengthRecordMapper.java#L109-L116
31,018
j-easy/easy-batch
easybatch-flatfile/src/main/java/org/easybatch/flatfile/DelimitedRecordMapper.java
DelimitedRecordMapper.setDelimiter
public void setDelimiter(final String delimiter) { String prefix = ""; //escape the "pipe" character used in regular expression of String.split method if ("|".equals(delimiter)) { prefix = "\\"; } this.delimiter = prefix + delimiter; }
java
public void setDelimiter(final String delimiter) { String prefix = ""; //escape the "pipe" character used in regular expression of String.split method if ("|".equals(delimiter)) { prefix = "\\"; } this.delimiter = prefix + delimiter; }
[ "public", "void", "setDelimiter", "(", "final", "String", "delimiter", ")", "{", "String", "prefix", "=", "\"\"", ";", "//escape the \"pipe\" character used in regular expression of String.split method", "if", "(", "\"|\"", ".", "equals", "(", "delimiter", ")", ")", "...
Set the delimiter to use. @param delimiter the delimiter to use
[ "Set", "the", "delimiter", "to", "use", "." ]
46286e1091dae1206674e2a30e0609c31feae36c
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-flatfile/src/main/java/org/easybatch/flatfile/DelimitedRecordMapper.java#L255-L262
31,019
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/RestAction.java
RestAction.queue
@SuppressWarnings("unchecked") public void queue(Consumer<? super T> success, Consumer<? super Throwable> failure) { Route.CompiledRoute route = finalizeRoute(); Checks.notNull(route, "Route"); RequestBody data = finalizeData(); CaseInsensitiveMap<String, String> headers = finali...
java
@SuppressWarnings("unchecked") public void queue(Consumer<? super T> success, Consumer<? super Throwable> failure) { Route.CompiledRoute route = finalizeRoute(); Checks.notNull(route, "Route"); RequestBody data = finalizeData(); CaseInsensitiveMap<String, String> headers = finali...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "queue", "(", "Consumer", "<", "?", "super", "T", ">", "success", ",", "Consumer", "<", "?", "super", "Throwable", ">", "failure", ")", "{", "Route", ".", "CompiledRoute", "route", "=", ...
Submits a Request for execution. <p><b>This method is asynchronous</b> @param success The success callback that will be called at a convenient time for the API. (can be null) @param failure The failure callback that will be called if the Request encounters an exception at its execution point.
[ "Submits", "a", "Request", "for", "execution", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/RestAction.java#L332-L345
31,020
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/WebSocketClient.java
WebSocketClient.reconnect
public void reconnect(boolean callFromQueue) throws InterruptedException { Set<MDC.MDCCloseable> contextEntries = null; Map<String, String> previousContext = null; { ConcurrentMap<String, String> contextMap = api.getContextMap(); if (callFromQueue && contextMap != nul...
java
public void reconnect(boolean callFromQueue) throws InterruptedException { Set<MDC.MDCCloseable> contextEntries = null; Map<String, String> previousContext = null; { ConcurrentMap<String, String> contextMap = api.getContextMap(); if (callFromQueue && contextMap != nul...
[ "public", "void", "reconnect", "(", "boolean", "callFromQueue", ")", "throws", "InterruptedException", "{", "Set", "<", "MDC", ".", "MDCCloseable", ">", "contextEntries", "=", "null", ";", "Map", "<", "String", ",", "String", ">", "previousContext", "=", "null...
This method is used to start the reconnect of the JDA instance. It is public for access from SessionReconnectQueue extensions. @param callFromQueue whether this was in SessionReconnectQueue and got polled
[ "This", "method", "is", "used", "to", "start", "the", "reconnect", "of", "the", "JDA", "instance", ".", "It", "is", "public", "for", "access", "from", "SessionReconnectQueue", "extensions", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/WebSocketClient.java#L534-L588
31,021
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/GuildController.java
GuildController.setNickname
@CheckReturnValue public AuditableRestAction<Void> setNickname(Member member, String nickname) { Checks.notNull(member, "Member"); checkGuild(member.getGuild(), "Member"); if(member.equals(getGuild().getSelfMember())) { if(!member.hasPermission(Permission.NICKNAME_CH...
java
@CheckReturnValue public AuditableRestAction<Void> setNickname(Member member, String nickname) { Checks.notNull(member, "Member"); checkGuild(member.getGuild(), "Member"); if(member.equals(getGuild().getSelfMember())) { if(!member.hasPermission(Permission.NICKNAME_CH...
[ "@", "CheckReturnValue", "public", "AuditableRestAction", "<", "Void", ">", "setNickname", "(", "Member", "member", ",", "String", "nickname", ")", "{", "Checks", ".", "notNull", "(", "member", ",", "\"Member\"", ")", ";", "checkGuild", "(", "member", ".", "...
Changes a Member's nickname in this guild. The nickname is visible to all members of this guild. <p>To change the nickname for the currently logged in account only the Permission {@link net.dv8tion.jda.core.Permission#NICKNAME_CHANGE NICKNAME_CHANGE} is required. <br>To change the nickname of <b>any</b> {@link net.dv8...
[ "Changes", "a", "Member", "s", "nickname", "in", "this", "guild", ".", "The", "nickname", "is", "visible", "to", "all", "members", "of", "this", "guild", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/GuildController.java#L221-L264
31,022
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/GuildController.java
GuildController.unban
@CheckReturnValue public AuditableRestAction<Void> unban(String userId) { Checks.isSnowflake(userId, "User ID"); checkPermission(Permission.BAN_MEMBERS); Route.CompiledRoute route = Route.Guilds.UNBAN.compile(getGuild().getId(), userId); return new AuditableRestAction<Void>(getG...
java
@CheckReturnValue public AuditableRestAction<Void> unban(String userId) { Checks.isSnowflake(userId, "User ID"); checkPermission(Permission.BAN_MEMBERS); Route.CompiledRoute route = Route.Guilds.UNBAN.compile(getGuild().getId(), userId); return new AuditableRestAction<Void>(getG...
[ "@", "CheckReturnValue", "public", "AuditableRestAction", "<", "Void", ">", "unban", "(", "String", "userId", ")", "{", "Checks", ".", "isSnowflake", "(", "userId", ",", "\"User ID\"", ")", ";", "checkPermission", "(", "Permission", ".", "BAN_MEMBERS", ")", ";...
Unbans the a user specified by the userId from this Guild. <p>Possible {@link net.dv8tion.jda.core.requests.ErrorResponse ErrorResponses} caused by the returned {@link net.dv8tion.jda.core.requests.RestAction RestAction} include the following: <ul> <li>{@link net.dv8tion.jda.core.requests.ErrorResponse#MISSING_PERMISS...
[ "Unbans", "the", "a", "user", "specified", "by", "the", "userId", "from", "this", "Guild", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/GuildController.java#L914-L934
31,023
DV8FromTheWorld/JDA
src/examples/java/MessageListenerExample.java
MessageListenerExample.main
public static void main(String[] args) { //We construct a builder for a BOT account. If we wanted to use a CLIENT account // we would use AccountType.CLIENT try { JDA jda = new JDABuilder("Your-Token-Goes-Here") // The token of the account that is logging in. ...
java
public static void main(String[] args) { //We construct a builder for a BOT account. If we wanted to use a CLIENT account // we would use AccountType.CLIENT try { JDA jda = new JDABuilder("Your-Token-Goes-Here") // The token of the account that is logging in. ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "//We construct a builder for a BOT account. If we wanted to use a CLIENT account", "// we would use AccountType.CLIENT", "try", "{", "JDA", "jda", "=", "new", "JDABuilder", "(", "\"Your-Token-Go...
This is the method where the program starts.
[ "This", "is", "the", "method", "where", "the", "program", "starts", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/examples/java/MessageListenerExample.java#L36-L61
31,024
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/audit/AuditLogEntry.java
AuditLogEntry.getChangesForKeys
public List<AuditLogChange> getChangesForKeys(AuditLogKey... keys) { Checks.notNull(keys, "Keys"); List<AuditLogChange> changes = new ArrayList<>(keys.length); for (AuditLogKey key : keys) { AuditLogChange change = getChangeByKey(key); if (change != null) ...
java
public List<AuditLogChange> getChangesForKeys(AuditLogKey... keys) { Checks.notNull(keys, "Keys"); List<AuditLogChange> changes = new ArrayList<>(keys.length); for (AuditLogKey key : keys) { AuditLogChange change = getChangeByKey(key); if (change != null) ...
[ "public", "List", "<", "AuditLogChange", ">", "getChangesForKeys", "(", "AuditLogKey", "...", "keys", ")", "{", "Checks", ".", "notNull", "(", "keys", ",", "\"Keys\"", ")", ";", "List", "<", "AuditLogChange", ">", "changes", "=", "new", "ArrayList", "<>", ...
Filters all changes by the specified keys @param keys Varargs {@link net.dv8tion.jda.core.audit.AuditLogKey AuditLogKeys} to look for @throws java.lang.IllegalArgumentException If provided with null array @return Possibly-empty, never-null immutable list of {@link AuditLogChange AuditLogChanges}
[ "Filters", "all", "changes", "by", "the", "specified", "keys" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/audit/AuditLogEntry.java#L211-L222
31,025
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/bot/sharding/DefaultShardManagerBuilder.java
DefaultShardManagerBuilder.removeEventListenerProviders
public DefaultShardManagerBuilder removeEventListenerProviders(final Collection<IntFunction<Object>> listenerProviders) { Checks.noneNull(listenerProviders, "listener providers"); this.listenerProviders.removeAll(listenerProviders); return this; }
java
public DefaultShardManagerBuilder removeEventListenerProviders(final Collection<IntFunction<Object>> listenerProviders) { Checks.noneNull(listenerProviders, "listener providers"); this.listenerProviders.removeAll(listenerProviders); return this; }
[ "public", "DefaultShardManagerBuilder", "removeEventListenerProviders", "(", "final", "Collection", "<", "IntFunction", "<", "Object", ">", ">", "listenerProviders", ")", "{", "Checks", ".", "noneNull", "(", "listenerProviders", ",", "\"listener providers\"", ")", ";", ...
Removes all provided listener providers from the list of listener providers. @param listenerProviders The listener provider(s) to remove from the list of listener providers. @return The DefaultShardManagerBuilder instance. Useful for chaining.
[ "Removes", "all", "provided", "listener", "providers", "from", "the", "list", "of", "listener", "providers", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/bot/sharding/DefaultShardManagerBuilder.java#L361-L367
31,026
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java
MessageAction.clearFiles
@CheckReturnValue public MessageAction clearFiles(BiConsumer<String, InputStream> finalizer) { Checks.notNull(finalizer, "Finalizer"); for (Iterator<Map.Entry<String, InputStream>> it = files.entrySet().iterator(); it.hasNext();) { Map.Entry<String, InputStream> entry = it.ne...
java
@CheckReturnValue public MessageAction clearFiles(BiConsumer<String, InputStream> finalizer) { Checks.notNull(finalizer, "Finalizer"); for (Iterator<Map.Entry<String, InputStream>> it = files.entrySet().iterator(); it.hasNext();) { Map.Entry<String, InputStream> entry = it.ne...
[ "@", "CheckReturnValue", "public", "MessageAction", "clearFiles", "(", "BiConsumer", "<", "String", ",", "InputStream", ">", "finalizer", ")", "{", "Checks", ".", "notNull", "(", "finalizer", ",", "\"Finalizer\"", ")", ";", "for", "(", "Iterator", "<", "Map", ...
Clears all previously added files @param finalizer BiConsumer useful to <b>close</b> remaining resources, the consumer will receive the name as a string parameter and the resource as {@code InputStream}. @return Updated MessageAction for chaining convenience @see java.io.Closeable
[ "Clears", "all", "previously", "added", "files" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java#L516-L528
31,027
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/events/self/SelfUpdateAvatarEvent.java
SelfUpdateAvatarEvent.getOldAvatarUrl
public String getOldAvatarUrl() { return previous == null ? null : String.format(AVATAR_URL, getSelfUser().getId(), previous, previous.startsWith("a_") ? ".gif" : ".png"); }
java
public String getOldAvatarUrl() { return previous == null ? null : String.format(AVATAR_URL, getSelfUser().getId(), previous, previous.startsWith("a_") ? ".gif" : ".png"); }
[ "public", "String", "getOldAvatarUrl", "(", ")", "{", "return", "previous", "==", "null", "?", "null", ":", "String", ".", "format", "(", "AVATAR_URL", ",", "getSelfUser", "(", ")", ".", "getId", "(", ")", ",", "previous", ",", "previous", ".", "startsWi...
The old avatar url @return The old avatar url
[ "The", "old", "avatar", "url" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/events/self/SelfUpdateAvatarEvent.java#L53-L56
31,028
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/events/self/SelfUpdateAvatarEvent.java
SelfUpdateAvatarEvent.getNewAvatarUrl
public String getNewAvatarUrl() { return next == null ? null : String.format(AVATAR_URL, getSelfUser().getId(), next, next.startsWith("a_") ? ".gif" : ".png"); }
java
public String getNewAvatarUrl() { return next == null ? null : String.format(AVATAR_URL, getSelfUser().getId(), next, next.startsWith("a_") ? ".gif" : ".png"); }
[ "public", "String", "getNewAvatarUrl", "(", ")", "{", "return", "next", "==", "null", "?", "null", ":", "String", ".", "format", "(", "AVATAR_URL", ",", "getSelfUser", "(", ")", ".", "getId", "(", ")", ",", "next", ",", "next", ".", "startsWith", "(", ...
The new avatar url @return The new avatar url
[ "The", "new", "avatar", "url" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/events/self/SelfUpdateAvatarEvent.java#L73-L76
31,029
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.isEmpty
public boolean isEmpty() { return title == null && description.length() == 0 && timestamp == null //&& color == null color alone is not enough to send && thumbnail == null && author == null && footer == null ...
java
public boolean isEmpty() { return title == null && description.length() == 0 && timestamp == null //&& color == null color alone is not enough to send && thumbnail == null && author == null && footer == null ...
[ "public", "boolean", "isEmpty", "(", ")", "{", "return", "title", "==", "null", "&&", "description", ".", "length", "(", ")", "==", "0", "&&", "timestamp", "==", "null", "//&& color == null color alone is not enough to send", "&&", "thumbnail", "==", "null", "&&...
Checks if the given embed is empty. Empty embeds will throw an exception if built @return true if the embed is empty and cannot be built
[ "Checks", "if", "the", "given", "embed", "is", "empty", ".", "Empty", "embeds", "will", "throw", "an", "exception", "if", "built" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L149-L160
31,030
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setDescription
public final EmbedBuilder setDescription(CharSequence description) { this.description.setLength(0); if (description != null && description.length() >= 1) appendDescription(description); return this; }
java
public final EmbedBuilder setDescription(CharSequence description) { this.description.setLength(0); if (description != null && description.length() >= 1) appendDescription(description); return this; }
[ "public", "final", "EmbedBuilder", "setDescription", "(", "CharSequence", "description", ")", "{", "this", ".", "description", ".", "setLength", "(", "0", ")", ";", "if", "(", "description", "!=", "null", "&&", "description", ".", "length", "(", ")", ">=", ...
Sets the Description of the embed. This is where the main chunk of text for an embed is typically placed. <p><b><a href="http://i.imgur.com/lbchtwk.png">Example</a></b> @param description the description of the embed, {@code null} to reset @throws java.lang.IllegalArgumentException If the length of {@code descripti...
[ "Sets", "the", "Description", "of", "the", "embed", ".", "This", "is", "where", "the", "main", "chunk", "of", "text", "for", "an", "embed", "is", "typically", "placed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L303-L309
31,031
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.appendDescription
public EmbedBuilder appendDescription(CharSequence description) { Checks.notNull(description, "description"); Checks.check(this.description.length() + description.length() <= MessageEmbed.TEXT_MAX_LENGTH, "Description cannot be longer than %d characters.", MessageEmbed.TEXT_MAX_LENGT...
java
public EmbedBuilder appendDescription(CharSequence description) { Checks.notNull(description, "description"); Checks.check(this.description.length() + description.length() <= MessageEmbed.TEXT_MAX_LENGTH, "Description cannot be longer than %d characters.", MessageEmbed.TEXT_MAX_LENGT...
[ "public", "EmbedBuilder", "appendDescription", "(", "CharSequence", "description", ")", "{", "Checks", ".", "notNull", "(", "description", ",", "\"description\"", ")", ";", "Checks", ".", "check", "(", "this", ".", "description", ".", "length", "(", ")", "+", ...
Appends to the description of the embed. This is where the main chunk of text for an embed is typically placed. <p><b><a href="http://i.imgur.com/lbchtwk.png">Example</a></b> @param description the string to append to the description of the embed @throws java.lang.IllegalArgumentException <ul> <li>If the provided {...
[ "Appends", "to", "the", "description", "of", "the", "embed", ".", "This", "is", "where", "the", "main", "chunk", "of", "text", "for", "an", "embed", "is", "typically", "placed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L327-L334
31,032
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setTimestamp
public EmbedBuilder setTimestamp(TemporalAccessor temporal) { if (temporal == null) { this.timestamp = null; } else if (temporal instanceof OffsetDateTime) { this.timestamp = (OffsetDateTime) temporal; } else { ZoneO...
java
public EmbedBuilder setTimestamp(TemporalAccessor temporal) { if (temporal == null) { this.timestamp = null; } else if (temporal instanceof OffsetDateTime) { this.timestamp = (OffsetDateTime) temporal; } else { ZoneO...
[ "public", "EmbedBuilder", "setTimestamp", "(", "TemporalAccessor", "temporal", ")", "{", "if", "(", "temporal", "==", "null", ")", "{", "this", ".", "timestamp", "=", "null", ";", "}", "else", "if", "(", "temporal", "instanceof", "OffsetDateTime", ")", "{", ...
Sets the Timestamp of the embed. <p><b><a href="http://i.imgur.com/YP4NiER.png">Example</a></b> <p><b>Hint:</b> You can get the current time using {@link java.time.Instant#now() Instant.now()} or convert time from a millisecond representation by using {@link java.time.Instant#ofEpochMilli(long) Instant.ofEpochMilli(l...
[ "Sets", "the", "Timestamp", "of", "the", "embed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L349-L390
31,033
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setColor
public EmbedBuilder setColor(Color color) { this.color = color == null ? Role.DEFAULT_COLOR_RAW : color.getRGB(); return this; }
java
public EmbedBuilder setColor(Color color) { this.color = color == null ? Role.DEFAULT_COLOR_RAW : color.getRGB(); return this; }
[ "public", "EmbedBuilder", "setColor", "(", "Color", "color", ")", "{", "this", ".", "color", "=", "color", "==", "null", "?", "Role", ".", "DEFAULT_COLOR_RAW", ":", "color", ".", "getRGB", "(", ")", ";", "return", "this", ";", "}" ]
Sets the Color of the embed. <a href="http://i.imgur.com/2YnxnRM.png" target="_blank">Example</a> @param color The {@link java.awt.Color Color} of the embed or {@code null} to use no color @return the builder after the color has been set @see #setColor(int)
[ "Sets", "the", "Color", "of", "the", "embed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L405-L409
31,034
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setThumbnail
public EmbedBuilder setThumbnail(String url) { if (url == null) { this.thumbnail = null; } else { urlCheck(url); this.thumbnail = new MessageEmbed.Thumbnail(url, null, 0, 0); } return this; }
java
public EmbedBuilder setThumbnail(String url) { if (url == null) { this.thumbnail = null; } else { urlCheck(url); this.thumbnail = new MessageEmbed.Thumbnail(url, null, 0, 0); } return this; }
[ "public", "EmbedBuilder", "setThumbnail", "(", "String", "url", ")", "{", "if", "(", "url", "==", "null", ")", "{", "this", ".", "thumbnail", "=", "null", ";", "}", "else", "{", "urlCheck", "(", "url", ")", ";", "this", ".", "thumbnail", "=", "new", ...
Sets the Thumbnail of the embed. <p><b><a href="http://i.imgur.com/Zc3qwqB.png">Example</a></b> <p><b>Uploading images with Embeds</b> <br>When uploading an <u>image</u> (using {@link net.dv8tion.jda.core.entities.MessageChannel#sendFile(java.io.File, net.dv8tion.jda.core.entities.Message) MessageChannel.sendFile(......
[ "Sets", "the", "Thumbnail", "of", "the", "embed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L462-L474
31,035
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setImage
public EmbedBuilder setImage(String url) { if (url == null) { this.image = null; } else { urlCheck(url); this.image = new MessageEmbed.ImageInfo(url, null, 0, 0); } return this; }
java
public EmbedBuilder setImage(String url) { if (url == null) { this.image = null; } else { urlCheck(url); this.image = new MessageEmbed.ImageInfo(url, null, 0, 0); } return this; }
[ "public", "EmbedBuilder", "setImage", "(", "String", "url", ")", "{", "if", "(", "url", "==", "null", ")", "{", "this", ".", "image", "=", "null", ";", "}", "else", "{", "urlCheck", "(", "url", ")", ";", "this", ".", "image", "=", "new", "MessageEm...
Sets the Image of the embed. <p><b><a href="http://i.imgur.com/2hzuHFJ.png">Example</a></b> <p><b>Uploading images with Embeds</b> <br>When uploading an <u>image</u> (using {@link net.dv8tion.jda.core.entities.MessageChannel#sendFile(java.io.File, net.dv8tion.jda.core.entities.Message) MessageChannel.sendFile(...)}) ...
[ "Sets", "the", "Image", "of", "the", "embed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L511-L523
31,036
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setAuthor
public EmbedBuilder setAuthor(String name, String url) { return setAuthor(name, url, null); }
java
public EmbedBuilder setAuthor(String name, String url) { return setAuthor(name, url, null); }
[ "public", "EmbedBuilder", "setAuthor", "(", "String", "name", ",", "String", "url", ")", "{", "return", "setAuthor", "(", "name", ",", "url", ",", "null", ")", ";", "}" ]
Sets the Author of the embed. The author appears in the top left of the embed and can have a small image beside it along with the author's name being made clickable by way of providing a url. This convenience method just sets the name and the url. <p><b><a href="http://i.imgur.com/JgZtxIM.png">Example</a></b> @param ...
[ "Sets", "the", "Author", "of", "the", "embed", ".", "The", "author", "appears", "in", "the", "top", "left", "of", "the", "embed", "and", "can", "have", "a", "small", "image", "beside", "it", "along", "with", "the", "author", "s", "name", "being", "made...
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L562-L565
31,037
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setAuthor
public EmbedBuilder setAuthor(String name, String url, String iconUrl) { //We only check if the name is null because its presence is what determines if the // the author will appear in the embed. if (name == null) { this.author = null; } else { ...
java
public EmbedBuilder setAuthor(String name, String url, String iconUrl) { //We only check if the name is null because its presence is what determines if the // the author will appear in the embed. if (name == null) { this.author = null; } else { ...
[ "public", "EmbedBuilder", "setAuthor", "(", "String", "name", ",", "String", "url", ",", "String", "iconUrl", ")", "{", "//We only check if the name is null because its presence is what determines if the", "// the author will appear in the embed.", "if", "(", "name", "==", "n...
Sets the Author of the embed. The author appears in the top left of the embed and can have a small image beside it along with the author's name being made clickable by way of providing a url. <p><b><a href="http://i.imgur.com/JgZtxIM.png">Example</a></b> <p><b>Uploading images with Embeds</b> <br>When uploading an <u...
[ "Sets", "the", "Author", "of", "the", "embed", ".", "The", "author", "appears", "in", "the", "top", "left", "of", "the", "embed", "and", "can", "have", "a", "small", "image", "beside", "it", "along", "with", "the", "author", "s", "name", "being", "made...
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L607-L622
31,038
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setFooter
public EmbedBuilder setFooter(String text, String iconUrl) { //We only check if the text is null because its presence is what determines if the // footer will appear in the embed. if (text == null) { this.footer = null; } else { Checks....
java
public EmbedBuilder setFooter(String text, String iconUrl) { //We only check if the text is null because its presence is what determines if the // footer will appear in the embed. if (text == null) { this.footer = null; } else { Checks....
[ "public", "EmbedBuilder", "setFooter", "(", "String", "text", ",", "String", "iconUrl", ")", "{", "//We only check if the text is null because its presence is what determines if the", "// footer will appear in the embed.", "if", "(", "text", "==", "null", ")", "{", "this", ...
Sets the Footer of the embed. <p><b><a href="http://i.imgur.com/jdf4sbi.png">Example</a></b> <p><b>Uploading images with Embeds</b> <br>When uploading an <u>image</u> (using {@link net.dv8tion.jda.core.entities.MessageChannel#sendFile(java.io.File, net.dv8tion.jda.core.entities.Message) MessageChannel.sendFile(...)})...
[ "Sets", "the", "Footer", "of", "the", "embed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L660-L675
31,039
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.addField
public EmbedBuilder addField(String name, String value, boolean inline) { if (name == null && value == null) return this; this.fields.add(new MessageEmbed.Field(name, value, inline)); return this; }
java
public EmbedBuilder addField(String name, String value, boolean inline) { if (name == null && value == null) return this; this.fields.add(new MessageEmbed.Field(name, value, inline)); return this; }
[ "public", "EmbedBuilder", "addField", "(", "String", "name", ",", "String", "value", ",", "boolean", "inline", ")", "{", "if", "(", "name", "==", "null", "&&", "value", "==", "null", ")", "return", "this", ";", "this", ".", "fields", ".", "add", "(", ...
Adds a Field to the embed. <p>Note: If a blank string is provided to either {@code name} or {@code value}, the blank string is replaced with {@link net.dv8tion.jda.core.EmbedBuilder#ZERO_WIDTH_SPACE}. <p><b><a href="http://i.imgur.com/gnjzCoo.png">Example of Inline</a></b> <p><b><a href="http://i.imgur.com/Ky0KlsT.pn...
[ "Adds", "a", "Field", "to", "the", "embed", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L716-L722
31,040
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java
WebhookMessageBuilder.reset
public WebhookMessageBuilder reset() { content.setLength(0); embeds.clear(); resetFiles(); username = null; avatarUrl = null; isTTS = false; return this; }
java
public WebhookMessageBuilder reset() { content.setLength(0); embeds.clear(); resetFiles(); username = null; avatarUrl = null; isTTS = false; return this; }
[ "public", "WebhookMessageBuilder", "reset", "(", ")", "{", "content", ".", "setLength", "(", "0", ")", ";", "embeds", ".", "clear", "(", ")", ";", "resetFiles", "(", ")", ";", "username", "=", "null", ";", "avatarUrl", "=", "null", ";", "isTTS", "=", ...
Resets this builder to default settings. @return The current WebhookMessageBuilder for chaining convenience
[ "Resets", "this", "builder", "to", "default", "settings", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java#L101-L110
31,041
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java
WebhookMessageBuilder.append
public WebhookMessageBuilder append(String content) { Checks.notNull(content, "Content"); Checks.check(this.content.length() + content.length() <= 2000, "Content may not exceed 2000 characters!"); this.content.append(content); return this; }
java
public WebhookMessageBuilder append(String content) { Checks.notNull(content, "Content"); Checks.check(this.content.length() + content.length() <= 2000, "Content may not exceed 2000 characters!"); this.content.append(content); return this; }
[ "public", "WebhookMessageBuilder", "append", "(", "String", "content", ")", "{", "Checks", ".", "notNull", "(", "content", ",", "\"Content\"", ")", ";", "Checks", ".", "check", "(", "this", ".", "content", ".", "length", "(", ")", "+", "content", ".", "l...
Appends to the currently set content of the resulting message. @param content The content to append @throws java.lang.IllegalArgumentException If the provided content is {@code null} or the resulting content would exceed {@code 2000} characters in length @return The current WebhookMessageBuilder for chaining conven...
[ "Appends", "to", "the", "currently", "set", "content", "of", "the", "resulting", "message", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java#L228-L235
31,042
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/AccountManager.java
AccountManager.setName
@CheckReturnValue public AccountManager setName(String name, String currentPassword) { Checks.notBlank(name, "Name"); Checks.check(name.length() >= 2 && name.length() <= 32, "Name must be between 2-32 characters long"); this.currentPassword = currentPassword; this.name = name; ...
java
@CheckReturnValue public AccountManager setName(String name, String currentPassword) { Checks.notBlank(name, "Name"); Checks.check(name.length() >= 2 && name.length() <= 32, "Name must be between 2-32 characters long"); this.currentPassword = currentPassword; this.name = name; ...
[ "@", "CheckReturnValue", "public", "AccountManager", "setName", "(", "String", "name", ",", "String", "currentPassword", ")", "{", "Checks", ".", "notBlank", "(", "name", ",", "\"Name\"", ")", ";", "Checks", ".", "check", "(", "name", ".", "length", "(", "...
Sets the username for the currently logged in account @param name The new username @param currentPassword The current password for the represented account, this is only required for {@link net.dv8tion.jda.core.AccountType#CLIENT AccountType.CLIENT} @throws IllegalArgumentException If this is action is performed on ...
[ "Sets", "the", "username", "for", "the", "currently", "logged", "in", "account" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/AccountManager.java#L206-L215
31,043
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/AccountManager.java
AccountManager.setAvatar
@CheckReturnValue public AccountManager setAvatar(Icon avatar, String currentPassword) { this.currentPassword = currentPassword; this.avatar = avatar; set |= AVATAR; return this; }
java
@CheckReturnValue public AccountManager setAvatar(Icon avatar, String currentPassword) { this.currentPassword = currentPassword; this.avatar = avatar; set |= AVATAR; return this; }
[ "@", "CheckReturnValue", "public", "AccountManager", "setAvatar", "(", "Icon", "avatar", ",", "String", "currentPassword", ")", "{", "this", ".", "currentPassword", "=", "currentPassword", ";", "this", ".", "avatar", "=", "avatar", ";", "set", "|=", "AVATAR", ...
Sets the avatar for the currently logged in account @param avatar An {@link net.dv8tion.jda.core.entities.Icon Icon} instance representing the new Avatar for the current account, {@code null} to reset the avatar to the default avatar. @param currentPassword The current password for the represented account, this is o...
[ "Sets", "the", "avatar", "for", "the", "currently", "logged", "in", "account" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/AccountManager.java#L251-L258
31,044
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/AccountManager.java
AccountManager.setEmail
@CheckReturnValue public AccountManager setEmail(String email, String currentPassword) { Checks.notNull(email, "email"); this.currentPassword = currentPassword; this.email = email; set |= EMAIL; return this; }
java
@CheckReturnValue public AccountManager setEmail(String email, String currentPassword) { Checks.notNull(email, "email"); this.currentPassword = currentPassword; this.email = email; set |= EMAIL; return this; }
[ "@", "CheckReturnValue", "public", "AccountManager", "setEmail", "(", "String", "email", ",", "String", "currentPassword", ")", "{", "Checks", ".", "notNull", "(", "email", ",", "\"email\"", ")", ";", "this", ".", "currentPassword", "=", "currentPassword", ";", ...
Sets the email for the currently logged in client account. @param email The new email @param currentPassword The <b>valid</b> current password for the represented account @throws net.dv8tion.jda.core.exceptions.AccountTypeException If the currently logged in account is not from {@link net.dv8tion.jda.core.AccountTy...
[ "Sets", "the", "email", "for", "the", "currently", "logged", "in", "client", "account", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/AccountManager.java#L278-L286
31,045
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/order/OrderAction.java
OrderAction.swapPosition
@SuppressWarnings("unchecked") public M swapPosition(int swapPosition) { Checks.notNegative(swapPosition, "Provided swapPosition"); Checks.check(swapPosition < orderList.size(), "Provided swapPosition is too big and is out of bounds. swapPosition: " + swapPosition); T se...
java
@SuppressWarnings("unchecked") public M swapPosition(int swapPosition) { Checks.notNegative(swapPosition, "Provided swapPosition"); Checks.check(swapPosition < orderList.size(), "Provided swapPosition is too big and is out of bounds. swapPosition: " + swapPosition); T se...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "M", "swapPosition", "(", "int", "swapPosition", ")", "{", "Checks", ".", "notNegative", "(", "swapPosition", ",", "\"Provided swapPosition\"", ")", ";", "Checks", ".", "check", "(", "swapPosition", "...
Swaps the currently selected entity with the entity located at the specified position. No other entities are affected by this operation. @param swapPosition 0 based index of target position @throws java.lang.IllegalStateException If no entity has been selected yet @throws java.lang.IllegalArgumentException If the sp...
[ "Swaps", "the", "currently", "selected", "entity", "with", "the", "entity", "located", "at", "the", "specified", "position", ".", "No", "other", "entities", "are", "affected", "by", "this", "operation", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/order/OrderAction.java#L310-L323
31,046
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/order/OrderAction.java
OrderAction.swapPosition
@SuppressWarnings("unchecked") public M swapPosition(T swapEntity) { Checks.notNull(swapEntity, "Provided swapEntity"); validateInput(swapEntity); return swapPosition(orderList.indexOf(swapEntity)); }
java
@SuppressWarnings("unchecked") public M swapPosition(T swapEntity) { Checks.notNull(swapEntity, "Provided swapEntity"); validateInput(swapEntity); return swapPosition(orderList.indexOf(swapEntity)); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "M", "swapPosition", "(", "T", "swapEntity", ")", "{", "Checks", ".", "notNull", "(", "swapEntity", ",", "\"Provided swapEntity\"", ")", ";", "validateInput", "(", "swapEntity", ")", ";", "return", ...
Swaps the currently selected entity with the specified entity. No other entities are affected by this operation. @param swapEntity Target entity to switch positions with @throws java.lang.IllegalStateException If no entity has been selected yet @throws java.lang.IllegalArgumentException If the specified position is ...
[ "Swaps", "the", "currently", "selected", "entity", "with", "the", "specified", "entity", ".", "No", "other", "entities", "are", "affected", "by", "this", "operation", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/order/OrderAction.java#L343-L350
31,047
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/MessageBuilder.java
MessageBuilder.replace
public MessageBuilder replace(String target, String replacement) { int index = builder.indexOf(target); while (index != -1) { builder.replace(index, index + target.length(), replacement); index = builder.indexOf(target, index + replacement.length()); } ...
java
public MessageBuilder replace(String target, String replacement) { int index = builder.indexOf(target); while (index != -1) { builder.replace(index, index + target.length(), replacement); index = builder.indexOf(target, index + replacement.length()); } ...
[ "public", "MessageBuilder", "replace", "(", "String", "target", ",", "String", "replacement", ")", "{", "int", "index", "=", "builder", ".", "indexOf", "(", "target", ")", ";", "while", "(", "index", "!=", "-", "1", ")", "{", "builder", ".", "replace", ...
Replaces each substring that matches the target string with the specified replacement string. The replacement proceeds from the beginning of the string to the end, for example, replacing "aa" with "b" in the message "aaa" will result in "ba" rather than "ab". @param target the sequence of char values to be replaced @...
[ "Replaces", "each", "substring", "that", "matches", "the", "target", "string", "with", "the", "specified", "replacement", "string", ".", "The", "replacement", "proceeds", "from", "the", "beginning", "of", "the", "string", "to", "the", "end", "for", "example", ...
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/MessageBuilder.java#L389-L398
31,048
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/MessageBuilder.java
MessageBuilder.replaceFirst
public MessageBuilder replaceFirst(String target, String replacement) { int index = builder.indexOf(target); if (index != -1) { builder.replace(index, index + target.length(), replacement); } return this; }
java
public MessageBuilder replaceFirst(String target, String replacement) { int index = builder.indexOf(target); if (index != -1) { builder.replace(index, index + target.length(), replacement); } return this; }
[ "public", "MessageBuilder", "replaceFirst", "(", "String", "target", ",", "String", "replacement", ")", "{", "int", "index", "=", "builder", ".", "indexOf", "(", "target", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "{", "builder", ".", "replace",...
Replaces the first substring that matches the target string with the specified replacement string. @param target the sequence of char values to be replaced @param replacement the replacement sequence of char values @return The MessageBuilder instance. Useful for chaining.
[ "Replaces", "the", "first", "substring", "that", "matches", "the", "target", "string", "with", "the", "specified", "replacement", "string", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/MessageBuilder.java#L410-L418
31,049
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/MessageBuilder.java
MessageBuilder.replaceLast
public MessageBuilder replaceLast(String target, String replacement) { int index = builder.lastIndexOf(target); if (index != -1) { builder.replace(index, index + target.length(), replacement); } return this; }
java
public MessageBuilder replaceLast(String target, String replacement) { int index = builder.lastIndexOf(target); if (index != -1) { builder.replace(index, index + target.length(), replacement); } return this; }
[ "public", "MessageBuilder", "replaceLast", "(", "String", "target", ",", "String", "replacement", ")", "{", "int", "index", "=", "builder", ".", "lastIndexOf", "(", "target", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "{", "builder", ".", "replac...
Replaces the last substring that matches the target string with the specified replacement string. @param target the sequence of char values to be replaced @param replacement the replacement sequence of char values @return The MessageBuilder instance. Useful for chaining.
[ "Replaces", "the", "last", "substring", "that", "matches", "the", "target", "string", "with", "the", "specified", "replacement", "string", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/MessageBuilder.java#L430-L438
31,050
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/MessageBuilder.java
MessageBuilder.indexOf
public int indexOf(CharSequence target, int fromIndex, int endIndex) { if (fromIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + fromIndex); if (endIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + endIndex); if (fromIndex >...
java
public int indexOf(CharSequence target, int fromIndex, int endIndex) { if (fromIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + fromIndex); if (endIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + endIndex); if (fromIndex >...
[ "public", "int", "indexOf", "(", "CharSequence", "target", ",", "int", "fromIndex", ",", "int", "endIndex", ")", "{", "if", "(", "fromIndex", "<", "0", ")", "throw", "new", "IndexOutOfBoundsException", "(", "\"index out of range: \"", "+", "fromIndex", ")", ";...
Returns the index within this string of the first occurrence of the specified substring between the specified indices. <p>If no such value of {@code target} exists, then {@code -1} is returned. @param target the substring to search for. @param fromIndex the index from which to start the search. @param endIndex the...
[ "Returns", "the", "index", "within", "this", "string", "of", "the", "first", "occurrence", "of", "the", "specified", "substring", "between", "the", "specified", "indices", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/MessageBuilder.java#L652-L693
31,051
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/MessageBuilder.java
MessageBuilder.lastIndexOf
public int lastIndexOf(CharSequence target, int fromIndex, int endIndex) { if (fromIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + fromIndex); if (endIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + endIndex); if (fromInd...
java
public int lastIndexOf(CharSequence target, int fromIndex, int endIndex) { if (fromIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + fromIndex); if (endIndex < 0) throw new IndexOutOfBoundsException("index out of range: " + endIndex); if (fromInd...
[ "public", "int", "lastIndexOf", "(", "CharSequence", "target", ",", "int", "fromIndex", ",", "int", "endIndex", ")", "{", "if", "(", "fromIndex", "<", "0", ")", "throw", "new", "IndexOutOfBoundsException", "(", "\"index out of range: \"", "+", "fromIndex", ")", ...
Returns the index within this string of the last occurrence of the specified substring between the specified indices. If no such value of {@code target} exists, then {@code -1} is returned. @param target the substring to search for. @param fromIndex the index from which to start the search. @param endIndex the ind...
[ "Returns", "the", "index", "within", "this", "string", "of", "the", "last", "occurrence", "of", "the", "specified", "substring", "between", "the", "specified", "indices", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/MessageBuilder.java#L718-L768
31,052
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java
ChannelAction.setName
@CheckReturnValue public ChannelAction setName(String name) { Checks.notNull(name, "Channel name"); if (name.length() < 1 || name.length() > 100) throw new IllegalArgumentException("Provided channel name must be 1 to 100 characters in length"); this.name = name; retu...
java
@CheckReturnValue public ChannelAction setName(String name) { Checks.notNull(name, "Channel name"); if (name.length() < 1 || name.length() > 100) throw new IllegalArgumentException("Provided channel name must be 1 to 100 characters in length"); this.name = name; retu...
[ "@", "CheckReturnValue", "public", "ChannelAction", "setName", "(", "String", "name", ")", "{", "Checks", ".", "notNull", "(", "name", ",", "\"Channel name\"", ")", ";", "if", "(", "name", ".", "length", "(", ")", "<", "1", "||", "name", ".", "length", ...
Sets the name for the new Channel @param name The not-null name for the new Channel (1-100 chars long) @throws java.lang.IllegalArgumentException If the provided name is null or not between 1-100 chars long @return The current ChannelAction, for chaining convenience
[ "Sets", "the", "name", "for", "the", "new", "Channel" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java#L98-L107
31,053
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java
ChannelAction.setTopic
@CheckReturnValue public ChannelAction setTopic(String topic) { if (type != ChannelType.TEXT) throw new UnsupportedOperationException("Can only set the topic for a TextChannel!"); if (topic != null && topic.length() > 1024) throw new IllegalArgumentException("Channel Topi...
java
@CheckReturnValue public ChannelAction setTopic(String topic) { if (type != ChannelType.TEXT) throw new UnsupportedOperationException("Can only set the topic for a TextChannel!"); if (topic != null && topic.length() > 1024) throw new IllegalArgumentException("Channel Topi...
[ "@", "CheckReturnValue", "public", "ChannelAction", "setTopic", "(", "String", "topic", ")", "{", "if", "(", "type", "!=", "ChannelType", ".", "TEXT", ")", "throw", "new", "UnsupportedOperationException", "(", "\"Can only set the topic for a TextChannel!\"", ")", ";",...
Sets the topic for the new TextChannel @param topic The topic for the new Channel (max 1024 chars) @throws UnsupportedOperationException If this ChannelAction is not for a TextChannel @throws IllegalArgumentException If the provided topic is longer than 1024 chars @return The current ChannelAction, for chaining con...
[ "Sets", "the", "topic", "for", "the", "new", "TextChannel" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java#L171-L180
31,054
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java
ChannelAction.setNSFW
@CheckReturnValue public ChannelAction setNSFW(boolean nsfw) { if (type != ChannelType.TEXT) throw new UnsupportedOperationException("Can only set nsfw for a TextChannel!"); this.nsfw = nsfw; return this; }
java
@CheckReturnValue public ChannelAction setNSFW(boolean nsfw) { if (type != ChannelType.TEXT) throw new UnsupportedOperationException("Can only set nsfw for a TextChannel!"); this.nsfw = nsfw; return this; }
[ "@", "CheckReturnValue", "public", "ChannelAction", "setNSFW", "(", "boolean", "nsfw", ")", "{", "if", "(", "type", "!=", "ChannelType", ".", "TEXT", ")", "throw", "new", "UnsupportedOperationException", "(", "\"Can only set nsfw for a TextChannel!\"", ")", ";", "th...
Sets the NSFW flag for the new TextChannel @param nsfw The NSFW flag for the new Channel @throws UnsupportedOperationException If this ChannelAction is not for a TextChannel @return The current ChannelAction, for chaining convenience
[ "Sets", "the", "NSFW", "flag", "for", "the", "new", "TextChannel" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java#L193-L200
31,055
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java
ChannelAction.setSlowmode
@CheckReturnValue public ChannelAction setSlowmode(int slowmode) { Checks.check(slowmode <= 120 && slowmode >= 0, "Slowmode must be between 0 and 120 (seconds)!"); this.slowmode = slowmode; return this; }
java
@CheckReturnValue public ChannelAction setSlowmode(int slowmode) { Checks.check(slowmode <= 120 && slowmode >= 0, "Slowmode must be between 0 and 120 (seconds)!"); this.slowmode = slowmode; return this; }
[ "@", "CheckReturnValue", "public", "ChannelAction", "setSlowmode", "(", "int", "slowmode", ")", "{", "Checks", ".", "check", "(", "slowmode", "<=", "120", "&&", "slowmode", ">=", "0", ",", "\"Slowmode must be between 0 and 120 (seconds)!\"", ")", ";", "this", ".",...
Sets the slowmode value, which limits the amount of time that individual users must wait between sending messages in the new TextChannel. This is measured in seconds. <p>Note that only {@link net.dv8tion.jda.core.AccountType#CLIENT CLIENT} type accounts are affected by slowmode, and that {@link net.dv8tion.jda.core.Ac...
[ "Sets", "the", "slowmode", "value", "which", "limits", "the", "amount", "of", "time", "that", "individual", "users", "must", "wait", "between", "sending", "messages", "in", "the", "new", "TextChannel", ".", "This", "is", "measured", "in", "seconds", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java#L221-L227
31,056
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java
ChannelAction.setBitrate
@CheckReturnValue public ChannelAction setBitrate(Integer bitrate) { if (type != ChannelType.VOICE) throw new UnsupportedOperationException("Can only set the bitrate for a VoiceChannel!"); if (bitrate != null) { int maxBitrate = guild.getFeatures().contains("VIP_R...
java
@CheckReturnValue public ChannelAction setBitrate(Integer bitrate) { if (type != ChannelType.VOICE) throw new UnsupportedOperationException("Can only set the bitrate for a VoiceChannel!"); if (bitrate != null) { int maxBitrate = guild.getFeatures().contains("VIP_R...
[ "@", "CheckReturnValue", "public", "ChannelAction", "setBitrate", "(", "Integer", "bitrate", ")", "{", "if", "(", "type", "!=", "ChannelType", ".", "VOICE", ")", "throw", "new", "UnsupportedOperationException", "(", "\"Can only set the bitrate for a VoiceChannel!\"", ")...
Sets the bitrate for the new VoiceChannel @param bitrate The bitrate for the new Channel (min {@code 8000}; max {@code 96000}/{@code 128000} (for {@link net.dv8tion.jda.core.entities.Guild#getFeatures() VIP Guilds})) or null to use default ({@code 64000}) @throws UnsupportedOperationException If this ChannelAction i...
[ "Sets", "the", "bitrate", "for", "the", "new", "VoiceChannel" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java#L340-L356
31,057
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java
ChannelAction.setUserlimit
@CheckReturnValue public ChannelAction setUserlimit(Integer userlimit) { if (type != ChannelType.VOICE) throw new UnsupportedOperationException("Can only set the userlimit for a VoiceChannel!"); if (userlimit != null && (userlimit < 0 || userlimit > 99)) throw new Illegal...
java
@CheckReturnValue public ChannelAction setUserlimit(Integer userlimit) { if (type != ChannelType.VOICE) throw new UnsupportedOperationException("Can only set the userlimit for a VoiceChannel!"); if (userlimit != null && (userlimit < 0 || userlimit > 99)) throw new Illegal...
[ "@", "CheckReturnValue", "public", "ChannelAction", "setUserlimit", "(", "Integer", "userlimit", ")", "{", "if", "(", "type", "!=", "ChannelType", ".", "VOICE", ")", "throw", "new", "UnsupportedOperationException", "(", "\"Can only set the userlimit for a VoiceChannel!\""...
Sets the userlimit for the new VoiceChannel @param userlimit The userlimit for the new VoiceChannel or {@code null}/{@code 0} to use no limit, @throws UnsupportedOperationException If this ChannelAction is not for a VoiceChannel @throws IllegalArgumentException If the provided userlimit is negative or above {@code 9...
[ "Sets", "the", "userlimit", "for", "the", "new", "VoiceChannel" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java#L371-L380
31,058
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/WebSocketSendingThread.java
WebSocketSendingThread.send
private boolean send(String request) { needRateLimit = !client.send(request, false); attemptedToSend = true; return !needRateLimit; }
java
private boolean send(String request) { needRateLimit = !client.send(request, false); attemptedToSend = true; return !needRateLimit; }
[ "private", "boolean", "send", "(", "String", "request", ")", "{", "needRateLimit", "=", "!", "client", ".", "send", "(", "request", ",", "false", ")", ";", "attemptedToSend", "=", "true", ";", "return", "!", "needRateLimit", ";", "}" ]
returns true if send was successful
[ "returns", "true", "if", "send", "was", "successful" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/WebSocketSendingThread.java#L202-L207
31,059
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/IOUtil.java
IOUtil.readFully
public static byte[] readFully(File file) throws IOException { Checks.notNull(file, "File"); Checks.check(file.exists(), "Provided file does not exist!"); try (InputStream is = new FileInputStream(file)) { // Get the size of the file long length = file.length...
java
public static byte[] readFully(File file) throws IOException { Checks.notNull(file, "File"); Checks.check(file.exists(), "Provided file does not exist!"); try (InputStream is = new FileInputStream(file)) { // Get the size of the file long length = file.length...
[ "public", "static", "byte", "[", "]", "readFully", "(", "File", "file", ")", "throws", "IOException", "{", "Checks", ".", "notNull", "(", "file", ",", "\"File\"", ")", ";", "Checks", ".", "check", "(", "file", ".", "exists", "(", ")", ",", "\"Provided ...
Used as an alternate to Java's nio Files.readAllBytes. <p>This customized version for File is provide (instead of just using {@link #readFully(java.io.InputStream)} with a FileInputStream) because with a File we can determine the total size of the array and do not need to have a buffer. This results in a memory footpr...
[ "Used", "as", "an", "alternate", "to", "Java", "s", "nio", "Files", ".", "readAllBytes", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/IOUtil.java#L41-L82
31,060
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java
WidgetUtil.getPremadeWidgetHtml
public static String getPremadeWidgetHtml(Guild guild, WidgetTheme theme, int width, int height) { Checks.notNull(guild, "Guild"); return getPremadeWidgetHtml(guild.getId(), theme, width, height); }
java
public static String getPremadeWidgetHtml(Guild guild, WidgetTheme theme, int width, int height) { Checks.notNull(guild, "Guild"); return getPremadeWidgetHtml(guild.getId(), theme, width, height); }
[ "public", "static", "String", "getPremadeWidgetHtml", "(", "Guild", "guild", ",", "WidgetTheme", "theme", ",", "int", "width", ",", "int", "height", ")", "{", "Checks", ".", "notNull", "(", "guild", ",", "\"Guild\"", ")", ";", "return", "getPremadeWidgetHtml",...
Gets the pre-made HTML Widget for the specified guild using the specified settings. The widget will only display correctly if the guild in question has the Widget enabled. @param guild the guild @param theme the theme, light or dark @param width the width of the widget @param height the height of the widget @retu...
[ "Gets", "the", "pre", "-", "made", "HTML", "Widget", "for", "the", "specified", "guild", "using", "the", "specified", "settings", ".", "The", "widget", "will", "only", "display", "correctly", "if", "the", "guild", "in", "question", "has", "the", "Widget", ...
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java#L106-L110
31,061
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java
WidgetUtil.getPremadeWidgetHtml
public static String getPremadeWidgetHtml(String guildId, WidgetTheme theme, int width, int height) { Checks.notNull(guildId, "GuildId"); Checks.notNull(theme, "WidgetTheme"); Checks.notNegative(width, "Width"); Checks.notNegative(height, "Height"); return String.format(WIDGE...
java
public static String getPremadeWidgetHtml(String guildId, WidgetTheme theme, int width, int height) { Checks.notNull(guildId, "GuildId"); Checks.notNull(theme, "WidgetTheme"); Checks.notNegative(width, "Width"); Checks.notNegative(height, "Height"); return String.format(WIDGE...
[ "public", "static", "String", "getPremadeWidgetHtml", "(", "String", "guildId", ",", "WidgetTheme", "theme", ",", "int", "width", ",", "int", "height", ")", "{", "Checks", ".", "notNull", "(", "guildId", ",", "\"GuildId\"", ")", ";", "Checks", ".", "notNull"...
Gets the pre-made HTML Widget for the specified guild using the specified settings. The widget will only display correctly if the guild in question has the Widget enabled. Additionally, this method can be used independently of being on the guild in question. @param guildId the guild ID @param theme the theme, light ...
[ "Gets", "the", "pre", "-", "made", "HTML", "Widget", "for", "the", "specified", "guild", "using", "the", "specified", "settings", ".", "The", "widget", "will", "only", "display", "correctly", "if", "the", "guild", "in", "question", "has", "the", "Widget", ...
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java#L129-L136
31,062
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/MiscUtil.java
MiscUtil.appendTo
public static void appendTo(Formatter formatter, int width, int precision, boolean leftJustified, String out) { try { Appendable appendable = formatter.out(); if (precision > -1 && out.length() > precision) { appendable.append(Helpers.truncate(out,...
java
public static void appendTo(Formatter formatter, int width, int precision, boolean leftJustified, String out) { try { Appendable appendable = formatter.out(); if (precision > -1 && out.length() > precision) { appendable.append(Helpers.truncate(out,...
[ "public", "static", "void", "appendTo", "(", "Formatter", "formatter", ",", "int", "width", ",", "int", "precision", ",", "boolean", "leftJustified", ",", "String", "out", ")", "{", "try", "{", "Appendable", "appendable", "=", "formatter", ".", "out", "(", ...
Can be used to append a String to a formatter. @param formatter The {@link java.util.Formatter Formatter} @param width Minimum width to meet, filled with space if needed @param precision Maximum amount of characters to append @param leftJustified Whether or not to left-justify the value @param out The String to append
[ "Can", "be", "used", "to", "append", "a", "String", "to", "a", "formatter", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/MiscUtil.java#L267-L287
31,063
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/webhook/WebhookClient.java
WebhookClient.send
public RequestFuture<?> send(String content) { Checks.notBlank(content, "Content"); Checks.check(content.length() <= 2000, "Content may not exceed 2000 characters!"); return execute(newBody(new JSONObject().put("content", content).toString())); }
java
public RequestFuture<?> send(String content) { Checks.notBlank(content, "Content"); Checks.check(content.length() <= 2000, "Content may not exceed 2000 characters!"); return execute(newBody(new JSONObject().put("content", content).toString())); }
[ "public", "RequestFuture", "<", "?", ">", "send", "(", "String", "content", ")", "{", "Checks", ".", "notBlank", "(", "content", ",", "\"Content\"", ")", ";", "Checks", ".", "check", "(", "content", ".", "length", "(", ")", "<=", "2000", ",", "\"Conten...
Sends the provided text message to this webhook. @param content The text message to send @throws java.lang.IllegalArgumentException If any of the provided message is {@code null}, blank or exceeds 2000 characters in length @throws java.util.concurrent.RejectedExecutionException If this client was closed @return {@l...
[ "Sends", "the", "provided", "text", "message", "to", "this", "webhook", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookClient.java#L334-L339
31,064
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/RoleAction.java
RoleAction.setColor
@CheckReturnValue public RoleAction setColor(Color color) { return this.setColor(color != null ? color.getRGB() : null); }
java
@CheckReturnValue public RoleAction setColor(Color color) { return this.setColor(color != null ? color.getRGB() : null); }
[ "@", "CheckReturnValue", "public", "RoleAction", "setColor", "(", "Color", "color", ")", "{", "return", "this", ".", "setColor", "(", "color", "!=", "null", "?", "color", ".", "getRGB", "(", ")", ":", "null", ")", ";", "}" ]
Sets the color which the new role should be displayed with. @param color An {@link java.awt.Color Color} for the new role, null to use default white/black @return The current RoleAction, for chaining convenience
[ "Sets", "the", "color", "which", "the", "new", "role", "should", "be", "displayed", "with", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/RoleAction.java#L128-L132
31,065
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/entities/Game.java
Game.of
public static Game of(GameType type, String name) { return of(type, name, null); }
java
public static Game of(GameType type, String name) { return of(type, name, null); }
[ "public", "static", "Game", "of", "(", "GameType", "type", ",", "String", "name", ")", "{", "return", "of", "(", "type", ",", "name", ",", "null", ")", ";", "}" ]
Creates a new Game instance with the specified name and url. @param type The {@link net.dv8tion.jda.core.entities.Game.GameType GameType} to use @param name The not-null name of the newly created game @throws IllegalArgumentException If the specified name is null or empty @return A valid Game instance with the pro...
[ "Creates", "a", "new", "Game", "instance", "with", "the", "specified", "name", "and", "url", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/entities/Game.java#L254-L257
31,066
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/pagination/PaginationAction.java
PaginationAction.limit
@SuppressWarnings("unchecked") public M limit(final int limit) { Checks.check(maxLimit == 0 || limit <= maxLimit, "Limit must not exceed %d!", maxLimit); Checks.check(minLimit == 0 || limit >= minLimit, "Limit must be greater or equal to %d", minLimit); synchronized (this.limit) ...
java
@SuppressWarnings("unchecked") public M limit(final int limit) { Checks.check(maxLimit == 0 || limit <= maxLimit, "Limit must not exceed %d!", maxLimit); Checks.check(minLimit == 0 || limit >= minLimit, "Limit must be greater or equal to %d", minLimit); synchronized (this.limit) ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "M", "limit", "(", "final", "int", "limit", ")", "{", "Checks", ".", "check", "(", "maxLimit", "==", "0", "||", "limit", "<=", "maxLimit", ",", "\"Limit must not exceed %d!\"", ",", "maxLimit", ")...
Sets the limit that should be used in the next RestAction completion call. <p>The specified limit may not be below the {@link #getMinLimit() Minimum Limit} nor above the {@link #getMaxLimit() Maximum Limit}. Unless these limits are specifically omitted. (See documentation of methods) <p><b>This limit represents how m...
[ "Sets", "the", "limit", "that", "should", "be", "used", "in", "the", "next", "RestAction", "completion", "call", "." ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/pagination/PaginationAction.java#L228-L239
31,067
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/renderer/BubbleChartRenderer.java
BubbleChartRenderer.processBubble
private float processBubble(BubbleValue bubbleValue, PointF point) { final float rawX = computator.computeRawX(bubbleValue.getX()); final float rawY = computator.computeRawY(bubbleValue.getY()); float radius = (float) Math.sqrt(Math.abs(bubbleValue.getZ()) / Math.PI); float rawRadius; ...
java
private float processBubble(BubbleValue bubbleValue, PointF point) { final float rawX = computator.computeRawX(bubbleValue.getX()); final float rawY = computator.computeRawY(bubbleValue.getY()); float radius = (float) Math.sqrt(Math.abs(bubbleValue.getZ()) / Math.PI); float rawRadius; ...
[ "private", "float", "processBubble", "(", "BubbleValue", "bubbleValue", ",", "PointF", "point", ")", "{", "final", "float", "rawX", "=", "computator", ".", "computeRawX", "(", "bubbleValue", ".", "getX", "(", ")", ")", ";", "final", "float", "rawY", "=", "...
Calculate bubble radius and center x and y coordinates. Center x and x will be stored in point parameter, radius will be returned as float value.
[ "Calculate", "bubble", "radius", "and", "center", "x", "and", "y", "coordinates", ".", "Center", "x", "and", "x", "will", "be", "stored", "in", "point", "parameter", "radius", "will", "be", "returned", "as", "float", "value", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/renderer/BubbleChartRenderer.java#L240-L262
31,068
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java
FloatUtils.nextUpF
public static float nextUpF(float f) { if (Float.isNaN(f) || f == Float.POSITIVE_INFINITY) { return f; } else { f += 0.0f; return Float.intBitsToFloat(Float.floatToRawIntBits(f) + ((f >= 0.0f) ? +1 : -1)); } }
java
public static float nextUpF(float f) { if (Float.isNaN(f) || f == Float.POSITIVE_INFINITY) { return f; } else { f += 0.0f; return Float.intBitsToFloat(Float.floatToRawIntBits(f) + ((f >= 0.0f) ? +1 : -1)); } }
[ "public", "static", "float", "nextUpF", "(", "float", "f", ")", "{", "if", "(", "Float", ".", "isNaN", "(", "f", ")", "||", "f", "==", "Float", ".", "POSITIVE_INFINITY", ")", "{", "return", "f", ";", "}", "else", "{", "f", "+=", "0.0f", ";", "ret...
Returns next bigger float value considering precision of the argument.
[ "Returns", "next", "bigger", "float", "value", "considering", "precision", "of", "the", "argument", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java#L9-L16
31,069
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java
FloatUtils.nextDownF
public static float nextDownF(float f) { if (Float.isNaN(f) || f == Float.NEGATIVE_INFINITY) { return f; } else { if (f == 0.0f) { return -Float.MIN_VALUE; } else { return Float.intBitsToFloat(Float.floatToRawIntBits(f) + ((f > 0.0f) ? ...
java
public static float nextDownF(float f) { if (Float.isNaN(f) || f == Float.NEGATIVE_INFINITY) { return f; } else { if (f == 0.0f) { return -Float.MIN_VALUE; } else { return Float.intBitsToFloat(Float.floatToRawIntBits(f) + ((f > 0.0f) ? ...
[ "public", "static", "float", "nextDownF", "(", "float", "f", ")", "{", "if", "(", "Float", ".", "isNaN", "(", "f", ")", "||", "f", "==", "Float", ".", "NEGATIVE_INFINITY", ")", "{", "return", "f", ";", "}", "else", "{", "if", "(", "f", "==", "0.0...
Returns next smaller float value considering precision of the argument.
[ "Returns", "next", "smaller", "float", "value", "considering", "precision", "of", "the", "argument", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java#L21-L31
31,070
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java
FloatUtils.nextUp
public static double nextUp(double d) { if (Double.isNaN(d) || d == Double.POSITIVE_INFINITY) { return d; } else { d += 0.0; return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + ((d >= 0.0) ? +1 : -1)); } }
java
public static double nextUp(double d) { if (Double.isNaN(d) || d == Double.POSITIVE_INFINITY) { return d; } else { d += 0.0; return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + ((d >= 0.0) ? +1 : -1)); } }
[ "public", "static", "double", "nextUp", "(", "double", "d", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "d", ")", "||", "d", "==", "Double", ".", "POSITIVE_INFINITY", ")", "{", "return", "d", ";", "}", "else", "{", "d", "+=", "0.0", ";", "r...
Returns next bigger double value considering precision of the argument.
[ "Returns", "next", "bigger", "double", "value", "considering", "precision", "of", "the", "argument", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java#L36-L43
31,071
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java
FloatUtils.almostEqual
public static boolean almostEqual(float a, float b, float absoluteDiff, float relativeDiff) { float diff = Math.abs(a - b); if (diff <= absoluteDiff) { return true; } a = Math.abs(a); b = Math.abs(b); float largest = (a > b) ? a : b; if (diff <= larg...
java
public static boolean almostEqual(float a, float b, float absoluteDiff, float relativeDiff) { float diff = Math.abs(a - b); if (diff <= absoluteDiff) { return true; } a = Math.abs(a); b = Math.abs(b); float largest = (a > b) ? a : b; if (diff <= larg...
[ "public", "static", "boolean", "almostEqual", "(", "float", "a", ",", "float", "b", ",", "float", "absoluteDiff", ",", "float", "relativeDiff", ")", "{", "float", "diff", "=", "Math", ".", "abs", "(", "a", "-", "b", ")", ";", "if", "(", "diff", "<=",...
Method checks if two float numbers are similar.
[ "Method", "checks", "if", "two", "float", "numbers", "are", "similar", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java#L63-L78
31,072
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java
FloatUtils.computeAutoGeneratedAxisValues
public static void computeAutoGeneratedAxisValues(float start, float stop, int steps, AxisAutoValues outValues) { double range = stop - start; if (steps == 0 || range <= 0) { outValues.values = new float[]{}; outValues.valuesNumber = 0; return; } doub...
java
public static void computeAutoGeneratedAxisValues(float start, float stop, int steps, AxisAutoValues outValues) { double range = stop - start; if (steps == 0 || range <= 0) { outValues.values = new float[]{}; outValues.valuesNumber = 0; return; } doub...
[ "public", "static", "void", "computeAutoGeneratedAxisValues", "(", "float", "start", ",", "float", "stop", ",", "int", "steps", ",", "AxisAutoValues", "outValues", ")", "{", "double", "range", "=", "stop", "-", "start", ";", "if", "(", "steps", "==", "0", ...
Computes the set of axis labels to show given start and stop boundaries and an ideal number of stops between these boundaries. @param start The minimum extreme (e.g. the left edge) for the axis. @param stop The maximum extreme (e.g. the right edge) for the axis. @param steps The ideal number of stops to c...
[ "Computes", "the", "set", "of", "axis", "labels", "to", "show", "given", "start", "and", "stop", "boundaries", "and", "an", "ideal", "number", "of", "stops", "between", "these", "boundaries", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/util/FloatUtils.java#L152-L195
31,073
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.setContentRect
public void setContentRect(int width, int height, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) { chartWidth = width; chartHeight = height; maxContentRect.set(paddingLeft, paddingTop, width - paddingRight, height - paddingBottom); co...
java
public void setContentRect(int width, int height, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) { chartWidth = width; chartHeight = height; maxContentRect.set(paddingLeft, paddingTop, width - paddingRight, height - paddingBottom); co...
[ "public", "void", "setContentRect", "(", "int", "width", ",", "int", "height", ",", "int", "paddingLeft", ",", "int", "paddingTop", ",", "int", "paddingRight", ",", "int", "paddingBottom", ")", "{", "chartWidth", "=", "width", ";", "chartHeight", "=", "heigh...
Calculates available width and height. Should be called when chart dimensions change. ContentRect is relative to chart view not the device's screen.
[ "Calculates", "available", "width", "and", "height", ".", "Should", "be", "called", "when", "chart", "dimensions", "change", ".", "ContentRect", "is", "relative", "to", "chart", "view", "not", "the", "device", "s", "screen", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L46-L53
31,074
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.constrainViewport
public void constrainViewport(float left, float top, float right, float bottom) { if (right - left < minViewportWidth) { // Minimum width - constrain horizontal zoom! right = left + minViewportWidth; if (left < maxViewport.left) { left = maxViewport.left; ...
java
public void constrainViewport(float left, float top, float right, float bottom) { if (right - left < minViewportWidth) { // Minimum width - constrain horizontal zoom! right = left + minViewportWidth; if (left < maxViewport.left) { left = maxViewport.left; ...
[ "public", "void", "constrainViewport", "(", "float", "left", ",", "float", "top", ",", "float", "right", ",", "float", "bottom", ")", "{", "if", "(", "right", "-", "left", "<", "minViewportWidth", ")", "{", "// Minimum width - constrain horizontal zoom!", "right...
Checks if new viewport doesn't exceed max available viewport.
[ "Checks", "if", "new", "viewport", "doesn", "t", "exceed", "max", "available", "viewport", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L79-L111
31,075
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.computeRawX
public float computeRawX(float valueX) { // TODO: (contentRectMinusAllMargins.width() / currentViewport.width()) can be recalculated only when viewport // change. final float pixelOffset = (valueX - currentViewport.left) * (contentRectMinusAllMargins.width() / currentViewport.wid...
java
public float computeRawX(float valueX) { // TODO: (contentRectMinusAllMargins.width() / currentViewport.width()) can be recalculated only when viewport // change. final float pixelOffset = (valueX - currentViewport.left) * (contentRectMinusAllMargins.width() / currentViewport.wid...
[ "public", "float", "computeRawX", "(", "float", "valueX", ")", "{", "// TODO: (contentRectMinusAllMargins.width() / currentViewport.width()) can be recalculated only when viewport", "// change.", "final", "float", "pixelOffset", "=", "(", "valueX", "-", "currentViewport", ".", ...
Translates chart value into raw pixel value. Returned value is absolute pixel X coordinate. If this method return 0 that means left most pixel of the screen.
[ "Translates", "chart", "value", "into", "raw", "pixel", "value", ".", "Returned", "value", "is", "absolute", "pixel", "X", "coordinate", ".", "If", "this", "method", "return", "0", "that", "means", "left", "most", "pixel", "of", "the", "screen", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L137-L143
31,076
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.computeRawY
public float computeRawY(float valueY) { final float pixelOffset = (valueY - currentViewport.bottom) * (contentRectMinusAllMargins.height() / currentViewport.height()); return contentRectMinusAllMargins.bottom - pixelOffset; }
java
public float computeRawY(float valueY) { final float pixelOffset = (valueY - currentViewport.bottom) * (contentRectMinusAllMargins.height() / currentViewport.height()); return contentRectMinusAllMargins.bottom - pixelOffset; }
[ "public", "float", "computeRawY", "(", "float", "valueY", ")", "{", "final", "float", "pixelOffset", "=", "(", "valueY", "-", "currentViewport", ".", "bottom", ")", "*", "(", "contentRectMinusAllMargins", ".", "height", "(", ")", "/", "currentViewport", ".", ...
Translates chart value into raw pixel value. Returned value is absolute pixel Y coordinate. If this method return 0 that means top most pixel of the screen.
[ "Translates", "chart", "value", "into", "raw", "pixel", "value", ".", "Returned", "value", "is", "absolute", "pixel", "Y", "coordinate", ".", "If", "this", "method", "return", "0", "that", "means", "top", "most", "pixel", "of", "the", "screen", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L150-L154
31,077
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.isWithinContentRect
public boolean isWithinContentRect(float x, float y, float precision) { if (x >= contentRectMinusAllMargins.left - precision && x <= contentRectMinusAllMargins.right + precision) { if (y <= contentRectMinusAllMargins.bottom + precision && y >= contentRectMinusAllMargins.top - pre...
java
public boolean isWithinContentRect(float x, float y, float precision) { if (x >= contentRectMinusAllMargins.left - precision && x <= contentRectMinusAllMargins.right + precision) { if (y <= contentRectMinusAllMargins.bottom + precision && y >= contentRectMinusAllMargins.top - pre...
[ "public", "boolean", "isWithinContentRect", "(", "float", "x", ",", "float", "y", ",", "float", "precision", ")", "{", "if", "(", "x", ">=", "contentRectMinusAllMargins", ".", "left", "-", "precision", "&&", "x", "<=", "contentRectMinusAllMargins", ".", "right...
Check if given coordinates lies inside contentRectMinusAllMargins.
[ "Check", "if", "given", "coordinates", "lies", "inside", "contentRectMinusAllMargins", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L203-L211
31,078
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.setCurrentViewport
public void setCurrentViewport(Viewport viewport) { constrainViewport(viewport.left, viewport.top, viewport.right, viewport.bottom); }
java
public void setCurrentViewport(Viewport viewport) { constrainViewport(viewport.left, viewport.top, viewport.right, viewport.bottom); }
[ "public", "void", "setCurrentViewport", "(", "Viewport", "viewport", ")", "{", "constrainViewport", "(", "viewport", ".", "left", ",", "viewport", ".", "top", ",", "viewport", ".", "right", ",", "viewport", ".", "bottom", ")", ";", "}" ]
Set current viewport to the same values as viewport passed in parameter. This method use deep copy so parameter can be safely modified later. Current viewport must be equal or smaller than maximum viewport. @param viewport
[ "Set", "current", "viewport", "to", "the", "same", "values", "as", "viewport", "passed", "in", "parameter", ".", "This", "method", "use", "deep", "copy", "so", "parameter", "can", "be", "safely", "modified", "later", ".", "Current", "viewport", "must", "be",...
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L248-L250
31,079
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.setCurrentViewport
public void setCurrentViewport(float left, float top, float right, float bottom) { constrainViewport(left, top, right, bottom); }
java
public void setCurrentViewport(float left, float top, float right, float bottom) { constrainViewport(left, top, right, bottom); }
[ "public", "void", "setCurrentViewport", "(", "float", "left", ",", "float", "top", ",", "float", "right", ",", "float", "bottom", ")", "{", "constrainViewport", "(", "left", ",", "top", ",", "right", ",", "bottom", ")", ";", "}" ]
Set new values for curent viewport, that will change what part of chart is visible. Current viewport must be equal or smaller than maximum viewport.
[ "Set", "new", "values", "for", "curent", "viewport", "that", "will", "change", "what", "part", "of", "chart", "is", "visible", ".", "Current", "viewport", "must", "be", "equal", "or", "smaller", "than", "maximum", "viewport", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L256-L258
31,080
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.setMaxViewport
public void setMaxViewport(Viewport maxViewport) { setMaxViewport(maxViewport.left, maxViewport.top, maxViewport.right, maxViewport.bottom); }
java
public void setMaxViewport(Viewport maxViewport) { setMaxViewport(maxViewport.left, maxViewport.top, maxViewport.right, maxViewport.bottom); }
[ "public", "void", "setMaxViewport", "(", "Viewport", "maxViewport", ")", "{", "setMaxViewport", "(", "maxViewport", ".", "left", ",", "maxViewport", ".", "top", ",", "maxViewport", ".", "right", ",", "maxViewport", ".", "bottom", ")", ";", "}" ]
Set maximum viewport to the same values as viewport passed in parameter. This method use deep copy so parameter can be safely modified later. @param maxViewport
[ "Set", "maximum", "viewport", "to", "the", "same", "values", "as", "viewport", "passed", "in", "parameter", ".", "This", "method", "use", "deep", "copy", "so", "parameter", "can", "be", "safely", "modified", "later", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L273-L275
31,081
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.setMaxViewport
public void setMaxViewport(float left, float top, float right, float bottom) { this.maxViewport.set(left, top, right, bottom); computeMinimumWidthAndHeight(); }
java
public void setMaxViewport(float left, float top, float right, float bottom) { this.maxViewport.set(left, top, right, bottom); computeMinimumWidthAndHeight(); }
[ "public", "void", "setMaxViewport", "(", "float", "left", ",", "float", "top", ",", "float", "right", ",", "float", "bottom", ")", "{", "this", ".", "maxViewport", ".", "set", "(", "left", ",", "top", ",", "right", ",", "bottom", ")", ";", "computeMini...
Set new values for maximum viewport, that will change what part of chart is visible.
[ "Set", "new", "values", "for", "maximum", "viewport", "that", "will", "change", "what", "part", "of", "chart", "is", "visible", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L280-L283
31,082
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/gesture/ZoomerCompat.java
ZoomerCompat.computeZoom
public boolean computeZoom() { if (mFinished) { return false; } long tRTC = SystemClock.elapsedRealtime() - mStartRTC; if (tRTC >= mAnimationDurationMillis) { mFinished = true; mCurrentZoom = mEndZoom; return false; } floa...
java
public boolean computeZoom() { if (mFinished) { return false; } long tRTC = SystemClock.elapsedRealtime() - mStartRTC; if (tRTC >= mAnimationDurationMillis) { mFinished = true; mCurrentZoom = mEndZoom; return false; } floa...
[ "public", "boolean", "computeZoom", "(", ")", "{", "if", "(", "mFinished", ")", "{", "return", "false", ";", "}", "long", "tRTC", "=", "SystemClock", ".", "elapsedRealtime", "(", ")", "-", "mStartRTC", ";", "if", "(", "tRTC", ">=", "mAnimationDurationMilli...
Computes the current zoom level, returning true if the zoom is still active and false if the zoom has finished. @see android.widget.Scroller#computeScrollOffset()
[ "Computes", "the", "current", "zoom", "level", "returning", "true", "if", "the", "zoom", "is", "still", "active", "and", "false", "if", "the", "zoom", "has", "finished", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/gesture/ZoomerCompat.java#L103-L118
31,083
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java
Axis.generateAxisFromRange
public static Axis generateAxisFromRange(float start, float stop, float step) { List<AxisValue> values = new ArrayList<AxisValue>(); for (float value = start; value <= stop; value += step) { AxisValue axisValue = new AxisValue(value); values.add(axisValue); } Ax...
java
public static Axis generateAxisFromRange(float start, float stop, float step) { List<AxisValue> values = new ArrayList<AxisValue>(); for (float value = start; value <= stop; value += step) { AxisValue axisValue = new AxisValue(value); values.add(axisValue); } Ax...
[ "public", "static", "Axis", "generateAxisFromRange", "(", "float", "start", ",", "float", "stop", ",", "float", "step", ")", "{", "List", "<", "AxisValue", ">", "values", "=", "new", "ArrayList", "<", "AxisValue", ">", "(", ")", ";", "for", "(", "float",...
Generates Axis with values from start to stop inclusive.
[ "Generates", "Axis", "with", "values", "from", "start", "to", "stop", "inclusive", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java#L112-L122
31,084
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java
Axis.generateAxisFromCollection
public static Axis generateAxisFromCollection(List<Float> axisValues) { List<AxisValue> values = new ArrayList<AxisValue>(); int index = 0; for (float value : axisValues) { AxisValue axisValue = new AxisValue(value); values.add(axisValue); ++index; } ...
java
public static Axis generateAxisFromCollection(List<Float> axisValues) { List<AxisValue> values = new ArrayList<AxisValue>(); int index = 0; for (float value : axisValues) { AxisValue axisValue = new AxisValue(value); values.add(axisValue); ++index; } ...
[ "public", "static", "Axis", "generateAxisFromCollection", "(", "List", "<", "Float", ">", "axisValues", ")", "{", "List", "<", "AxisValue", ">", "values", "=", "new", "ArrayList", "<", "AxisValue", ">", "(", ")", ";", "int", "index", "=", "0", ";", "for"...
Generates Axis with values from given list.
[ "Generates", "Axis", "with", "values", "from", "given", "list", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java#L127-L138
31,085
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java
Axis.generateAxisFromCollection
public static Axis generateAxisFromCollection(List<Float> axisValues, List<String> axisValuesLabels) { if (axisValues.size() != axisValuesLabels.size()) { throw new IllegalArgumentException("Values and labels lists must have the same size!"); } List<AxisValue> values = new ArrayList...
java
public static Axis generateAxisFromCollection(List<Float> axisValues, List<String> axisValuesLabels) { if (axisValues.size() != axisValuesLabels.size()) { throw new IllegalArgumentException("Values and labels lists must have the same size!"); } List<AxisValue> values = new ArrayList...
[ "public", "static", "Axis", "generateAxisFromCollection", "(", "List", "<", "Float", ">", "axisValues", ",", "List", "<", "String", ">", "axisValuesLabels", ")", "{", "if", "(", "axisValues", ".", "size", "(", ")", "!=", "axisValuesLabels", ".", "size", "(",...
Generates Axis with values and labels from given lists, both lists must have the same size.
[ "Generates", "Axis", "with", "values", "and", "labels", "from", "given", "lists", "both", "lists", "must", "have", "the", "same", "size", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java#L143-L158
31,086
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/renderer/AbstractChartRenderer.java
AbstractChartRenderer.drawLabelTextAndBackground
protected void drawLabelTextAndBackground(Canvas canvas, char[] labelBuffer, int startIndex, int numChars, int autoBackgroundColor) { final float textX; final float textY; if (isValueLabelBackgroundEnabled) { if (isValueLabelBackgroundA...
java
protected void drawLabelTextAndBackground(Canvas canvas, char[] labelBuffer, int startIndex, int numChars, int autoBackgroundColor) { final float textX; final float textY; if (isValueLabelBackgroundEnabled) { if (isValueLabelBackgroundA...
[ "protected", "void", "drawLabelTextAndBackground", "(", "Canvas", "canvas", ",", "char", "[", "]", "labelBuffer", ",", "int", "startIndex", ",", "int", "numChars", ",", "int", "autoBackgroundColor", ")", "{", "final", "float", "textX", ";", "final", "float", "...
Draws label text and label background if isValueLabelBackgroundEnabled is true.
[ "Draws", "label", "text", "and", "label", "background", "if", "isValueLabelBackgroundEnabled", "is", "true", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/renderer/AbstractChartRenderer.java#L104-L125
31,087
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/model/Viewport.java
Viewport.set
public void set(Viewport src) { this.left = src.left; this.top = src.top; this.right = src.right; this.bottom = src.bottom; }
java
public void set(Viewport src) { this.left = src.left; this.top = src.top; this.right = src.right; this.bottom = src.bottom; }
[ "public", "void", "set", "(", "Viewport", "src", ")", "{", "this", ".", "left", "=", "src", ".", "left", ";", "this", ".", "top", "=", "src", ".", "top", ";", "this", ".", "right", "=", "src", ".", "right", ";", "this", ".", "bottom", "=", "src...
Copy the coordinates from src into this viewport. @param src The viewport whose coordinates are copied into this viewport.
[ "Copy", "the", "coordinates", "from", "src", "into", "this", "viewport", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/model/Viewport.java#L162-L167
31,088
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/model/Viewport.java
Viewport.contains
public boolean contains(Viewport v) { // check for empty first return this.left < this.right && this.bottom < this.top // now check for containment && left <= v.left && top >= v.top && right >= v.right && bottom <= v.bottom; }
java
public boolean contains(Viewport v) { // check for empty first return this.left < this.right && this.bottom < this.top // now check for containment && left <= v.left && top >= v.top && right >= v.right && bottom <= v.bottom; }
[ "public", "boolean", "contains", "(", "Viewport", "v", ")", "{", "// check for empty first", "return", "this", ".", "left", "<", "this", ".", "right", "&&", "this", ".", "bottom", "<", "this", ".", "top", "// now check for containment", "&&", "left", "<=", "...
Returns true iff the specified viewport r is inside or equal to this viewport. An empty viewport never contains another viewport. @param v The viewport being tested for containment. @return true iff the specified viewport r is inside or equal to this viewport
[ "Returns", "true", "iff", "the", "specified", "viewport", "r", "is", "inside", "or", "equal", "to", "this", "viewport", ".", "An", "empty", "viewport", "never", "contains", "another", "viewport", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/model/Viewport.java#L250-L255
31,089
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/renderer/AxesRenderer.java
AxesRenderer.drawInForeground
public void drawInForeground(Canvas canvas) { Axis axis = chart.getChartData().getAxisYLeft(); if (null != axis) { drawAxisLabelsAndName(canvas, axis, LEFT); } axis = chart.getChartData().getAxisYRight(); if (null != axis) { drawAxisLabelsAndName(canvas, ...
java
public void drawInForeground(Canvas canvas) { Axis axis = chart.getChartData().getAxisYLeft(); if (null != axis) { drawAxisLabelsAndName(canvas, axis, LEFT); } axis = chart.getChartData().getAxisYRight(); if (null != axis) { drawAxisLabelsAndName(canvas, ...
[ "public", "void", "drawInForeground", "(", "Canvas", "canvas", ")", "{", "Axis", "axis", "=", "chart", ".", "getChartData", "(", ")", ".", "getAxisYLeft", "(", ")", ";", "if", "(", "null", "!=", "axis", ")", "{", "drawAxisLabelsAndName", "(", "canvas", "...
Draw axes labels and names in the foreground. @param canvas
[ "Draw", "axes", "labels", "and", "names", "in", "the", "foreground", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/renderer/AxesRenderer.java#L375-L395
31,090
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/renderer/LineChartRenderer.java
LineChartRenderer.drawPoints
private void drawPoints(Canvas canvas, Line line, int lineIndex, int mode) { pointPaint.setColor(line.getPointColor()); int valueIndex = 0; for (PointValue pointValue : line.getValues()) { int pointRadius = ChartUtils.dp2px(density, line.getPointRadius()); final float raw...
java
private void drawPoints(Canvas canvas, Line line, int lineIndex, int mode) { pointPaint.setColor(line.getPointColor()); int valueIndex = 0; for (PointValue pointValue : line.getValues()) { int pointRadius = ChartUtils.dp2px(density, line.getPointRadius()); final float raw...
[ "private", "void", "drawPoints", "(", "Canvas", "canvas", ",", "Line", "line", ",", "int", "lineIndex", ",", "int", "mode", ")", "{", "pointPaint", ".", "setColor", "(", "line", ".", "getPointColor", "(", ")", ")", ";", "int", "valueIndex", "=", "0", "...
implementing point styles.
[ "implementing", "point", "styles", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/renderer/LineChartRenderer.java#L371-L395
31,091
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/view/AbstractChartView.java
AbstractChartView.canScrollHorizontally
@Override public boolean canScrollHorizontally(int direction) { if (getZoomLevel() <= 1.0) { return false; } final Viewport currentViewport = getCurrentViewport(); final Viewport maximumViewport = getMaximumViewport(); if (direction < 0) { return curre...
java
@Override public boolean canScrollHorizontally(int direction) { if (getZoomLevel() <= 1.0) { return false; } final Viewport currentViewport = getCurrentViewport(); final Viewport maximumViewport = getMaximumViewport(); if (direction < 0) { return curre...
[ "@", "Override", "public", "boolean", "canScrollHorizontally", "(", "int", "direction", ")", "{", "if", "(", "getZoomLevel", "(", ")", "<=", "1.0", ")", "{", "return", "false", ";", "}", "final", "Viewport", "currentViewport", "=", "getCurrentViewport", "(", ...
When embedded in a ViewPager, this will be called in order to know if we can scroll. If this returns true, the ViewPager will ignore the drag so that we can scroll our content. If this return false, the ViewPager will assume we won't be able to scroll and will consume the drag @param direction Amount of pixels being s...
[ "When", "embedded", "in", "a", "ViewPager", "this", "will", "be", "called", "in", "order", "to", "know", "if", "we", "can", "scroll", ".", "If", "this", "returns", "true", "the", "ViewPager", "will", "ignore", "the", "drag", "so", "that", "we", "can", ...
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/view/AbstractChartView.java#L494-L506
31,092
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/renderer/PieChartRenderer.java
PieChartRenderer.pointToAngle
private float pointToAngle(float x, float y, float centerX, float centerY) { double diffX = x - centerX; double diffY = y - centerY; // Pass -diffX to get clockwise degrees order. double radian = Math.atan2(-diffX, diffY); float angle = ((float) Math.toDegrees(radian) + 360) % 3...
java
private float pointToAngle(float x, float y, float centerX, float centerY) { double diffX = x - centerX; double diffY = y - centerY; // Pass -diffX to get clockwise degrees order. double radian = Math.atan2(-diffX, diffY); float angle = ((float) Math.toDegrees(radian) + 360) % 3...
[ "private", "float", "pointToAngle", "(", "float", "x", ",", "float", "y", ",", "float", "centerX", ",", "float", "centerY", ")", "{", "double", "diffX", "=", "x", "-", "centerX", ";", "double", "diffY", "=", "y", "-", "centerY", ";", "// Pass -diffX to g...
Calculates angle of touched point.
[ "Calculates", "angle", "of", "touched", "point", "." ]
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/renderer/PieChartRenderer.java#L410-L420
31,093
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/renderer/PieChartRenderer.java
PieChartRenderer.calculateMaxViewport
private void calculateMaxViewport() { tempMaximumViewport.set(0, MAX_WIDTH_HEIGHT, MAX_WIDTH_HEIGHT, 0); maxSum = 0.0f; for (SliceValue sliceValue : dataProvider.getPieChartData().getValues()) { maxSum += Math.abs(sliceValue.getValue()); } }
java
private void calculateMaxViewport() { tempMaximumViewport.set(0, MAX_WIDTH_HEIGHT, MAX_WIDTH_HEIGHT, 0); maxSum = 0.0f; for (SliceValue sliceValue : dataProvider.getPieChartData().getValues()) { maxSum += Math.abs(sliceValue.getValue()); } }
[ "private", "void", "calculateMaxViewport", "(", ")", "{", "tempMaximumViewport", ".", "set", "(", "0", ",", "MAX_WIDTH_HEIGHT", ",", "MAX_WIDTH_HEIGHT", ",", "0", ")", ";", "maxSum", "=", "0.0f", ";", "for", "(", "SliceValue", "sliceValue", ":", "dataProvider"...
Viewport is not really important for PieChart, this kind of chart doesn't relay on viewport but uses pixels coordinates instead. This method also calculates sum of all SliceValues.
[ "Viewport", "is", "not", "really", "important", "for", "PieChart", "this", "kind", "of", "chart", "doesn", "t", "relay", "on", "viewport", "but", "uses", "pixels", "coordinates", "instead", ".", "This", "method", "also", "calculates", "sum", "of", "all", "Sl...
c41419c9afa097452dee823c7eba0e5136aa96bd
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/renderer/PieChartRenderer.java#L443-L449
31,094
openwms/org.openwms
org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java
AbstractWebController.translate
protected String translate(String key, Object... objects) { return messageSource.getMessage(key, objects, null); }
java
protected String translate(String key, Object... objects) { return messageSource.getMessage(key, objects, null); }
[ "protected", "String", "translate", "(", "String", "key", ",", "Object", "...", "objects", ")", "{", "return", "messageSource", ".", "getMessage", "(", "key", ",", "objects", ",", "null", ")", ";", "}" ]
Get the messageSource. @param key The error code to search message text for @param objects Any arguments that are passed into the message text @return the messageSource.
[ "Get", "the", "messageSource", "." ]
b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e
https://github.com/openwms/org.openwms/blob/b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java#L131-L133
31,095
openwms/org.openwms
org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java
AbstractWebController.buildOKResponse
protected <T extends AbstractBase> ResponseEntity<Response<T>> buildOKResponse(T... params) { return buildResponse(HttpStatus.OK, "", "", params); }
java
protected <T extends AbstractBase> ResponseEntity<Response<T>> buildOKResponse(T... params) { return buildResponse(HttpStatus.OK, "", "", params); }
[ "protected", "<", "T", "extends", "AbstractBase", ">", "ResponseEntity", "<", "Response", "<", "T", ">", ">", "buildOKResponse", "(", "T", "...", "params", ")", "{", "return", "buildResponse", "(", "HttpStatus", ".", "OK", ",", "\"\"", ",", "\"\"", ",", ...
Build an response object that signals a success response to the caller. @param <T> Some type extending the AbstractBase entity @param params A set of Serializable objects that are passed to the caller @return A ResponseEntity with status {@link HttpStatus#OK}
[ "Build", "an", "response", "object", "that", "signals", "a", "success", "response", "to", "the", "caller", "." ]
b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e
https://github.com/openwms/org.openwms/blob/b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java#L173-L175
31,096
openwms/org.openwms
org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java
AbstractWebController.getLocationForCreatedResource
protected String getLocationForCreatedResource(HttpServletRequest req, String objId) { StringBuffer url = req.getRequestURL(); UriTemplate template = new UriTemplate(url.append("/{objId}/").toString()); return template.expand(objId).toASCIIString(); }
java
protected String getLocationForCreatedResource(HttpServletRequest req, String objId) { StringBuffer url = req.getRequestURL(); UriTemplate template = new UriTemplate(url.append("/{objId}/").toString()); return template.expand(objId).toASCIIString(); }
[ "protected", "String", "getLocationForCreatedResource", "(", "HttpServletRequest", "req", ",", "String", "objId", ")", "{", "StringBuffer", "url", "=", "req", ".", "getRequestURL", "(", ")", ";", "UriTemplate", "template", "=", "new", "UriTemplate", "(", "url", ...
Append the ID of the object that was created to the original request URL and return it. @param req The HttpServletRequest object @param objId The ID to append @return The complete appended URL
[ "Append", "the", "ID", "of", "the", "object", "that", "was", "created", "to", "the", "original", "request", "URL", "and", "return", "it", "." ]
b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e
https://github.com/openwms/org.openwms/blob/b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java#L211-L215
31,097
docker-java/docker-java
src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java
DefaultDockerClientConfig.overrideDockerPropertiesWithSystemProperties
private static Properties overrideDockerPropertiesWithSystemProperties(Properties p, Properties systemProperties) { Properties overriddenProperties = new Properties(); overriddenProperties.putAll(p); for (String key : CONFIG_KEYS) { if (systemProperties.containsKey(key)) { ...
java
private static Properties overrideDockerPropertiesWithSystemProperties(Properties p, Properties systemProperties) { Properties overriddenProperties = new Properties(); overriddenProperties.putAll(p); for (String key : CONFIG_KEYS) { if (systemProperties.containsKey(key)) { ...
[ "private", "static", "Properties", "overrideDockerPropertiesWithSystemProperties", "(", "Properties", "p", ",", "Properties", "systemProperties", ")", "{", "Properties", "overriddenProperties", "=", "new", "Properties", "(", ")", ";", "overriddenProperties", ".", "putAll"...
Creates a new Properties object containing values overridden from the System properties @param p The original set of properties to override @return A copy of the original Properties with overridden values
[ "Creates", "a", "new", "Properties", "object", "containing", "values", "overridden", "from", "the", "System", "properties" ]
c5c89327108abdc50aa41d7711d4743b8bac75fe
https://github.com/docker-java/docker-java/blob/c5c89327108abdc50aa41d7711d4743b8bac75fe/src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java#L179-L189
31,098
docker-java/docker-java
src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java
DefaultDockerClientConfig.createDefaultConfigBuilder
static Builder createDefaultConfigBuilder(Map<String, String> env, Properties systemProperties) { Properties properties = loadIncludedDockerProperties(systemProperties); properties = overrideDockerPropertiesWithSettingsFromUserHome(properties, systemProperties); properties = overrideDockerProper...
java
static Builder createDefaultConfigBuilder(Map<String, String> env, Properties systemProperties) { Properties properties = loadIncludedDockerProperties(systemProperties); properties = overrideDockerPropertiesWithSettingsFromUserHome(properties, systemProperties); properties = overrideDockerProper...
[ "static", "Builder", "createDefaultConfigBuilder", "(", "Map", "<", "String", ",", "String", ">", "env", ",", "Properties", "systemProperties", ")", "{", "Properties", "properties", "=", "loadIncludedDockerProperties", "(", "systemProperties", ")", ";", "properties", ...
Allows you to build the config without system environment interfering for more robust testing
[ "Allows", "you", "to", "build", "the", "config", "without", "system", "environment", "interfering", "for", "more", "robust", "testing" ]
c5c89327108abdc50aa41d7711d4743b8bac75fe
https://github.com/docker-java/docker-java/blob/c5c89327108abdc50aa41d7711d4743b8bac75fe/src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java#L198-L204
31,099
docker-java/docker-java
src/main/java/com/github/dockerjava/core/KeystoreSSLConfig.java
KeystoreSSLConfig.getSSLContext
@Override public SSLContext getSSLContext() throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { final SSLContext context = SSLContext.getInstance("TLS"); String httpProtocols = System.getProperty("https.protocols"); System.set...
java
@Override public SSLContext getSSLContext() throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { final SSLContext context = SSLContext.getInstance("TLS"); String httpProtocols = System.getProperty("https.protocols"); System.set...
[ "@", "Override", "public", "SSLContext", "getSSLContext", "(", ")", "throws", "KeyManagementException", ",", "UnrecoverableKeyException", ",", "NoSuchAlgorithmException", ",", "KeyStoreException", "{", "final", "SSLContext", "context", "=", "SSLContext", ".", "getInstance...
Get the SSL Context out of the keystore. @return java SSLContext @throws KeyManagementException @throws UnrecoverableKeyException @throws NoSuchAlgorithmException @throws KeyStoreException
[ "Get", "the", "SSL", "Context", "out", "of", "the", "keystore", "." ]
c5c89327108abdc50aa41d7711d4743b8bac75fe
https://github.com/docker-java/docker-java/blob/c5c89327108abdc50aa41d7711d4743b8bac75fe/src/main/java/com/github/dockerjava/core/KeystoreSSLConfig.java#L75-L111