Package co.nstant.in.cbor.model

Examples of co.nstant.in.cbor.model.NegativeInteger


        super(decoder, inputStream);
    }

    @Override
    public NegativeInteger decode(int initialByte) throws CborException {
        return new NegativeInteger(
                        MINUS_ONE.subtract(getLengthAsBigInteger(initialByte)));
    }
View Full Code Here


  protected DataItem convert(long value) {
    if (value >= 0) {
      return new UnsignedInteger(value);
    } else {
      return new NegativeInteger(value);
    }
  }
View Full Code Here

    }
  }

  protected DataItem convert(BigInteger value) {
    if (value.signum() == -1) {
      return new NegativeInteger(value);
    } else {
      return new UnsignedInteger(value);
    }
  }
View Full Code Here

    super(decoder, inputStream);
  }

  @Override
  public NegativeInteger decode(int initialByte) throws CborException {
    return new NegativeInteger(MINUS_ONE.subtract(getLengthAsBigInteger(initialByte)));
  }
View Full Code Here

TOP

Related Classes of co.nstant.in.cbor.model.NegativeInteger

Copyright © 2018 www.massapicom. 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.