001/*
002 * Version 0.70 01/04/2002
003 *
004 * Visit my url for update: http://www.geocities.com/beapetrovicova/
005 *
006 * jFtp was developed by Bea Petrovicova <beapetrovicova@yahoo.com>.
007 * The design and implementation of jFtp are available for royalty-free 
008 * adoption and use. This software is provided 'as is' without any 
009 * guarantees. Copyright is retained by Bea Petrovicova. Redistribution 
010 * of any part of jFtp or any derivative works must include this notice.
011 * 
012 */  
013
014package cz.dhl.io;
015
016/**
017 * Allows to compare CoFile objects.
018 * 
019 * @Version 0.70 01/04/2002
020 * @author Bea Petrovicova <beapetrovicova@yahoo.com>  
021 * @see cz.dhl.io.CoFile
022 */
023public interface CoOrder 
024   /* Emulation for Java v1.0 and v1.1 = Remove Comparable! */
025   extends Comparable
026{   
027   /** Compares two abstract pathnames lexicographically by name. 
028    * @exception ClassCastException */
029   public int compareNameToIgnoreCase(CoOrder file);
030   
031   /** Compares two abstract pathnames lexicographically by extension. 
032    * @exception ClassCastException */
033   public int compareExtToIgnoreCase(CoOrder file);
034
035   /** Tests this abstract pathname whether 
036    * name starts with the given character. */
037   public boolean startsWithIgnoreCase(char ch);
038
039   /** Tests this abstract pathname for equality with the given extension.
040    * @parameter filter must be uppercase string with a leading '.' sign; 
041    * example: ".TXT" or ".HTM" or ".HTML" etc ... */
042   public boolean equalsExtTo(String filter);
043
044   /** Tests this abstract pathname for equality with one of the given extensions.
045    * @parameter filter must be array of uppercase strings with a leading '.' sign; 
046    * example: { ".TXT", ".HTM", ".HTML", etc ... } */
047   public boolean equalsExtTo(String filter[]);
048
049   /** Compares two abstract pathnames lexicographically (by pathname). */
050   public int compareTo(Object o);
051
052   /** Tests if corresponding connection to remote host is active. */
053   public boolean isConnected();
054}
055