Mock singleton objects and static methods Mocking objects Mocking static methods Unmocking Mock singleton objects and static methods Mocking objects When you need a singleto...
influxdb-client-java Note: Use this client library with InfluxDB 2.x and InfluxDB 1.8+ ( see details ). For connecting to InfluxDB 1.7 or earlier instances, use the influxdb-jav...
Sealed Classes Sealed Classes Sealed classes are used for representing restricted class hierarchies, when a value can have one of the types from a limited set, but cannot have ...
类型检测与类型转换 is 与 !is 操作符 智能转换 “不安全的”转换操作符 “安全的”(可空)转换操作符 类型检测与类型转换 In Kotlin, you can perform type checks to check the type of an object at runtime. Type casts convert objects...
属性 属性 属性与Java中的字段是相同的,但是更加强大。属性做的事情是字段加上getter加上setter。我们通过一个例子来比较他们的不同之处。这是Java中字段安全访问和修改所需要的代码: public class Person { private String name ; public S...