- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {LocalDateTime l =
new LocalDateTime()
LocalDateTime.now()
DateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
- Smart code suggestions by Codota
}
@Override public int hashCode() { return Objects.hash(id, getPort(), getProtocol(), getPath(), getAttributes()); }
public ServerConfigImpl withAttributes(Map<String, String> attributes) { setAttributes(attributes); return this; }
private void fillRouteServers(Route route, Map<String, ServerImpl> servers) { Annotations.newDeserializer(route.getMetadata().getAnnotations()) .servers() .forEach( (name, config) -> servers.put( name, newServer( config.getProtocol(), route.getSpec().getHost(), null, config.getPath(), config.getAttributes()))); } }
private void useSecureProtocolForServers(final Route route) { Map<String, ServerConfigImpl> servers = Annotations.newDeserializer(route.getMetadata().getAnnotations()).servers(); servers.values().forEach(s -> s.setProtocol(getSecureProtocol(s.getProtocol()))); Map<String, String> annotations = Annotations.newSerializer().servers(servers).annotations(); route.getMetadata().getAnnotations().putAll(annotations); }
.collect( Collectors.toMap( Map.Entry::getKey, entry -> new ServerConfigImpl(entry.getValue())));
private ServerConfig normalizeServer(ServerConfig serverConfig) { String port = serverConfig.getPort(); if (port != null && !port.contains("/")) { port = port + "/tcp"; } return new ServerConfigImpl( port, serverConfig.getProtocol(), serverConfig.getPath(), serverConfig.getAttributes()); } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ServerConfigImpl)) { return false; } ServerConfigImpl that = (ServerConfigImpl) o; return Objects.equals(id, that.id) && Objects.equals(getPort(), that.getPort()) && Objects.equals(getProtocol(), that.getProtocol()) && Objects.equals(getPath(), that.getPath()) && Objects.equals(getAttributes(), that.getAttributes()); }