Optimized the pcep api

1.remove the "public" in the interface
2.remove the "static" in the enum

Change-Id: I782ec94581a7f8ef08280444f237a9a21f2f1807

Optimized the pcep api

1.remove the "public" in the interface
2.remove the "static" in the enum

Change-Id: I782ec94581a7f8ef08280444f237a9a21f2f1807
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepController.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepController.java
index c28841b..5b181c3 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepController.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepController.java
@@ -28,7 +28,7 @@
      *
      * @return Iterable of did elements
      */
-    public Iterable<PcepSwitch> getSwitches();
+    Iterable<PcepSwitch> getSwitches();
 
     /**
      * Return a switch with a specified did.
@@ -36,49 +36,49 @@
      * @param did of a device
      * @return a pcep device
      */
-    public PcepSwitch getSwitch(PcepDpid did);
+    PcepSwitch getSwitch(PcepDpid did);
 
     /**
      * Register a listener for meta events that occur to PCEP devices.
      *
      * @param listener the listener to notify
      */
-    public void addListener(PcepSwitchListener listener);
+    void addListener(PcepSwitchListener listener);
 
     /**
      * Unregister a listener.
      *
      * @param listener the listener to unregister
      */
-    public void removeListener(PcepSwitchListener listener);
+    void removeListener(PcepSwitchListener listener);
 
     /**
      * Register a listener for meta events that occur to PCEP links.
      *
      * @param listener the listener to notify
      */
-    public void addLinkListener(PcepLinkListener listener);
+    void addLinkListener(PcepLinkListener listener);
 
     /**
      * Unregister a link listener.
      *
      * @param listener the listener to unregister
      */
-    public void removeLinkListener(PcepLinkListener listener);
+    void removeLinkListener(PcepLinkListener listener);
 
     /**
      * Register a listener for meta events that occur to PCEP tunnel.
      *
      * @param listener the listener to notify
      */
-    public void addTunnelListener(PcepTunnelListener listener);
+    void addTunnelListener(PcepTunnelListener listener);
 
     /**
      * Unregister a tunnel listener.
      *
      * @param listener the listener to unregister
      */
-    public void removeTunnelListener(PcepTunnelListener listener);
+    void removeTunnelListener(PcepTunnelListener listener);
 
     /**
      * Setup a tunnel through pcep controller.
@@ -91,7 +91,7 @@
      * @param name tunnel name
      * @return pcep tunnel
      */
-    public PcepTunnel applyTunnel(DeviceId srcDid, DeviceId dstDid,
+    PcepTunnel applyTunnel(DeviceId srcDid, DeviceId dstDid,
                                   long srcPort, long dstPort, long bandwidth,
                                   String name);
 
@@ -101,7 +101,7 @@
      * @param id pcep tunnel id.
      * @return true or false
      */
-    public Boolean deleteTunnel(String id);
+    Boolean deleteTunnel(String id);
 
     /**
      * Update tunnel bandwidth by tunnel id.
@@ -110,6 +110,6 @@
      * @param bandwidth bandwidth of a tunnel
      * @return true or false
      */
-    public Boolean updateTunnelBandwidth(String id, long bandwidth);
+    Boolean updateTunnelBandwidth(String id, long bandwidth);
 
 }
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLink.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLink.java
index e4f9a2c..4dc05de 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLink.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLink.java
@@ -22,7 +22,7 @@
  */
 public interface PcepLink extends PcepOperator {
 
-    public enum SubType {
+    enum SubType {
         /**
          * Optical Transmission Section Link.
          */
@@ -50,7 +50,7 @@
     }
 
 
-    public enum PortType {
+    enum PortType {
         ODU_PORT, OCH_PORT, OMS_PORT
     }
 
@@ -59,7 +59,7 @@
      *
      * @return endpoint port type
      */
-    public PortType portType();
+    PortType portType();
 
     /**
      * Returns the link sub type,OTS,OPS,PKT_OPTICAL or ODUK.
@@ -67,21 +67,21 @@
      * @return link subType
      */
 
-    public SubType linkSubType();
+    SubType linkSubType();
 
     /**
      * Returns the link state, up or down.
      *
      * @return link state
      */
-    public String linkState();
+    String linkState();
 
     /**
      * Returns the distance of a link.
      *
      * @return distance
      */
-    public int linkDistance();
+    int linkDistance();
 
     /**
      * Returns the capacity type of a link,1: WAVELENGTHNUM, 2:SLOTNUM, 3,
@@ -89,48 +89,48 @@
      *
      * @return capacity type
      */
-    public String linkCapacityType();
+    String linkCapacityType();
 
     /**
      * Returns the available capacity value ,such as available bandwidth.
      *
      * @return availValue
      */
-    public int linkAvailValue();
+    int linkAvailValue();
 
     /**
      * Returns the max capacity value ,such as max bandwidth.
      *
      * @return maxValue
      */
-    public int linkMaxValue();
+    int linkMaxValue();
 
     /**
      * Returns the source device did of a link.
      *
      * @return source did
      */
-    public PcepDpid linkSrcDeviceID();
+    PcepDpid linkSrcDeviceID();
 
     /**
      * Returns the destination device did of a link.
      *
      * @return destination did
      */
-    public PcepDpid linkDstDeviceId();
+    PcepDpid linkDstDeviceId();
 
     /**
      * Returns the source port of a link.
      *
      * @return port number
      */
-    public Port linkSrcPort();
+    Port linkSrcPort();
 
     /**
      * Returns the destination port of a link.
      *
      * @return port number
      */
-    public Port linkDstPort();
+    Port linkDstPort();
 
 }
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLinkListener.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLinkListener.java
index 39730f4..608ef1b 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLinkListener.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepLinkListener.java
@@ -26,5 +26,5 @@
      *
      * @param link pcep link
      */
-    public void handlePCEPlink(PcepLink link);
+    void handlePCEPlink(PcepLink link);
 }
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepOperator.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepOperator.java
index 8bdcd67..452244d 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepOperator.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepOperator.java
@@ -18,11 +18,10 @@
 /**
  * A interface defined operator type, and provide a method to get the operator
  * type.
- *
  */
 public interface PcepOperator {
 
-    public enum OperationType {
+    enum OperationType {
 
         ADD, UPDATE, DELETE,
     }
@@ -32,5 +31,5 @@
      *
      * @return operation type.
      */
-    public OperationType getOperationType();
+    OperationType getOperationType();
 }
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitch.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitch.java
index ded1a79..94f73dc 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitch.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitch.java
@@ -20,7 +20,7 @@
  */
 public interface PcepSwitch extends PcepOperator {
 
-    public static enum DeviceType {
+    enum DeviceType {
         /* optical device */
         ROADM,
 
@@ -38,55 +38,55 @@
      * Gets a string version of the ID for this switch.
      * @return string version of the ID
      */
-    public String getStringId();
+    String getStringId();
 
     /**
      * Gets the datapathId of the switch.
      * @return the switch dpid in long format
      */
-    public long getId();
+    long getId();
 
-    public long getNeId();
+    long getNeId();
 
     /**
      * Gets the sub type of the device.
      * @return the sub type
      */
-    public DeviceType getDeviceType();
+    DeviceType getDeviceType();
 
     /**
      * fetch the manufacturer description.
      * @return the description
      */
-    public String manufacturerDescription();
+    String manufacturerDescription();
 
     /**
      * fetch the datapath description.
      * @return the description
      */
-    public String datapathDescription();
+    String datapathDescription();
 
     /**
      * fetch the hardware description.
      * @return the description
      */
-    public String hardwareDescription();
+    String hardwareDescription();
 
     /**
      * fetch the software description.
      * @return the description
      */
-    public String softwareDescription();
+    String softwareDescription();
 
     /**
      * fetch the serial number.
      * @return the serial
      */
-    public String serialNumber();
+    String serialNumber();
 
     /**
      * Indicates if this switch is optical.
      * @return true if optical
      */
-    public boolean isOptical();
+    boolean isOptical();
 }
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitchListener.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitchListener.java
index 01eaaa5..2017e73 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitchListener.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepSwitchListener.java
@@ -25,20 +25,20 @@
      *
      * @param dpid the switch where the event occurred
      */
-    public void switchAdded(PcepDpid dpid);
+    void switchAdded(PcepDpid dpid);
 
     /**
      * Notify that the switch was removed.
      *
      * @param dpid the switch where the event occurred.
      */
-    public void switchRemoved(PcepDpid dpid);
+    void switchRemoved(PcepDpid dpid);
 
     /**
      * Notify that the switch has changed in some way.
      *
      * @param dpid the switch that changed
      */
-    public void switchChanged(PcepDpid dpid);
+    void switchChanged(PcepDpid dpid);
 
 }
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnel.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnel.java
index a0d892d..6b0a7e6 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnel.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnel.java
@@ -28,7 +28,7 @@
     /**
      * Describe the type of a tunnel.
      */
-    public static enum Type {
+    enum Type {
 
         /**
          * Signifies that this is a L0 OCH tunnel.
@@ -49,7 +49,7 @@
     /**
      * The ability of a tunnel.
      */
-    public static enum Ability {
+    enum Ability {
         /**
          * no protected tunnel,if the tunnel is broken ,then the user is out of
          * service.
@@ -69,7 +69,7 @@
         DIAMOND
     }
 
-    public static enum PATHTYPE {
+    enum PATHTYPE {
 
         /**
          * Indicates path is the preferred path.
@@ -84,9 +84,8 @@
 
     /**
      * Represents state of the path, work normally or broken down.
-     *
      */
-    public static enum PathState {
+    enum PathState {
         NORMAL, BROKEN
     }
 
@@ -95,63 +94,63 @@
      *
      * @return tunnel type
      */
-    public Type type();
+    Type type();
 
     /**
      * Returns the name of a tunnel.
      *
      * @return tunnel name
      */
-    public String name();
+    String name();
 
     /**
      * Returns the device id of destination endpoint of a tunnel.
      *
      * @return device id
      */
-    public PcepDpid srcDeviceID();
+    PcepDpid srcDeviceID();
 
     /**
      * Returns the device id of source endpoint of a tunnel.
      *
      * @return device id
      */
-    public PcepDpid dstDeviceId();
+    PcepDpid dstDeviceId();
 
     /**
      * Returns source port of a tunnel.
      *
      * @return port number
      */
-    public long srcPort();
+    long srcPort();
 
     /**
      * Returns destination port of a tunnel.
      *
      * @return port number
      */
-    public long dstPort();
+    long dstPort();
 
     /**
      * Returns the bandwidth of a tunnel.
      *
      * @return bandwidth
      */
-    public long bandWidth();
+    long bandWidth();
 
     /**
      * Returns the tunnel id.
      *
      * @return id of the PCEP tunnel
      */
-    public long id();
+    long id();
 
     /**
      * Returns the detail hop list of a tunnel.
      *
      * @return hop list
      */
-    public List<PcepHopNodeDescription> getHopList();
+    List<PcepHopNodeDescription> getHopList();
 
     /**
      * Returns the instance of a pcep tunnel,a instance is used to mark the times of
@@ -159,34 +158,34 @@
      *
      * @return the instance of a tunnel.
      */
-    public int getInstance();
+    int getInstance();
 
     /**
      * Returns the state of a path.
      *
      * @return normal or broken
      */
-    public PathState getPathState();
+    PathState getPathState();
 
     /**
      * Returns the ability of a tunnel.
      *
      * @return ability of the tunenl
      */
-    public Ability getSla();
+    Ability getSla();
 
     /**
      * Returns the path type of a path if the tunnel's ability is diamond .
      *
      * @return the type of a path, the preferred or alternate.
      */
-    public PATHTYPE getPathType();
+    PATHTYPE getPathType();
 
     /**
      * Get the under lay tunnel id of VLAN tunnel.
      *
      * @return the tunnel id of a OCH tunnel under lay of a VLAN tunnel.
      */
-    public long underlayTunnelId();
+    long underlayTunnelId();
 
 }
diff --git a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnelListener.java b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnelListener.java
index 2cbe15a..2c974a4 100644
--- a/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnelListener.java
+++ b/apps/pcep-api/src/main/java/org/onosproject/pcep/api/PcepTunnelListener.java
@@ -26,6 +26,6 @@
      *
      * @param tunnel a pceptunnel.
      */
-    public void handlePCEPTunnel(PcepTunnel tunnel);
+    void handlePCEPTunnel(PcepTunnel tunnel);
 
 }