Example usage for java.lang Integer MAX_VALUE

List of usage examples for java.lang Integer MAX_VALUE

Introduction

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

Prototype

int MAX_VALUE

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

Click Source Link

Document

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

Usage

From source file:net.darkmist.alib.io.Slurp.java

public static byte[] slurp(DataInput din, long amount) throws IOException {
    if (amount > Integer.MAX_VALUE)
        throw new IOException("Size larger than max int");
    return slurp(din, (int) amount);
}

From source file:statistic.graph.JChartPanel.java

public void add(String key, double value) {
    XYSeries series = new XYSeries(key);
    stepDataset.addSeries(series);/*from  ww w. j a  v a  2  s  . co m*/
    series.add(Integer.MIN_VALUE, 0);
    series.add(0, value);
    series.add(Integer.MAX_VALUE, value);
}

From source file:com.alibaba.wasp.fserver.SplitThread.java

/** @param server */
SplitThread(FServer server) {//ww  w.  j  a v  a 2s  . c o  m
    super();
    this.server = server;
    this.conf = server.getConfiguration();
    this.entityGroupSplitLimit = conf.getInt("wasp.fserver.entityGroupSplitLimit", Integer.MAX_VALUE);

    int splitThreads = conf.getInt("wasp.fserver.thread.split", 1);

    final String n = Thread.currentThread().getName();

    this.splits = (ThreadPoolExecutor) Executors.newFixedThreadPool(splitThreads, new ThreadFactory() {
        @Override
        public Thread newThread(Runnable r) {
            Thread t = new Thread(r);
            t.setName(n + "-splits-" + System.currentTimeMillis());
            return t;
        }
    });
}

From source file:com.bukanir.android.utils.Utils.java

public static boolean isHttpServiceRunning(Context context) {
    ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
    for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
        if (BukanirHttpService.class.getName().equals(service.service.getClassName())) {
            return true;
        }//  w w  w  .  j a v  a 2s .c om
    }
    return false;
}

From source file:cpcc.core.services.UniqueIntegerIdGenerator.java

/**
 * {@inheritDoc}//w  w w.ja  v a  2s  .c  o m
 */
@Override
public Serializable generate(SessionImplementor session, Object obj) throws HibernateException {
    final Serializable id = session.getEntityPersister(entityName, obj).getIdentifier(obj, session);
    return id != null ? id : RandomUtils.nextInt(0, Integer.MAX_VALUE);
}

From source file:name.martingeisse.admin.navigation.component.NavigationMenuPanel.java

/**
 * Constructor.
 * @param id the wicket id
 */
public NavigationMenuPanel(final String id) {
    this(id, Integer.MAX_VALUE);
}

From source file:com.github.lynxdb.server.core.repository.SuggestRepo.java

public List<String> byTagValue(Vhost _vhost, String _query) {
    List<String> result = ct.select(QueryBuilder.select("tagv").from("suggest_tagv")
            .where(QueryBuilder.eq("vhostid", _vhost.getId())).limit(Integer.MAX_VALUE), String.class);
    if (_query.isEmpty()) {
        return result;
    }/*  w ww .j av a 2 s.co  m*/
    result.removeIf((s -> !s.contains(_query)));

    monitor.queryGetCount.incrementAndGet();

    return result;
}

From source file:com.effektif.workflow.api.types.NumberType.java

/**
 * Parse a text value as a Integer, Long or Double, as appropriate.
 * Based on com.fasterxml.jackson.databind.deser.std.NumberDeserializers.NumberDeserializer#deserialize(JsonParser, DeserializationContext)
 *//*w  ww  .j av a2 s  .  co  m*/
private Number parseValue(String value) {
    if (value == null) {
        return null;
    }
    value = value.trim();
    try {
        boolean decimal = value.contains(".");
        if (decimal) {
            return Double.valueOf(value);
        } else {
            long longValue = Long.parseLong(value);
            if (longValue <= Integer.MAX_VALUE && longValue >= Integer.MIN_VALUE) {
                return (int) longValue;
            }
            return longValue;
        }
    } catch (NumberFormatException e) {
        return null;
    }
}

From source file:com.redhat.lightblue.metadata.types.IntegerTypeTest.java

@Test
public void testToJson() {
    JsonNodeFactory jsonNodeFactory = new JsonNodeFactory(true);
    JsonNode jsonNode = integerType.toJson(jsonNodeFactory, Integer.MAX_VALUE);
    assertTrue(new Integer(jsonNode.asText()).equals(Integer.MAX_VALUE));
}

From source file:io.fluo.stress.TrieBasicIT.java

@Test
public void testBit32() throws Exception {
    runTrieTest(20, Integer.MAX_VALUE, 32);
}