Java Code Examples for io.fabric8.kubernetes.api.model.IntOrString#getStrVal()
The following examples show how to use
io.fabric8.kubernetes.api.model.IntOrString#getStrVal() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jkube File: DefaultServiceEnricher.java License: Eclipse Public License 2.0 | 5 votes |
private String getPortValue(IntOrString port) { String val = port.getStrVal(); if (val == null) { val = Integer.toString(port.getIntVal()); } return val; }
Example 2
Source Project: che File: Routes.java License: Eclipse Public License 2.0 | 5 votes |
private static boolean matchesPort(ServicePort servicePort, IntOrString routePort) { if (routePort.getStrVal() != null && routePort.getStrVal().equals(servicePort.getName())) { return true; } if (routePort.getIntVal() != null && routePort.getIntVal().equals(servicePort.getPort())) { return true; } return false; }
Example 3
Source Project: che File: Ingresses.java License: Eclipse Public License 2.0 | 5 votes |
private static boolean matchesServicePort(IntOrString backendPort, ServicePort servicePort) { if (backendPort.getStrVal() != null && backendPort.getStrVal().equals(servicePort.getName())) { return true; } if (backendPort.getIntVal() != null && backendPort.getIntVal().equals(servicePort.getPort())) { return true; } return false; }