public class KeYCollections
extends java.lang.Object
Constructor and Description |
---|
KeYCollections() |
Modifier and Type | Method and Description |
---|---|
static <S,T,U> java.util.Map<S,U> |
apply(java.util.Map<S,? extends T> m0,
java.util.Map<T,U> m1)
Combine two maps by function application.
|
static <S,T extends S> |
concat(S[] s1,
T[] s2)
Concatenates two arrays.
|
static java.lang.String |
filterAlphabetic(java.lang.String string)
Takes a string and returns a string which is potentially shorter and
contains a sub-collection of the original characters.
|
static java.lang.String |
join(java.lang.Iterable<?> collection,
java.lang.String delimiter)
Join the string representations of a collection of objects into onw
string.
|
static java.lang.String |
join(java.lang.Object[] collection,
java.lang.String delimiter)
Join the string representations of an array of objects into one
string.
|
public static <S,T extends S> S[] concat(S[] s1, T[] s2)
public static <S,T,U> java.util.Map<S,U> apply(java.util.Map<S,? extends T> m0, java.util.Map<T,U> m1)
m0
which are not keys of m1
are dropped.
This implementation tries to use the same implementation of Map
(provided in Java SE) as m0
.public static java.lang.String join(java.lang.Iterable<?> collection, java.lang.String delimiter)
Object.toString()
is used to turn the objects into strings.
collection
- an arbitrary non-null collectiondelimiter
- a non-null string which is put between the elements.public static java.lang.String join(java.lang.Object[] collection, java.lang.String delimiter)
Object.toString()
is used to turn the objects into strings.
collection
- an arbitrary non-null array of objectsdelimiter
- a non-null string which is put between the elements.public static java.lang.String filterAlphabetic(java.lang.String string)
All alphabetic characters (A-Z and a-z) are copied to the result while all other characters are removed.
string
- an arbitrary stringCopyright © 2003-2019 The KeY-Project.