Debian Codegraph @

fontawesomefx-emojione/src/main/java/de/jensd/fx/glyphs/emojione/utils/EmojiOneNameComparator.java

raw
1 /**
2 * Copyright (c) 2013-2015 Jens Deters http://www.jensd.de
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
5 * License. You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
10 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
11 * governing permissions and limitations under the License.
12 *
13 */
14 package de.jensd.fx.glyphs.emojione.utils;
15
16 import de.jensd.fx.glyphs.emojione.EmojiOne;
17
18 import java.util.Comparator;
19
20 /**
21 *
22 * @author Jens Deters
23 */
24 public class EmojiOneNameComparator implements Comparator<EmojiOne> {
25
26 @Override
27 public int compare(EmojiOne o1, EmojiOne o2) {
28 if(o1 != null && o2 != null){
29 return o1.name().compareTo(o2.name());
30 }
31 return 0;
32 }
33 }