本文整理汇总了Java中kodkod.util.ints.SparseSequence.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java SparseSequence.getClass方法的具体用法?Java SparseSequence.getClass怎么用?Java SparseSequence.getClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kodkod.util.ints.SparseSequence
的用法示例。
在下文中一共展示了SparseSequence.getClass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BooleanMatrix
import kodkod.util.ints.SparseSequence; //导入方法依赖的package包/类
/**
* Constructs a new matrix with the given dimensions and factory, backed by
* a sparse sequence which can most efficiently hold the elements storable
* in the sparse sequences s0 and s1.
*
* @ensures this.dimensions' = dimensions && this.factory' = factory &&
* this.elements' = [0..dimensions.capacity)->one FALSE
*/
private BooleanMatrix(Dimensions d, BooleanFactory f, SparseSequence<BooleanValue> s0,
SparseSequence<BooleanValue> s1) {
this.dims = d;
this.factory = f;
final Class< ? > c0 = s0.getClass(), c1 = s1.getClass();
if (c0 != c1 || c0 == RangeSequence.class)
this.cells = new RangeSequence<BooleanValue>();
else if (c0 == HomogenousSequence.class)
this.cells = new HomogenousSequence<BooleanValue>(TRUE, Ints.bestSet(d.capacity()));
else
this.cells = new TreeSequence<BooleanValue>();
}
示例2: BooleanMatrix
import kodkod.util.ints.SparseSequence; //导入方法依赖的package包/类
/**
* Constructs a new matrix with the given dimensions and factory,
* backed by a sparse sequence which can most efficiently hold
* the elements storable in the sparse sequences s0 and s1.
* @ensures this.dimensions' = dimensions && this.factory' = factory &&
* this.elements' = [0..dimensions.capacity)->one FALSE
*/
private BooleanMatrix(Dimensions d, BooleanFactory f, SparseSequence<BooleanValue> s0, SparseSequence<BooleanValue> s1) {
this.dims = d;
this.factory = f;
final Class<?> c0 = s0.getClass(), c1 = s1.getClass();
if (c0!=c1 || c0==RangeSequence.class)
this.cells = new RangeSequence<BooleanValue>();
else if (c0==HomogenousSequence.class)
this.cells = new HomogenousSequence<BooleanValue>(TRUE, Ints.bestSet(d.capacity()));
else
this.cells = new TreeSequence<BooleanValue>();
}
示例3: BooleanMatrix
import kodkod.util.ints.SparseSequence; //导入方法依赖的package包/类
/**
* Constructs a new matrix with the given dimensions and factory,
* backed by a sparse sequence which can most efficiently hold
* the elements storable in the sparse sequences s0 and s1.
* @ensures this.dimensions' = dimensions && this.factory' = factory &&
* this.elements' = [0..dimensions.capacity)->one FALSE
*/
private BooleanMatrix(Dimensions d, BooleanFactory f, SparseSequence<BooleanValue> s0, SparseSequence<BooleanValue> s1) {
this.dims = d;
this.factory = f;
final Class<?> c0 = s0.getClass(), c1 = s1.getClass();
if (c0!=c1 || c0==RangeSequence.class)
this.cells = new RangeSequence<BooleanValue>();
else if (c0==HomogenousSequence.class)
this.cells = new HomogenousSequence<BooleanValue>(TRUE, Ints.bestSet(d.capacity()));
else
this.cells = new TreeSequence<BooleanValue>();
}