Debian Codegraph @

fontawesomefx-octicons/src/main/java/de/jensd/fx/glyphs/octicons/utils/OctIconNameComparator.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.octicons.utils;
15
16 import de.jensd.fx.glyphs.octicons.OctIcon;
17 import java.util.Comparator;
18
19 /**
20 *
21 * @author Jens Deters
22 * @author Naoghuman (https://github.com/Naoghuman)
23 */
24 public class OctIconNameComparator implements Comparator<OctIcon> {
25
26 @Override
27 public int compare(OctIcon o1, OctIcon o2) {
28 if(o1 != null && o2 != null){
29 return o1.name().compareTo(o2.name());
30 }
31 return 0;
32 }
33 }