Inheritance: global::java.util.AbstractSet, global::java.util.NavigableSet, global::java.lang.Cloneable, global::java.io.Serializable
 protected internal ResourceBundleSupport(Locale locale, ResourceBundle resourceBundle, string baseName)
 {
   base.\u002Ector();
   ResourceBundleSupport resourceBundleSupport = this;
   if (locale == null)
   {
     string str = "Locale must not be null";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new NullPointerException(str);
   }
   else if (resourceBundle == null)
   {
     string str = "Resources must not be null";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new NullPointerException(str);
   }
   else if (baseName == null)
   {
     string str = "BaseName must not be null";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new NullPointerException(str);
   }
   else
   {
     this.locale = locale;
     this.resources = resourceBundle;
     this.resourceBase = baseName;
     this.cache = new TreeMap();
     this.lookupPath = new TreeSet();
   }
 }
Ejemplo n.º 2
0
 public virtual Set getUniqueValues()
 {
   TreeSet treeSet = new TreeSet();
   for (int row = 0; row < this.data.getRowCount(); ++row)
   {
     for (int column = 0; column < this.data.getColumnCount(); ++column)
     {
       Number number = this.data.getValue(row, column);
       if (number != null)
         ((Set) treeSet).add((object) number);
     }
   }
   return (Set) treeSet;
 }
 /**
    * Returns a string representing the data in this class. The string contains one line for each
    * country calling code. The country calling code is followed by a '|' and then a list of
    * comma-separated languages sorted in ascending order.
    */
 public String toString()
 {
     StringBuilder output = new StringBuilder();
     for (int i = 0; i < numOfEntries; i++) {
       output.append(countryCallingCodes[i]);
       output.append('|');
       SortedSet<String> sortedSetOfLangs = new TreeSet<String>(availableLanguages.get(i));
       foreach (String lang in sortedSetOfLangs) {
     output.append(lang);
     output.append(',');
       }
       output.append('\n');
     }
     return output.toString();
 }
Ejemplo n.º 4
0
        public World(ISaveHandler isavehandler, string s, long l, WorldProvider worldprovider)
        {
            scheduledUpdatesAreImmediate = false;
            field_821_y = new ArrayList();
            loadedEntityList = new ArrayList();
            unloadedEntityList = new ArrayList();
            scheduledTickTreeSet = new TreeSet();
            scheduledTickSet = new HashSet();
            loadedTileEntityList = new ArrayList();
            playerEntities = new ArrayList();
            field_6159_E = 0xffffffL;
            skylightSubtracted = 0;
            distHashCounter = (new Random()).nextInt();
            DIST_HASH_MAGIC = 0x3c6ef35f;
            editingBlocks = false;
            lockTimestamp = java.lang.System.currentTimeMillis();
            autosavePeriod = 40;
            rand = new Random();
            field_9212_p = false;
            worldAccesses = new ArrayList();
            field_9207_I = new ArrayList();
            field_4265_J = 0;
            spawnHostileMobs = true;
            spawnPeacefulMobs = true;
            activeChunkSet = new HashSet();
            ambientTickCountdown = rand.nextInt(12000);
            field_778_L = new ArrayList();
            singleplayerWorld = false;
            worldFile = isavehandler;
            worldInfo = isavehandler.func_22096_c();
            field_9212_p = worldInfo == null;
            if (worldprovider != null)
            {
                worldProvider = worldprovider;
            }
            else if (worldInfo != null && worldInfo.func_22178_h() == -1)
            {
                worldProvider = new WorldProviderHell();
            }
            else
            {
                worldProvider = new WorldProvider();
            }
            bool flag = false;
            if (worldInfo == null)
            {
                worldInfo = new WorldInfo(l, s);
                flag = true;
            }
            else
            {
                worldInfo.setLevelName(s);
            }
            worldProvider.registerWorld(this);
            chunkProvider = func_22086_b();
            if (flag)
            {
                field_9209_x = true;
                int i = 0;
                byte byte0 = 64;
                int j;
                for (j = 0; !worldProvider.canCoordinateBeSpawn(i, j); j += rand.nextInt(64) - rand.nextInt(64))
                {
                    i += rand.nextInt(64) - rand.nextInt(64);
                }

                worldInfo.setSpawnPosition(i, byte0, j);
                field_9209_x = false;
            }
            calculateInitialSkylight();
        }
        public override void readFromSortedMap(SortedMap<Integer, String> areaCodeMap)
        {
            SortedSet<String> descriptionsSet = new TreeSet<String>();
            numOfEntries = areaCodeMap.size();
            prefixSizeInBytes = getOptimalNumberOfBytesForValue(areaCodeMap.lastKey());
            phoneNumberPrefixes = ByteBuffer.allocate(numOfEntries * prefixSizeInBytes);

            // Fill the phone number prefixes byte buffer, the set of possible lengths of prefixes and the
            // description set.
            int index = 0;
            foreach (Entry<Integer, String> entry in areaCodeMap.entrySet()) {
              int prefix = entry.getKey();
              storeWordInBuffer(phoneNumberPrefixes, prefixSizeInBytes, index, prefix);
              possibleLengths.add((int) Math.log10(prefix) + 1);
              descriptionsSet.add(entry.getValue());
              ++index;
            }
            createDescriptionPool(descriptionsSet, areaCodeMap);
        }