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:com.lmpessoa.sonarview.core.Server.java
public List<Issue> getIssues(String projectId) throws MalformedURLException, IOException { int pageIndex = 1; int total = Integer.MAX_VALUE; List<Issue> result = new ArrayList<>(); while (result.size() < total) { JSONObject response = readIssuesFromServer(projectId, pageIndex); if (total == Integer.MAX_VALUE) { total = response.getInt("total"); }/*from w ww .ja va 2 s . c om*/ JSONArray issues = response.getJSONArray("issues"); for (int i = 0; i < issues.length(); ++i) { result.add(new Issue(issues.getJSONObject(i))); } pageIndex += 1; } return result; }
From source file:nl.surfnet.coin.teams.control.LandingPageController.java
@RequestMapping(value = "/landingpage.shtml", method = RequestMethod.POST) public void storeCookie(HttpServletResponse response) { Cookie cookie = new Cookie(LoginInterceptor.TEAMS_COOKIE, "skipLanding=true"); cookie.setMaxAge(Integer.MAX_VALUE); response.addCookie(cookie);/*from ww w . ja v a2s. c om*/ }
From source file:org.apache.drill.common.expression.fn.BooleanFunctions.java
@Override public FunctionDefinition[] getFunctionDefintions() { return new FunctionDefinition[] { FunctionDefinition.operator("or", new AllowedTypeList(2, Integer.MAX_VALUE, DataType.BOOLEAN), OutputTypeDeterminer.FIXED_BOOLEAN, "or", "||"), FunctionDefinition.operator("and", new AllowedTypeList(2, Integer.MAX_VALUE, DataType.BOOLEAN), OutputTypeDeterminer.FIXED_BOOLEAN, "and", "&&"), FunctionDefinition.operator("greater than", new ComparableArguments(2), OutputTypeDeterminer.FIXED_BOOLEAN, ">"), FunctionDefinition.operator("less than", new ComparableArguments(2), OutputTypeDeterminer.FIXED_BOOLEAN, "<"), FunctionDefinition.operator("equal", new ComparableArguments(2), OutputTypeDeterminer.FIXED_BOOLEAN, "==", "<>"), FunctionDefinition.operator("greater than or equal to", new ComparableArguments(2), OutputTypeDeterminer.FIXED_BOOLEAN, ">="), FunctionDefinition.operator("less than or equal to", new ComparableArguments(2), OutputTypeDeterminer.FIXED_BOOLEAN, "<="), }; }
From source file:io.mapzone.controller.ui.CtrlPanel.java
/** * {@inheritDoc}/*from ww w . j a va2 s. c o m*/ * <p/> * Sets size to: * <pre> * SIDE_PANEL_WIDTH, SIDE_PANEL_WIDTH, Integer.MAX_VALUE * </pre> */ @Override public void init() { site().setSize(SIDE_PANEL_WIDTH, SIDE_PANEL_WIDTH, Integer.MAX_VALUE); }
From source file:it.scoppelletti.mobilepower.os.AbstractAsyncTask.java
/** * Imposta il numero di passi del processo. * // w w w.j av a 2s . c o m * @param value Valore. */ protected final void setStepCount(long value) { if (value <= 0) { throw new IllegalArgumentException(String.format("Argument value %1$d is less than 1.", value)); } myStepCount = value; myStepScale = 1; while (value > Integer.MAX_VALUE) { myStepScale++; value = value / ((long) myStepScale); } }
From source file:Main.java
private static int getImageViewFieldValue(Object object, String fieldName) { int value = 0; try {/*from ww w. j a v a 2 s . c o m*/ Field field = ImageView.class.getDeclaredField(fieldName); field.setAccessible(true); int fieldValue = (Integer) field.get(object); if (fieldValue > 0 && fieldValue < Integer.MAX_VALUE) { value = fieldValue; } } catch (Exception e) { Log.e("", e.getMessage()); } return value; }
From source file:de.qaware.chronix.solr.query.analysis.functions.aggregations.Integral.java
/** * Calculates the integral of the given time series using the simpson integrator of commons math lib * * @param timeSeries the time series as argument for the chronix function * @param functionValueMap the analysis and values result map *///from ww w. j a v a 2 s . c om @Override public void execute(MetricTimeSeries timeSeries, FunctionValueMap functionValueMap) { if (timeSeries.isEmpty()) { functionValueMap.add(this, Double.NaN); return; } SimpsonIntegrator simpsonIntegrator = new SimpsonIntegrator(); double integral = simpsonIntegrator.integrate(Integer.MAX_VALUE, x -> timeSeries.getValue((int) x), 0, timeSeries.size() - 1); functionValueMap.add(this, integral); }
From source file:de.unisb.cs.st.javaslicer.jung.CreateJungGraphSliceVisitor.java
public CreateJungGraphSliceVisitor(Transformer<InstructionInstance, VertexType> vertexTransformer) { this(vertexTransformer, Integer.MAX_VALUE); }
From source file:voldemort.utils.VoldemortIOUtils.java
public static int copy(Reader input, Writer output, long limit) throws IOException { long count = copyLarge(input, output, limit); if (count > Integer.MAX_VALUE) { return -1; }//from w w w .j a v a 2 s.c o m return (int) count; }
From source file:com.sm.transport.grizzly.codec.RequestEncoder.java
@Override protected TransformationResult<Request, Buffer> transformImpl(AttributeStorage storage, Request request) throws TransformationException { byte ver = request.getHeader().getSerializeVersion(); int pLen = request.getPayload() == null ? 0 : request.getPayload().length; byte[] header = request.getHeader().toByte(); // encoding length , and check the max value of integer, should be 2GB int totalLen = OFFSET + header.length + pLen + R_SIZE + H_SIZE; if (totalLen > Integer.MAX_VALUE) { throw new TransformationException(totalLen + " exceeding Integer.MAX_VALUE"); }/*from w w w . j ava 2 s . c o m*/ //logger.info("total "+totalLen+" hd "+header.length+" payload "+pLen); // Retrieve the memory manager //final MemoryManager memoryManager = ctx.getConnection().getTransport().getMemoryManager(); // allocate the buffer of required size final Buffer bout = obtainMemoryManager(storage).allocate(totalLen); // Instruct the FilterChain to call the next filter bout.put(SIGNATURE); bout.put(ver); bout.putInt(totalLen); bout.putShort((short) header.length); bout.put(header); // request type bout.put((byte) request.getType().ordinal()); bout.put(request.getPayload()); bout.flip(); bout.allowBufferDispose(true); return TransformationResult.createCompletedResult(bout, null); }