List of usage examples for java.lang Integer MIN_VALUE
int MIN_VALUE
To view the source code for java.lang Integer MIN_VALUE.
Click Source Link
From source file:com.nebhale.devoxx2013.web.GameControllerTest.java
@Test public void destroyDoesNotExist() throws Exception { this.mockMvc.perform(delete("/games/{game}", Integer.MIN_VALUE)).andExpect(status().isNotFound()); }
From source file:net.naonedbus.rest.controller.impl.HoraireController.java
/** * Rcuprer les horaires depuis le WebService. * /*from w ww. j a v a2 s . c om*/ * @throws IOException * @throws MalformedURLException */ public synchronized List<Horaire> getAllFromWeb(final Arret arret, final DateMidnight date) throws IOException { final UrlBuilder url = new UrlBuilder(PATH); final List<HoraireNode> horaires; List<Horaire> result = null; url.addSegment(arret.getCodeArret()); url.addSegment(arret.getCodeLigne()); url.addSegment(arret.getCodeSens()); url.addSegment(mDateFormat.format(date.toDate())); final HoraireContainer content = parseJsonObject(url.getUrl()); MutableDateTime mutableDateTime = new MutableDateTime(date); if (content != null) { horaires = content.horaires; result = new ArrayList<Horaire>(); int lastHour = Integer.MIN_VALUE; // Transformation des horaires TAN en horaire naonedbus. for (final HoraireNode horaireTan : horaires) { final int hour = Integer.parseInt(horaireTan.heure.replaceAll("[^\\d.]", "")); mutableDateTime.setHourOfDay(hour); // Changement de jour if (hour < lastHour) { mutableDateTime.addDays(1); } lastHour = hour; for (final String passage : horaireTan.passages) { int minute = Integer.parseInt(passage.replaceAll("[^\\d.]", "")); mutableDateTime.setMinuteOfHour(minute); final Horaire horaire = new Horaire(); horaire.setJour(date); horaire.setHoraire(mutableDateTime.toDateTime()); horaire.setTerminus(parseTerminus(passage, content.notes)); horaire.setSection(new DateMidnight(horaire.getHoraire())); result.add(horaire); } } } return result; }
From source file:com.reecedunn.espeak.VoiceSettings.java
public int getPitch() { int min = mEngine.Pitch.getMinValue(); int max = mEngine.Pitch.getMaxValue(); int pitch = getPreferenceValue(PREF_PITCH, Integer.MIN_VALUE); if (pitch == Integer.MIN_VALUE) { pitch = getPreferenceValue(PREF_DEFAULT_PITCH, 100) / 2; }//w w w. j av a2s .c om if (pitch > max) pitch = max; if (pitch < min) pitch = min; return pitch; }
From source file:org.elasticsearch.client.HeapBufferedAsyncResponseConsumerTests.java
public void testConfiguredBufferLimit() throws Exception { try {// w w w . j a va 2s . co m new HeapBufferedAsyncResponseConsumer(randomIntBetween(Integer.MIN_VALUE, 0)); } catch (IllegalArgumentException e) { assertEquals("bufferLimit must be greater than 0", e.getMessage()); } try { new HeapBufferedAsyncResponseConsumer(0); } catch (IllegalArgumentException e) { assertEquals("bufferLimit must be greater than 0", e.getMessage()); } int bufferLimit = randomIntBetween(1, MAX_TEST_BUFFER_SIZE - 100); HeapBufferedAsyncResponseConsumer consumer = new HeapBufferedAsyncResponseConsumer(bufferLimit); bufferLimitTest(consumer, bufferLimit); }
From source file:com.javiermoreno.springboot.rest.App.java
/** Fix de default codification of the static content to UTF-8 */ @Bean// w w w .j av a 2 s . c om public FilterRegistrationBean filterRegistrationBean() { FilterRegistrationBean registrationBean = new FilterRegistrationBean(); CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter(); registrationBean.setFilter(characterEncodingFilter); characterEncodingFilter.setEncoding("UTF-8"); characterEncodingFilter.setForceEncoding(true); registrationBean.setOrder(Integer.MIN_VALUE); registrationBean.addUrlPatterns("/*"); return registrationBean; }
From source file:LongVector.java
public final void removeAllElements() { for (int i = 0; i < _size; i++) { _data[i] = java.lang.Integer.MIN_VALUE; }/*w ww . j a v a 2s . c om*/ _size = 0; }
From source file:com.sap.core.odata.testutil.tool.core.AbstractTestClient.java
public void call() { call(Integer.MIN_VALUE, Integer.MAX_VALUE); }
From source file:com.adobe.cq.wcm.core.components.internal.servlets.AdaptiveImageServletMappingConfigurationConsumer.java
/** * Activation method//from w w w . java 2s .co m * * @param componentContext - Component context * @param bundleContext - Bundle context * @param config - Config properties */ @Activate public void activate(ComponentContext componentContext, BundleContext bundleContext, Map<String, Object> config) { try { Configuration[] configurations = configurationAdmin.listConfigurations( "(" + Constants.SERVICE_PID + "=" + AdaptiveImageServlet.class.getName() + ")"); if (ArrayUtils.isNotEmpty(configurations)) { Configuration oldConfig = configurations[0]; oldAISDefaultResizeWidth = PropertiesUtil .toInteger(oldConfig.getProperties().get("defaultResizeWidth"), Integer.MIN_VALUE); if (oldAISDefaultResizeWidth > 0) { LOG.warn( "Found previous custom configuration for the {}. The configuration will be reused to control the {} " + "registrations managed by this component. Please migrate the previous configuration to the {} factory" + " configurations.", AdaptiveImageServlet.class.getName(), AdaptiveImageServlet.class.getName(), AdaptiveImageServletMappingConfigurationFactory.class.getName()); } } } catch (Exception e) { LOG.error("Unable to retrieve previous configuration for the " + AdaptiveImageServlet.class.getName() + " component. " + "The configuration, if it still exists, will not be reused to configure the defaultResizeWidth property of the " + "servlet's registrations managed by this component.", e); } this.bundleContext = bundleContext; updateServletRegistrations(); }
From source file:net.sourceforge.cobertura.metrics.model.coverage.Rate.java
/** * {@inheritDoc}/*from www. ja va 2s .com*/ */ @Override public int compareTo(final Rate that) { // Check sanity if (that == null) { return Integer.MIN_VALUE; } if (that == this) { return 0; } // Compare the values int result = getRateType().compareTo(that.getRateType()); if (result == 0) { result = getMaximum() - that.getMaximum(); } if (result == 0) { result = getActual() - that.getActual(); } // All done. return result; }
From source file:org.wallride.autoconfigure.WallRideWebMvcConfiguration.java
@Override public void addResourceHandlers(ResourceHandlerRegistry registry) { Integer cachePeriod = this.resourceProperties.getCachePeriod(); registry.addResourceHandler("/resources/**") .addResourceLocations(wallRideProperties.getHome() + "themes/default/resources/", CLASSPATH_RESOURCE_LOCATION) .setCachePeriod(cachePeriod); registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/") .setCachePeriod(cachePeriod); registry.setOrder(Integer.MIN_VALUE); }