本文整理汇总了Java中edu.emory.mathcs.backport.java.util.Collections.emptyList方法的典型用法代码示例。如果您正苦于以下问题:Java Collections.emptyList方法的具体用法?Java Collections.emptyList怎么用?Java Collections.emptyList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.emory.mathcs.backport.java.util.Collections
的用法示例。
在下文中一共展示了Collections.emptyList方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEmptyDate
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test
public void testEmptyDate() {
PartitionSpec spec = new PartitionSpec("test", Collections.emptyList(), Interpreter.SECONDS,
"YYYY-MM-dd HH:mm:ss");
assertEquals(null, spec.interpret(""));
assertEquals(null, spec.interpret(null));
}
示例2: testDateFormatterSeconds
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test
public void testDateFormatterSeconds() {
PartitionSpec spec = new PartitionSpec("test", Collections.emptyList(), Interpreter.SECONDS,
"YYYY-MM-dd HH:mm:ss");
assertEquals("2017-01-19 05:05:59", spec.interpret("1484802359"));
}
示例3: testDateFormatterMilliseconds
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test
public void testDateFormatterMilliseconds() {
PartitionSpec spec = new PartitionSpec("test", Collections.emptyList(),
Interpreter.MILLISECONDS, "YYYY-MM-dd HH:mm:ss");
assertEquals("2017-01-19 05:05:59", spec.interpret("1484802359000"));
}
示例4: testStatic
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test
public void testStatic() {
PartitionSpec spec =
new PartitionSpec("test", Collections.emptyList(), Interpreter.STATIC, "static");
assertEquals("static", spec.interpret(""));
}
示例5: testString
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test
public void testString() {
PartitionSpec spec =
new PartitionSpec("test", Collections.emptyList(), Interpreter.STRING, "string");
assertEquals("a_string", spec.interpret("a_string"));
}
示例6: testStringConstructor
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test
public void testStringConstructor() {
PartitionSpec spec = new PartitionSpec("test", Collections.emptyList());
assertEquals("a_string", spec.interpret("a_string"));
}
示例7: testInvalidInterpreter
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test(expected = RuntimeException.class)
public void testInvalidInterpreter() {
PartitionSpec spec =
new PartitionSpec("test", Collections.emptyList(), Interpreter.STATIC, "static");
spec.getFormattedTime("will fail");
}
示例8: shouldComputeCorrectAverageWhenCoveragesListIsEmpty
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Test
public void shouldComputeCorrectAverageWhenCoveragesListIsEmpty() {
DataPoint dataPoint = new DataPoint(10, Collections.emptyList());
assertEquals("Correct average is computed", 0, dataPoint.getCoverage());
}
示例9: getSupportedSettings
import edu.emory.mathcs.backport.java.util.Collections; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Collection<RioSetting<?>> getSupportedSettings() {
return Collections.emptyList();
}