public boolean removeSelectionCriteria(SelectionCriteria selCriteria)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "removeSelectionCriteria", selCriteria);

        SelectionCriteria[] tmp = selectionCriteriaList;

        boolean removedCriteria = false;

        // Loop through the selectionCriteriaList
        for (int i = 0; i < selectionCriteriaList.length; ++i)
        {
            if (selectionCriteriaList[i].equals(selCriteria))
            {
                // If there was only one criteria and we have removed it then
                // nullify lists
                if (selectionCriteriaList.length == 1)
                {
                    selectionCriteriaList = null;
                    topics = null;
                }
                else
                {
                    // The criteria match, so resize the array without this
                    // criteria in it.
                    tmp = new SelectionCriteria[selectionCriteriaList.length - 1];
                    System.arraycopy(selectionCriteriaList, 0, tmp, 0, i);
                    System.arraycopy(selectionCriteriaList, i + 1, tmp, i, selectionCriteriaList.length - i - 1);

                    selectionCriteriaList = tmp;

                    // And copy into the topics array so that they always match
                    this.topics = new String[selectionCriteriaList.length];
                    for (int t = 0; t < selectionCriteriaList.length; t++)
                    {
                        topics[t] = (selectionCriteriaList[t] == null) ? null : selectionCriteriaList[t].getDiscriminator();
                    }
                }

                removedCriteria = true;

                break;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "removeSelectionCriteria", Boolean.valueOf(removedCriteria));
        return removedCriteria;
    }
public boolean removeSelectionCriteria ( SelectionCriteria selCriteria ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeSelectionCriteria" , selCriteria ) ; SelectionCriteria [ ] tmp = selectionCriteriaList ; boolean removedCriteria = false ; for ( int i = 0 ; i < selectionCriteriaList . length ; ++ i ) { if ( selectionCriteriaList [ i ] . equals ( selCriteria ) ) { if ( selectionCriteriaList . length == 1 ) { selectionCriteriaList = null ; topics = null ; } else { tmp = new SelectionCriteria [ selectionCriteriaList . length - 1 ] ; System . arraycopy ( selectionCriteriaList , 0 , tmp , 0 , i ) ; System . arraycopy ( selectionCriteriaList , i + 1 , tmp , i , selectionCriteriaList . length - i - 1 ) ; selectionCriteriaList = tmp ; this . topics = new String [ selectionCriteriaList . length ] ; for ( int t = 0 ; t < selectionCriteriaList . length ; t ++ ) { topics [ t ] = ( selectionCriteriaList [ t ] == null ) ? null : selectionCriteriaList [ t ] . getDiscriminator ( ) ; } } removedCriteria = true ; break ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "removeSelectionCriteria" , Boolean . valueOf ( removedCriteria ) ) ; return removedCriteria ; }
Remove a selection criteria from the subscription