Tabnine Logo
Integer.longValue
Code IndexAdd Tabnine to your IDE (free)

How to use
longValue
method
in
java.lang.Integer

Best Java code snippets using java.lang.Integer.longValue (Showing top 20 results out of 6,984)

origin: jwtk/jjwt

/**
 * @since 0.10.0
 */
private static Object normalize(Object o) {
  if (o instanceof Integer) {
    o = ((Integer) o).longValue();
  }
  return o;
}
origin: google/guava

@Override
Integer offset(Integer origin, long distance) {
 checkNonnegative(distance, "distance");
 return Ints.checkedCast(origin.longValue() + distance);
}
origin: apache/flink

  @Override
  public Long map(Integer value) throws Exception {
    return value.longValue();
  }
};
origin: apache/incubator-druid

@JsonCreator
public static RowBasedKey fromJsonArray(final Object[] key)
{
 // Type info is lost during serde:
 // Floats may be deserialized as doubles, Longs may be deserialized as integers, convert them back
 for (int i = 0; i < key.length; i++) {
  if (key[i] instanceof Integer) {
   key[i] = ((Integer) key[i]).longValue();
  } else if (key[i] instanceof Double) {
   key[i] = ((Double) key[i]).floatValue();
  }
 }
 return new RowBasedKey(key);
}
origin: google/j2objc

@Override
Integer offset(Integer origin, long distance) {
 checkNonnegative(distance, "distance");
 return Ints.checkedCast(origin.longValue() + distance);
}
origin: org.testng/testng

/**
 * @return <tt>null</tt> if there is no timeout value, otherwise the
 * watchdog instance.
 *
 * @throws BuildException under unspecified circumstances
 * @since Ant 1.2
 */
protected ExecuteWatchdog createWatchdog() /*throws BuildException*/ {
 if(m_timeout == null) {
  return null;
 }
 return new ExecuteWatchdog(m_timeout.longValue());
}
origin: prestodb/presto

@Override
Integer offset(Integer origin, long distance) {
 checkNonnegative(distance, "distance");
 return Ints.checkedCast(origin.longValue() + distance);
}
origin: Activiti/Activiti

public void setValue(Object value, ValueFields valueFields) {
 if (value != null) {
  valueFields.setLongValue(((Integer) value).longValue());
  valueFields.setTextValue(value.toString());
 } else {
  valueFields.setLongValue(null);
  valueFields.setTextValue(null);
 }
}
origin: apache/incubator-druid

private static MapBasedInputRow getLongRow(long timestamp, int rowID, int dimensionCount)
{
 List<String> dimensionList = new ArrayList<String>(dimensionCount);
 ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder();
 for (int i = 0; i < dimensionCount; i++) {
  String dimName = StringUtils.format("Dim_%d", i);
  dimensionList.add(dimName);
  builder.put(dimName, new Integer(rowID).longValue());
 }
 return new MapBasedInputRow(timestamp, dimensionList, builder.build());
}
origin: springside/springside4

private String format(Number o) {
  if (o instanceof Float) {
    return format(((Float) o).doubleValue());
  } else if (o instanceof Double) {
    return format(((Double) o).doubleValue());
  } else if (o instanceof Short) {
    return format(((Short) o).longValue());
  } else if (o instanceof Integer) {
    return format(((Integer) o).longValue());
  } else if (o instanceof Long) {
    return format(((Long) o).longValue());
  }
  return null;
}
origin: apache/flink

@Override
public void process(
    Integer integer,
    TimeWindow window,
    InternalWindowContext ctx,
    Iterable<Integer> input,
    Collector<Void> out) throws Exception {
  Integer inputValue = input.iterator().next();
  ctx.output(integerOutputTag, inputValue);
  ctx.output(longOutputTag, inputValue.longValue());
}
origin: robolectric/robolectric

private NativeInput.MotionEvent getNativeMotionEvent() {
 long nativePtr;
 if (RuntimeEnvironment.getApiLevel() <= KITKAT_WATCH) {
  Integer nativePtrInt = ReflectionHelpers.getField(realMotionEvent, "mNativePtr");
  nativePtr = nativePtrInt.longValue();
 } else {
  nativePtr = ReflectionHelpers.getField(realMotionEvent, "mNativePtr");
 }
 return nativeMotionEventRegistry.getNativeObject(nativePtr);
}
origin: apache/incubator-druid

 @Override
 public Entry<KeyType> apply(Entry<KeyType> entry)
 {
  final Object[] deserializedValues = new Object[entry.getValues().length];
  for (int i = 0; i < deserializedValues.length; i++) {
   deserializedValues[i] = aggregatorFactories[i].deserialize(entry.getValues()[i]);
   if (deserializedValues[i] instanceof Integer) {
    // Hack to satisfy the groupBy unit tests; perhaps we could do better by adjusting Jackson config.
    deserializedValues[i] = ((Integer) deserializedValues[i]).longValue();
   }
  }
  return new Entry<>(entry.getKey(), deserializedValues);
 }
}
origin: apache/flink

  @Override
  public void processElement(Integer value, Context ctx, Collector<String> out) throws Exception {
    out.collect("IN:" + value);
    ctx.output(INTEGER_OUTPUT_TAG, value);
    ctx.output(LONG_OUTPUT_TAG, value.longValue());
  }
}
origin: apache/flink

  @Override
  public void processElement(Integer value, Context ctx, Collector<String> out) throws Exception {
    out.collect("IN:" + value);
    ctx.output(INTEGER_OUTPUT_TAG, value);
    ctx.output(LONG_OUTPUT_TAG, value.longValue());
  }
}
origin: apache/flink

  public void eval(Integer a, Long b, Long c) {
    collect(a.longValue());
    collect(b);
    collect(c);
  }
}
origin: apache/flink

  @Override
  public void processElement(Integer value, Context ctx, Collector<String> out) throws Exception {
    out.collect("IN:" + value);
    ctx.output(INTEGER_OUTPUT_TAG, value);
    ctx.output(LONG_OUTPUT_TAG, value.longValue());
  }
}
origin: apache/kafka

@Test
public void testMaybeRequestUpdate() {
  TopicPartition tp = new TopicPartition("topic-1", 0);
  metadata.update(emptyMetadataResponse(), 0L);
  assertTrue(metadata.updateLastSeenEpochIfNewer(tp, 1));
  assertEquals(metadata.lastSeenLeaderEpoch(tp).get().longValue(), 1);
  metadata.update(emptyMetadataResponse(), 1L);
  assertFalse(metadata.updateLastSeenEpochIfNewer(tp, 1));
  assertEquals(metadata.lastSeenLeaderEpoch(tp).get().longValue(), 1);
  metadata.update(emptyMetadataResponse(), 2L);
  assertFalse(metadata.updateLastSeenEpochIfNewer(tp, 0));
  assertEquals(metadata.lastSeenLeaderEpoch(tp).get().longValue(), 1);
  metadata.update(emptyMetadataResponse(), 3L);
  assertTrue(metadata.updateLastSeenEpochIfNewer(tp, 2));
  assertEquals(metadata.lastSeenLeaderEpoch(tp).get().longValue(), 2);
}
origin: apache/kafka

@Test
public void testExpiryOfUnsentBatchesShouldNotCauseUnresolvedSequences() throws Exception {
  final long producerId = 343434L;
  TransactionManager transactionManager = new TransactionManager();
  setupWithTransactionState(transactionManager);
  prepareAndReceiveInitProducerId(producerId, Errors.NONE);
  assertTrue(transactionManager.hasProducerId());
  assertEquals(0, transactionManager.sequenceNumber(tp0).longValue());
  // Send first ProduceRequest
  Future<RecordMetadata> request1 = accumulator.append(tp0, 0L, "key".getBytes(), "value".getBytes(), null, null, MAX_BLOCK_TIMEOUT).future;
  Node node = metadata.fetch().nodes().get(0);
  time.sleep(10000L);
  client.disconnect(node.idString());
  client.blackout(node, 10);
  sender.run(time.milliseconds());
  assertFutureFailure(request1, TimeoutException.class);
  assertFalse(transactionManager.hasUnresolvedSequence(tp0));
}
origin: baomidou/mybatis-plus

@Test
@Order(26)
void testServiceImplInnerLambdaQuery() {
  H2User tomcat = userService.lambdaQuery().eq(H2User::getName, "Tomcat").one();
  Assertions.assertNotNull(tomcat);
  Assertions.assertNotEquals(0L, userService.lambdaQuery().like(H2User::getName, "a").count().longValue());
  userService.lambdaQuery().like(H2User::getName, "T")
    .ne(H2User::getAge, AgeEnum.TWO)
    .ge(H2User::getVersion, 1)
    .isNull(H2User::getPrice)
    .list();
}
java.langIntegerlongValue

Javadoc

Returns the value of this Integer as a long.

Popular methods of Integer

  • parseInt
    Parses the specified string as a signed integer value using the specified radix. The ASCII character
  • toString
    Converts the specified signed integer into a string representation based on the specified radix. The
  • valueOf
    Parses the specified string as a signed integer value using the specified radix.
  • intValue
    Gets the primitive value of this int.
  • <init>
    Constructs a new Integer from the specified string.
  • toHexString
    Returns a string representation of the integer argument as an unsigned integer in base 16.The unsign
  • equals
    Compares this instance with the specified object and indicates if they are equal. In order to be equ
  • compareTo
    Compares this Integer object to another object. If the object is an Integer, this function behaves l
  • hashCode
  • compare
    Compares two int values.
  • decode
    Parses the specified string and returns a Integer instance if the string can be decoded into an inte
  • numberOfLeadingZeros
    Determines the number of leading zeros in the specified integer prior to the #highestOneBit(int).
  • decode,
  • numberOfLeadingZeros,
  • getInteger,
  • doubleValue,
  • toBinaryString,
  • byteValue,
  • bitCount,
  • shortValue,
  • highestOneBit

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now