commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1412089 - /commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java
Date Wed, 21 Nov 2012 13:30:16 GMT
Author: ggregory
Date: Wed Nov 21 13:30:16 2012
New Revision: 1412089

URL: http://svn.apache.org/viewvc?rev=1412089&view=rev
Log:
Fix some formating.

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java?rev=1412089&r1=1412088&r2=1412089&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java Wed
Nov 21 13:30:16 2012
@@ -114,20 +114,30 @@ public class SubnetUtils {
          * @param address A dot-delimited IPv4 address, e.g. "192.168.0.1"
          * @return True if in range, false otherwise
          */
-        public boolean isInRange(String address)    { return isInRange(toInteger(address));
}
+        public boolean isInRange(String address) {
+            return isInRange(toInteger(address));
+        }
 
-        private boolean isInRange(int address)      {
-            int diff = address-low();
-            return (diff >= 0 && (diff <= (high()-low())));
+        private boolean isInRange(int address) {
+            int diff = address - low();
+            return (diff >= 0 && (diff <= (high() - low())));
         }
 
-        public String getBroadcastAddress()         { return format(toArray(broadcast()));
}
-        
-        public String getNetworkAddress()           { return format(toArray(network()));
}
-        
-        public String getNetmask()                  { return format(toArray(netmask()));
}
-        
-        public String getAddress()                  { return format(toArray(address()));
}
+        public String getBroadcastAddress() {
+            return format(toArray(broadcast()));
+        }
+
+        public String getNetworkAddress() {
+            return format(toArray(network()));
+        }
+
+        public String getNetmask() {
+            return format(toArray(netmask()));
+        }
+
+        public String getAddress() {
+            return format(toArray(address()));
+        }
 
         /**
          * Return the low address as a dotted IP address.
@@ -135,7 +145,9 @@ public class SubnetUtils {
          * 
          * @return the IP address in dotted format, may be "0.0.0.0" if there is no valid
address
          */
-        public String getLowAddress()               { return format(toArray(low())); }
+        public String getLowAddress() {
+            return format(toArray(low()));
+        }
 
         /**
          * Return the high address as a dotted IP address.
@@ -143,7 +155,9 @@ public class SubnetUtils {
          * 
          * @return the IP address in dotted format, may be "0.0.0.0" if there is no valid
address
          */
-        public String getHighAddress()              { return format(toArray(high())); }
+        public String getHighAddress() {
+            return format(toArray(high()));
+        }
         
         /**
          * Get the count of available addresses.
@@ -155,7 +169,9 @@ public class SubnetUtils {
             return count < 0 ? 0 : count;
         }
 
-        public int asInteger(String address)        { return toInteger(address); }
+        public int asInteger(String address) {
+            return toInteger(address);
+        }
 
         public String getCidrSignature() {
             return toCidrNotation(



Mime
View raw message