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 class
Size.Size1D
A class for representing the size (length) of a 1-dimensional array.static class
Size.Size2D
A class for representing the size (i.e., length of each dimension) a 2-dimensional array.static class
Size.Size3D
A class for representing the size (i.e., length of each dimension) a 3-dimensional array.static class
Size.Size4D
A class for representing the size (i.e., length of each dimension) a 4-dimensional array.static class
Size.Size5D
A class for representing the size (i.e., length of each dimension) a 5-dimensional array.
-
Field Summary
Fields Modifier and Type Field Description int[]
lengths
The 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 Size
setLengths(int... lengths)
Sets the lengths of the dimensions of an array of dimensionlengths.length
String
toString()
-
-
-
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)
-
-