/** * Instantiate a new Vector based on an existing DDF, given a column name. The column name is not verified for * correctness; any errors would only show up on actual usage. * * @param theDDF * @param theColumnName */ public Vector(DDF theDDF, String theColumnName) { this.initialize(theDDF, theColumnName); }
private void initialize(DDF theDDF, String name) { this.setDDF(theDDF); this.setDDFColumnName(name); }
private void initialize(String name, T[] data, String engineName) throws DDFException { if (data == null || data.length == 0) throw new DDFException("Cannot initialize a null or zero-length Vector"); DDF newDDF = DDFManager.get(DDFManager.EngineType.fromString(engineName)) // .newDDF(null, (Object) data, new Class[] { Array.class, this.getParameterizedType() },name, // new Schema(name, String.format("%s %s", name, this.getParameterizedType().getSimpleName()))); this.initialize(newDDF, name); }
/** * Instantiate a new Vector with the given T array. Uses the default engine. * * @param data * @param theColumnName * @throws DDFException */ public Vector(String theColumnName, T[] data) throws DDFException { this.initialize(theColumnName, data, null); }
/** * Instantiate a new Vector with the given T array. Uses the default engine. * * @param data * @param theColumnName * @param engineName * @throws DDFException */ public Vector(String theColumnName, T[] data, String engineName) throws DDFException { this.initialize(theColumnName, data, engineName); }