# Class Filter

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

public class Filter extends Object
This holds contact filtering data.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `categoryBits`
  The collision category bits.
  `int`
  `groupIndex`
  Collision groups allow a certain group of objects to never collide (negative) or always collide (positive).
  `int`
  `maskBits`
  The collision mask bits.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Filter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `set(Filter argOther)`

  ### Methods inherited from class Object

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

- ## Field Details

  - ### categoryBits

    public int categoryBits
    The collision category bits. Normally you would just set one bit.

  - ### maskBits

    public int maskBits
    The collision mask bits. This states the categories that this shape would accept for collision.

  - ### groupIndex

    public int groupIndex
    Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no collision group. Non-zero group filtering always wins against the mask bits.

- ## Constructor Details

  - ### Filter

    public Filter()

- ## Method Details

  - ### set

    public void set(Filter argOther)