Skip to content

Commit

Permalink
Fix formatting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
groboclown committed Jun 8, 2020
1 parent 324eceb commit 9c2b4e8
Show file tree
Hide file tree
Showing 181 changed files with 51,225 additions and 51,225 deletions.
26 changes: 13 additions & 13 deletions .idea/fileTemplates/includes/File Header.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .idea/fileTemplates/internal/AnnotationType.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .idea/fileTemplates/internal/Class.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .idea/fileTemplates/internal/Enum.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .idea/fileTemplates/internal/Interface.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/fileTemplates/internal/module-info.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/fileTemplates/internal/package-info.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package net.groboclown.p4.server.api;


import com.intellij.openapi.util.Comparing;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* This class is used as a reference to a connection object.
* It is mostly used by the caches, so that it can persist to which
* connection it applies.
* <p>
* It can directly be displayed to the user with a {@link #toString()}
* call.
*/
public final class ClientServerRef {
private final P4ServerName serverName;
private final String clientName;


// Like P4ServerName, this class could potentially be cached, like String.intern, but that
// might lead to additional memory problems beyond what we already have.

public ClientServerRef(@NotNull final P4ServerName serverName, @Nullable final String clientName) {
this.serverName = serverName;
this.clientName = clientName;
}


@NotNull
public P4ServerName getServerName() {
return serverName;
}


@NotNull
public String getServerDisplayId() {
return getServerName().getDisplayName();
}


@Nullable
public String getClientName() {
return clientName;
}


@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o == null) {
return false;
}
if (o.getClass().equals(getClass())) {
ClientServerRef that = (ClientServerRef) o;
return that.serverName.equals(serverName) &&
Comparing.equal(that.clientName, clientName);
}
return false;
}


@Override
public int hashCode() {
return (serverName.hashCode() << 3) +
(clientName == null ? 0 : clientName.hashCode());
}


@Override
public String toString() {
return clientName + "@" + serverName.getDisplayName();
}
}
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package net.groboclown.p4.server.api;


import com.intellij.openapi.util.Comparing;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* This class is used as a reference to a connection object.
* It is mostly used by the caches, so that it can persist to which
* connection it applies.
* <p>
* It can directly be displayed to the user with a {@link #toString()}
* call.
*/
public final class ClientServerRef {
private final P4ServerName serverName;
private final String clientName;


// Like P4ServerName, this class could potentially be cached, like String.intern, but that
// might lead to additional memory problems beyond what we already have.

public ClientServerRef(@NotNull final P4ServerName serverName, @Nullable final String clientName) {
this.serverName = serverName;
this.clientName = clientName;
}


@NotNull
public P4ServerName getServerName() {
return serverName;
}


@NotNull
public String getServerDisplayId() {
return getServerName().getDisplayName();
}


@Nullable
public String getClientName() {
return clientName;
}


@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o == null) {
return false;
}
if (o.getClass().equals(getClass())) {
ClientServerRef that = (ClientServerRef) o;
return that.serverName.equals(serverName) &&
Comparing.equal(that.clientName, clientName);
}
return false;
}


@Override
public int hashCode() {
return (serverName.hashCode() << 3) +
(clientName == null ? 0 : clientName.hashCode());
}


@Override
public String toString() {
return clientName + "@" + serverName.getDisplayName();
}
}
Loading

0 comments on commit 9c2b4e8

Please sign in to comment.