class BorderArrangement implements Arrangement, Serializable {

    @Override
    public void add(Block block, Object key) {
        if (key == null) {
            this.centerBlock = block;
        } else if (!(key instanceof RectangleEdge)) {
            throw new IllegalArgumentException("The 'key' must be an instance " 
                    + "of RectangleEdge or null.");
        } else {
            RectangleEdge edge = (RectangleEdge) key;
            if (edge == RectangleEdge.TOP) {
                this.topBlock = block;
            } else if (edge == RectangleEdge.BOTTOM) {
                this.bottomBlock = block;
            } else if (edge == RectangleEdge.LEFT) {
                this.leftBlock = block;
            } else if (edge == RectangleEdge.RIGHT) {
                this.rightBlock = block;
            }
        }
    }

    public  BorderArrangement();

}