Clear {@link #allMockSubnets} and restore it from given a collection of instances.

@param subnets
collection of MockSubnet to restore
340525
public void restoreAllMockSubnet(final Collection<MockSubnet> subnets) {
        allMockSubnets.clear();
        if (null != subnets) {
            for (MockSubnet instance : subnets) {
                allMockSubnets.put(instance.getSubnetId(), instance);
            }
        }
    }
1021839
public static void clearEvidences(Network bn) throws ShanksException {
        try {
            bn.clearAllEvidence();
            bn.updateBeliefs();
        } catch (Exception e) {
            throw new ShanksException(e);
        }
    }
1080808
public void clearMessages(String fieldName) {
    	Set messagesForFieldName = getMessages(fieldName);
    	for (Iterator mi = messagesForFieldName.iterator(); mi.hasNext();) {
			messages.remove(mi.next());
		}
    	messagesSubSets.clear();
    }
1064417
public void setReplicationSubnetGroups(java.util.Collection<ReplicationSubnetGroup> replicationSubnetGroups) {
        if (replicationSubnetGroups == null) {
            this.replicationSubnetGroups = null;
            return;
        }

        this.replicationSubnetGroups = new java.util.ArrayList<ReplicationSubnetGroup>(replicationSubnetGroups);
    }
817106
public static synchronized void reset(Class<?>... classMocks) {
        for (Class<?> type : classMocks) {
            final MethodInvocationControl invocationHandler = MockRepository.getStaticMethodInvocationControl(type);
            if (invocationHandler != null) {
                invocationHandler.reset();
            }
            NewInvocationControl<?> newInvocationControl = MockRepository.getNewInstanceControl(type);
            if (newInvocationControl != null) {
                try {
                    newInvocationControl.reset();
                } catch (AssertionError e) {
                    NewInvocationControlAssertionError.throwAssertionErrorForNewSubstitutionFailure(e, type);
                }
            }
        }
    }
1330391
public void setDBSubnetGroups(java.util.Collection<DBSubnetGroup> dBSubnetGroups) {
        if (dBSubnetGroups == null) {
            this.dBSubnetGroups = null;
            return;
        }

        this.dBSubnetGroups = new com.amazonaws.internal.SdkInternalList<DBSubnetGroup>(dBSubnetGroups);
    }
535222
public void restoreAllMockSecurityGroup(final Collection<MockSecurityGroup> securityGroups) {
        allMockSecurityGroup.clear();
        if (null != securityGroups) {
            for (MockSecurityGroup instance : securityGroups) {
                allMockSecurityGroup.put(instance.getGroupId(), instance);
            }
        }
    }
220049
public void clear() {
        if (!disposedInd) {
            Collection<Binding> unsubscribe1 = null;
            Collection<CompositeBinding> unsubscribe2 = null;
            if (bindings == null && compBindings == null) {
                return;
            }
            if (bindings != null) {
                unsubscribe1 = bindings;
                bindings = null;
                unsubscribeFromAll(unsubscribe1);
            }
            if (compBindings != null) {
                unsubscribe2 = compBindings;
                compBindings = null;
                unsubscribeFromAllComposite(unsubscribe2);
            }
        }
    }
1122758
func (s *SetSubnetsInput) SetSubnets(v []*string) *SetSubnetsInput {
	s.Subnets = v
	return s
}
468029
public void setClusterSubnetGroups(java.util.Collection<ClusterSubnetGroup> clusterSubnetGroups) {
        if (clusterSubnetGroups == null) {
            this.clusterSubnetGroups = null;
            return;
        }

        this.clusterSubnetGroups = new com.amazonaws.internal.SdkInternalList<ClusterSubnetGroup>(clusterSubnetGroups);
    }
1132177
public void setSubnets(java.util.Collection<String> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }

        this.subnets = new java.util.ArrayList<String>(subnets);
    }
321082
public void restoreAllMockEc2Instances(final Collection<AbstractMockEc2Instance> instances) {
        allMockEc2Instances.clear();
        if (null != instances) {
            for (AbstractMockEc2Instance instance : instances) {
                allMockEc2Instances.put(instance.getInstanceID(), instance);
                // re-initialize the internal timer
                instance.initializeInternalTimer();
            }
        }
    }
1131588
def clear_subsystem_caches(subsys):
    """"""
    try:
        # New-style caches
        subsys._repertoire_cache.clear()
        subsys._mice_cache.clear()
    except TypeError:
        try:
            # Pre cache.clear() implementation
            subsys._repertoire_cache.cache = {}
            subsys._mice_cache.cache = {}
        except AttributeError:
            # Old school, pre cache refactor
            subsys._repertoire_cache = {}
            subsys._repertoire_cache_info = [0, 0]
            subsys._mice_cache = {}
1119984
public void removeSubtree( Tree<T> subtree )
    {
        if ( children.remove( subtree ) )
        {
            subtree.parent = null;
        }
    }
564741
public void setSubnets(java.util.Collection<Subnet> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }

        this.subnets = new com.amazonaws.internal.SdkInternalList<Subnet>(subnets);
    }
770628
public static void clearAssumptions(Map<Integer, Integer> assumptionTill, int pc) {
        Iterator<Integer> it = assumptionTill.values().iterator();
        while (it.hasNext()) {
            if (it.next().intValue() <= pc) {
                it.remove();
            }
        }
    }
569003
public void setDBSubnetGroups(java.util.Collection<DBSubnetGroup> dBSubnetGroups) {
        if (dBSubnetGroups == null) {
            this.dBSubnetGroups = null;
            return;
        }

        this.dBSubnetGroups = new java.util.ArrayList<DBSubnetGroup>(dBSubnetGroups);
    }