Package org.xcsp.common
Class Size
- java.lang.Object
-
- org.xcsp.common.Size
-
- Direct Known Subclasses:
Size.Size1D,Size.Size2D,Size.Size3D,Size.Size4D,Size.Size5D
public abstract class Size extends Object
This is the root abstract class of all subclasses that are useful for denoting the size (i.e., length of each dimension) of multi-dimensional arrays of variables. These classes are used as syntactic sugar.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSize.Size1DA class for representing the size (length) of a 1-dimensional array.static classSize.Size2DA class for representing the size (i.e., length of each dimension) a 2-dimensional array.static classSize.Size3DA class for representing the size (i.e., length of each dimension) a 3-dimensional array.static classSize.Size4DA class for representing the size (i.e., length of each dimension) a 4-dimensional array.static classSize.Size5DA class for representing the size (i.e., length of each dimension) a 5-dimensional array.
-
Field Summary
Fields Modifier and Type Field Description int[]lengthsThe respective lengths of an array of dimensionlengths.length.
-
Constructor Summary
Constructors Constructor Description Size()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SizesetLengths(int... lengths)Sets the lengths of the dimensions of an array of dimensionlengths.lengthStringtoString()
-
-
-
Method Detail
-
setLengths
protected Size setLengths(int... lengths)
Sets the lengths of the dimensions of an array of dimensionlengths.length- Parameters:
lengths- the lengths of the dimensions of an array- Returns:
- this object (for method chaining)
-
-