Make TreeNode a static interface inside TreeFormatter

The TreeNode interface is tied to the TreeFormatter. To make this
more obvious make TreeNode a static interface inside the
TreeFormatter class.

Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Change-Id: I9a7d1d8824fe7bd789b156ef59450592f0ab2a4c
This commit is contained in:
Edwin Kempin
2012-02-10 13:39:53 +01:00
parent 54f8eb5bd6
commit 3fdf4e20ed
3 changed files with 7 additions and 23 deletions

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.sshd.commands;
import com.google.gerrit.reviewdb.Project;
import com.google.gerrit.server.config.AllProjectsName;
import com.google.gerrit.sshd.commands.TreeFormatter.TreeNode;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;

View File

@@ -19,6 +19,12 @@ import java.util.SortedSet;
public class TreeFormatter {
public static interface TreeNode {
public String getDisplayName();
public boolean isVisible();
public SortedSet<? extends TreeNode> getChildren();
}
public static final String NOT_VISIBLE_NODE = "(x)";
private static final String NODE_PREFIX = "|-- ";

View File

@@ -1,23 +0,0 @@
// Copyright (C) 2011 The Android Open Source Project
//
// 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 com.google.gerrit.sshd.commands;
import java.util.SortedSet;
public interface TreeNode {
public String getDisplayName();
public boolean isVisible();
public SortedSet<? extends TreeNode> getChildren();
}