public abstract class Maps
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Maps.DelayedValue |
static class |
Maps.DiscarderByKey |
static class |
Maps.Literal |
static class |
Maps.Marker |
static class |
Maps.Putter |
static class |
Maps.Setter |
static class |
Maps.SetterByKey |
static class |
Maps.Value |
Modifier and Type | Method and Description |
---|---|
static <T> AbstractType<?> |
getExactMapTypeIfKnown(java.util.List<Pair<T,T>> entries,
java.util.function.Function<T,AbstractType<?>> mapper)
Returns the exact MapType from the entries if it can be known.
|
static ColumnSpecification |
keySpecOf(ColumnSpecification column) |
static <T> java.lang.String |
mapToString(java.util.List<Pair<T,T>> entries)
Create a
String representation of the list containing the specified elements. |
static <T> java.lang.String |
mapToString(java.util.List<Pair<T,T>> items,
java.util.function.Function<T,java.lang.String> mapper)
Create a
String representation of the map from the specified items associated to
the map entries. |
static <T extends AssignmentTestable> |
testMapAssignment(ColumnSpecification receiver,
java.util.List<Pair<T,T>> entries)
Tests that the map with the specified entries can be assigned to the specified column.
|
static ColumnSpecification |
valueSpecOf(ColumnSpecification column) |
public static ColumnSpecification keySpecOf(ColumnSpecification column)
public static ColumnSpecification valueSpecOf(ColumnSpecification column)
public static <T extends AssignmentTestable> AssignmentTestable.TestResult testMapAssignment(ColumnSpecification receiver, java.util.List<Pair<T,T>> entries)
receiver
- the receiving columnentries
- the map entriespublic static <T> java.lang.String mapToString(java.util.List<Pair<T,T>> entries)
String
representation of the list containing the specified elements.entries
- the list elementsString
representation of the listpublic static <T> java.lang.String mapToString(java.util.List<Pair<T,T>> items, java.util.function.Function<T,java.lang.String> mapper)
String
representation of the map from the specified items associated to
the map entries.items
- items associated to the map entriesmapper
- the mapper used to map the items to the String
representation of the map entriesString
representation of the mappublic static <T> AbstractType<?> getExactMapTypeIfKnown(java.util.List<Pair<T,T>> entries, java.util.function.Function<T,AbstractType<?>> mapper)
entries
- the entriesmapper
- the mapper used to retrieve the key and value types from the entriesnull
Copyright © 2009- The Apache Software Foundation