private UBiDiProps(bool makeDummy) // ignore makeDummy, only creates a // unique signature { indexes = new int[IX_TOP]; indexes[0] = IX_TOP; trie = new CharTrie(0, 0, null); // dummy trie, always returns 0 }
/// <summary> /// Checks if the argument Trie has the same data as this Trie /// </summary> /// /// <param name="other">Trie to check</param> /// <returns>true if the argument Trie has the same data as this Trie, false /// otherwise</returns> // /CLOVER:OFF public override bool Equals(Object other) { bool result = base.Equals(other); if (result && other is CharTrie) { CharTrie othertrie = (CharTrie)other; return(m_initialValue_ == othertrie.m_initialValue_); } return(false); }
private void ReadData(Stream mask0) { DataInputStream inputStream = new DataInputStream(mask0); // read the header IBM.ICU.Impl.ICUBinary.ReadHeader(inputStream, FMT, new UBiDiProps.IsAcceptable()); // read indexes[] int i, count; count = inputStream.ReadInt(); if (count < IX_INDEX_TOP) { throw new IOException("indexes[0] too small in " + DATA_FILE_NAME); } indexes = new int[count]; indexes[0] = count; for (i = 1; i < count; ++i) { indexes[i] = inputStream.ReadInt(); } // read the trie trie = new CharTrie(inputStream, null); // read mirrors[] count = indexes[IX_MIRROR_LENGTH]; if (count > 0) { mirrors = new int[count]; for (i = 0; i < count; ++i) { mirrors[i] = inputStream.ReadInt(); } } // read jgArray[] count = indexes[IX_JG_LIMIT] - indexes[IX_JG_START]; jgArray = new sbyte[count]; for (i = 0; i < count; ++i) { jgArray[i] = inputStream.ReadByte(); } }
/// <param name="trie"></param> public FriendAgent(CharTrie trie) { outer_CharTrie = trie; }