public static Point2D createPoint2D() { Point2D pt = new Point2D(); pt.X = x++; pt.Y = (short)(x * x); return pt; }
public void testRemoteArraysDims23() { log.info("testRemoteArraysDims23("); RemoteArrayTypes23 remote; remote = client.RemoteArrayTypes23; { int[] arr1 = new int[3]; int[,] arr2 = new int[7,6]; int[,,] arr3 = new int[7,5,3]; int[,,,] arr4 = new int[3,4,6,7]; for (int i2 = 0; i2 < arr2.GetLength(0); i2++) for (int i1 = 0; i1 < arr2.GetLength(1); i1++) arr2[i2,i1] = i2+i1; for (int i3 = 0; i3 < arr3.GetLength(0); i3++) for (int i2 = 0; i2 < arr3.GetLength(1); i2++) for (int i1 = 0; i1 <arr3.GetLength(2); i1++) arr3[i3,i2,i1] = i3+i2+i1; for (int i4 = 0; i4 < arr4.GetLength(0); i4++) for (int i3 = 0; i3 < arr4.GetLength(1); i3++) for (int i2 = 0; i2 < arr4.GetLength(2); i2++) for (int i1 = 0; i1 < arr4.GetLength(3); i1++) arr4[i4,i3,i2,i1] = i4+i3+i2+i1; arr1[0] = arr2[1,1]; arr1[1] = arr3[1,1,1]; arr1[2] = arr4[1,1,1,1]; int[] arrR = remote.SendArraysInt(arr2, arr3, arr4); TestUtils.assertEquals(log, "int", arr1, arrR); } { String[] arr1 = new String[3]; String[,] arr2 = new String[7,6]; String[,,] arr3 = new String[7,5,3]; String[,,,] arr4 = new String[3,4,6,7]; for (int i2 = 0; i2 < arr2.GetLength(0); i2++) for (int i1 = 0; i1 < arr2.GetLength(1); i1++) arr2[i2,i1] = ""+i2+i1; for (int i3 = 0; i3 < arr3.GetLength(0); i3++) for (int i2 = 0; i2 < arr3.GetLength(1); i2++) for (int i1 = 0; i1 <arr3.GetLength(2); i1++) arr3[i3,i2,i1] = ""+i3+i2+i1; for (int i4 = 0; i4 < arr4.GetLength(0); i4++) for (int i3 = 0; i3 < arr4.GetLength(1); i3++) for (int i2 = 0; i2 < arr4.GetLength(2); i2++) for (int i1 = 0; i1 < arr4.GetLength(3); i1++) arr4[i4,i3,i2,i1] = ""+i4+i3+i2+i1; arr1[0] = arr2[1,1]; arr1[1] = arr3[1,1,1]; arr1[2] = arr4[1,1,1,1]; String[] arrR = remote.SendArraysString(arr2, arr3, arr4); TestUtils.assertEquals(log, "String", arr1, arrR); } { PrimitiveTypes[] arr1 = new PrimitiveTypes[3]; PrimitiveTypes[,] arr2 = new PrimitiveTypes[7,6]; PrimitiveTypes[,,] arr3 = new PrimitiveTypes[7,5,3]; PrimitiveTypes[,,,] arr4 = new PrimitiveTypes[3,4,6,7]; for (int i2 = 0; i2 < arr2.GetLength(0); i2++) for (int i1 = 0; i1 < arr2.GetLength(1); i1++) arr2[i2,i1] = TestUtils.createObjectPrimitiveTypes(); for (int i3 = 0; i3 < arr3.GetLength(0); i3++) for (int i2 = 0; i2 < arr3.GetLength(1); i2++) for (int i1 = 0; i1 <arr3.GetLength(2); i1++) arr3[i3,i2,i1] = TestUtils.createObjectPrimitiveTypes(); for (int i4 = 0; i4 < arr4.GetLength(0); i4++) for (int i3 = 0; i3 < arr4.GetLength(1); i3++) for (int i2 = 0; i2 < arr4.GetLength(2); i2++) for (int i1 = 0; i1 < arr4.GetLength(3); i1++) arr4[i4,i3,i2,i1] = TestUtils.createObjectPrimitiveTypes(); arr1[0] = arr2[1,1]; arr1[1] = arr3[1,1,1]; arr1[2] = arr4[1,1,1,1]; PrimitiveTypes[] arrR = remote.SendArraysClass(arr2, arr3, arr4); TestUtils.assertEquals(log, "PrimitiveTypes", arr1, arrR); } { Object[] arr1 = new Object[3]; Object[,] arr2 = new Object[7,6]; Object[,,] arr3 = new Object[7,5,3]; Object[,,,] arr4 = new Object[3,4,6,7]; for (int i2 = 0; i2 < arr2.GetLength(0); i2++) for (int i1 = 0; i1 < arr2.GetLength(1); i1++) arr2[i2,i1] = TestUtils.createObjectPrimitiveTypes(); for (int i3 = 0; i3 < arr3.GetLength(0); i3++) for (int i2 = 0; i2 < arr3.GetLength(1); i2++) for (int i1 = 0; i1 <arr3.GetLength(2); i1++) arr3[i3,i2,i1] = TestUtils.createObjectPrimitiveTypes(); for (int i4 = 0; i4 < arr4.GetLength(0); i4++) for (int i3 = 0; i3 < arr4.GetLength(1); i3++) for (int i2 = 0; i2 < arr4.GetLength(2); i2++) for (int i1 = 0; i1 < arr4.GetLength(3); i1++) arr4[i4,i3,i2,i1] = TestUtils.createObjectPrimitiveTypes(); arr1[0] = arr2[1,1]; arr1[1] = arr3[1,1,1]; arr1[2] = arr4[1,1,1,1]; Object[] arrR = remote.SendArraysObject(arr2, arr3, arr4); TestUtils.assertEquals(log, "Object", arr1, arrR); } { Point2D[] arr1 = new Point2D[3]; Point2D[,] arr2 = new Point2D[7,6]; Point2D[,,] arr3 = new Point2D[7,5,3]; Point2D[,,,] arr4 = new Point2D[3,4,6,7]; for (int i2 = 0; i2 < arr2.GetLength(0); i2++) for (int i1 = 0; i1 < arr2.GetLength(1); i1++) arr2[i2,i1] = TestUtils.createPoint2D(); for (int i3 = 0; i3 < arr3.GetLength(0); i3++) for (int i2 = 0; i2 < arr3.GetLength(1); i2++) for (int i1 = 0; i1 <arr3.GetLength(2); i1++) arr3[i3,i2,i1] = TestUtils.createPoint2D(); for (int i4 = 0; i4 < arr4.GetLength(0); i4++) for (int i3 = 0; i3 < arr4.GetLength(1); i3++) for (int i2 = 0; i2 < arr4.GetLength(2); i2++) for (int i1 = 0; i1 < arr4.GetLength(3); i1++) arr4[i4,i3,i2,i1] = TestUtils.createPoint2D(); arr1[0] = arr2[1,1]; arr1[1] = arr3[1,1,1]; arr1[2] = arr4[1,1,1,1]; Point2D[] arrR = remote.SendArraysInline(arr2, arr3, arr4); TestUtils.assertEquals(log, "Point2D", arr1, arrR); } log.info(")testRemoteArraysDims23"); }
public Actor(Point2D[] @shape, Matrix2D @position) { this.shapeValue = @shape; this.positionValue = @position; }
public Point2D(Point2D rhs) { this.xValue = rhs.xValue; this.yValue = rhs.yValue; }