Package java.util

Examples of java.util.Set.retainAll()


            throws IllegalActionException {
        RecordToken recordToken = (RecordToken) rightArgument;

        Set intersectionSet = new HashSet();
        intersectionSet.addAll(_fields.keySet());
        intersectionSet.retainAll(recordToken._fields.keySet());

        Iterator labels = intersectionSet.iterator();
        int size = intersectionSet.size();
        String[] newLabels = new String[size];
        Token[] newValues = new Token[size];
View Full Code Here


            throws IllegalActionException {
        RecordToken recordToken = (RecordToken) rightArgument;

        Set intersectionSet = new HashSet();
        intersectionSet.addAll(_fields.keySet());
        intersectionSet.retainAll(recordToken._fields.keySet());

        Iterator labels = intersectionSet.iterator();
        int size = intersectionSet.size();
        String[] newLabels = new String[size];
        Token[] newValues = new Token[size];
View Full Code Here

     @return A RecordToken containing the result.
     */
    public static Token intersect(RecordToken record1, RecordToken record2)
            throws IllegalActionException {
        Set commonNames = new HashSet(record1.labelSet());
        commonNames.retainAll(record2.labelSet());

        Token[] values = new Token[commonNames.size()];
        String[] names = new String[values.length];
        int i = 0;

View Full Code Here

                        Object oa = ((ObjectToken) a).getValue();
                        Object ob = ((ObjectToken) b).getValue();

                        if (oa instanceof Set && ob instanceof Collection) {
                            Set result = new HashSet((Set) oa);
                            result.retainAll((Collection) ob);
                            return new ObjectToken(result);
                        } else {
                            throw new InterpreterException(
                                    "Unknown object types: expected Set and Collection.");
                        }
View Full Code Here

        Set thatOutputs = automaton.outputNameSet();
        Set thatInternals = automaton.internalTransitionNameSet();

        thatInputs.retainAll(thisInternals);
        thatOutputs.retainAll(thisInternals);
        thatInternals.retainAll(thisInternals);

        if (!thatInputs.isEmpty() || !thatOutputs.isEmpty()
                || !thatInternals.isEmpty()) {
            throw new IllegalActionException(
                    message
View Full Code Here

        Set thisInputs = this.inputNameSet();
        Set thisOutputs = this.outputNameSet();
        thisInternals = this.internalTransitionNameSet();

        thisInputs.retainAll(thatInternals);
        thisOutputs.retainAll(thatInternals);
        thisInternals.retainAll(thatInternals);

        if (!thisInputs.isEmpty() || !thisOutputs.isEmpty()
                || !thisInternals.isEmpty()) {
            throw new IllegalActionException(
View Full Code Here

        }

        // check the output transitions do not overlap
        thisOutputs = this.outputNameSet();
        thatOutputs = automaton.outputNameSet();
        thisOutputs.retainAll(thatOutputs);

        if (!thisOutputs.isEmpty()) {
            throw new IllegalActionException(message + "the output "
                    + "transitions of the two overlap.");
        }
View Full Code Here

            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here

     * @see org.apache.slide.webdav.util.DaslConstants
     */
    public Set getSupportedLiveProperties( String filter ) {
        Set s = getSupportedLiveProperties( new String[0] );
        if( Q_COMPUTED_ONLY.equals(filter) ) {
            s.retainAll( computedProperties );
        }
        if( Q_PROTECTED_ONLY.equals(filter) ) {
            s.retainAll( protectedProperties );
        }
        return s;
View Full Code Here

        Set s = getSupportedLiveProperties( new String[0] );
        if( Q_COMPUTED_ONLY.equals(filter) ) {
            s.retainAll( computedProperties );
        }
        if( Q_PROTECTED_ONLY.equals(filter) ) {
            s.retainAll( protectedProperties );
        }
        return s;
    }
   
    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.