Class C
java.lang.Object
fc.util.C
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic fc.util.C.EntryCreate a map entry to pass to the map method.static fc.util.C.EntryAlias for the e methodstatic ListCreate an return a list from the specified args.static voidstatic Mapmap(fc.util.C.Entry... entries) Create an return a Map from the specified args.static MapCreate an return a Map from the specified args, which are treated as key, value pairs in sequence.static booleanReturns true if the specified collection is null or empty.static SetrandomNNoDuplicates(List list, int count) Pick NON-duplicate N random items from a list.static SetrandomNNoDuplicates(List list, int count, int retries) Pick NON-duplicate N random items from a list.static SetrandomNNoDups(List list, int count) alias for therandomNNoDuplicates(List, int)methodstatic SetCreate an return a Set from the specified args.static booleanunbox and return false if nullstatic charunbox and return '0' if nullstatic doubleunbox and return 0 if nullstatic intunbox and return 0 if nullstatic longunbox and return 0 if nullstatic shortunbox and return 0 if nullstatic booleanunbox and return false if nullstatic booleanunbox and return false if nullstatic charunbox and return '0' if nullstatic doubleunbox and return 0 if nullstatic intunbox and return 0 if nullstatic longunbox and return 0 if nullstatic shortunboxShort(Object s) unbox and return 0 if null
-
Constructor Details
-
C
public C()
-
-
Method Details
-
list
-
set
-
map
-
map
-
entry
-
e
-
randomNNoDuplicates
Pick NON-duplicate N random items from a list. If N invalid input: '<' number of unique items in the list, throws a IllegalArgumentException. Also throws a IllegalArgumentException if not able to get unique items after 16 tries (per item). To specify a different retry count (per item), use the variant of this method that takes the retry parameter.- Parameters:
count- number (N) items to choose.- Throws:
IllegalArgumentException
-
randomNNoDups
alias for therandomNNoDuplicates(List, int)method- Throws:
IllegalArgumentException
-
randomNNoDuplicates
public static Set randomNNoDuplicates(List list, int count, int retries) throws IllegalArgumentException Pick NON-duplicate N random items from a list. If N invalid input: '<' number of unique items in the list, throws a IllegalArgumentException. Also throws a IllegalArgumentException if not able to get unique items after the specified (per item).- Parameters:
count- number (N) items to choose.retries- number of retries to get a unique random item before bailing/throwing an Exception- Throws:
IllegalArgumentException
-
unbox
-
unboxShort
unbox and return 0 if null -
unbox
-
unboxInt
-
unbox
-
unboxLong
-
unbox
-
unboxDouble
unbox and return 0 if null -
unbox
-
unboxChar
-
unbox
-
unboxBool
-
unboxBoolean
unbox and return false if null -
nullOrEmpty
Returns true if the specified collection is null or empty. -
main
-