Examples of byteValue()


Examples of org.eclipse.jdt.internal.compiler.impl.Constant.byteValue()

    if (c == null || c == Constant.NotAConstant) return null;
    switch (c.typeID()) {
      case TypeIds.T_boolean:
        return Boolean.valueOf(c.booleanValue());
      case TypeIds.T_byte:
        return new Byte(c.byteValue());
      case TypeIds.T_char:
        return new Character(c.charValue());
      case TypeIds.T_double:
        return new Double(c.doubleValue());
      case TypeIds.T_float:

Examples of org.eclipse.jdt.internal.compiler.impl.Constant.byteValue()

      org.eclipse.jdt.internal.compiler.ast.Expression compilerExpression = (org.eclipse.jdt.internal.compiler.ast.Expression) node;
      Constant constant = compilerExpression.constant;
      if (constant != null && constant != Constant.NotAConstant) {
        switch (constant.typeID()) {
          case TypeIds.T_int : return new Integer(constant.intValue());
          case TypeIds.T_byte : return new Byte(constant.byteValue());
          case TypeIds.T_short : return new Short(constant.shortValue());
          case TypeIds.T_char : return new Character(constant.charValue());
          case TypeIds.T_float : return new Float(constant.floatValue());
          case TypeIds.T_double : return new Double(constant.doubleValue());
          case TypeIds.T_boolean : return constant.booleanValue() ? Boolean.TRUE : Boolean.FALSE;

Examples of org.eclipse.jdt.internal.compiler.impl.Constant.byteValue()

    if (c == null || c == Constant.NotAConstant) return null;
    switch (c.typeID()) {
      case TypeIds.T_boolean:
        return Boolean.valueOf(c.booleanValue());
      case TypeIds.T_byte:
        return new Byte(c.byteValue());
      case TypeIds.T_char:
        return new Character(c.charValue());
      case TypeIds.T_double:
        return new Double(c.doubleValue());
      case TypeIds.T_float:

Examples of org.eclipse.jdt.internal.compiler.impl.Constant.byteValue()

      return true;
    switch (currentConstant.typeID()) {
      case TypeIds.T_int :
        return currentConstant.intValue() != otherConstant.intValue();
      case TypeIds.T_byte :
        return currentConstant.byteValue() != otherConstant.byteValue();
      case TypeIds.T_short :
        return currentConstant.shortValue() != otherConstant.shortValue();
      case TypeIds.T_char :
        return currentConstant.charValue() != otherConstant.charValue();
      case TypeIds.T_long :

Examples of org.eclipse.jdt.internal.compiler.impl.Constant.byteValue()

    TypeBinding type = variableBinding.type;
    switch (type.id) {
      case TypeIds.T_boolean:
        return constant.booleanValue();
      case TypeIds.T_byte:
        return constant.byteValue();
      case TypeIds.T_char:
        return constant.charValue();
      case TypeIds.T_double:
        return constant.doubleValue();
      case TypeIds.T_float:

Examples of org.jamesii.core.math.complex.Complex.byteValue()

  }

  /** Tests the {@link Complex#byteValue()} method. */
  public void testByteValue() {
    Complex c = new Complex(Math.random() * 100, Math.random() * 100);
    assertEquals(c.byteValue(), (byte) c.getReal());
  }

  /** Tests the {@link Complex#shortValue()} method. */
  public void testShortValue() {
    Complex c = new Complex(Math.random() * 100, Math.random() * 100);
 

Examples of org.openrdf.model.Literal.byteValue()

                } else if (type.equals(XMLSchema.INT)) {
                    return l.intValue();
                } else if (type.equals(XMLSchema.INTEGER)) {
                    return l.integerValue();
                } else if (type.equals(XMLSchema.BYTE)) {
                    return l.byteValue();
                } else if (type.equals(XMLSchema.BOOLEAN)) {
                    return l.booleanValue();
                } else if (type.equals(XMLSchema.SHORT)) {
                    return l.shortValue();
                } else if (type.equals(XMLSchema.FLOAT)) {

Examples of org.openrdf.model.Literal.byteValue()

        assertEquals(XMLSchema.BOOLEAN, l.getDatatype());
        l = vf.createLiteral((byte) 'c');
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("99", l.getLabel());
        assertEquals((byte) 'c', l.byteValue());
        assertEquals(XMLSchema.BYTE, l.getDatatype());
        XMLGregorianCalendar calendar = XMLDatatypeUtil.parseCalendar("2002-10-10T12:00:00-05:00");
        l = vf.createLiteral(calendar);
        assertNotNull(l);
        assertNull(l.getLanguage());

Examples of org.openrdf.model.Literal.byteValue()

        l = (Literal) toSet(sc.getStatements(valueUri, hasValueUri, null, false)).iterator().next().getObject();
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("99", l.getLabel());
        assertEquals(XMLSchema.BYTE, l.getDatatype());
        assertEquals((byte) 'c', l.byteValue());
        valueUri = vf.createURI(prefix + "booleanValue");
        l = (Literal) toSet(sc.getStatements(valueUri, hasValueUri, null, false)).iterator().next().getObject();
        assertNotNull(l);
        assertNull(l.getLanguage());
        assertEquals("false", l.getLabel());

Examples of ptolemy.data.UnsignedByteToken.byteValue()

            byte[] dataBytes = new byte[dataArrayToken.length()];

            for (int j = 0; j < dataArrayToken.length(); j++) {
                UnsignedByteToken token = (UnsignedByteToken) dataArrayToken
                        .getElement(j);
                dataBytes[j] = token.byteValue();
            }

            DatagramPacket packet = new DatagramPacket(dataBytes,
                    dataBytes.length, _address, _remoteSocketNumber);
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.