Codota Logo
Tuple.getString
Code IndexAdd Codota to your IDE (free)

How to use
getString
method
in
obvious.data.Tuple

Best Java code snippets using obvious.data.Tuple.getString (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: com.googlecode.obvious/obviousx-weka

@Override
public double value(int attIndex) {
 Class<?> c = tuple.getSchema().getColumnType(attIndex);
 double value = -1;
 if (ObviousWekaUtils.isNumeric(c)) {
  return Double.valueOf(tuple.get(attIndex).toString());
 } else if (ObviousWekaUtils.isString(c)) {
  return Double.valueOf(attribute(attIndex).indexOfValue(
    tuple.getString(attIndex)));
 } else if (ObviousWekaUtils.isDate(c)) {
  return tuple.getDate(attIndex).getTime();
 }
 return value;
}
origin: com.googlecode.obvious/obvious-ivtk

@Override
public int addRow(Tuple tuple) {
 if (tuple.getSchema().equals(getSchema())) {
  String colName = tuple.getString("name");
  Class<?> c = (Class<?>) tuple.get("type");
  Object value = tuple.get("default");
  addColumn(colName, c, value);
 }
 this.fireTableEvent(getColumnCount(), getColumnCount(),
   TableListener.ALL_COLUMN, TableListener.INSERT);
 return getColumnCount();
}
origin: com.googlecode.obvious/obviousx-weka

@Override
public int addRow(Tuple tuple) {
 Schema tupleSchema = tuple.getSchema();
 for (int i = 0; i < tupleSchema.getColumnCount(); i++) {
  if (!tupleSchema.getColumnName(i).equals(schema.getColumnName(i))
    || !tupleSchema.getColumnType(i).equals(schema.getColumnType(i))) {
   return -1;
  }
 }
 Instance inst = new Instance(schema.getColumnCount());
 for (int i = 0; i < tuple.getSchema().getColumnCount(); i++) {
  Attribute att = instances.attribute(i);
  if (att.isNumeric())  {
   inst.setValue(att, Double.parseDouble(tuple.get(i).toString()));
  } else if (att.isString() || att.isNominal()) {
   inst.setValue(att, tuple.getString(i));
  } else if (att.isDate()) {
   try {
    inst.setValue(att, att.parseDate(tuple.getDate(i).toString()));
   } catch (ParseException e) {
    e.printStackTrace();
   }
  }
 }
 instances.add(inst);
 return getRowCount();
}
obvious.dataTuplegetString

Popular methods of Tuple

  • get
  • getSchema
  • getRow
  • getDate
  • set

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now