1 /* 2 * File : IpRange.java 3 * Created : 8 oct. 2003 13:02:23 4 * By : Olivier 5 * 6 * Azureus - a Java Bittorrent client 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details ( see the LICENSE file ). 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 */ 22 23 package org.gudy.azureus2.core3.ipfilter; 24 25 /** 26 * @author Olivier 27 * 28 */ 29 public interface 30 IpRange 31 { 32 public String getDescription()33 getDescription(); 34 35 public void setDescription( String str )36 setDescription( 37 String str ); 38 39 public boolean isValid()40 isValid(); 41 42 public boolean isSessionOnly()43 isSessionOnly(); 44 45 public String getStartIp()46 getStartIp(); 47 48 public void setStartIp( String str )49 setStartIp( 50 String str ); 51 52 public String getEndIp()53 getEndIp(); 54 55 public void setEndIp( String str )56 setEndIp( 57 String str ); 58 59 public void setSessionOnly( boolean sessionOnly )60 setSessionOnly( 61 boolean sessionOnly ); 62 isInRange(String ipAddress)63 public boolean isInRange(String ipAddress); 64 checkValid()65 public void checkValid(); 66 67 public int compareStartIpTo( IpRange other )68 compareStartIpTo( 69 IpRange other ); 70 71 public int compareEndIpTo( IpRange other )72 compareEndIpTo( 73 IpRange other ); 74 75 public int compareDescription( IpRange other )76 compareDescription( 77 IpRange other ); 78 79 /** 80 * @return 81 */ getEndIpLong()82 long getEndIpLong(); 83 84 /** 85 * @return 86 */ getStartIpLong()87 long getStartIpLong(); 88 89 /** 90 * @return 91 */ getMergedEndLong()92 public long getMergedEndLong(); 93 94 /** 95 * @return 96 */ getMergedEntries()97 public IpRange[] getMergedEntries(); 98 99 /** 100 * 101 */ resetMergeInfo()102 public void resetMergeInfo(); 103 104 /** 105 * @return 106 */ getMerged()107 public boolean getMerged(); 108 109 /** 110 * 111 */ setMerged()112 public void setMerged(); 113 114 /** 115 * @param endIpLong 116 */ setMergedEnd(long endIpLong)117 public void setMergedEnd(long endIpLong); 118 119 /** 120 * @param e2 121 */ addMergedEntry(IpRange e2)122 public void addMergedEntry(IpRange e2); 123 124 /** 125 * @return 126 * 127 * @since 3.0.1.5 128 */ getAddedToRangeList()129 public boolean getAddedToRangeList(); 130 } 131