@Test public void close() throws IOException { Ht16k33 driver = new Ht16k33(mI2c); driver.close(); Mockito.verify(mI2c).close(); }
@Override public void close() throws IOException { if (mDevice != null) { try { mDevice.close(); } finally { mDevice = null; } } }
Ht16k33 implements AutoCloseable { @Override public void close() throws IOException { if (mDevice != null) { try { mDevice.close(); } finally { mDevice = null; } } } }
Ht16k33 implements AutoCloseable { @Override public void close() throws IOException { if (mDevice != null) { try { mDevice.close(); } finally { mDevice = null; } } } Ht16k33(String bus);  Ht16k33(String bus, int i2cAddress); @VisibleForTesting  Ht16k33(I2cDevice device); }
Ht16k33 implements AutoCloseable { @Override public void close() throws IOException { if (mDevice != null) { try { mDevice.close(); } finally { mDevice = null; } } } Ht16k33(String bus);  Ht16k33(String bus, int i2cAddress); @VisibleForTesting  Ht16k33(I2cDevice device); @Override void close(); void setEnabled(boolean enabled); void setBrightness(int value); void setBrightness(float value); void writeColumn(int column, short data); }
Ht16k33 implements AutoCloseable { @Override public void close() throws IOException { if (mDevice != null) { try { mDevice.close(); } finally { mDevice = null; } } } Ht16k33(String bus);  Ht16k33(String bus, int i2cAddress); @VisibleForTesting  Ht16k33(I2cDevice device); @Override void close(); void setEnabled(boolean enabled); void setBrightness(int value); void setBrightness(float value); void writeColumn(int column, short data); static final int I2C_ADDRESS; static final int HT16K33_BRIGHTNESS_MAX; static final short SEGMENT_TOP; static final short SEGMENT_RIGHT_TOP; static final short SEGMENT_RIGHT_BOTTOM; static final short SEGMENT_BOTTOM; static final short SEGMENT_LEFT_BOTTOM; static final short SEGMENT_LEFT_TOP; static final short SEGMENT_CENTER_LEFT; static final short SEGMENT_CENTER_RIGHT; static final short SEGMENT_DIAGONAL_LEFT_TOP; static final short SEGMENT_CENTER_TOP; static final short SEGMENT_DIAGONAL_RIGHT_TOP; static final short SEGMENT_DIAGONAL_LEFT_BOTTOM; static final short SEGMENT_CENTER_BOTTOM; static final short SEGMENT_DIAGONAL_RIGHT_BOTTOM; static final short SEGMENT_DOT; }