Examples of toLong()


Examples of anvil.core.Any.toLong()

          case Any.IS_BOOLEAN:
            buffer.append(data.toBoolean() ? "'true'" : "'false'");
            break;

          case Any.IS_INT:
            buffer.append(data.toLong());
            break;

          case Any.IS_DOUBLE:
            buffer.append(data.toDouble());
            break;
View Full Code Here

Examples of anvil.core.Any.toLong()

    case TYPE_STRING:
      appendString(result, flags, width, value.toString());
      break;

    case TYPE_LONG:
      appendLong(result, flags, width, value.toLong());
      break;

    case TYPE_DOUBLE:
      appendFloat(result, flags, width, precision, value.toDouble(), false);
      break;
View Full Code Here

Examples of anvil.core.Any.toLong()

            code.invokevirtual(pool.addMethodRef(TYPE_ANY,
              "toLong", "()J"))
          }
        } else {
          if (defaultValue != null) {
            code.lconst(defaultValue.toLong());
          } else {
            code.lconst(0);
          }
        }
        break;
View Full Code Here

Examples of anvil.core.Any.toLong()

 

  public Any eval()
  {
    Any a = _child.eval();
    return Any.create(a.toLong());
  }

  public void compile(ByteCompiler context, int operation)
  {
    if (operation == GET_BOOLEAN) {
View Full Code Here

Examples of com.altamiracorp.bigtable.model.Value.toLong()

public class ValueTest {
    @Test
    public void testLongConversion() {
        for (long i = 0; i < 10000; i++) {
            Value value = new Value(new Long(i));
            assertEquals(i, value.toLong().longValue());
        }
    }
}
View Full Code Here

Examples of com.caucho.quercus.env.Value.toLong()

        return "";

      Value v = args[_index];

      if (v.isLongConvertible())
        return String.valueOf((char) v.toLong());
      else
        return v.charValueAt(0).toString();
    }
  }
View Full Code Here

Examples of com.fasterxml.uuid.EthernetAddress.toLong()

        EthernetAddress ethernet_address =
            new EthernetAddress(new byte[ETHERNET_ADDRESS_ARRAY_LENGTH]);
        assertEquals(
            "EthernetAddress(byte[]) did not create expected EthernetAddress",
            NULL_ETHERNET_ADDRESS_LONG,
            ethernet_address.toLong());
       
        // let's test creating an array from a good byte array
        ethernet_address =
            new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);
        assertEquals(
View Full Code Here

Examples of com.google.enterprise.connector.otex.client.ClientValue.toLong()

        (LivelinkTraversalManager) sess.getTraversalManager();

    ClientValue results = ltm.getLastAuditEvent();
    assertEquals(1, results.size());
    // toLong works with H2 (we check the type in the production code).
    assertEquals(10042L, results.toLong(0, "EventID"));
    // The fractional seconds are OK, because LivelinkDateFormat.parse
    // handles multiple variations in the timestamp strings.
    assertEquals("2013-04-24 08:00:00.0", results.toString(0, "AuditDate"));
  }
View Full Code Here

Examples of com.linkedin.restli.examples.custom.types.CustomLong.toLong()

  public Greeting get(CompoundKey key)
  {
    CustomLong longId = (CustomLong)key.getPart("longId");
    Date dateId = (Date)key.getPart("dateId");

    return new Greeting().setId(longId.toLong() + dateId.getTime());
  }

  @Override
  public BatchUpdateResult<CompoundKey, Greeting> batchUpdate(BatchUpdateRequest<CompoundKey, Greeting> entities)
  {
View Full Code Here

Examples of com.linkedin.restli.examples.custom.types.CustomNonNegativeLong.toLong()

  public Greeting get(CompoundKey key)
  {
    CustomNonNegativeLong age = (CustomNonNegativeLong)key.getPart("age");
    Date birthday = (Date)key.getPart("birthday");

    return new Greeting().setId(age.toLong() + birthday.getTime());
  }

  @Override
  public BatchUpdateResult<CompoundKey, Greeting> batchUpdate(BatchUpdateRequest<CompoundKey, Greeting> entities)
  {
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.