Examples of convert()


Examples of parquet.schema.PrimitiveType.PrimitiveTypeName.convert()

  private Column convertPrimitiveField(final Type fieldType) {
    final String fieldName = fieldType.getName();
    final PrimitiveTypeName parquetPrimitiveTypeName =
        fieldType.asPrimitiveType().getPrimitiveTypeName();
    final OriginalType originalType = fieldType.getOriginalType();
    return parquetPrimitiveTypeName.convert(
        new PrimitiveType.PrimitiveTypeNameConverter<Column, RuntimeException>() {
      @Override
      public Column convertBOOLEAN(PrimitiveTypeName primitiveTypeName) {
        return new Column(fieldName, TajoDataTypes.Type.BOOLEAN);
      }
View Full Code Here

Examples of pt.ist.fenixWebFramework.rendererExtensions.converters.DomainObjectKeyConverter.convert()

                String[] parts = key.split(",");
                if (parts.length < 3) {
                    throw new ConversionException("invalid key format: " + key);
                }

                final CurricularCourse curricularCourse = (CurricularCourse) converter.convert(type, parts[0]);
                final CurriculumGroup curriculumGroup = (CurriculumGroup) converter.convert(type, parts[1]);
                final StudentCurricularPlan studentCurricularPlan = (StudentCurricularPlan) converter.convert(type, parts[2]);

                final SelectedCurricularCourse selectedCurricularCourse =
                        new SelectedCurricularCourse(curricularCourse, studentCurricularPlan);
View Full Code Here

Examples of pt.ist.fenixWebFramework.renderers.converters.IntegerNumberConverter.convert()

        @Override
        public Object convert(Class type, Object value) {
            try {
                IntegerNumberConverter converter = new IntegerNumberConverter();
                Integer studentNumber = (Integer) converter.convert(type, value);

                return Student.readStudentByNumber(studentNumber);
            } catch (ConversionException e) {
                return null;
            }
View Full Code Here

Examples of ptolemy.actor.GraphReader.convert()

     */
    public static void main(String[] args) {
        TestGraphReader tester = new TestGraphReader();
        CompositeActor toplevel = tester._readGraph(args);
        GraphReader graphReader = new GraphReader();
        DirectedGraph graph = (DirectedGraph) (graphReader.convert(toplevel));
        tester._printGraph(graph);
    }

    ///////////////////////////////////////////////////////////////////
    ////                         protected methods                 ////
View Full Code Here

Examples of ptolemy.actor.IOPort.convert()

                                IOPort port = receiver.getContainer();
                                if (isPutConditional) {
                                    receiver._putConditional = true;
                                    receiver._token = token == null ? null
                                            : port.convert(token);
                                } else {
                                    receiver._putConditional = false;
                                    try {
                                        token = tokenArray[i][j];
                                    } catch (Throwable e) {
View Full Code Here

Examples of ptolemy.actor.TypedIOPort.convert()

                }

                for (int j = 0; j < farReceivers[channelIndex].length; j++) {
                    TypedIOPort port = (TypedIOPort) farReceivers[channelIndex][j]
                            .getContainer();
                    Token newToken = port.convert(token);
                    farReceivers[channelIndex][j].put(newToken);
                }
            } catch (ArrayIndexOutOfBoundsException ex) {
                // NOTE: This may occur if the channel index is out of range.
                // This is allowed, just do nothing.
View Full Code Here

Examples of ptolemy.data.type.ArrayType.convert()

        IntToken inttoken = new IntToken(0);
        inttokens[0] = inttoken;
        arraytoken = new ArrayToken(inttokens);

        ArrayType arraytype = new ArrayType(BaseType.INT);
        arraytoken2 = (ArrayToken) arraytype.convert(arraytoken);
        initialOutputs_CGToken = arraytoken2;
        System.out.println("token = " + initialOutputs_CGToken.toString());
    }

    public static void main(String[] args) throws IllegalActionException {
View Full Code Here

Examples of ptolemy.data.type.Type.convert()

            Type type = ((ArrayType) getType()).getElementType();

            if (type.equals(token.getType())) {
                return token;
            } else {
                Token newToken = type.convert(token);
                return newToken;
            }
        }

        /** Override the base class to convert the token to the element
View Full Code Here

Examples of rinde.sim.pdptw.central.Solvers.SimulationConverter.convert()

    final TestSimAPI simAPI = new TestSimAPI(0, 1, NonSI.MINUTE);
    final SimulationConverter handle = Solvers.converterBuilder().with(mp)
        .with(simAPI).build();

    final StateContext sc = handle.convert(SolveArgs.create().useAllParcels()
        .noCurrentRoutes());
    assertEquals(ImmutableMap.of(v1.dto, v1), sc.vehicleMap);
    assertEquals(ImmutableMap.of(p1.dto, p1), sc.parcelMap);

    assertEquals(ImmutableSet.of(p1.dto), sc.state.availableParcels);
View Full Code Here

Examples of scatours.currencyconverter.CurrencyConverter.convert()

        node.start();

        System.out.println("Quick currency converter test");
        CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter");
        System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
        System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP");

        System.out.println("Node started - Press enter to shutdown.");
        System.in.read();
        node.stop();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.