public class TableHelper extends Object
TableHelper
class provides helper methods to format table titles and data.Modifier and Type | Class | Description |
---|---|---|
static class |
TableHelper.StringSnmpProxyColumnFactory |
Modifier and Type | Field | Description |
---|---|---|
protected static SnmpProxyColumnFactory<String> |
columnFactory |
Constructor | Description |
---|---|
TableHelper() |
Modifier and Type | Method | Description |
---|---|---|
static List<SnmpProxyColumn<String>> |
buildColumns(com.snmp4j.smi.SmiObjectType entryObjet) |
Create the column proxy elements based on a table entry object type.
|
static <T> List<SnmpProxyColumn<T>> |
buildColumns(com.snmp4j.smi.SmiObjectType child,
Class<T> valueClass,
SnmpProxyColumnFactory<T> columnFactory) |
|
static List<SnmpProxyIndexColumn<String>> |
buildIndexColumns(com.snmp4j.smi.SmiObjectType child) |
|
static <T> List<SnmpProxyIndexColumn<T>> |
buildIndexColumns(com.snmp4j.smi.SmiObjectType child,
Class<T> valueClass,
SnmpProxyColumnFactory<T> columnFactory) |
|
static <T> List<SnmpProxyColumn<T>> |
getSnmpProxyColumns(com.snmp4j.smi.SmiObjectType parentObjectType,
Class<T> valueClass,
SnmpProxyColumnFactory<T> columnFactory,
List<com.snmp4j.smi.SmiObjectType> smiObjectTypes) |
Get the proxy columns for the specified SNMP table definition.
|
static List<String> |
getTitlesFromNames(String prefix,
List<String> names) |
Return column titles for a list of object names and a common prefix of the names which should not be included
in the titles.
|
protected static String |
trimTitleSuffix(String title) |
Removes the last name suffix from the given title.
|
protected static SnmpProxyColumnFactory<String> columnFactory
public static List<String> getTitlesFromNames(String prefix, List<String> names)
prefix
- the prefix to remove from the object names to form the returned column title.names
- a list of object names that should be used for the titles.names
but each title without the specified prefix
if present.protected static String trimTitleSuffix(String title)
title
- a camel case title.title
with the last camel case word removed.public static List<SnmpProxyColumn<String>> buildColumns(com.snmp4j.smi.SmiObjectType entryObjet)
entryObjet
- the table Entry object (the object below the table node in the SMI MIB tree).public static <T> List<SnmpProxyColumn<T>> buildColumns(com.snmp4j.smi.SmiObjectType child, Class<T> valueClass, SnmpProxyColumnFactory<T> columnFactory)
public static <T> List<SnmpProxyColumn<T>> getSnmpProxyColumns(com.snmp4j.smi.SmiObjectType parentObjectType, Class<T> valueClass, SnmpProxyColumnFactory<T> columnFactory, List<com.snmp4j.smi.SmiObjectType> smiObjectTypes)
T
- The value type of the proxies.parentObjectType
- the parent (i.e., table entry) object type.valueClass
- the value class of T.columnFactory
- The factory to be used to create the column proxies.smiObjectTypes
- The columnar object types. If a columnar object type equals parentObjectType
, the column title
will be the parent's full object name. Otherwise, the common prefix of the column names and the parent name
will be removed from the column titles.public static List<SnmpProxyIndexColumn<String>> buildIndexColumns(com.snmp4j.smi.SmiObjectType child)
public static <T> List<SnmpProxyIndexColumn<T>> buildIndexColumns(com.snmp4j.smi.SmiObjectType child, Class<T> valueClass, SnmpProxyColumnFactory<T> columnFactory)
Copyright © 2020 SNMP4J.org. All rights reserved.