Package io.openems.edge.core.appmanager
Class InterfaceConfiguration
java.lang.Object
io.openems.edge.core.appmanager.InterfaceConfiguration
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an ip to the list.Adds an ip to the list with usingInet4AddressWithSubnetmask.fromString(String)
.Adds an ip to the list with usingInet4AddressWithSubnetmask.fromString(String, String)
.boolean
getIps()
int
hashCode()
static void
removeDuplicatedIps
(List<InterfaceConfiguration> listToRemove, List<InterfaceConfiguration> other) Removes ip's from thelistToRemove
if the ip-address is in both lists.static List<InterfaceConfiguration>
summarize
(List<InterfaceConfiguration> interfaceConfiguration) Summarizes the duplicated interfaces into one.toString()
-
Field Details
-
interfaceName
e. g. eth0.
-
-
Constructor Details
-
InterfaceConfiguration
-
-
Method Details
-
addIp
Adds an ip to the list.- Parameters:
ip
- theInet4AddressWithSubnetmask
to add- Returns:
- this
-
addIp
Adds an ip to the list with usingInet4AddressWithSubnetmask.fromString(String)
.- Parameters:
ip
- theInet4AddressWithSubnetmask
to add- Returns:
- this
- Throws:
OpenemsException
- ifInet4AddressWithSubnetmask.fromString(String)
throws an error
-
addIp
Adds an ip to the list with usingInet4AddressWithSubnetmask.fromString(String, String)
.- Parameters:
label
- the label of the ipip
- theInet4AddressWithSubnetmask
to add- Returns:
- this
- Throws:
OpenemsException
- ifInet4AddressWithSubnetmask.fromString(String)
throws an error
-
getIps
-
hashCode
public int hashCode() -
equals
-
toString
-
summarize
public static List<InterfaceConfiguration> summarize(List<InterfaceConfiguration> interfaceConfiguration) Summarizes the duplicated interfaces into one.- Parameters:
interfaceConfiguration
- the configurations to summarize- Returns:
- the interfaces
-
removeDuplicatedIps
public static void removeDuplicatedIps(List<InterfaceConfiguration> listToRemove, List<InterfaceConfiguration> other) Removes ip's from thelistToRemove
if the ip-address is in both lists.- Parameters:
listToRemove
- the list to remove the ip'sother
- the other interfaces
-