public short shortValueOf(Integer integer) { return integer.shortValue(); } }
public Short toShort(Integer self) { return self.shortValue(); }
@Override public short shortValueOf(Integer integer) { return integer.shortValue(); } }
@Override public short shortValueOf(Integer integer) { return integer.shortValue(); } }
public static Short parseShort(String body, String field) { ObjectMapper mapper = new ObjectMapper(); JsonNode node = null; try { node = mapper.readTree(body); JsonNode leaf = node.get(field); if (leaf != null) { Integer value = leaf.asInt(); return value.shortValue(); } } catch (IOException e) { e.printStackTrace(); } return null; }
@Override public void setDx2(int dx2) { _escherClientAnchor.setDx2(Integer.valueOf(dx2).shortValue()); } }
@Nullable public String getPitchAngleDescription() { Integer value = _directory.getInteger(TAG_PITCH_ANGLE); if (value == null) return null; DecimalFormat format = new DecimalFormat("0.#"); // converted to degrees of upward camera tilt return format.format(-value.shortValue() / 10.0); }
@Nullable public String getRollAngleDescription() { Integer value = _directory.getInteger(TAG_ROLL_ANGLE); if (value == null) return null; DecimalFormat format = new DecimalFormat("0.#"); // converted to degrees of clockwise camera rotation return format.format(value.shortValue() / 10.0); }
@Nullable public String getAccelerometerZDescription() { Integer value = _directory.getInteger(TAG_ACCELEROMETER_Z); if (value == null) return null; // positive is acceleration upwards return String.valueOf(value.shortValue()); }
/** * @param row2 the row(0 based) of the second cell. */ public void setRow2(int row2) { checkRange(row2, 0, MAX_ROW, "row2"); _escherClientAnchor.setRow2(Integer.valueOf(row2).shortValue()); }
@Nullable public String getAccelerometerXDescription() { Integer value = _directory.getInteger(TAG_ACCELEROMETER_X); if (value == null) return null; // positive is acceleration to the left return String.valueOf(value.shortValue()); }
/** * @param row1 0-based row of the first cell. */ public void setRow1(int row1) { checkRange(row1, 0, MAX_ROW, "row1"); _escherClientAnchor.setRow1(Integer.valueOf(row1).shortValue()); }
@Nullable public String getAccelerometerYDescription() { Integer value = _directory.getInteger(TAG_ACCELEROMETER_Y); if (value == null) return null; // positive is acceleration backwards return String.valueOf(value.shortValue()); }
public StreamPriority(JsonObject json) { this.weight = json.getInteger("weight", (int)DEFAULT_WEIGHT).shortValue(); this.dependency = json.getInteger("dependency", DEFAULT_DEPENDENCY); this.exclusive = json.getBoolean("exclusive", DEFAULT_EXCLUSIVE); }
public short getShort(int parameterIndex) throws SQLException { checkClosed(); checkIndex(parameterIndex, Types.SMALLINT, "Short"); if (callResult[parameterIndex - 1] == null) { return 0; } return ((Integer) callResult[parameterIndex - 1]).shortValue(); }
@Override protected Short[] getSortedTestData() { Random rnd = new Random(874597969123412338L); short rndShort = Integer.valueOf(rnd.nextInt()).shortValue(); if (rndShort < 0) { rndShort = Integer.valueOf(-rndShort).shortValue(); } if (rndShort == Short.MAX_VALUE) { rndShort -= 3; } if (rndShort <= 2) { rndShort += 3; } return new Short[]{ Short.valueOf(Short.MIN_VALUE), Short.valueOf(Integer.valueOf(-rndShort).shortValue()), Short.valueOf(Integer.valueOf(-1).shortValue()), Short.valueOf(Integer.valueOf(0).shortValue()), Short.valueOf(Integer.valueOf(1).shortValue()), Short.valueOf(Integer.valueOf(2).shortValue()), Short.valueOf(Integer.valueOf(rndShort).shortValue()), Short.valueOf(Short.MAX_VALUE)}; } }
@Nullable public String getWbTypeDescription(int tagType) { Integer wbtype = _directory.getInteger(tagType); if (wbtype == null) return null; return super.getLightSourceDescription(wbtype.shortValue()); }
@Nullable public String getWbTypeDescription(int tagType) { Integer wbtype = _directory.getInteger(tagType); if (wbtype == null) return null; return super.getLightSourceDescription(wbtype.shortValue()); } }
@Nullable public String getWbTypeDescription(int tagType) { Integer wbtype = _directory.getInteger(tagType); if (wbtype == null) return null; return super.getLightSourceDescription(wbtype.shortValue()); } }
@Override protected ShortValue[] getSortedTestData() { Random rnd = new Random(874597969123412338L); short rndShort = Integer.valueOf(rnd.nextInt()).shortValue(); if (rndShort < 0) { rndShort = Integer.valueOf(-rndShort).shortValue(); } if (rndShort == Short.MAX_VALUE) { rndShort -= 3; } if (rndShort <= 2) { rndShort += 3; } return new ShortValue[]{ new ShortValue(Short.MIN_VALUE), new ShortValue(Integer.valueOf(-rndShort).shortValue()), new ShortValue(Integer.valueOf(-1).shortValue()), new ShortValue(Integer.valueOf(0).shortValue()), new ShortValue(Integer.valueOf(1).shortValue()), new ShortValue(Integer.valueOf(2).shortValue()), new ShortValue(Integer.valueOf(rndShort).shortValue()), new ShortValue(Short.MAX_VALUE)}; } }