Example usage for java.lang Integer MIN_VALUE

List of usage examples for java.lang Integer MIN_VALUE

Introduction

In this page you can find the example usage for java.lang Integer MIN_VALUE.

Prototype

int MIN_VALUE

To view the source code for java.lang Integer MIN_VALUE.

Click Source Link

Document

A constant holding the minimum value an int can have, -231.

Usage

From source file:de.tudarmstadt.ukp.experiments.argumentation.convincingness.graph.VisualizationTest.java

public static void showGraph(Graph graph, File outputFile) throws IOException {
    graph.addAttribute("ui.antialias", true);
    graph.addAttribute("ui.stylesheet", "edge {fill-color:grey; shape: cubic-curve;} ");

    // min and max ratio
    int minRatio = Integer.MAX_VALUE;
    int maxRatio = Integer.MIN_VALUE;
    for (Node node : graph) {
        // get ratio
        int ratio = node.getOutDegree() - node.getInDegree() + 100;

        minRatio = Math.min(ratio, minRatio);
        maxRatio = Math.max(ratio, maxRatio);
    }/*from   w ww.j  av a 2  s  .  co  m*/

    for (Node node : graph) {
        // parse cluster node IDs back to sorted set
        SortedSet<String> clusterNodesIDs = new TreeSet<>(
                Arrays.asList(node.getAttribute(Step6GraphTransitivityCleaner.NODE_ATTR_CLUSTERED_ARGS)
                        .toString().replaceAll("^\\[", "").replaceAll("\\]$", "").split(", ")));

        // get longest out-coming transition path

        // get ratio
        int ratio = node.getOutDegree() - node.getInDegree() + 100;

        String color = mapValueToColor(minRatio, maxRatio, ratio);
        int size = (node.getOutDegree() + 10) * 2;

        int maxTransitivityScore = computeMaxTransitivityScore(graph, node);

        node.addAttribute("ui.style", String.format("fill-color: %s; size: %dpx;", color, size));
        node.addAttribute("ui.label",
                String.format("%d/%d/%d", node.getInDegree(), node.getOutDegree(), maxTransitivityScore));
    }

    final int RES = 450;
    Viewer viewer = graph.display();
    ViewPanel panel = viewer.getDefaultView();
    panel.setSize(RES, RES);

    FileSinkImages pic = new FileSinkImages(FileSinkImages.OutputType.PNG, FileSinkImages.Resolutions.HD720);

    pic.setLayoutPolicy(FileSinkImages.LayoutPolicy.COMPUTED_FULLY_AT_NEW_IMAGE);
    pic.setResolution(RES, RES);

    pic.writeAll(graph, outputFile.getAbsolutePath());
}

From source file:de.escidoc.core.common.servlet.UserHandleCookieUtil.java

/**
 * @return the escidocCookieLifetime.//from w  ww  . j  a v a  2s  .com
 * @throws WebserverSystemException Thrown if access to configuration properties fails.
 */
public static int getEscidocCookieLifetime() throws WebserverSystemException {

    if (escidocCookieLifetime == Integer.MIN_VALUE) {
        try {
            escidocCookieLifetime = Integer.parseInt(EscidocConfiguration.getInstance()
                    .get(EscidocConfiguration.ESCIDOC_CORE_USERHANDLE_COOKIE_LIFETIME));
        } catch (final Exception e) {
            throw new WebserverSystemException(StringUtility.format("Can't get configuration parameter",
                    EscidocConfiguration.ESCIDOC_CORE_USERHANDLE_COOKIE_LIFETIME, e.getMessage()), e);
        }
    }
    return escidocCookieLifetime;
}

From source file:com.epam.reportportal.gateway.UrlRewriteConfiguration.java

@Bean
public FilterRegistrationBean filterRegistrationBean() {
    FilterRegistrationBean registrationBean = new FilterRegistrationBean();
    registrationBean.setFilter(new ZuulMiltipartRewriteFilter(zuulProperties.getServletPath()));
    registrationBean.addUrlPatterns("/*");

    /* should be the first one in the filter chain */
    registrationBean.setOrder(Integer.MIN_VALUE);
    return registrationBean;
}

From source file:com.cloudera.sqoop.manager.MySQLManager.java

@Override
protected void initOptionDefaults() {
    if (options.getFetchSize() == null) {
        LOG.info("Preparing to use a MySQL streaming resultset.");
        options.setFetchSize(Integer.MIN_VALUE);
    } else if (!options.getFetchSize().equals(Integer.MIN_VALUE) && !options.getFetchSize().equals(0)) {
        LOG.info("Argument '--fetch-size " + options.getFetchSize()
                + "' will probably get ignored by MySQL JDBC driver.");
        // see also
        // http://dev.mysql.com/doc/refman/5.5/en
        //                       /connector-j-reference-implementation-notes.html
    }//from ww  w.j  av a 2  s .com
}

From source file:com.primitive.applicationmanager.datagram.ApplicationManagerDatagram.java

/**
 * ???int????????/*  www  .  j  a va 2s  .  co  m*/
 * @param argTag
 * @return int
 */
public int getInt(final String argTag) {
    try {
        return this.json.getInt(argTag);
    } catch (final JSONException ex) {
        Logger.warm(ex);
        return Integer.MIN_VALUE;
    }
}

From source file:com.navercorp.pinpoint.web.mapper.stat.DataSourceSamplerTest.java

private void assertEquals(SampledDataSource sampledDataSource, List<DataSourceBo> dataSourceBoList) {
    int minActiveConnectionSize = Integer.MAX_VALUE;
    int maxActiveConnectionSize = Integer.MIN_VALUE;
    int sumActiveConnectionSize = 0;

    int minMaxConnectionSize = Integer.MAX_VALUE;
    int maxMaxConnectionSize = Integer.MIN_VALUE;
    int sumMaxConnectionSize = 0;

    for (DataSourceBo dataSourceBo : dataSourceBoList) {
        int activeConnectionSize = dataSourceBo.getActiveConnectionSize();
        if (activeConnectionSize < minActiveConnectionSize) {
            minActiveConnectionSize = activeConnectionSize;
        }/*from  w  w  w .  j av a2  s. c om*/
        if (activeConnectionSize > maxActiveConnectionSize) {
            maxActiveConnectionSize = activeConnectionSize;
        }
        sumActiveConnectionSize += activeConnectionSize;

        int maxConnectionSize = dataSourceBo.getMaxConnectionSize();
        if (maxConnectionSize < minMaxConnectionSize) {
            minMaxConnectionSize = maxConnectionSize;
        }
        if (maxConnectionSize > maxMaxConnectionSize) {
            maxMaxConnectionSize = maxConnectionSize;
        }
        sumMaxConnectionSize += maxConnectionSize;
    }

    Assert.assertTrue(sampledDataSource.getActiveConnectionSize().getMinYVal().equals(minActiveConnectionSize));
    Assert.assertTrue(sampledDataSource.getActiveConnectionSize().getMaxYVal().equals(maxActiveConnectionSize));
    Assert.assertTrue(sampledDataSource.getActiveConnectionSize().getSumYVal().equals(sumActiveConnectionSize));

    Assert.assertTrue(sampledDataSource.getMaxConnectionSize().getMinYVal().equals(minMaxConnectionSize));
    Assert.assertTrue(sampledDataSource.getMaxConnectionSize().getMaxYVal().equals(maxMaxConnectionSize));
    Assert.assertTrue(sampledDataSource.getMaxConnectionSize().getSumYVal().equals(sumMaxConnectionSize));
}

From source file:com.nebhale.devoxx2013.web.DoorControllerTest.java

@Test
public void readDoesNotExist() throws Exception {
    this.mockMvc.perform(get("/games/{game}/door/{door}", Integer.MIN_VALUE, Integer.MIN_VALUE + 1))
            .andExpect(status().isNotFound());
}

From source file:com.l2jfree.gameserver.instancemanager.SiegeGuardManager.java

public SiegeGuardManager(Castle castle) {
    _castle = castle;
    _siegeGuardSpawn = new FastList<L2Spawn>();
    _spawnId = Integer.MIN_VALUE;
}

From source file:com.sisrni.managedbean.TipoBecaMB.java

/** 
 * Metodo para guardar una instancia de 'TipoBeca' en la tabla 
 * correspondiente de la base de datos/* w  ww . ja va  2 s  . c  om*/
 */
public void guardarTipoBeca() {
    String msg = "Tipo de Beca Almacenado Exitosamente!";
    try {
        tipoBeca.setIdTipoBeca(Integer.MIN_VALUE);
        tipoBecaService.save(tipoBeca);
        FacesContext.getCurrentInstance().addMessage(null,
                new FacesMessage(FacesMessage.SEVERITY_INFO, "Guardado!!", msg));

    } catch (Exception e) {
        JsfUtil.addErrorMessage("Error al Guardar Tipo de Beca!");
        e.printStackTrace();
    }
    cargarTipoBeca();
}

From source file:com.l2jfree.gameserver.network.packets.L2ServerPacket.java

protected final void writeCompQ(long value) {
    if (Config.PACKET_FINAL)
        writeQ(value);//from  w  w  w. jav  a2 s.com
    else
        writeD(L2Math.limit(Integer.MIN_VALUE, value, Integer.MAX_VALUE));
}