我将在Java中弃用一个类.
@Deprecated
class deprecatedClass
Run Code Online (Sandbox Code Playgroud)
我有这个弃用的类的列表,
List<deprecatedClass> listOfDeperecatedClass
Run Code Online (Sandbox Code Playgroud)
那么我是否也需要@Deprecated为此列表添加标签?
编辑:@Deprecated应该有一个大写'D'.
请参阅:http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html
我有一个字符串,我需要检查它是否是标准的时区标识符.我不确定我需要使用哪种方法.
String timeZoneToCheck = "UTC";
Run Code Online (Sandbox Code Playgroud)
我想检查它是否代表有效的时区.
我在4.10使用junit并在1.3处声明了hamcrest-core,在1.3处声明了hamcrest-library.我的问题是在junit 4.10中嵌入的hamcrest-library和hamcrest-core.junit 4.11怎么样?
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud) joda.time中是否有任何函数验证字符串是否表示正确的时区,如果格式不正确则抛出异常?
我知道TimeZone.getAvalibaleIDs(),但只是想知道是否有任何预定义的功能.
java ×3
timezone ×2
annotations ×1
deprecated ×1
hamcrest ×1
jodatime ×1
junit ×1
maven ×1
validation ×1