Package edu.umd.cs.findbugs.util
Class Util
java.lang.Object
edu.umd.cs.findbugs.util.Util
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final float
(package private) static Collection
<Runnable> (package private) static final Pattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K> List
<K> static <K> Set
<K> static void
closeSilently
(Closeable out) Deprecated.Use try-with-resources instead.static void
static void
Deprecated.Use try-with-resources instead.static void
closeSilently
(Reader in) Deprecated.Use try-with-resources instead.static void
closeSilently
(ZipFile zip) Deprecated.Use try-with-resources instead.static <T> Set
<T> static <E> E
static String
private static String
getFileExtension
(String name) static String
static Reader
getFileReader
(File filename) static Reader
getFileReader
(String filename) static Writer
getFileWriter
(String filename) static MessageDigest
static Reader
getReader
(InputStream in) static Writer
getWriter
(OutputStream out) static String
static <K,
V> Map <K, V> immutableMap
(Map<K, V> map) static boolean
isPowerOfTwo
(int i) static <K> ArrayList
<K> makeSmallArrayList
(List<K> m) static <K,
V> HashMap <K, V> makeSmallHashMap
(Map<K, V> m) static <K> HashSet
<K> makeSmallHashSet
(Collection<K> m) static String
static Thread
static Thread
runInDameonThread
(Runnable r, String name) static void
static Thread
-
Field Details
-
runAtShutdown
-
tag
-
DEFAULT_LOAD_FACTOR
static final float DEFAULT_LOAD_FACTOR- See Also:
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
startDameonThread
-
runInDameonThread
-
runInDameonThread
-
repeat
-
runLogAtShutdown
-
emptyOrNonnullSingleton
-
immutableMap
-
getReader
-
getFileReader
- Throws:
FileNotFoundException
-
getFileReader
- Throws:
FileNotFoundException
-
getWriter
-
getFileWriter
- Throws:
FileNotFoundException
-
closeSilently
-
closeSilently
Deprecated.Use try-with-resources instead. -
closeSilently
Deprecated.Use try-with-resources instead. And basicallyIOException
fromOutputStream.close()
is not good to ignore. -
closeSilently
Deprecated.Use try-with-resources instead. And basicallyIOException
fromOutputStream.close()
is not good to ignore. -
closeSilently
Deprecated.Use try-with-resources instead. -
getXMLType
- Throws:
IOException
-
getFileExtension
-
getFileExtension
-
getFileExtensionIgnoringGz
-
first
- Parameters:
i
- the Iterable whose first element is to be retrieved- Returns:
- first element of iterable
-
makeSmallHashMap
-
makeSmallHashSet
-
makeSmallArrayList
-
addTo
-
addTo
-
getMD5Digest
-
isPowerOfTwo
public static boolean isPowerOfTwo(int i)
-