001 /* PAVLOV -- Multiple Choice Study System 002 * Copyright (C) 2000 - 2004 T.J. Willis 003 * 004 * This program is free software; you can redistribute it and/or 005 * modify it under the terms of the GNU General Public License 006 * as published by the Free Software Foundation; either version 2 007 * of the License, or (at your option) any later version. 008 * 009 * This program is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 012 * GNU General Public License for more details. 013 * 014 * You should have received a copy of the GNU General Public License 015 * along with this program; if not, write to the Free Software 016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. 017 * 018 * $Header: /cvsroot/pavlov/net/sourceforge/pavlov/randommedia/FileNameComparator.java,v 1.3 2004/05/10 14:58:54 tj_willis Exp $ 019 */ 020 package net.sourceforge.pavlov.randommedia; 021 022 import java.io.File; 023 024 /** 025 * A filesystem directory full of media items. 026 * @author <a href="mailto:tj_willis@users.sourceforge.net">T.J. Willis</a> 027 * @version 1.0 028 */ 029 public class FileNameComparator implements java.util.Comparator 030 { 031 // FIXME: should this be in randommedia??? 032 // Compares its two arguments for order. 033 /** 034 * Describe <code>compare</code> method here. 035 * 036 * @param o1 an <code>Object</code> value 037 * @param o2 an <code>Object</code> value 038 * @return an <code>int</code> value 039 */ 040 public int compare(Object o1, Object o2) 041 { 042 //FIXME: check for null, not file 043 File f1 = (File)o1; 044 File f2 = (File)o2; 045 return f1.compareTo(f2); 046 //if( o1 instanceof java.io.File ) return -1; 047 //if( o2 instanceof java.io.File ) return -1; 048 //return 0; 049 } 050 051 // Indicates whether some other object is "equal to" this Comparator. 052 /** 053 * Describe <code>equals</code> method here. 054 * 055 * @param obj an <code>Object</code> value 056 * @return a <code>boolean</code> value 057 */ 058 public boolean equals(Object obj) 059 { 060 return false; 061 } 062 063 064 065 } 066