Java Collections.unmodifiableList Examples

Java Collections.unmodifiableList - 30 examples found. These are the top rated real world Java examples of java.util.Collections.unmodifiableList extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 private static void init() {
   languageCodes = new HashMap<Standard, List<String>>();
   List<String> temp = extractLanguageCodes(LANG_CODES_ISO_639_1_TXT_FILE);
   languageCodes.put(Standard.ISO_639_1, Collections.unmodifiableList(temp));
   temp = extractLanguageCodes(LANG_CODES_ISO_639_3_TXT_FILE);
   languageCodes.put(Standard.ISO_639_3, Collections.unmodifiableList(temp));
 }
Example #2
0
  public List<DeviceOutputSetting> getOutputSettings() {
    if (this.outputSettings == null || this.outputSettings.isEmpty()) {
      return Collections.unmodifiableList(this.createDefaultConfiguration());
    }

    return Collections.unmodifiableList(this.outputSettings);
  }
 @Override
 public List<Scenario> getScenarios() {
   if (DtVersionDetector.isAPM()) {
     return Collections.unmodifiableList(getScenarios(InstallationType.APM));
   }
   return Collections.unmodifiableList(getScenarios(InstallationType.Classic));
 }
Example #4
0
 public GroupRules(String groupName) {
   mGroupName = groupName;
   mFilterRules = new ArrayList();
   mReadOnlyFilterRules = Collections.unmodifiableList(mFilterRules);
   mConditionRules = new ArrayList();
   mReadOnlyConditionRules = Collections.unmodifiableList(mConditionRules);
 }
 DataDeleteRequest(
     int i,
     long l,
     long l1,
     List list,
     List list1,
     List list2,
     boolean flag,
     boolean flag1,
     IBinder ibinder,
     String s) {
   mVersionCode = i;
   zzMS = l;
   zzann = l1;
   zzapG = Collections.unmodifiableList(list);
   zzanw = Collections.unmodifiableList(list1);
   zzapH = list2;
   zzapI = flag;
   zzapJ = flag1;
   if (ibinder == null) {
     list = null;
   } else {
     list = com.google.android.gms.internal.zznh.zza.zzbJ(ibinder);
   }
   zzapE = list;
   zzOZ = s;
 }
    @Override
    public void routeInputSourceTaskFailedEventToDestination(
        int sourceTaskIndex, Map<Integer, List<Integer>> destinationTaskAndInputIndices) {
      if (remainderRangeForLastShuffler < basePartitionRange) {
        int startOffset = sourceTaskIndex * basePartitionRange;
        List<Integer> allIndices = Lists.newArrayListWithCapacity(basePartitionRange);
        for (int i = 0; i < basePartitionRange; ++i) {
          allIndices.add(startOffset + i);
        }
        List<Integer> inputIndices = Collections.unmodifiableList(allIndices);
        for (int i = 0; i < numDestinationTasks - 1; ++i) {
          destinationTaskAndInputIndices.put(i, inputIndices);
        }

        startOffset = sourceTaskIndex * remainderRangeForLastShuffler;
        allIndices = Lists.newArrayListWithCapacity(remainderRangeForLastShuffler);
        for (int i = 0; i < remainderRangeForLastShuffler; ++i) {
          allIndices.add(startOffset + i);
        }
        inputIndices = Collections.unmodifiableList(allIndices);
        destinationTaskAndInputIndices.put(numDestinationTasks - 1, inputIndices);
      } else {
        // all tasks have same pattern
        int startOffset = sourceTaskIndex * basePartitionRange;
        List<Integer> allIndices = Lists.newArrayListWithCapacity(basePartitionRange);
        for (int i = 0; i < basePartitionRange; ++i) {
          allIndices.add(startOffset + i);
        }
        List<Integer> inputIndices = Collections.unmodifiableList(allIndices);
        for (int i = 0; i < numDestinationTasks; ++i) {
          destinationTaskAndInputIndices.put(i, inputIndices);
        }
      }
    }