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

How to use
floatValue
method
in
java.lang.Integer

Best Java code snippets using java.lang.Integer.floatValue (Showing top 20 results out of 1,386)

origin: apache/incubator-pinot

@Override
public Float toFloat(Object value) {
 return ((Integer) value).floatValue();
}
origin: jfinal/jfinal

public Float toFloat(Integer self) {
  return self.floatValue();
}
 
origin: debezium/debezium

public static Number add(Integer first, float second) {
  double sum = first.floatValue() + second;
  if (Float.MAX_VALUE >= sum && Float.MIN_VALUE <= sum) return Float.valueOf((float) sum);
  return Double.valueOf(sum);
}
origin: MovingBlocks/Terasology

@Override
public Float get() {
  return ((Integer) fieldMetadata.getValueChecked(target)).floatValue();
}
origin: json-path/JsonPath

  public Float convert(Object src) {
    if(src == null){
      return null;
    }
    if(Float.class.isAssignableFrom(src.getClass())){
      return (Float) src;
    } else if (Integer.class.isAssignableFrom(src.getClass())) {
      return ((Integer) src).floatValue();
    } else if (Long.class.isAssignableFrom(src.getClass())) {
      return ((Long) src).floatValue();
    } else if (BigDecimal.class.isAssignableFrom(src.getClass())) {
      return ((BigDecimal) src).floatValue();
    } else if (Double.class.isAssignableFrom(src.getClass())) {
      return ((Double) src).floatValue();
    } else if (String.class.isAssignableFrom(src.getClass())) {
      return Float.valueOf(src.toString());
    }
    throw new MappingException("can not map a " + src.getClass() + " to " + Float.class.getName());
  }
}
origin: hibernate/hibernate-orm

return (X) Float.valueOf( value.floatValue() );
origin: voldemort/voldemort

private Float coerceToFloat(Object o) {
  if(o == null)
    return null;
  Class<?> c = o.getClass();
  if(c == Float.class)
    return (Float) o;
  else if(c == Byte.class)
    return ((Byte) o).floatValue();
  else if(c == Short.class)
    return ((Short) o).floatValue();
  else if(c == Integer.class)
    return ((Integer) o).floatValue();
  else
    throw new SerializationException("Object of type " + c.getName()
                     + " cannot be coerced to type " + JsonTypes.FLOAT32
                     + " as the schema specifies.");
}
origin: CalebFenton/simplify

  resultValue = typedValue.longValue();
} else if (opName.endsWith("float")) {
  resultValue = typedValue.floatValue();
origin: postgresql/postgresql

  return new PGBoolean( val.intValue() == 0?Boolean.FALSE:Boolean.TRUE );
case Types.REAL:
  return new PGFloat( new Float( val.floatValue() ) );
case Types.DOUBLE:
case Types.FLOAT:
origin: apache/kylin

cubeMetrics.increase("totalCube", totalCube.floatValue());
for (CubeInstance cubeInstance : cubeInstances) {
  if (cubeInstance.getInputRecordSizeBytes() > 0) {
origin: com.datastax.cassandra/cassandra-driver-core

@Override
protected Float deserialize(Integer value) {
 return value.floatValue();
}
origin: com.jayway.jsonpath/json-path

  public Float convert(Object src) {
    if(src == null){
      return null;
    }
    if(Float.class.isAssignableFrom(src.getClass())){
      return (Float) src;
    } else if (Integer.class.isAssignableFrom(src.getClass())) {
      return ((Integer) src).floatValue();
    } else if (Long.class.isAssignableFrom(src.getClass())) {
      return ((Long) src).floatValue();
    } else if (BigDecimal.class.isAssignableFrom(src.getClass())) {
      return ((BigDecimal) src).floatValue();
    } else if (Double.class.isAssignableFrom(src.getClass())) {
      return ((Double) src).floatValue();
    } else if (String.class.isAssignableFrom(src.getClass())) {
      return Float.valueOf(src.toString());
    }
    throw new MappingException("can not map a " + src.getClass() + " to " + Float.class.getName());
  }
}
origin: nodebox/nodebox

public void setValueForControl(Object v) {
  if (v instanceof Float) {
    draggable.setValue((Float) v);
  } else if (v instanceof Double) {
    draggable.setValue(((Double) v).floatValue());
  } else if (v instanceof Integer) {
    draggable.setValue(((Integer) v).floatValue());
  } else {
    throw new IllegalArgumentException("Value " + v + " is not a number.");
  }
}
origin: geotools/geotools

  opacity = i.floatValue();
} else if (obj instanceof Float) {
  Float i = (Float) obj;
origin: geotools/geotools

cell = ((Integer) reclassTable.elementAt((int) cell)).floatValue();
origin: org.mvel/mvel2

 public Float convert(Object o) {
  //noinspection UnnecessaryBoxing
  return ((Integer) o).floatValue();
 }
}
origin: boonproject/boon

  @Override
  public Float apply(Integer salary) {
    float pay = salary.floatValue() / 100;
    return pay;
  }
})
origin: org.apache.sling/org.apache.sling.jcr.resource

/**
 * @see org.apache.sling.jcr.resource.internal.helper.Converter#toFloat()
 */
public Float toFloat() {
  return this.getNumber().floatValue();
}
origin: PrivacyApps/document-viewer

@ActionMethod(ids = { R.id.actions_leftTopCorner, R.id.actions_leftBottomCorner, R.id.actions_rightTopCorner,
    R.id.actions_rightBottomCorner })
public void scrollToCorner(final ActionEx action) {
  final Integer offX = action.getParameter("offsetX");
  final Integer offY = action.getParameter("offsetY");
  final float offsetX = offX != null ? offX.floatValue() : 0;
  final float offsetY = offY != null ? offY.floatValue() : 0;
  new EventGotoPageCorner(this, offsetX, offsetY).process().release();
}
origin: goldmansachs/gs-collections

this.getInstanceUnderTest().sumOfFloat(each -> {
  sumOfFloatIterationOrder.add(each);
  return each.floatValue();
});
assertEquals(expectedIterationOrder, sumOfFloatIterationOrder);
java.langIntegerfloatValue

Javadoc

Returns the value of this Integer as a float.

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.
  • longValue
    Returns the value of this Integer as along.
  • decode
    Parses the specified string and returns a Integer instance if the string can be decoded into an inte
  • longValue,
  • 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
  • Github Copilot alternatives
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