/** * Returns the OID as dotted string (e.g., "1.3.6.1.4.1") regardless of what * {@link OIDTextFormat} instance is set in {@link SNMP4JSettings}. * * @return a dotted string representation of this OID value. * @since 2.2 */ public String toDottedString() { return oidTextFormat.format(value); }
/** * Returns the OID as dotted string (e.g., "1.3.6.1.4.1") regardless of what * {@link OIDTextFormat} instance is set in {@link SNMP4JSettings}. * @return * a dotted string representation of this OID value. * @since 2.2 */ public String toDottedString() { return oidTextFormat.format(value); }
/** * Format the OID as text. This could return to same result as {@link #toString()} * but also fully converted index-to-text values like * {@code snmp4jLogLoggerIndex.org.snmp4j.MessageDispatcherImpl}. * * @return a string representation of this OID as defined by the * {@link OIDTextFormat#format(int[])} in {@link SNMP4JSettings}. * @since 2.2 */ public String format() { return SNMP4JSettings.getOIDTextFormat().format(value); }
/** * Format the OID as text. This could return to same result as {@link #toString()} * but also fully converted index-to-text values like * {@code snmp4jLogLoggerIndex.org.snmp4j.MessageDispatcherImpl}. * @return * a string representation of this OID as defined by the * {@link OIDTextFormat#format(int[])} in {@link SNMP4JSettings}. * @since 2.2 */ public String format() { return SNMP4JSettings.getOIDTextFormat().format(value); }
public String toString() { return SNMP4JSettings.getOIDTextFormat().format(value); }
/** * Returns a textual representation of the supplied variable against the * optionally supplied instance OID. * * @param instanceOID the instance OID <code>variable</code> is associated * with. If <code>null</code> the formatting cannot take any MIB * specification of the variable into account and has to format it based * on its type only. * @param variable * the variable to format. * @param withOID * if <code>true</code> the <code>instanceOID</code> should be included * in the textual representation to form a {@link VariableBinding} * representation. * @return the textual representation. */ public String format(OID instanceOID, Variable variable, boolean withOID) { return (withOID) ? SNMP4JSettings.getOIDTextFormat().format(instanceOID.getValue())+ " = "+variable : variable.toString(); }
/** * Returns a textual representation of the supplied variable against the * optionally supplied instance OID. * * @param instanceOID the instance OID <code>variable</code> is associated * with. If <code>null</code> the formatting cannot take any MIB * specification of the variable into account and has to format it based * on its type only. * @param variable * the variable to format. * @param withOID * if <code>true</code> the <code>instanceOID</code> should be included * in the textual representation to form a {@link VariableBinding} * representation. * @return the textual representation. */ public String format(OID instanceOID, Variable variable, boolean withOID) { return (withOID) ? SNMP4JSettings.getOIDTextFormat().format(instanceOID.getValue())+ " = "+variable : variable.toString(); }
/** * Returns a textual representation of the supplied variable against the * optionally supplied instance OID. * * @param instanceOID the instance OID <code>variable</code> is associated * with. If <code>null</code> the formatting cannot take any MIB * specification of the variable into account and has to format it based * on its type only. * @param variable * the variable to format. * @param withOID * if <code>true</code> the <code>instanceOID</code> should be included * in the textual representation to form a {@link VariableBinding} * representation. * @return the textual representation. */ public String format(OID instanceOID, Variable variable, boolean withOID) { return (withOID) ? SNMP4JSettings.getOIDTextFormat().format(instanceOID.getValue())+ " = "+variable : variable.toString(); }
return oidFormat.format(instanceOID.getValue()) + SEPARATOR + typeString + SEPARATOR + valueString;