public class NetworkUtils
extends java.lang.Object
Constructor and Description |
---|
NetworkUtils() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.JPanel |
createRow(java.lang.String text,
java.lang.String toolTip,
javax.swing.JComponent theComponent)
Helper method for creating formatted rows in dialog boxes, which consist
of a label, a component, and some tool-tip for the label.
|
static <T,V> boolean |
isConsistent(java.util.Collection<T> sources,
ParameterGetter<T,V> getter) |
static boolean |
isConsistent(java.util.Collection toCheck,
java.lang.Class<?> theClass,
java.lang.String methodName)
Checks to see if all the objects in a list return the same value for a
method which the user provides by name.
|
public static boolean isConsistent(java.util.Collection toCheck, java.lang.Class<?> theClass, java.lang.String methodName)
toCheck
- the list of objects to check for consistencymethodName
- the method to be invoked (uses reflection)theClass
- the class method is inpublic static javax.swing.JPanel createRow(java.lang.String text, java.lang.String toolTip, javax.swing.JComponent theComponent)
text
- the text to be displayed to the left of the commponent as a
JLabeltoolTip
- a tooltip / help to be displayed for the labeltheComponent
- the component to be displayed to the right of the labelpublic static <T,V> boolean isConsistent(java.util.Collection<T> sources, ParameterGetter<T,V> getter)
T
- V
- sources
- getter
-