# Class Island

java.lang.Object
com.codename1.gaming.physics.box2d.dynamics.Island

public class Island extends Object
This is an internal class.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Body[]`
  `m_bodies`
  `int`
  `m_bodyCapacity`
  `int`
  `m_bodyCount`
  `int`
  `m_contactCapacity`
  `int`
  `m_contactCount`
  `Contact[]`
  `m_contacts`
  `int`
  `m_jointCapacity`
  `int`
  `m_jointCount`
  `Joint[]`
  `m_joints`
  `ContactListener`
  `m_listener`
  `Position[]`
  `m_positions`
  `Velocity[]`
  `m_velocities`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Island()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(Body body)`
  `void`
  `add(Contact contact)`
  `void`
  `add(Joint joint)`
  `void`
  `clear()`
  `void`
  `init(int bodyCapacity, int contactCapacity, int jointCapacity, ContactListener listener)`
  `void`
  `report(ContactVelocityConstraint[] constraints)`
  `void`
  `solve(Profile profile, TimeStep step, Vec2 gravity, boolean allowSleep)`
  `void`
  `solveTOI(TimeStep subStep, int toiIndexA, int toiIndexB)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### m_listener

    public ContactListener m_listener

  - ### m_bodies

    public Body[] m_bodies

  - ### m_contacts

    public Contact[] m_contacts

  - ### m_joints

    public Joint[] m_joints

  - ### m_positions

    public Position[] m_positions

  - ### m_velocities

    public Velocity[] m_velocities

  - ### m_bodyCount

    public int m_bodyCount

  - ### m_jointCount

    public int m_jointCount

  - ### m_contactCount

    public int m_contactCount

  - ### m_bodyCapacity

    public int m_bodyCapacity

  - ### m_contactCapacity

    public int m_contactCapacity

  - ### m_jointCapacity

    public int m_jointCapacity

- ## Constructor Details

  - ### Island

    public Island()

- ## Method Details

  - ### init

    public void init(int bodyCapacity, int contactCapacity, int jointCapacity, ContactListener listener)

  - ### clear

    public void clear()

  - ### solve

    public void solve(Profile profile, TimeStep step, Vec2 gravity, boolean allowSleep)

  - ### solveTOI

    public void solveTOI(TimeStep subStep, int toiIndexA, int toiIndexB)

  - ### add

    public void add(Body body)

  - ### add

    public void add(Contact contact)

  - ### add

    public void add(Joint joint)

  - ### report

    public void report(ContactVelocityConstraint[] constraints)