| 程序包 | 说明 |
|---|---|
| com.jn.langx.text | |
| com.jn.langx.util | |
| com.jn.langx.util.collection | |
| com.jn.langx.util.collection.iter | |
| com.jn.langx.util.io | |
| com.jn.langx.util.reflect | |
| com.jn.langx.util.reflect.type |
| 构造器和说明 |
|---|
HttpQueryStringAccessor(String url) |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
Strings.join(String separator,
Iterable objects) |
static String |
Strings.join(String separator,
Iterator objects)
append all objects with the specified separator
|
void |
BasedStringAccessor.setTarget(T target) |
static String |
Strings.truncate(String string,
int length)
Get substring from 0 to a specified length
equals: string.substring(0, length)
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <E> boolean |
Collects.allMatch(Iterable<E> collection,
Predicate<E> predicate)
whether all elements match the specified condition or not
|
static <K,V> boolean |
Collects.allMatch(Map<? extends K,? extends V> map,
Predicate2<K,V> predicate)
whether all elements match the specified condition or not
|
static <E> boolean |
Collects.anyMatch(Collection<E> collection,
Predicate<E> predicate)
has any element match the specified condition
|
static <K,V> boolean |
Collects.anyMatch(Map<? extends K,? extends V> map,
Predicate2<K,V> predicate)
has any element match the specified condition
|
static <E> Collection<E> |
Collects.collect(Object anyObject,
Collection<E> container) |
static <E,R> R |
Collects.collect(Object anyObject,
Collector<E,R> collector) |
static <E,R> R |
Collects.collect(Object anyObject,
Supplier0<R> containerFactory,
Consumer2<R,E> consumer) |
static <E,R> R |
Collects.collect(Object anyObject,
Supplier0<R> containerFactory,
Consumer2<R,E> consumer) |
static <E> E[] |
Arrs.createArray(Class<E> componentType,
int length,
Supplier<Integer,E> initSupplier)
Create an array with the specified length and every element's value is supplied by the specified initSupplier
|
static <K,V> NonAbsentHashMap<K,V> |
Collects.emptyNonAbsentHashMap(Supplier<K,V> supplier) |
static <K,V> Map<K,V> |
Collects.filter(Map<K,V> map,
Predicate2<K,V> predicate)
Filter a map with the specified predicate
|
static <E> Collection<E> |
Collects.filter(Object anyObject,
Predicate<E> predicate)
Filter any object with the specified predicate
|
E |
Pipeline.findFirst(Predicate<E> predicate) |
static <E,R> Collection<R> |
Collects.flatMap(Collection<Collection<E>> collection,
Function<E,R> mapper)
map a collection to another, flat it
|
static <E> void |
Collects.forEach(E[] array,
Consumer2<Integer,E> consumer)
Iterate every element
|
static <K,V> void |
Collects.forEach(Map<? extends K,? extends V> map,
Consumer2<K,V> consumer)
Iterate every element
|
static <E> void |
Collects.forEach(Object anyObject,
Consumer<E> consumer)
Iterate every element
|
static <E> void |
Arrs.initArray(E[] array,
E initValue) |
static <E> void |
Arrs.initArray(E[] array,
Supplier<Integer,E> initSupplier) |
static <E> void |
Arrs.initArray(E[] array,
Supplier<Integer,E> initSupplier) |
static <K,V,R> List<R> |
Collects.map(Map<? extends K,? extends V> map,
Function2<K,V,R> mapper)
mapping aMap to a list
|
static <K,V,K1,V1> |
Collects.map(Map<? extends K,? extends V> map,
Mapper2<K,V,Pair<K1,V1>> mapper)
mapping aMap to bMap
|
static <E,R> Collection<R> |
Collects.map(Object anyObject,
Function<E,R> mapper)
mapping an iterable to a list
|
static <E,K,V> Map<K,V> |
Collects.map(Object anyObject,
Mapper<E,Pair<K,V>> mapper)
mapping an iterable to a map
|
static <E> E |
Collects.max(Object object,
Comparator<E> comparator) |
static <E> E |
Collects.max(Object object,
Comparator<E> comparator) |
static <E> E |
Collects.min(Object object,
Comparator<E> comparator) |
static <E> boolean |
Collects.noneMatch(Iterable<E> collection,
Predicate<E> predicate)
has no any element match the specified condition ?
|
static <K,V> boolean |
Collects.noneMatch(Map<? extends K,? extends V> map,
Predicate2<K,V> predicate)
has no any element match the specified condition ?
|
static <E> boolean |
Collects.removeIf(Collection<E> collection,
Predicate<E> predicate)
remove all elements that match the condition
|
static <E> boolean |
Collects.removeIf(Iterator<E> iterator,
Predicate<E> predicate) |
static <K,V> boolean |
Collects.removeIf(Map<K,V> map,
Predicate2<K,V> predicate)
remove all elements that match the map
|
static <E> TreeSet<E> |
Collects.sort(Collection<E> collection,
Comparator<E> comparator)
sort a collection, return an new list. it is different to
Collections.sort(list) is that : Collections.sort() return void
|
static <E> TreeSet<E> |
Collects.sort(Collection<E> collection,
Comparator<E> comparator,
boolean reverse)
sort a collection, return an new list. it is different to
Collections.sort(list) is that : Collections.sort() return void
|
static <K,V> Map<K,V> |
Collects.sort(Map<K,V> map,
Comparator<K> comparator)
sort a collection, return an new list. it is different to
Collections.sort(list) is that : Collections.sort() return void
|
static <E,K,V> Collector<E,Map<K,V>> |
Collects.toHashMap(Function<E,K> keyMapper,
Function<E,V> valueMapper,
boolean sequential) |
static <E,K,V> Collector<E,Map<K,V>> |
Collects.toHashMap(Function<E,K> keyMapper,
Function<E,V> valueMapper,
boolean sequential) |
static <E,K,V> Collector<E,Map<K,V>> |
Collects.toTreeMap(Function<E,K> keyMapper,
Function<E,V> valueMapper,
Comparator<K> comparator) |
static <E,K,V> Collector<E,Map<K,V>> |
Collects.toTreeMap(Function<E,K> keyMapper,
Function<E,V> valueMapper,
Comparator<K> comparator) |
| 构造器和说明 |
|---|
NonAbsentHashMap(int initialCapacity,
float loadFactor,
Supplier<K,V> supplier) |
NonAbsentHashMap(Supplier<K,V> supplier) |
PropertiesAccessor(Properties properties) |
StringMapAccessor(StringMap target) |
WrappedNonAbsentMap(Map<K,V> map,
Supplier<K,V> supplier) |
WrappedNonAbsentMap(Map<K,V> map,
Supplier<K,V> supplier) |
| 构造器和说明 |
|---|
EnumerationIterable(Enumeration<E> enumeration) |
EnumerationIterable(EnumerationIterator<E> iterator) |
EnumerationIterator(Enumeration<E> enumeration) |
IteratorIterable(Iterator<E> iterator) |
IteratorIterable(Iterator<E> iterator,
boolean removable) |
WrappedIterable(Iterable<E> delegate,
boolean mutable) |
WrappedIterator(Iterator<E> delegate,
boolean mutable) |
| 限定符和类型 | 方法和说明 |
|---|---|
static CharsetDecoder |
Charsets.decoder(Charset charset)
Returns a cached thread-local
CharsetDecoder for the specified Charset. |
static CharsetDecoder |
Charsets.decoder(Charset charset,
CodingErrorAction codingErrorAction)
Returns a new
CharsetDecoder for the Charset with the specified error action. |
static CharsetDecoder |
Charsets.decoder(Charset charset,
CodingErrorAction codingErrorAction)
Returns a new
CharsetDecoder for the Charset with the specified error action. |
static CharsetDecoder |
Charsets.decoder(Charset charset,
CodingErrorAction malformedInputAction,
CodingErrorAction unmappableCharacterAction)
Returns a new
CharsetDecoder for the Charset with specified error actions. |
static CharsetDecoder |
Charsets.decoder(Charset charset,
CodingErrorAction malformedInputAction,
CodingErrorAction unmappableCharacterAction)
Returns a new
CharsetDecoder for the Charset with specified error actions. |
static CharsetDecoder |
Charsets.decoder(Charset charset,
CodingErrorAction malformedInputAction,
CodingErrorAction unmappableCharacterAction)
Returns a new
CharsetDecoder for the Charset with specified error actions. |
static CharsetEncoder |
Charsets.encoder(Charset charset)
Returns a cached thread-local
CharsetEncoder for the specified Charset. |
static CharsetEncoder |
Charsets.encoder(Charset charset,
CodingErrorAction codingErrorAction)
Returns a new
CharsetEncoder for the Charset with the specified error action. |
static CharsetEncoder |
Charsets.encoder(Charset charset,
CodingErrorAction codingErrorAction)
Returns a new
CharsetEncoder for the Charset with the specified error action. |
static CharsetEncoder |
Charsets.encoder(Charset charset,
CodingErrorAction malformedInputAction,
CodingErrorAction unmappableCharacterAction)
Returns a new
CharsetEncoder for the Charset with specified error actions. |
static CharsetEncoder |
Charsets.encoder(Charset charset,
CodingErrorAction malformedInputAction,
CodingErrorAction unmappableCharacterAction)
Returns a new
CharsetEncoder for the Charset with specified error actions. |
static CharsetEncoder |
Charsets.encoder(Charset charset,
CodingErrorAction malformedInputAction,
CodingErrorAction unmappableCharacterAction)
Returns a new
CharsetEncoder for the Charset with specified error actions. |
| 构造器和说明 |
|---|
LineDelimiter(String delimiter) |
LineIterator(Reader reader)
Constructs an iterator of the lines for a
Reader. |
| 限定符和类型 | 方法和说明 |
|---|---|
static Collection<Field> |
Reflects.filterFields(Field[] fields,
int... excludedModifiers) |
static Collection<Field> |
Reflects.getAllDeclaredFields(Class clazz) |
static Collection<Field> |
Reflects.getAllDeclaredFields(Class clazz,
boolean containsStatic) |
static Collection<Field> |
Reflects.getAllPublicFields(Class clazz,
boolean containsStatic) |
static Collection<Field> |
Reflects.getAllPublicInstanceFields(Class clazz) |
static <E extends Annotation> |
Reflects.getAnnotation(AnnotatedElement annotatedElement,
Class<E> annotationClass)
Returns this element's annotation for the specified type if
such an annotation is present, else null.
|
static <E extends Annotation> |
Reflects.getAnnotation(AnnotatedElement annotatedElement,
Class<E> annotationClass)
Returns this element's annotation for the specified type if
such an annotation is present, else null.
|
static Annotation[] |
Reflects.getAnnotations(AnnotatedElement annotatedElement)
Returns all annotations present on this element.
|
static Field |
Reflects.getAnyField(Class clazz,
String fieldName) |
static Field |
Reflects.getAnyField(Class clazz,
String fieldName) |
static <V> V |
Reflects.getAnyFieldValue(Object object,
String fieldName,
boolean force,
boolean throwException) |
static <V> V |
Reflects.getAnyFieldValue(Object object,
String fieldName,
boolean force,
boolean throwException) |
static <V> V |
Reflects.getAnyFieldValueForcedIfPresent(Object object,
String fieldName) |
static <V> V |
Reflects.getAnyFieldValueForcedIfPresent(Object object,
String fieldName) |
static Method |
Reflects.getAnyMethod(Class clazz,
String methodName,
Class... parameterTypes) |
static Method |
Reflects.getAnyMethod(Class clazz,
String methodName,
Class... parameterTypes) |
static URL |
Reflects.getCodeLocation(Class clazz) |
static Constructor |
Reflects.getConstructor(Class clazz,
Class... parameterTypes) |
static List<Annotation> |
Reflects.getDeclaredAnnotations(AnnotatedElement annotatedElement)
Returns all annotations that are directly present on this
element.
|
static Field |
Reflects.getDeclaredField(Class clazz,
String fieldName) |
static Field |
Reflects.getDeclaredField(Class clazz,
String fieldName) |
static <V> V |
Reflects.getDeclaredFieldValue(Object object,
String fieldName,
boolean force,
boolean throwException) |
static <V> V |
Reflects.getDeclaredFieldValueForcedIfPresent(Object object,
String fieldName) |
static <V> V |
Reflects.getDeclaredFieldValueForcedIfPresent(Object object,
String fieldName) |
static Method |
Reflects.getDeclaredMethod(Class clazz,
String methodName,
Class... parameterTypes) |
static Method |
Reflects.getDeclaredMethod(Class clazz,
String methodName,
Class... parameterTypes) |
static <V> V |
Reflects.getFieldValue(Field field,
Object object,
boolean force,
boolean throwException) |
static <V> V |
Reflects.getFieldValue(Field field,
Object object,
boolean force,
boolean throwException) |
static String |
Reflects.getFQNClassName(Class clazz) |
static String |
Reflects.getJvmSignature(Class clazz) |
static String |
Reflects.getMethodString(Class clazz,
String methodName,
Class[] parameterTypes) |
static String |
Reflects.getMethodString(Class clazz,
String methodName,
Class[] parameterTypes) |
static String |
Reflects.getMethodString(String clazzFQN,
String methodName,
Class returnType,
Class[] parameterTypes) |
static String |
Reflects.getPackageName(Class clazz) |
static Field |
Reflects.getPublicField(Class clazz,
String fieldName) |
static Field |
Reflects.getPublicField(Class clazz,
String fieldName) |
static <V> V |
Reflects.getPublicFieldValue(Object object,
String fieldName,
boolean throwException) |
static <V> V |
Reflects.getPublicFieldValue(Object object,
String fieldName,
boolean throwException) |
static <V> V |
Reflects.getPublicFieldValueForcedIfPresent(Object object,
String fieldName) |
static <V> V |
Reflects.getPublicFieldValueForcedIfPresent(Object object,
String fieldName) |
static Method |
Reflects.getPublicMethod(Class clazz,
String methodName,
Class... parameterTypes) |
static Method |
Reflects.getPublicMethod(Class clazz,
String methodName,
Class... parameterTypes) |
static String |
Reflects.getSimpleClassName(Class clazz) |
static String |
Reflects.getSimpleClassName(Object obj) |
static String |
Reflects.getTypeName(Class type) |
static Iterable<Class<?>> |
Reflects.hierarchy(Class<?> type)
Get an
Iterable that can iterate over a class hierarchy in ascending (subclass to superclass) order,
excluding interfaces. |
static Iterable<Class<?>> |
Reflects.hierarchy(Class<?> type,
boolean excludeInterfaces)
Get an
Iterable that can iterate over a class hierarchy in ascending (subclass to superclass) order. |
static <V> V |
Reflects.invoke(Method method,
Object object,
Object[] parameters,
boolean force,
boolean throwException) |
static <V> V |
Reflects.invokeAnyMethod(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters,
boolean force,
boolean throwException) |
static <V> V |
Reflects.invokeAnyMethod(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters,
boolean force,
boolean throwException) |
static <V> V |
Reflects.invokeAnyMethodForcedIfPresent(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters) |
static <V> V |
Reflects.invokeAnyMethodForcedIfPresent(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters) |
static <V> V |
Reflects.invokeDeclaredMethod(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters,
boolean force,
boolean throwException) |
static <V> V |
Reflects.invokeDeclaredMethod(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters,
boolean force,
boolean throwException) |
static <V> V |
Reflects.invokeDeclaredMethodForcedIfPresent(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters) |
static <V> V |
Reflects.invokeDeclaredMethodForcedIfPresent(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters) |
static <V> V |
Reflects.invokePublicMethod(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters,
boolean force,
boolean throwException) |
static <V> V |
Reflects.invokePublicMethod(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters,
boolean force,
boolean throwException) |
static <V> V |
Reflects.invokePublicMethodForcedIfPresent(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters) |
static <V> V |
Reflects.invokePublicMethodForcedIfPresent(Object object,
String methodName,
Class[] parameterTypes,
Object[] parameters) |
static boolean |
Reflects.isAnnotationPresent(AnnotatedElement annotatedElement,
Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type
is present on this element, else false.
|
static boolean |
Reflects.isAnnotationPresent(AnnotatedElement annotatedElement,
Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type
is present on this element, else false.
|
static boolean |
Reflects.isAnonymous(Class clazz) |
static boolean |
Reflects.isAnonymousOrLocal(Class<?> clazz) |
static boolean |
Reflects.isInnerClass(Class<?> clazz) |
static boolean |
Reflects.isLambda(Class<?> clazz) |
static boolean |
Reflects.isLocal(Class clazz) |
static boolean |
Reflects.isStatic(Class<?> clazz) |
static <E> E |
Reflects.newInstance(Class<E> clazz) |
static <E> E |
Reflects.newInstance(Class<E> clazz,
Class[] parameterTypes,
Object[] parameters) |
static <E> E |
Reflects.newInstance(Class<E> clazz,
Class[] parameterTypes,
Object[] parameters) |
static void |
Reflects.setAnyFieldValue(Object object,
String fieldName,
Object value,
boolean force,
boolean throwException) |
static void |
Reflects.setAnyFieldValue(Object object,
String fieldName,
Object value,
boolean force,
boolean throwException) |
static void |
Reflects.setDeclaredFieldValue(Object object,
String fieldName,
Object value,
boolean force,
boolean throwException) |
static void |
Reflects.setDeclaredFieldValue(Object object,
String fieldName,
Object value,
boolean force,
boolean throwException) |
void |
FieldComparator.setDelegate(Comparator delegate) |
static void |
Reflects.setFieldValue(Field field,
Object target,
Object value,
boolean force,
boolean throwException) |
static void |
Reflects.setFieldValue(Field field,
Object target,
Object value,
boolean force,
boolean throwException) |
static void |
Reflects.setPublicFieldValue(Object object,
String fieldName,
Object value,
boolean force,
boolean throwException) |
static void |
Reflects.setPublicFieldValue(Object object,
String fieldName,
Object value,
boolean force,
boolean throwException) |
void |
ArrayAccessor.setTarget(E target) |
| 构造器和说明 |
|---|
FieldAccessor(Object target) |
FieldComparator(Class clazz,
String fieldName,
Comparator fieldComparator) |
FieldComparator(Class clazz,
String fieldName,
Comparator fieldComparator) |
FieldComparator(Field field,
Comparator fieldComparator) |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
Types.getTypeSignature(String typeString)
get the type's signature in jvm runtime
|
Copyright © 2019. All rights reserved.