set1, set2的差集（在set1，不在set2中的对象）的只读view，不复制产生新的Set对象.

如果尝试写入该View会抛出UnsupportedOperationException
339955
public static <E> Set<E> differenceView(final Set<E> set1, final Set<?> set2) {
		return Sets.difference(set1, set2);
	}
1240705
@Override
    public void afterPropertiesSet() throws Exception {
        Connection conn = null;

        try {
            boolean createTables = true;

            try {
                conn = dataSource.getConnection();

                ResultSet rs = conn.getMetaData().getTables(conn.getCatalog(), null, "EVENTS_CUSTOMINFO", null);
                while (rs.next()) {
                    LOG.warning("Tables and indexes will not be created as they are already existing");
                    createTables = false;
                }
            } catch (SQLException e) {
                LOG.log(Level.WARNING, "Tables and indexes can not be created", e);
                createTables = false;
            }

            if (createTables) {
                ScriptRunner sr = new ScriptRunner(conn, false, false);
                sr.setLogWriter(null);
                sr.setErrorLogWriter(null);
                sr.runScript(new InputStreamReader(this.getClass().getResourceAsStream("/" + createSql)));
                if (createSqlInd != null && !createSqlInd.equals("")) {
                    sr.runScript(new InputStreamReader(this.getClass().getResourceAsStream("/" + createSqlInd)));
                } else {
                    LOG.warning("The script to create indexes has not been set. Indexes will not be created.");
                }
            }
        } finally {
            if (conn != null) {
                try {
                    conn.close();
                } catch (SQLException e) {
                    LOG.warning("Unable to close JDBC connection.");
                }
            }
        }
    }
980808
@Override
	public void afterPropertiesSet() throws Exception {
		if (this.requestFactory == null) {
			SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
			requestFactory.setConnectTimeout(1000);
			requestFactory.setReadTimeout(3000);
			this.requestFactory = requestFactory;
		}

		template = new RestTemplate(this.requestFactory);
		template.setMessageConverters(Arrays.asList(requestConverter, responseConverter));

		if (locationUpdaterEnabled) {
			Runnable worker = new Runnable() {
				@Override
				public void run() {
					updateMembers();
				}
			};
			locationUpdater.scheduleAtFixedRate(worker, 5000, 5000, TimeUnit.MILLISECONDS);
		}
	}
105542
@Override
  public <T, U> BindingBuilder<T> provider(Key<U> parent, Method m)
  {
    throw new UnsupportedOperationException(getClass().getName());
  }
499375
@SuppressWarnings("unchecked")
    private boolean trySetValue(List<?> datas, Object pojo, CustomPropertyDescriptor field,
                                Class<? extends Collection> clazz) {
        log.debug("要赋值的fieldName为{}", field.getName());

        Collection collection = tryBuildCollection(clazz);
        if (collection == null) {
            log.warn("无法为class[{}]构建实例", clazz);
            return false;
        }
        collection.addAll(datas);
        try {
            return BeanUtils.setProperty(pojo, field.getName(), collection);
        } catch (Exception e) {
            log.debug("字段[{}]赋值失败，使用的集合类为[{}]", field.getName(), clazz, e);
            return false;
        }
    }
1141683
@UiThread
  public static <T extends View, V> void set(@NonNull T view,
      @NonNull Property<? super T, V> setter, @Nullable V value) {
    setter.set(view, value);
  }
801925
public static <E> Set<E> disjointView(final Set<? extends E> set1, final Set<? extends E> set2) {
		return Sets.symmetricDifference(set1, set2);
	}
166414
@Override
  public void adapt(T operation, com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutation) {
    throw new UnsupportedOperationException(
      String.format("The %s operation is unsupported.", operationDescription));
}
770504
public static Any set(final int tangoType, final Object value) throws DevFailed {
        final Any any = ORBManager.createAny();

        if (value != null) {
            Object array = null;
            if (value.getClass().isArray()) {
                // convert to array of primitives if necessary
                array = org.tango.utils.ArrayUtils.toPrimitiveArray(value);
            } else {
                // put in an array before inserting for scalars
                array = Array.newInstance(AttributeTangoType.getTypeFromTango(tangoType).getType(), 1);
                Array.set(array, 0, value);
            }
            Method method = null;
            try {
                final Class<?> inserterClass = CLASS_MAP.get(tangoType);
                method = inserterClass.getMethod("insert", Any.class, PARAM_MAP.get(tangoType));
                method.invoke(null, any, array);
            } catch (final IllegalArgumentException e) {
                throw DevFailedUtils.newDevFailed(ExceptionMessages.ATTR_OPT_PROP, value.getClass().getCanonicalName()
                        + " is not of the good type, should be " + method);
            } catch (final IllegalAccessException e) {
                throw DevFailedUtils.newDevFailed(e);
            } catch (final InvocationTargetException e) {
                throw DevFailedUtils.newDevFailed(e.getCause());
            } catch (final SecurityException e) {
                throw DevFailedUtils.newDevFailed(e);
            } catch (final NoSuchMethodException e) {
                throw DevFailedUtils.newDevFailed(e);
            }
        }
        return any;
    }
1246421
public static ResultSet combineResultSets(ResultSet first, ResultSet second) {
    Function<ColumnType, String> columnTypeToString = new Function<ColumnType, String>() {
      public String apply(ColumnType input) {
        return input.getLabelName();
      }
    };
    List<String> firstColumns =
        Lists.transform(Lists.newArrayList(first.getColumnTypes()), columnTypeToString);
    List<String> secondColumns =
        Lists.transform(Lists.newArrayList(second.getColumnTypes()), columnTypeToString);
    if (!firstColumns.equals(secondColumns)) {
      throw new IllegalArgumentException(String.format(
          "First result set columns [%s] do not match second columns [%s]",
          Joiner.on(",").join(firstColumns), Joiner.on(",").join(secondColumns)));
    }
    List<Row> combinedRows = Lists.newArrayList(first.getRows());
    if (second.getRows() != null) {
      combinedRows.addAll(Lists.newArrayList(second.getRows()));
    }

    ResultSet combinedResultSet = new ResultSet();
    combinedResultSet.getColumnTypes().addAll(first.getColumnTypes());
    combinedResultSet.getRows().addAll(combinedRows);
    return combinedResultSet;
  }
709129
@Override
	protected AbstractUrlBasedView buildView(String viewName) throws Exception
	{

		BeetlSpringView beetlView = (BeetlSpringView) super.buildView(viewName);
		beetlView.setGroupTemplate(groupTemplate);
		String suffix = getSuffix();
		//如果配置有后缀，需要重新设定视图
		if(suffix!=null&&suffix.length()!=0){
			if (viewName.contains("#")) {
				String[] split = viewName.split("#");
				if (split.length > 2) {
				throw new Exception("视图名称有误：" + viewName);
				}
				beetlView.setUrl(getPrefix() + split[0] + getSuffix() + "#" + split[1]);
			}
		}
		return beetlView;
		
	}
770856
public void populate(Map<String, String[]> map)
    {
        for (Entry<String, String[]> entry : map.entrySet())
        {
            String property = entry.getKey();
            if (model.typeMap.containsKey(property))
            {
                String[] values = entry.getValue();
                if (values.length > 1)
                {
                    throw new UnsupportedOperationException(property + " has multivalue " + values);
                }
                if (values.length == 1)
                {
                    set(property, values[0]);
                }
            }
        }
    }
1366610
@Override
    public DTDSubset combineWithExternalSubset(InputProblemReporter rep, DTDSubset extSubset)
        throws XMLStreamException
    {
        /* First let's see if we can just reuse GE Map used by int or ext
         * subset; (if only one has contents), or if not, combine them.
         */
        HashMap<String,EntityDecl> ge1 = getGeneralEntityMap();
        HashMap<String,EntityDecl> ge2 = extSubset.getGeneralEntityMap();
        if (ge1 == null || ge1.isEmpty()) {
            ge1 = ge2;
        } else {
            if (ge2 != null && !ge2.isEmpty()) {
                /* Internal subset Objects are never shared or reused (and by
                 * extension, neither are objects they contain), so we can just
                 * modify GE map if necessary
                 */
                combineMaps(ge1, ge2);
            }
        }

        // Ok, then, let's combine notations similarly
        HashMap<String,NotationDeclaration> n1 = getNotationMap();
        HashMap<String,NotationDeclaration> n2 = extSubset.getNotationMap();
        if (n1 == null || n1.isEmpty()) {
            n1 = n2;
        } else {
            if (n2 != null && !n2.isEmpty()) {
                /* First; let's make sure there are no colliding notation
                 * definitions: it's an error to try to redefine notations.
                 */
                checkNotations(n1, n2);

                /* Internal subset Objects are never shared or reused (and by
                 * extension, neither are objects they contain), so we can just
                 * modify notation map if necessary
                 */
                combineMaps(n1, n2);
            }
        }


        // And finally elements, rather similarly:
        HashMap<PrefixedName,DTDElement> e1 = getElementMap();
        HashMap<PrefixedName,DTDElement> e2 = extSubset.getElementMap();
        if (e1 == null || e1.isEmpty()) {
            e1 = e2;
        } else {
            if (e2 != null && !e2.isEmpty()) {
                /* Internal subset Objects are never shared or reused (and by
                 * extension, neither are objects they contain), so we can just
                 * modify element map if necessary
                 */
                combineElements(rep, e1, e2);
            }
        }

        /* Combos are not cachable, and because of that, there's no point
         * in storing any PE info either.
         */
        return constructInstance(false, ge1, null, null, null, n1, e1,
                                 mFullyValidating);
    }
1349032
public void afterPropertiesSet() throws Exception {
		this.connectSupport = new ConnectSupport(sessionStrategy);
		if (applicationUrl != null) {
			this.connectSupport.setApplicationUrl(applicationUrl);
		}
	}
319329
public void executeSetValue(Object pvObject, Object pvArgs) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
		AccessController.doPrivileged(new AccessiblePrivilegedAction(accessibleObject));
		if (propertyType == PROPERTY_TYPE_METHOD) {
			((Method) accessibleObject).invoke(pvObject, new Object[] { pvArgs });	
		} else {
			((Field) accessibleObject).set(pvObject, pvArgs);
		}
	}
522117
function(setA, setB, property1, property2){
	// p for param
	// v for value
	var numProps = numericProperties(setA, setB, property1, property2);
	var sAv1 = numProps.sAv1,
		sAv2 = numProps.sAv2,
		sBv1 = numProps.sBv1,
		sBv2 = numProps.sBv2,
		count = sAv2 - sAv1 + 1;

	var after = {
		difference: [sBv2+1, sAv2],
		intersection: [sAv1,sBv2],
		union: [sBv1, sAv2],
		count: count,
		meta: "after"
	};
	var before = {
		difference: [sAv1, sBv1-1],
		intersection: [sBv1,sAv2],
		union: [sAv1, sBv2],
		count: count,
		meta: "before"
	};

	// if the sets are equal
	if(sAv1 === sBv1 && sAv2 === sBv2) {
		return {
			intersection: [sAv1,sAv2],
			union: [sAv1,sAv2],
			count: count,
			meta: "equal"
		};
	}
	// A starts at B but A ends later
	else if( sAv1 === sBv1 && sBv2 < sAv2 ) {
		return after;
	}
	// A end at B but A starts earlier
	else if( sAv2 === sBv2 && sBv1 > sAv1 ) {
		return before;
	}
	// B contains A
	else if( within(sAv1, [sBv1, sBv2]) && within(sAv2, [sBv1, sBv2]) ) {
		return {
			intersection: [sAv1,sAv2],
			union: [sBv1, sBv2],
			count: count,
			meta: "subset"
		};
	}
	// A contains B
	else if( within(sBv1, [sAv1, sAv2]) && within(sBv2, [sAv1, sAv2]) ) {
		return {
			intersection: [sBv1,sBv2],
			// there is a difference in what A has
			difference: [null, null],
			union: [sAv1, sAv2],
			count: count,
			meta: "superset"
		};
	}
	// setA starts earlier and overlaps setB
	else if(sAv1 < sBv1 && within(sAv2, [sBv1, sBv2]) ) {
		return before;
	}
	// setB starts earlier and overlaps setA
	else if(sBv1 < sAv1 && within(sBv2, [sAv1, sAv2]) ) {
		return after;
	}
	// side by side ... nothing intersection
	else if(sAv2 === sBv1-1) {
		return {
			difference: [sAv1,sAv2],
			union: [sAv1, sBv2],
			count: count,
			meta: "disjoint-before"
		};
	}

	else if(sBv2 === sAv1 - 1) {
		return {
			difference: [sAv1,sAv2],
			union: [sBv1, sAv2],
			count: count,
			meta: "disjoint-after"
		};
	}
	if(!isNaN(count)) {
		return {
			count: count,
			meta: "disjoint"
		};
	}

}
617049
private void trySetDefault(Object bean1) throws IllegalAccessError {
        try {
            doSetDefault(bean1);
        } catch (IllegalAccessException ex) {
            try {
                // try again
                f.setAccessible(true);
                doSetDefault(bean1);
            }catch (IllegalAccessException ex1) {
                throw new IllegalAccessError(ex1.getMessage());
            }
        }
    }