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