public final boolean validate(int fbWidth, int fbHeight) {
    List<Integer> seenIds = new ArrayList<Integer>();
    Rect fbRect = new Rect();

    if (screens.isEmpty())
      return false;
    if (numScreens() > 255)
      return false;

    fbRect.setXYWH(0, 0, fbWidth, fbHeight);

    for (Iterator<Screen> iter = screens.iterator(); iter.hasNext();) {
      Screen refScreen = (Screen)iter.next();
      if (refScreen.dimensions.isEmpty())
        return false;
      if (!refScreen.dimensions.enclosedBy(fbRect))
        return false;
      //if (seenIds.lastIndexOf(refScreen.id) != seenIds.get(-1))
      //  return false;
      seenIds.add(refScreen.id);
    }

    return true;
  }