@Test public void testPut_sequentialCodePoints() { final int[] codePoint1 = new int[]{1, 2, 3, 4}; final EmojiMetadata metadata1 = new TestEmojiMetadata(codePoint1); final int[] codePoint2 = new int[]{1, 2, 3}; final EmojiMetadata metadata2 = new TestEmojiMetadata(codePoint2); final int[] codePoint3 = new int[]{1, 2}; final EmojiMetadata metadata3 = new TestEmojiMetadata(codePoint3); mMetadataRepo.put(metadata1); mMetadataRepo.put(metadata2); mMetadataRepo.put(metadata3); assertSame(metadata1, getNode(codePoint1)); assertSame(metadata2, getNode(codePoint2)); assertSame(metadata3, getNode(codePoint3)); assertEquals(null, getNode(new int[]{1})); assertEquals(null, getNode(new int[]{1, 2, 3, 4, 5})); }
@RestrictTo(LIBRARY_GROUP) @VisibleForTesting void put(@NonNull final EmojiMetadata data) { Preconditions.checkNotNull(data, "emoji metadata cannot be null"); Preconditions.checkArgument(data.getCodepointsLength() > 0, "invalid metadata codepoint length"); mRootNode.put(data, 0, data.getCodepointsLength() - 1); }
MetadataRepo { @RestrictTo(LIBRARY_GROUP) @VisibleForTesting void put(@NonNull final EmojiMetadata data) { Preconditions.checkNotNull(data, "emoji metadata cannot be null"); Preconditions.checkArgument(data.getCodepointsLength() > 0, "invalid metadata codepoint length"); mRootNode.put(data, 0, data.getCodepointsLength() - 1); } }
MetadataRepo { @RestrictTo(LIBRARY_GROUP) @VisibleForTesting void put(@NonNull final EmojiMetadata data) { Preconditions.checkNotNull(data, "emoji metadata cannot be null"); Preconditions.checkArgument(data.getCodepointsLength() > 0, "invalid metadata codepoint length"); mRootNode.put(data, 0, data.getCodepointsLength() - 1); } @RestrictTo(LIBRARY_GROUP)  MetadataRepo(); private  MetadataRepo(@NonNull final Typeface typeface,
            @NonNull final MetadataList metadataList); }
MetadataRepo { @RestrictTo(LIBRARY_GROUP) @VisibleForTesting void put(@NonNull final EmojiMetadata data) { Preconditions.checkNotNull(data, "emoji metadata cannot be null"); Preconditions.checkArgument(data.getCodepointsLength() > 0, "invalid metadata codepoint length"); mRootNode.put(data, 0, data.getCodepointsLength() - 1); } @RestrictTo(LIBRARY_GROUP)  MetadataRepo(); private  MetadataRepo(@NonNull final Typeface typeface,
            @NonNull final MetadataList metadataList); static MetadataRepo create(@NonNull final Typeface typeface,
            @NonNull final InputStream inputStream); static MetadataRepo create(@NonNull final Typeface typeface,
            @NonNull final ByteBuffer byteBuffer); static MetadataRepo create(@NonNull final AssetManager assetManager,
            final String assetPath); @RestrictTo(LIBRARY_GROUP) char[] getEmojiCharArray(); @RestrictTo(LIBRARY_GROUP) MetadataList getMetadataList(); }
MetadataRepo { @RestrictTo(LIBRARY_GROUP) @VisibleForTesting void put(@NonNull final EmojiMetadata data) { Preconditions.checkNotNull(data, "emoji metadata cannot be null"); Preconditions.checkArgument(data.getCodepointsLength() > 0, "invalid metadata codepoint length"); mRootNode.put(data, 0, data.getCodepointsLength() - 1); } @RestrictTo(LIBRARY_GROUP)  MetadataRepo(); private  MetadataRepo(@NonNull final Typeface typeface,
            @NonNull final MetadataList metadataList); static MetadataRepo create(@NonNull final Typeface typeface,
            @NonNull final InputStream inputStream); static MetadataRepo create(@NonNull final Typeface typeface,
            @NonNull final ByteBuffer byteBuffer); static MetadataRepo create(@NonNull final AssetManager assetManager,
            final String assetPath); @RestrictTo(LIBRARY_GROUP) char[] getEmojiCharArray(); @RestrictTo(LIBRARY_GROUP) MetadataList getMetadataList();  }