src/tokenclustering/model/ClusteringAreaData.java
/**
     * Removes a token from this area.
     * @param token The token to remove.
     * @return The token removed or null if this are did not containthe token given.
     */
Removes a token from this area.
@param token The token to remove.
@return The token removed or null if this are did not containthe token given.
Removes a token from this area . @param token The token to remove . @return The token removed or null if this are did not containthe token given .
public Token removeToken(Token token) {
        if (this.getTokens().contains(token)) {
            this.freeSlots.addAll((Collection<? extends Slot>) token.getOccupiedSlots().clone());
            this.occupiedSlots.removeAll((Collection<? extends Slot>) token.getOccupiedSlots().clone());
            this.getTokens().remove(token);
            return token;
        } else {
            return null;
        }
    }
public Token removeToken ( Token token ) { if ( this . getTokens ( ) . contains ( token ) ) { this . freeSlots . addAll ( ( Collection < ? extends Slot > ) token . getOccupiedSlots ( ) . clone ( ) ) ; this . occupiedSlots . removeAll ( ( Collection < ? extends Slot > ) token . getOccupiedSlots ( ) . clone ( ) ) ; this . getTokens ( ) . remove ( token ) ; return token ; } else { return null ; } }
Removes a token from this area.
Removes a token from this area .