@Test public void shouldConstructOctagon() throws NoSuchMethodException { Octagons octagons = Octagons.newInstance( 100, "Orange", 0, 0 , 20 , 100, 100 ); PointArray points = octagons.get(0).getPoints(); Assert.assertThat(valueOf(points.get(0).getX()), CoreMatchers.is(20L)); Assert.assertThat(valueOf(points.get(0).getY()), CoreMatchers.is(0L)); Assert.assertThat(valueOf(points.get(7).getX()), CoreMatchers.is(14L)); Assert.assertThat(valueOf(points.get(7).getY()), CoreMatchers.is(-14L)); points = octagons.get(10).getPoints(); Assert.assertThat(valueOf(points.get(0).getX()), CoreMatchers.is(1000 + 20L)); Assert.assertThat(valueOf(points.get(0).getY()), CoreMatchers.is(1000 + 0L)); Assert.assertThat(valueOf(points.get(7).getX()), CoreMatchers.is(1000 + 14L)); Assert.assertThat(valueOf(points.get(7).getY()), CoreMatchers.is(1000 + -14L)); Octagons octagons2 = Octagons.copyInstance(octagons); points = octagons2.get(0).getPoints(); Assert.assertThat(valueOf(points.get(0).getX()), CoreMatchers.is(20L)); Assert.assertThat(valueOf(points.get(0).getY()), CoreMatchers.is(0L)); Assert.assertThat(valueOf(points.get(7).getX()), CoreMatchers.is(14L)); Assert.assertThat(valueOf(points.get(7).getY()), CoreMatchers.is(-14L)); points = octagons.get(10).getPoints(); Assert.assertThat(valueOf(points.get(0).getX()), CoreMatchers.is(1000 + 20L)); Assert.assertThat(valueOf(points.get(0).getY()), CoreMatchers.is(1000 + 0L)); Assert.assertThat(valueOf(points.get(7).getX()), CoreMatchers.is(1000 + 14L)); Assert.assertThat(valueOf(points.get(7).getY()), CoreMatchers.is(1000 + -14L)); }
public static Octagons newInstance(final long length) { return StructuredArray.newInstance(Octagons.class, Octagon.class, length); }
Octagons extends StructuredArray<Octagon> { public static Octagons newInstance(final long length) { return StructuredArray.newInstance(Octagons.class, Octagon.class, length); } }
Octagons extends StructuredArray<Octagon> { public static Octagons newInstance(final long length) { return StructuredArray.newInstance(Octagons.class, Octagon.class, length); } Octagons();  Octagons(Octagons source); }
Octagons extends StructuredArray<Octagon> { public static Octagons newInstance(final long length) { return StructuredArray.newInstance(Octagons.class, Octagon.class, length); } Octagons();  Octagons(Octagons source); static Octagons newInstance(final long length); static Octagons newInstance(
            final long length,
            final CtorAndArgsProvider<Octagon> ctorAndArgsProvider); static Octagons newInstance(
            final long length,
            final String color,
            final long initialCenterX,
            final long initialCenterY,
            final long radius,
            final long deltaX,
            final long deltaY); }
Octagons extends StructuredArray<Octagon> { public static Octagons newInstance(final long length) { return StructuredArray.newInstance(Octagons.class, Octagon.class, length); } Octagons();  Octagons(Octagons source); static Octagons newInstance(final long length); static Octagons newInstance(
            final long length,
            final CtorAndArgsProvider<Octagon> ctorAndArgsProvider); static Octagons newInstance(
            final long length,
            final String color,
            final long initialCenterX,
            final long initialCenterY,
            final long radius,
            final long deltaX,
            final long deltaY); public Date creationDate; }