本文整理汇总了Java中org.hamcrest.internal.ArrayIterator类的典型用法代码示例。如果您正苦于以下问题:Java ArrayIterator类的具体用法?Java ArrayIterator怎么用?Java ArrayIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ArrayIterator类属于org.hamcrest.internal包,在下文中一共展示了ArrayIterator类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: appendValue
import org.hamcrest.internal.ArrayIterator; //导入依赖的package包/类
public Description appendValue(Object value) {
if (value == null) {
append("null");
} else if (value instanceof String) {
toJavaSyntax((String) value);
} else if (value instanceof Character) {
append('"');
toJavaSyntax((Character) value);
append('"');
} else if (value instanceof Short) {
append('<');
append(valueOf(value));
append("s>");
} else if (value instanceof Long) {
append('<');
append(valueOf(value));
append("L>");
} else if (value instanceof Float) {
append('<');
append(valueOf(value));
append("F>");
} else if (value.getClass().isArray()) {
appendValueList("[",", ","]", new ArrayIterator(value));
} else {
append('<');
append(valueOf(value));
append('>');
}
return this;
}
开发者ID:KRMAssociatesInc,项目名称:eHMP,代码行数:31,代码来源:BaseDescription.java
示例2: testInternalNets
import org.hamcrest.internal.ArrayIterator; //导入依赖的package包/类
@Test
public void testInternalNets() throws Exception {
ThermalInstance upper = testLoadedUnit.getInstances().get(0);
ThermalInstance lower = testLoadedUnit.getInstances().get(1);
ArrayIterator namesIt = new ArrayIterator(new String[]{"net1", "net2", "net3", "net4", "net5", "net6", "net7",
"net8"});
ArrayIterator instancesIt = new ArrayIterator(new ThermalInstance[][]{{upper, upper}, {upper, upper},
{upper, upper}, {upper, lower}, {lower, lower}, {lower, lower}, {lower, lower}, {lower, upper}});
ArrayIterator pinNamesIt = new ArrayIterator(new String[][]{{"D", "C4"}, {"C", "B4"}, {"B", "A4"}, {"A", "D4"},
{"D", "C4"}, {"C", "B4"}, {"B", "A4"}, {"A", "D4"}});
Iterator<Net> netsIt = testLoadedUnit.getInternalNets().iterator();
while (namesIt.hasNext() && instancesIt.hasNext() && netsIt.hasNext() && pinNamesIt.hasNext()) {
String name = (String) namesIt.next();
Net net = (Net) netsIt.next();
ArrayIterator instIt = new ArrayIterator((ThermalInstance[]) instancesIt.next());
ArrayIterator pinOutput = new ArrayIterator(new Boolean[]{true, false});
ArrayIterator pinNameIt = new ArrayIterator((String[]) pinNamesIt.next());
Net newNet = new Net(name, NetType.WIRE);
while (pinNameIt.hasNext() && pinOutput.hasNext() && instIt.hasNext()) {
newNet.addPin(new Pin((Boolean) pinOutput.next(), (String) pinNameIt.next(), (ThermalInstance) instIt.next()));
}
Assert.assertEquals(net, newNet);
}
}
开发者ID:ComputerArchitectureGroupPWr,项目名称:JGenerilo,代码行数:34,代码来源:ThermometerUnitTest.java
示例3: appendValue
import org.hamcrest.internal.ArrayIterator; //导入依赖的package包/类
@Override
public Description appendValue(Object value) {
if (value == null) {
append("null");
} else if (value instanceof String) {
toJavaSyntax((String) value);
} else if (value instanceof Character) {
append('"');
toJavaSyntax((Character) value);
append('"');
} else if (value instanceof Short) {
append('<');
append(descriptionOf(value));
append("s>");
} else if (value instanceof Long) {
append('<');
append(descriptionOf(value));
append("L>");
} else if (value instanceof Float) {
append('<');
append(descriptionOf(value));
append("F>");
} else if (value.getClass().isArray()) {
appendValueList("[",", ","]", new ArrayIterator(value));
} else {
append('<');
append(descriptionOf(value));
append('>');
}
return this;
}
开发者ID:lcm-proj,项目名称:lcm,代码行数:32,代码来源:BaseDescription.java
示例4: main
import org.hamcrest.internal.ArrayIterator; //导入依赖的package包/类
public static void main(String[] args) {
System.out.println("Hello, world!");
Iterator<Object> arrayIterator = new ArrayIterator(args);
while (arrayIterator.hasNext()) System.out.println(arrayIterator.next());
}
开发者ID:pivotal,项目名称:executable-dist-plugin,代码行数:6,代码来源:Hello.java
示例5: Search
import org.hamcrest.internal.ArrayIterator; //导入依赖的package包/类
Search(long[] query, ArrayIterator ls, TIntHashSet results ) {
this.ls = ls;
this.results = results;
this.query= query;
}
开发者ID:ffalchi,项目名称:it.cnr.isti.vir,代码行数:6,代码来源:LSHHammingLongs_Archive.java
注:本文中的org.hamcrest.internal.ArrayIterator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论