Examples of toInt()


Examples of org.apache.mina.example.chat.ChatCommand.toInt()

        String theCommand = result[0];
        ChatCommand command = ChatCommand.valueOf(theCommand);

        if ("OK".equals(status)) {

            switch (command.toInt()) {

            case ChatCommand.BROADCAST:
                if (result.length == 3) {
                    callback.messageReceived(result[2]);
                }
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toInt()

  private static final ObjectMapper mapper = new ObjectMapper();

  protected ResourceResponse newResourceResponse(Attributes attributes)
  {
    final StringValue queriesParam = attributes.getRequest().getQueryParameters().getParameterValue("queries");
    int qs = queriesParam.toInt(1);
    if (qs < 1)
    {
      qs = 1;
    }
    else if (qs > 500)
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toInt()

    assertEquals(0, params.getAllNamed().size());
    assertEquals(2, params.getIndexedCount());

    StringValue paramId = params.get(0);
    assertNotNull(paramId);
    assertEquals(1, paramId.toInt());

    StringValue paramName = params.get(1);
    assertNotNull(paramName);
    assertEquals("fred", paramName.toString());
  }
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toInt()

    assertEquals(3, params.getAllNamed().size());
    assertEquals(2, params.getIndexedCount());

    StringValue paramId = params.get(0);
    assertNotNull(paramId);
    assertEquals(1, paramId.toInt());

    StringValue paramName = params.get(1);
    assertNotNull(paramName);
    assertEquals("fred", paramName.toString());
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toInt()

    assertNotNull(foo.size() == 2);
    assertEquals("bar", foo.get(0).toString(""));
    assertEquals("baz", foo.get(1).toString(""));

    StringValue paramValue = params.get("value");
    assertEquals(12, paramValue.toInt());
  }

  @Test
  public void testPlaceholders()
  {
View Full Code Here

Examples of org.blync.client.calendar.Day.toInt()

        for (int i = 0; i < 366; i++) {
            Day occurrence = startDay.add(i);
            if (occurrence.compare(endDay) > 0) {
                break;
            }
            days.addElement(new Integer(occurrence.toInt()));
        }
        if (appointment.getRecurrence() != null) {
            RecurrencePattern recurrence = appointment.getRecurrence();
            int type = recurrence.getType();
            Day repeatUntil = recurrence.getRepeatUntil();
View Full Code Here

Examples of org.exolab.castor.xml.schema.Facet.toInt()

            Facet facet = (Facet)enumeration.nextElement();
            String name = facet.getName();

            //-- maxExclusive
            if (Facet.MAX_EXCLUSIVE.equals(name))
                setMaxExclusive(facet.toInt());
            //-- maxInclusive
            else if (Facet.MAX_INCLUSIVE.equals(name))
                setMaxInclusive(facet.toInt());
            //-- minExclusive
            else if (Facet.MIN_EXCLUSIVE.equals(name))
View Full Code Here

Examples of org.geotools.feature.visitor.MinVisitor.MinResult.toInt()

        assertEquals(1, minResult3.toInt());
        //test for destruction during merge
        CalcResult minResult4 = new MinResult((Comparable) new Integer(10));
        CalcResult minResult5 = minResult4.merge(minResult1);
        assertEquals(1, minResult5.toInt());
        assertEquals(10, minResult4.toInt());
        //test negative result
        CalcResult minResult6 = new MinResult((Comparable) new Integer(-5));
        CalcResult minResult7 = (MinResult) minResult1.merge(minResult6);
        assertEquals(-5, minResult7.toInt());
        assertEquals(-5, minResult6.toInt());
View Full Code Here

Examples of org.jitterbit.integration.server.data.DataElement.toInt()

      final String headerPrefix = "jms.header.out.";
      final String propertyPrefix = "jms.property.out.";
      if( propName.startsWith(headerPrefix) ) {
        String headerName = propName.substring(headerPrefix.length());
        if ( headerName.equalsIgnoreCase(JmsHeader.JmsDeliveryMode.getName()) ) {
          deliveryMode = value.toInt();
          if ( deliveryMode != DeliveryMode.NON_PERSISTENT && deliveryMode != DeliveryMode.PERSISTENT)
            deliveryMode = defaultDeliveryMode;
        }
        else if ( headerName.equalsIgnoreCase(JmsHeader.JmsPriority.getName())) {
          priority = value.toInt();
View Full Code Here

Examples of org.luaj.vm2.LuaValue.toint()

 
  public void testJavaIntToLuaInt() {
    Integer i = Integer.valueOf(777);
    LuaValue v = CoerceJavaToLua.coerce(i);
    assertEquals( LuaInteger.class, v.getClass() );
    assertEquals( 777, v.toint() );
  }

  public void testLuaIntToJavaInt() {
    LuaInteger i = LuaInteger.valueOf(777);
    Object o = CoerceLuaToJava.coerce(i, int.class);
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.