code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public static Polygon calculateBounds(final MapfishMapContext context) {
double rotation = context.getRootContext().getRotation();
ReferencedEnvelope env = context.getRootContext().toReferencedEnvelope();
Coordinate centre = env.centre();
AffineTransform rotateInstance = AffineTransform... | java |
public static SimpleFeatureType createGridFeatureType(
@Nonnull final MapfishMapContext mapContext,
@Nonnull final Class<? extends Geometry> geomClass) {
final SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
CoordinateReferenceSystem projection = mapContext... | java |
public static String createLabel(final double value, final String unit, final GridLabelFormat format) {
final double zero = 0.000000001;
if (format != null) {
return format.format(value, unit);
} else {
if (Math.abs(value - Math.round(value)) < zero) {
ret... | java |
public static Object parsePrimitive(
final String fieldName, final PrimitiveAttribute<?> pAtt, final PObject requestData) {
Class<?> valueClass = pAtt.getValueClass();
Object value;
try {
value = parseValue(false, new String[0], valueClass, fieldName, requestData);
... | java |
@Override
protected URL getDefinitionsURL() {
try {
URL url = CustomEPSGCodes.class.getResource(CUSTOM_EPSG_CODES_FILE);
// quickly test url
try (InputStream stream = url.openStream()) {
//noinspection ResultOfMethodCallIgnored
stream.read(... | java |
public synchronized void addMapStats(
final MapfishMapContext mapContext, final MapAttribute.MapAttributeValues mapValues) {
this.mapStats.add(new MapStats(mapContext, mapValues));
} | java |
public void addEmailStats(final InternetAddress[] recipients, final boolean storageUsed) {
this.storageUsed = storageUsed;
for (InternetAddress recipient: recipients) {
emailDests.add(recipient.getAddress());
}
} | java |
public String calculateLabelUnit(final CoordinateReferenceSystem mapCrs) {
String unit;
if (this.labelProjection != null) {
unit = this.labelCRS.getCoordinateSystem().getAxis(0).getUnit().toString();
} else {
unit = mapCrs.getCoordinateSystem().getAxis(0).getUnit().toStri... | java |
public MathTransform calculateLabelTransform(final CoordinateReferenceSystem mapCrs) {
MathTransform labelTransform;
if (this.labelProjection != null) {
try {
labelTransform = CRS.findMathTransform(mapCrs, this.labelCRS, true);
} catch (FactoryException e) {
... | java |
public static GridLabelFormat fromConfig(final GridParam param) {
if (param.labelFormat != null) {
return new GridLabelFormat.Simple(param.labelFormat);
} else if (param.valueFormat != null) {
return new GridLabelFormat.Detailed(
param.valueFormat, param.unitF... | java |
@Nullable
public final Credentials toCredentials(final AuthScope authscope) {
try {
if (!matches(MatchInfo.fromAuthScope(authscope))) {
return null;
}
} catch (UnknownHostException | MalformedURLException | SocketException e) {
throw new RuntimeEx... | java |
public final PJsonObject getJSONObject(final int i) {
JSONObject val = this.array.optJSONObject(i);
final String context = "[" + i + "]";
if (val == null) {
throw new ObjectMissingException(this, context);
}
return new PJsonObject(this, val, context);
} | java |
public final PJsonArray getJSONArray(final int i) {
JSONArray val = this.array.optJSONArray(i);
final String context = "[" + i + "]";
if (val == null) {
throw new ObjectMissingException(this, context);
}
return new PJsonArray(this, val, context);
} | java |
@Override
public final int getInt(final int i) {
int val = this.array.optInt(i, Integer.MIN_VALUE);
if (val == Integer.MIN_VALUE) {
throw new ObjectMissingException(this, "[" + i + "]");
}
return val;
} | java |
@Override
public final float getFloat(final int i) {
double val = this.array.optDouble(i, Double.MAX_VALUE);
if (val == Double.MAX_VALUE) {
throw new ObjectMissingException(this, "[" + i + "]");
}
return (float) val;
} | java |
@Override
public final String getString(final int i) {
String val = this.array.optString(i, null);
if (val == null) {
throw new ObjectMissingException(this, "[" + i + "]");
}
return val;
} | java |
@Override
public final boolean getBool(final int i) {
try {
return this.array.getBoolean(i);
} catch (JSONException e) {
throw new ObjectMissingException(this, "[" + i + "]");
}
} | java |
@Override
public final String getString(final String key) {
String result = optString(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
@Override
public final String optString(final String key, final String defaultValue) {
String result = optString(key);
return result == null ? defaultValue : result;
} | java |
@Override
public final int getInt(final String key) {
Integer result = optInt(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
@Override
public final Integer optInt(final String key, final Integer defaultValue) {
Integer result = optInt(key);
return result == null ? defaultValue : result;
} | java |
@Override
public final long getLong(final String key) {
Long result = optLong(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
@Override
public final long optLong(final String key, final long defaultValue) {
Long result = optLong(key);
return result == null ? defaultValue : result;
} | java |
@Override
public final double getDouble(final String key) {
Double result = optDouble(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
@Override
public final Double optDouble(final String key, final Double defaultValue) {
Double result = optDouble(key);
return result == null ? defaultValue : result;
} | java |
@Override
public final float getFloat(final String key) {
Float result = optFloat(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
@Override
public final Float optFloat(final String key, final Float defaultValue) {
Float result = optFloat(key);
return result == null ? defaultValue : result;
} | java |
@Override
public final boolean getBool(final String key) {
Boolean result = optBool(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
@Override
public final Boolean optBool(final String key, final Boolean defaultValue) {
Boolean result = optBool(key);
return result == null ? defaultValue : result;
} | java |
@Override
public final PObject getObject(final String key) {
PObject result = optObject(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
@Override
public final PArray getArray(final String key) {
PArray result = optArray(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | java |
public AccessAssertion unmarshal(final JSONObject encodedAssertion) {
final String className;
try {
className = encodedAssertion.getString(JSON_CLASS_NAME);
final Class<?> assertionClass =
Thread.currentThread().getContextClassLoader().loadClass(className);
... | java |
public JSONObject marshal(final AccessAssertion assertion) {
final JSONObject jsonObject = assertion.marshal();
if (jsonObject.has(JSON_CLASS_NAME)) {
throw new AssertionError("The toJson method in AccessAssertion: '" + assertion.getClass() +
"' d... | java |
public static MfClientHttpRequestFactory createFactoryWrapper(
final MfClientHttpRequestFactory requestFactory,
final UriMatchers matchers, final Map<String, List<String>> headers) {
return new AbstractMfClientHttpRequestFactoryWrapper(requestFactory, matchers, false) {
@Over... | java |
@SuppressWarnings("unchecked")
public void setHeaders(final Map<String, Object> headers) {
this.headers.clear();
for (Map.Entry<String, Object> entry: headers.entrySet()) {
if (entry.getValue() instanceof List) {
List value = (List) entry.getValue();
// ve... | java |
public static void writeProcessorOutputToValues(
final Object output,
final Processor<?, ?> processor,
final Values values) {
Map<String, String> mapper = processor.getOutputMapperBiMap();
if (mapper == null) {
mapper = Collections.emptyMap();
}
... | java |
public static String getInputValueName(
@Nullable final String inputPrefix,
@Nonnull final BiMap<String, String> inputMapper,
@Nonnull final String field) {
String name = inputMapper == null ? null : inputMapper.inverse().get(field);
if (name == null) {
if... | java |
public static String getOutputValueName(
@Nullable final String outputPrefix,
@Nonnull final Map<String, String> outputMapper,
@Nonnull final Field field) {
String name = outputMapper.get(field.getName());
if (name == null) {
name = field.getName();
... | java |
public static Dimension rectangleDoubleToDimension(final Rectangle2D.Double rectangle) {
return new Dimension(
(int) Math.round(rectangle.width),
(int) Math.round(rectangle.height));
} | java |
public MapBounds getRotatedBounds(final Rectangle2D.Double paintAreaPrecise, final Rectangle paintArea) {
final MapBounds rotatedBounds = this.getRotatedBounds();
if (rotatedBounds instanceof CenterScaleMapBounds) {
return rotatedBounds;
}
final ReferencedEnvelope envelope ... | java |
public MapBounds getRotatedBoundsAdjustedForPreciseRotatedMapSize() {
Rectangle2D.Double paintAreaPrecise = getRotatedMapSizePrecise();
Rectangle paintArea = new Rectangle(MapfishMapContext.rectangleDoubleToDimension(paintAreaPrecise));
return getRotatedBounds(paintAreaPrecise, paintArea);
} | java |
@VisibleForTesting
public static void runMain(final String[] args) throws Exception {
final CliHelpDefinition helpCli = new CliHelpDefinition();
try {
Args.parse(helpCli, args);
if (helpCli.help) {
printUsage(0);
return;
}
... | java |
public GridCoverage2D call() {
try {
BufferedImage coverageImage = this.tiledLayer.createBufferedImage(
this.tilePreparationInfo.getImageWidth(),
this.tilePreparationInfo.getImageHeight());
Graphics2D graphics = coverageImage.createGraphics();
... | java |
@PreDestroy
public final void shutdown() {
this.timer.shutdownNow();
this.executor.shutdownNow();
if (this.cleanUpTimer != null) {
this.cleanUpTimer.shutdownNow();
}
} | java |
private boolean isAbandoned(final SubmittedPrintJob printJob) {
final long duration = ThreadPoolJobManager.this.jobQueue.timeSinceLastStatusCheck(
printJob.getEntry().getReferenceId());
final boolean abandoned =
duration > TimeUnit.SECONDS.toMillis(ThreadPoolJobManager.th... | java |
private boolean isAcceptingNewJobs() {
if (this.requestedToStop) {
return false;
} else if (new File(this.workingDirectories.getWorking(), "stop").exists()) {
LOGGER.info("The print has been requested to stop");
this.requestedToStop = true;
notifyIfStopped... | java |
private void notifyIfStopped() {
if (isAcceptingNewJobs() || !this.runningTasksFutures.isEmpty()) {
return;
}
final File stoppedFile = new File(this.workingDirectories.getWorking(), "stopped");
try {
LOGGER.info("The print has finished processing jobs and can now ... | java |
public void postConstruct() {
parseGeometry();
Assert.isTrue(this.polygon != null, "Polygon is null. 'area' string is: '" + this.area + "'");
Assert.isTrue(this.display != null, "'display' is null");
Assert.isTrue(this.style == null || this.display == AoiDisplay.RENDER,
... | java |
public SimpleFeatureCollection areaToFeatureCollection(
@Nonnull final MapAttribute.MapAttributeValues mapAttributes) {
Assert.isTrue(mapAttributes.areaOfInterest == this,
"map attributes passed in does not contain this area of interest object");
final SimpleFeatureTyp... | java |
public AreaOfInterest copy() {
AreaOfInterest aoi = new AreaOfInterest();
aoi.display = this.display;
aoi.area = this.area;
aoi.polygon = this.polygon;
aoi.style = this.style;
aoi.renderAsSvg = this.renderAsSvg;
return aoi;
} | java |
public static void fillProcessorAttributes(
final List<Processor> processors,
final Map<String, Attribute> initialAttributes) {
Map<String, Attribute> currentAttributes = new HashMap<>(initialAttributes);
for (Processor processor: processors) {
if (processor instanceo... | java |
public void checkAllGroupsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (OneOfGroup group: this.mapping.values()) {
if (group.satisfiedBy.isEmpty()) {
errors.append("\n");
errors.append("\t* The OneOf choice: ").append... | java |
@PostConstruct
public final void addMetricsAppenderToLogback() {
final LoggerContext factory = (LoggerContext) LoggerFactory.getILoggerFactory();
final Logger root = factory.getLogger(Logger.ROOT_LOGGER_NAME);
final InstrumentedAppender metrics = new InstrumentedAppender(this.metricRegistry... | java |
public void checkAllRequirementsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (Field field: this.dependantsInJson) {
final Collection<String> requirements = this.dependantToRequirementsMap.get(field);
if (!requirements.isEmpty()) {
... | java |
public final void printClientConfig(final JSONWriter json) throws JSONException {
json.key("layouts");
json.array();
final Map<String, Template> accessibleTemplates = getTemplates();
accessibleTemplates.entrySet().stream().sorted(Comparator.comparing(Map.Entry::getKey))
.... | java |
public final Template getTemplate(final String name) {
final Template template = this.templates.get(name);
if (template != null) {
this.accessAssertion.assertAccess("Configuration", this);
template.assertAccessible(name);
} else {
throw new IllegalArgumentExce... | java |
@Nonnull
public final Style getDefaultStyle(@Nonnull final String geometryType) {
String normalizedGeomName = GEOMETRY_NAME_ALIASES.get(geometryType.toLowerCase());
if (normalizedGeomName == null) {
normalizedGeomName = geometryType.toLowerCase();
}
Style style = this.def... | java |
public final void setDefaultStyle(final Map<String, Style> defaultStyle) {
this.defaultStyle = new HashMap<>(defaultStyle.size());
for (Map.Entry<String, Style> entry: defaultStyle.entrySet()) {
String normalizedName = GEOMETRY_NAME_ALIASES.get(entry.getKey().toLowerCase());
if ... | java |
public final List<Throwable> validate() {
List<Throwable> validationErrors = new ArrayList<>();
this.accessAssertion.validate(validationErrors, this);
for (String jdbcDriver: this.jdbcDrivers) {
try {
Class.forName(jdbcDriver);
} catch (ClassNotFoundExcep... | java |
public void addDependency(final ProcessorGraphNode node) {
Assert.isTrue(node != this, "A processor can't depends on himself");
this.dependencies.add(node);
node.addRequirement(this);
} | java |
@Nonnull
public BiMap<String, String> getOutputMapper() {
final BiMap<String, String> outputMapper = this.processor.getOutputMapperBiMap();
if (outputMapper == null) {
return HashBiMap.create();
}
return outputMapper;
} | java |
@Nonnull
public BiMap<String, String> getInputMapper() {
final BiMap<String, String> inputMapper = this.processor.getInputMapperBiMap();
if (inputMapper == null) {
return HashBiMap.create();
}
return inputMapper;
} | java |
public Set<? extends Processor<?, ?>> getAllProcessors() {
IdentityHashMap<Processor<?, ?>, Void> all = new IdentityHashMap<>();
all.put(this.getProcessor(), null);
for (ProcessorGraphNode<?, ?> dependency: this.dependencies) {
for (Processor<?, ?> p: dependency.getAllProcessors()) {... | java |
public static String findReplacement(final String variableName, final Date date) {
if (variableName.equalsIgnoreCase("date")) {
return cleanUpName(DateFormat.getDateInstance().format(date));
} else if (variableName.equalsIgnoreCase("datetime")) {
return cleanUpName(DateFormat.get... | java |
protected static void error(
final HttpServletResponse httpServletResponse, final String message, final HttpStatus code) {
try {
httpServletResponse.setContentType("text/plain");
httpServletResponse.setStatus(code.value());
setNoCache(httpServletResponse);
... | java |
protected final void error(final HttpServletResponse httpServletResponse, final Throwable e) {
httpServletResponse.setContentType("text/plain");
httpServletResponse.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
try (PrintWriter out = httpServletResponse.getWriter()) {
out.prin... | java |
protected final StringBuilder getBaseUrl(final HttpServletRequest httpServletRequest) {
StringBuilder baseURL = new StringBuilder();
if (httpServletRequest.getContextPath() != null && !httpServletRequest.getContextPath().isEmpty()) {
baseURL.append(httpServletRequest.getContextPath());
... | java |
@VisibleForTesting
protected static Dimension getSize(
final ScalebarAttributeValues scalebarParams,
final ScaleBarRenderSettings settings, final Dimension maxLabelSize) {
final float width;
final float height;
if (scalebarParams.getOrientation().isHorizontal()) {
... | java |
@VisibleForTesting
protected static Dimension getMaxLabelSize(final ScaleBarRenderSettings settings) {
float maxLabelHeight = 0.0f;
float maxLabelWidth = 0.0f;
for (final Label label: settings.getLabels()) {
maxLabelHeight = Math.max(maxLabelHeight, label.getHeight());
... | java |
@VisibleForTesting
protected static String createLabelText(
final DistanceUnit scaleUnit, final double value, final DistanceUnit intervalUnit) {
double scaledValue = scaleUnit.convertTo(value, intervalUnit);
// assume that there is no interval smaller then 0.0001
scaledValue = M... | java |
@VisibleForTesting
protected static double getNearestNiceValue(
final double value, final DistanceUnit scaleUnit, final boolean lockUnits) {
DistanceUnit bestUnit = bestUnit(scaleUnit, value, lockUnits);
double factor = scaleUnit.convertTo(1.0, bestUnit);
// nearest power of 10 ... | java |
@VisibleForTesting
protected static int getBarSize(final ScaleBarRenderSettings settings) {
if (settings.getParams().barSize != null) {
return settings.getParams().barSize;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
return settings.ge... | java |
@VisibleForTesting
protected static int getLabelDistance(final ScaleBarRenderSettings settings) {
if (settings.getParams().labelDistance != null) {
return settings.getParams().labelDistance;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
... | java |
public final URI render(
final MapfishMapContext mapContext,
final ScalebarAttributeValues scalebarParams,
final File tempFolder,
final Template template)
throws IOException, ParserConfigurationException {
final double dpi = mapContext.getDPI();
... | java |
public static PJsonObject parseSpec(final String spec) {
final JSONObject jsonSpec;
try {
jsonSpec = new JSONObject(spec);
} catch (JSONException e) {
throw new RuntimeException("Cannot parse the spec file: " + spec, e);
}
return new PJsonObject(jsonSpec, ... | java |
public final OutputFormat getOutputFormat(final PJsonObject specJson) {
final String format = specJson.getString(MapPrinterServlet.JSON_OUTPUT_FORMAT);
final boolean mapExport =
this.configuration.getTemplate(specJson.getString(Constants.JSON_LAYOUT_KEY)).isMapExport();
final Str... | java |
public final Processor.ExecutionContext print(
final String jobId, final PJsonObject specJson, final OutputStream out)
throws Exception {
final OutputFormat format = getOutputFormat(specJson);
final File taskDirectory = this.workingDirectories.getTaskDirectory();
try {
... | java |
public final Set<String> getOutputFormatsNames() {
SortedSet<String> formats = new TreeSet<>();
for (String formatBeanName: this.outputFormat.keySet()) {
int endingIndex = formatBeanName.indexOf(MAP_OUTPUT_FORMAT_BEAN_NAME_ENDING);
if (endingIndex < 0) {
endingInd... | java |
public Scale getNearestScale(
final ZoomLevels zoomLevels,
final double tolerance,
final ZoomLevelSnapStrategy zoomLevelSnapStrategy,
final boolean geodetic,
final Rectangle paintArea,
final double dpi) {
final Scale scale = getScale(paint... | java |
@PostConstruct
public final void init() {
this.cleanUpTimer = Executors.newScheduledThreadPool(1, timerTask -> {
final Thread thread = new Thread(timerTask, "Clean up old job records");
thread.setDaemon(true);
return thread;
});
this.cleanUpTimer.scheduleA... | java |
public static Collection<Field> getAllAttributes(final Class<?> classToInspect) {
Set<Field> allFields = new HashSet<>();
getAllAttributes(classToInspect, allFields, Function.identity(), field -> true);
return allFields;
} | java |
public static Collection<Field> getAttributes(
final Class<?> classToInspect, final Predicate<Field> filter) {
Set<Field> allFields = new HashSet<>();
getAllAttributes(classToInspect, allFields, Function.identity(), filter);
return allFields;
} | java |
private static URI createRaster(
final Dimension targetSize, final RasterReference rasterReference,
final Double rotation, final Color backgroundColor,
final File workingDir) throws IOException {
final File path = File.createTempFile("north-arrow-", ".png", workingDir);
... | java |
private static URI createSvg(
final Dimension targetSize,
final RasterReference rasterReference, final Double rotation,
final Color backgroundColor, final File workingDir)
throws IOException {
// load SVG graphic
final SVGElement svgRoot = parseSvg(rasterR... | java |
private static void embedSvgGraphic(
final SVGElement svgRoot,
final SVGElement newSvgRoot, final Document newDocument,
final Dimension targetSize, final Double rotation) {
final String originalWidth = svgRoot.getAttributeNS(null, "width");
final String originalHeight... | java |
public void setDirectory(final String directory) {
this.directory = new File(this.configuration.getDirectory(), directory);
if (!this.directory.exists()) {
throw new IllegalArgumentException(String.format(
"Directory does not exist: %s.\n" +
"C... | java |
public void setAttribute(final String name, final Attribute attribute) {
if (name.equals(MAP_KEY)) {
this.mapAttribute = (MapAttribute) attribute;
}
} | java |
public Map<String, Attribute> getAttributes() {
Map<String, Attribute> result = new HashMap<>();
DataSourceAttribute datasourceAttribute = new DataSourceAttribute();
Map<String, Attribute> dsResult = new HashMap<>();
dsResult.put(MAP_KEY, this.mapAttribute);
datasourceAttribute.s... | java |
public final void printClientConfig(final JSONWriter json) throws JSONException {
json.key("attributes");
json.array();
for (Map.Entry<String, Attribute> entry: this.attributes.entrySet()) {
Attribute attribute = entry.getValue();
if (attribute.getClass().getAnnotation(In... | java |
public final void setAttributes(final Map<String, Attribute> attributes) {
for (Map.Entry<String, Attribute> entry: attributes.entrySet()) {
Object attribute = entry.getValue();
if (!(attribute instanceof Attribute)) {
final String msg =
"Attribute... | java |
public final ProcessorDependencyGraph getProcessorGraph() {
if (this.processorGraph == null) {
synchronized (this) {
if (this.processorGraph == null) {
final Map<String, Class<?>> attcls = new HashMap<>();
for (Map.Entry<String, Attribute> attr... | java |
@SuppressWarnings("unchecked")
@Nonnull
public final java.util.Optional<Style> getStyle(final String styleName) {
final String styleRef = this.styles.get(styleName);
Optional<Style> style;
if (styleRef != null) {
style = (Optional<Style>) this.styleParser
... | java |
@PostConstruct
public void init() {
this.metricRegistry.register(name("gc"), new GarbageCollectorMetricSet());
this.metricRegistry.register(name("memory"), new MemoryUsageGaugeSet());
this.metricRegistry.register(name("thread-states"), new ThreadStatesGaugeSet());
this.metricRegistry... | java |
public void postConstruct() throws URISyntaxException {
WmsVersion.lookup(this.version);
Assert.isTrue(validateBaseUrl(), "invalid baseURL");
Assert.isTrue(this.layers.length > 0, "There must be at least one layer defined for a WMS request" +
" to make sense");
// OpenL... | java |
@Nonnull
public BufferedImage createBufferedImage(final int imageWidth, final int imageHeight) {
return new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_4BYTE_ABGR);
} | java |
public void setKeywords(final List<String> keywords) {
StringBuilder builder = new StringBuilder();
for (String keyword: keywords) {
if (builder.length() > 0) {
builder.append(',');
}
builder.append(keyword.trim());
}
this.keywords = Op... | java |
protected String getKey(final String ref, final String filename, final String extension) {
return prefix + ref + "/" + filename + "." + extension;
} | java |
private Object tryConvert(
final MfClientHttpRequestFactory clientHttpRequestFactory,
final Object rowValue) throws URISyntaxException, IOException {
if (this.converters.isEmpty()) {
return rowValue;
}
String value = String.valueOf(rowValue);
for (Tab... | java |
@Override
public final Integer optInt(final String key) {
final int result = this.obj.optInt(key, Integer.MIN_VALUE);
return result == Integer.MIN_VALUE ? null : result;
} | java |
@Override
public final Double optDouble(final String key) {
double result = this.obj.optDouble(key, Double.NaN);
if (Double.isNaN(result)) {
return null;
}
return result;
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.