List of usage examples for java.lang Integer MAX_VALUE
int MAX_VALUE
To view the source code for java.lang Integer MAX_VALUE.
Click Source Link
From source file:io.github.GoldenDeveloper79.TheBasics.Commands.TempBanCMD.java
public TempBanCMD() { super(new String[] { "tempban" }, 2, Integer.MAX_VALUE, MultiPlayer.ALWAYS); }
From source file:com.mnxfst.stream.dispatcher.policy.BroadcastDispatchPolicy.java
/** * @see com.mnxfst.stream.dispatcher.DispatchPolicy#init(java.util.Map) *//*from www . j a v a 2s.com*/ public void init(Map<String, String> settings) { if (settings != null && !settings.isEmpty()) { for (int i = 0; i < Integer.MAX_VALUE; i++) { if (settings.containsKey(BROADCAST_DESTINATION_PREFIX + i)) { String value = settings.get(BROADCAST_DESTINATION_PREFIX + i); if (StringUtils.isNotBlank(value)) this.broadcastDestinations.add(value.trim()); } break; } } }
From source file:net.mohatu.bloocoin.miner.Register.java
private void genData() { Random r = new Random(), w = new Random(); addr = DigestUtils.sha1Hex((randomString() + r.nextInt(Integer.MAX_VALUE)).toString()).toString(); key = DigestUtils.sha1Hex((randomString() + w.nextInt(Integer.MAX_VALUE)).toString()).toString(); System.out.println("Addr: " + addr + "\nKey: " + key); }
From source file:io.fabric8.kubernetes.api.environments.Environment.java
public int order() { return order != null ? order.intValue() : Integer.MAX_VALUE; }
From source file:io.github.benas.jpopulator.randomizers.validation.MinValueRandomizer.java
/** * Generate a random value for the given type. * * @param type the type for which a random value will be generated * @param minValue the minimum threshold for the generated value * @return a random value (greater than maxValue) for the given type or null if the type is not supported *///w ww. j a v a 2 s. c o m public static Object getRandomValue(final Class type, final long minValue) { if (type.equals(Byte.TYPE) || type.equals(Byte.class)) { return (byte) randomDataGenerator.nextLong(minValue, Byte.MAX_VALUE); } if (type.equals(Short.TYPE) || type.equals(Short.class)) { return (short) randomDataGenerator.nextLong(minValue, Short.MAX_VALUE); } if (type.equals(Integer.TYPE) || type.equals(Integer.class)) { return (int) randomDataGenerator.nextLong(minValue, Integer.MAX_VALUE); } if (type.equals(Long.TYPE) || type.equals(Long.class)) { return randomDataGenerator.nextLong(minValue, Long.MAX_VALUE); } if (type.equals(BigInteger.class)) { return new BigInteger(String.valueOf(randomDataGenerator.nextLong(minValue, Long.MAX_VALUE))); } if (type.equals(BigDecimal.class)) { return new BigDecimal(randomDataGenerator.nextLong(minValue, Long.MAX_VALUE)); } return null; }
From source file:de.sanandrew.mods.turretmod.registry.assembly.TurretAssemblyRecipes.java
private static boolean preProcessJson(Path root, final ITurretAssemblyRegistry registry) { if (Files.exists(root)) { try {//from w w w. j a va 2 s . c o m Files.find(root, Integer.MAX_VALUE, (filePth, attr) -> FilenameUtils.getName(filePth.toString()).startsWith("group_")) .forEach(file -> processJson(file, json -> registerJsonGroup(json, registry))); } catch (IOException ex) { TmrConstants.LOG.log(Level.ERROR, String.format("Couldn't read recipe group from directory %s", root), ex); return false; } } return true; }
From source file:com.github.ferstl.spring.jdbc.oracle.TestInterruptiblePreparedStatementSetter.java
@Override protected boolean setValuesIfAvailable(PreparedStatement ps, int i) throws SQLException { if (i >= this.parameters.length) { return false; }//from w ww . jav a2 s. com StatementCreatorUtils.setParameterValue(ps, 1, SqlTypeValue.TYPE_UNKNOWN, Integer.MAX_VALUE); StatementCreatorUtils.setParameterValue(ps, 2, SqlTypeValue.TYPE_UNKNOWN, this.parameters[i]); return true; }
From source file:RandomInputStream.java
@Override public int available() { // Limited only by available memory and the size of an array. return Integer.MAX_VALUE; }
From source file:io.mapzone.controller.catalog.csw.GetProposalsResponse.java
@Override protected void doExecute() throws Exception { CatalogRepositoryContext catalog = CatalogPlugin.instance().catalog(); ElementSetType elementSet = ElementSetType.SUMMARY; int maxResults = Integer.MAX_VALUE; String query = null;/*w w w. j a v a2 s .c o m*/ // GET if (!request().parameters().isEmpty()) { throw new UnsupportedOperationException("GetRecords: GET requests are not supported."); } // POST GetRecordsType body = request().<GetRecordsType>parsedBody().orElse(null); if (body != null) { if (body.getMaxRecords() != null) { maxResults = body.getMaxRecords().intValue(); } if (body.getStartPosition() != null && body.getStartPosition().intValue() != 1) { throw new UnsupportedOperationException( "startPos is not supported for GetProposals: " + body.getStartPosition()); } if (!"csw:Proposals".equals(body.getOutputSchema())) { throw new UnsupportedOperationException("Only supported schema: " + body.getOutputSchema()); } QueryType queryBody = (QueryType) body.getAbstractQuery().getValue(); query = queryBody.getConstraint().getCqlText(); if (query == null) { throw new IllegalStateException("CQL text is mandatory for GetProposals."); } // if (!ElementSetType.SUMMARY.value().equals( queryBody.getElementSetName() )) { // throw new UnsupportedOperationException( "elementSet is always SUMMARY for GetProposals: " + queryBody.getElementSetName() ); // } } List<String> rs = ImmutableList.copyOf(catalog.index().propose(query, maxResults, null)); // GetRecordsResponse out().writeStartElement("csw", "GetRecordsResponse", Namespaces.CSW); out().writeNamespace("xml", Namespaces.XML); out().writeNamespace("csw", Namespaces.CSW); out().writeNamespace("dc", Namespaces.DC); out().writeNamespace("dct", Namespaces.DCT); // SearchResults out().writeStartElement("csw", "SearchResults", Namespaces.CSW); String resultSize = Integer.toString(rs.size()); out().writeAttribute("numberOfRecordsMatched", resultSize); out().writeAttribute("numberOfRecordsReturned", resultSize); out().writeAttribute("nextRecord", "0"); out().writeAttribute("recordSchema", Namespaces.CSW); out().writeAttribute("elementSet", elementSet.value()); // records for (String proposal : rs) { out().writeStartElement(Namespaces.CSW, "SummaryRecord"); out().writeStartElement(Namespaces.DCT, "abstract"); out().writeCharacters(proposal); out().writeEndElement(); out().writeStartElement(Namespaces.DC, "subject"); out().writeCharacters(proposal); out().writeEndElement(); out().writeEndElement(); } out().writeEndElement(); out().writeEndElement(); }
From source file:ru.portal.config.WebConfig.java
@Bean public SimpleUrlHandlerMapping GWTUrlHandlerMapping() { SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping(); mapping.setOrder(Integer.MAX_VALUE - 2); Properties urlProperties = new Properties(); //TODO ? ? // ? ?? ? ? urlProperties.put("/**/gwt.rpc", "quoteController"); mapping.setMappings(urlProperties);//from w w w . j a v a2 s.c om return mapping; }