当前位置: 首页>>代码示例>>Java>>正文


Java UnmodifiableList.unmodifiableList方法代码示例

本文整理汇总了Java中org.apache.commons.collections4.list.UnmodifiableList.unmodifiableList方法的典型用法代码示例。如果您正苦于以下问题:Java UnmodifiableList.unmodifiableList方法的具体用法?Java UnmodifiableList.unmodifiableList怎么用?Java UnmodifiableList.unmodifiableList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.collections4.list.UnmodifiableList的用法示例。


在下文中一共展示了UnmodifiableList.unmodifiableList方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: LogMessage

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
private LogMessage(Type type, String message, Object... arguments) {
    Validate.notNull(type);
    Validate.notNull(message);
    Validate.notNull(arguments); // arguments can contain null elements

    this.type = type;
    this.message = message;

    List<String> args = Arrays.stream(arguments) // convert args to strings here on purpose -- objects may not be immutable/serializable
            .map(x -> {
                if (x == null) {
                    return NULL_STRING;
                } else if (x instanceof Throwable) {
                    return ExceptionUtils.getStackTrace((Throwable) x);
                } else {
                    return x.toString();
                }
            })
            .collect(Collectors.toList());
    this.arguments = (UnmodifiableList<String>) UnmodifiableList.unmodifiableList(args);
}
 
开发者ID:offbynull,项目名称:actors,代码行数:22,代码来源:LogMessage.java

示例2: MethodAttributes

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
MethodAttributes(
        MethodSignature signature,
        InstrumentationSettings settings,
        List<ContinuationPoint> continuationPoints,
        List<SynchronizationPoint> synchPoints,
        CoreVariables coreVars,
        CacheVariables cacheVars,
        StorageContainerVariables storageContainerVars,
        StorageVariables localsStorageVars,
        StorageVariables stackStorageVars,
        LockVariables lockVars) {
    Validate.notNull(signature);
    Validate.notNull(settings);
    Validate.notNull(continuationPoints);
    Validate.notNull(synchPoints);
    Validate.notNull(coreVars);
    Validate.notNull(cacheVars);
    Validate.notNull(storageContainerVars);
    Validate.notNull(localsStorageVars);
    Validate.notNull(stackStorageVars);
    Validate.notNull(lockVars);
    Validate.noNullElements(continuationPoints);
    Validate.noNullElements(synchPoints);

    this.signature = signature;
    this.settings = settings;
    this.continuationPoints =
            (UnmodifiableList<ContinuationPoint>) UnmodifiableList.unmodifiableList(new ArrayList<>(continuationPoints));
    this.synchPoints =
            (UnmodifiableList<SynchronizationPoint>) UnmodifiableList.unmodifiableList(new ArrayList<>(synchPoints));
    this.coreVars = coreVars;
    this.cacheVars = cacheVars;
    this.storageContainerVars = storageContainerVars;
    this.localsStorageVars = localsStorageVars;
    this.stackStorageVars = stackStorageVars;
    this.lockVars = lockVars;
}
 
开发者ID:offbynull,项目名称:coroutines,代码行数:38,代码来源:MethodAttributes.java

示例3: CreateProcessRequest

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
/**
 * Constructs a {@link CreateProcessRequest} object.
 * @param id of process
 * @param responseBus bus to send responses/notifications to for the created process 
 * @param executable executable to run
 * @param parameters parameters to use when running {@code executable}
 * @throws NullPointerException if any argument is {@code null}, or contains {@code null}
 */
public CreateProcessRequest(int id, Bus responseBus, String executable, String ... parameters) {
    super(id);
    Validate.notNull(responseBus);
    Validate.notNull(executable);
    Validate.notNull(parameters);
    Validate.noNullElements(parameters);

    this.responseBus = responseBus;
    this.executable = executable;
    this.parameters = (UnmodifiableList<String>) UnmodifiableList.unmodifiableList(new ArrayList<>(Arrays.asList(parameters)));
}
 
开发者ID:offbynull,项目名称:portmapper,代码行数:20,代码来源:CreateProcessRequest.java

示例4: subList

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
@Override
public List<K> subList(final int fromIndexInclusive, final int toIndexExclusive) {
    return UnmodifiableList.unmodifiableList(super.subList(fromIndexInclusive, toIndexExclusive));
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:5,代码来源:LinkedMap.java

示例5: Address

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
private Address(List<String> addressElements) {
    this.addressElements = (UnmodifiableList<String>) UnmodifiableList.unmodifiableList(addressElements);
}
 
开发者ID:offbynull,项目名称:actors,代码行数:4,代码来源:Address.java

示例6: keyList

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
/**
 * Gets a view over the keys in the map as a List.
 * <p>
 * The List will be ordered by object insertion into the map.
 * The List is unmodifiable.
 *
 * @see #keySet()
 * @return the unmodifiable list view over the keys
 * @since 3.2
 */
public List<K> keyList() {
    return UnmodifiableList.unmodifiableList(insertOrder);
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:14,代码来源:ListOrderedMap.java

示例7: asList

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
/**
 * Gets an unmodifiable view of the order of the Set.
 *
 * @return an unmodifiable list view
 */
public List<E> asList() {
    return UnmodifiableList.unmodifiableList(setOrder);
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:9,代码来源:ListOrderedSet.java

示例8: getSets

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
/**
 * Gets the sets being decorated.
 *
 * @return Unmodifiable list of all sets in this composite.
 */
public List<Set<E>> getSets() {
    return UnmodifiableList.unmodifiableList(all);
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:9,代码来源:CompositeSet.java

示例9: unmodifiableList

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
/**
 * Returns an unmodifiable list backed by the given list.
 * <p>
 * This method uses the implementation in the decorators subpackage.
 *
 * @param <E>  the element type
 * @param list  the list to make unmodifiable, must not be null
 * @return an unmodifiable list backed by the given list
 * @throws NullPointerException if the list is null
 */
public static <E> List<E> unmodifiableList(final List<? extends E> list) {
    return UnmodifiableList.unmodifiableList(list);
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:14,代码来源:ListUtils.java

示例10: getCollections

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
/**
 * Gets the collections being decorated.
 *
 * @return Unmodifiable list of all collections in this composite.
 */
public List<Collection<E>> getCollections() {
    return UnmodifiableList.unmodifiableList(all);
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:9,代码来源:CompositeCollection.java

示例11: getIterators

import org.apache.commons.collections4.list.UnmodifiableList; //导入方法依赖的package包/类
/**
 * Gets the list of Iterators (unmodifiable).
 *
 * @return the unmodifiable list of iterators added
 */
public List<Iterator<? extends E>> getIterators() {
    return UnmodifiableList.unmodifiableList(iterators);
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:9,代码来源:CollatingIterator.java


注:本文中的org.apache.commons.collections4.list.UnmodifiableList.unmodifiableList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。