congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Conversion.toInt
Code IndexAdd Tabnine to your IDE (free)

How to use
toInt
method
in
org.apache.avro.Conversion

Best Java code snippets using org.apache.avro.Conversion.toInt (Showing top 4 results out of 315)

origin: org.apache.avro/avro

 return conversion.toBytes(fromClass.cast(datum), schema, type);
case INT:
 return conversion.toInt(fromClass.cast(datum), schema, type);
case LONG:
 return conversion.toLong(fromClass.cast(datum), schema, type);
origin: apache/avro

 return conversion.toBytes(fromClass.cast(datum), schema, type);
case INT:
 return conversion.toInt(fromClass.cast(datum), schema, type);
case LONG:
 return conversion.toLong(fromClass.cast(datum), schema, type);
origin: org.apache.parquet/parquet-avro

private <D> Object convert(Schema schema, LogicalType logicalType,
              Conversion<D> conversion, Object datum) {
 if (conversion == null) {
  return datum;
 }
 Class<D> fromClass = conversion.getConvertedType();
 switch (schema.getType()) {
  case RECORD:  return conversion.toRecord(fromClass.cast(datum), schema, logicalType);
  case ENUM:    return conversion.toEnumSymbol(fromClass.cast(datum), schema, logicalType);
  case ARRAY:   return conversion.toArray(fromClass.cast(datum), schema, logicalType);
  case MAP:     return conversion.toMap(fromClass.cast(datum), schema, logicalType);
  case FIXED:   return conversion.toFixed(fromClass.cast(datum), schema, logicalType);
  case STRING:  return conversion.toCharSequence(fromClass.cast(datum), schema, logicalType);
  case BYTES:   return conversion.toBytes(fromClass.cast(datum), schema, logicalType);
  case INT:     return conversion.toInt(fromClass.cast(datum), schema, logicalType);
  case LONG:    return conversion.toLong(fromClass.cast(datum), schema, logicalType);
  case FLOAT:   return conversion.toFloat(fromClass.cast(datum), schema, logicalType);
  case DOUBLE:  return conversion.toDouble(fromClass.cast(datum), schema, logicalType);
  case BOOLEAN: return conversion.toBoolean(fromClass.cast(datum), schema, logicalType);
 }
 return datum;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

 return conversion.toBytes(fromClass.cast(datum), schema, type);
case INT:
 return conversion.toInt(fromClass.cast(datum), schema, type);
case LONG:
 return conversion.toLong(fromClass.cast(datum), schema, type);
org.apache.avroConversiontoInt

Popular methods of Conversion

  • getConvertedType
    Return the Java class representing the logical type.
  • toBytes
  • toFixed
  • fromArray
  • fromBoolean
  • fromBytes
  • fromCharSequence
  • fromDouble
  • fromEnumSymbol
  • fromFixed
  • fromFloat
  • fromInt
  • fromFloat,
  • fromInt,
  • fromLong,
  • fromMap,
  • fromRecord,
  • toArray,
  • toBoolean,
  • toCharSequence,
  • toDouble,
  • toEnumSymbol

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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