org.joda.beans.gen.guava.ini Maven / Gradle / Ivy
# copies requiring Guava library or Joda-Collect
# ImmutableCollection is abstract, thus uses ImmutableList/ArrayList
# TreeMultiset use only works with natural ordering
# how to copy $value to make it immutable
[immutable.builder.to.immutable]
Collection = ImmutableList.copyOf($value)
List = ImmutableList.copyOf($value)
Set = ImmutableSet.copyOf($value)
SortedSet = ImmutableSortedSet.copyOfSorted($value)
Map = ImmutableMap.copyOf($value)
SortedMap = ImmutableSortedMap.copyOfSorted($value)
EnumSet = EnumSet.copyOf($value)
NavigableSet = Sets.unmodifiableNavigableSet(Sets.newTreeSet($value))
NavigableMap = Maps.unmodifiableNavigableMap(Maps.newTreeMap($value))
BiMap = ImmutableBiMap.copyOf($value)
Multimap = ImmutableMultimap.copyOf($value)
ListMultimap = ImmutableListMultimap.copyOf($value)
SetMultimap = ImmutableSetMultimap.copyOf($value)
Multiset = ImmutableMultiset.copyOf($value)
SortedMultiset = ImmutableSortedMultiset.copyOfSorted($value)
Table = ImmutableTable.copyOf($value)
Grid = ImmutableGrid.copyOf($value)
ImmutableCollection = ImmutableList.copyOf($value)
ImmutableList = ImmutableList.copyOf($value)
ImmutableSet = ImmutableSet.copyOf($value)
ImmutableSortedSet = ImmutableSortedSet.copyOfSorted($value)
ImmutableMap = ImmutableMap.copyOf($value)
ImmutableSortedMap = ImmutableSortedMap.copyOfSorted($value)
ImmutableBiMap = ImmutableBiMap.copyOf($value)
ImmutableMultimap = ImmutableMultimap.copyOf($value)
ImmutableListMultimap = ImmutableListMultimap.copyOf($value)
ImmutableSetMultimap = ImmutableSetMultimap.copyOf($value)
ImmutableMultiset = ImmutableMultiset.copyOf($value)
ImmutableSortedMultiset = ImmutableSortedMultiset.copyOfSorted($value)
ImmutableTable = ImmutableTable.copyOf($value)
ImmutableGrid = ImmutableGrid.copyOf($value)
ImmutableBean = $value
# how to copy $value to make it mutable
[immutable.builder.to.mutable]
Collection = ImmutableList.copyOf($value)
List = ImmutableList.copyOf($value)
Set = ImmutableSet.copyOf($value)
SortedSet = ImmutableSortedSet.copyOfSorted($value)
Map = ImmutableMap.copyOf($value)
SortedMap = ImmutableSortedMap.copyOfSorted($value)
EnumSet = new HashSet<>($value)
NavigableSet = new TreeSet<>($value))
NavigableMap = new TreeMap<>($value)
BiMap = ImmutableBiMap.copyOf($value)
Multimap = ImmutableMultimap.copyOf($value)
ListMultimap = ImmutableListMultimap.copyOf($value)
SetMultimap = ImmutableSetMultimap.copyOf($value)
Multiset = ImmutableMultiset.copyOf($value)
SortedMultiset = ImmutableSortedMultiset.copyOfSorted($value)
Table = ImmutableTable.copyOf($value)
Grid = ImmutableGrid.copyOf($value)
ImmutableCollection = $value
ImmutableList = $value
ImmutableSet = $value
ImmutableSortedSet = $value
ImmutableMap = $value
ImmutableSortedMap = $value
ImmutableBiMap = $value
ImmutableMultimap = $value
ImmutableListMultimap = $value
ImmutableSetMultimap = $value
ImmutableMultiset = $value
ImmutableSortedMultiset = $value
ImmutableTable = $value
ImmutableGrid = $value
ImmutableBean = $value
# the type to use for in the builder
[immutable.builder.type]
EnumSet = Set<>
ImmutableCollection = Collection<>
ImmutableList = List<>
ImmutableSet = Set<>
ImmutableSortedSet = SortedSet<>
ImmutableMap = Map<>
ImmutableSortedMap = SortedMap<>
ImmutableBiMap = BiMap<>
ImmutableMultimap = Multimap<>
ImmutableListMultimap = ListMultimap<>
ImmutableSetMultimap = SetMultimap<>
ImmutableMultiset = Multiset<>
ImmutableSortedMultiset = SortedMultiset<>
ImmutableTable = Table<>
ImmutableGrid = Grid<>
# the initializer to use for collections in the builder
[immutable.builder.init]
Collection = ImmutableList.of()
List = ImmutableList.of()
Set = ImmutableSet.of()
SortedSet = ImmutableSortedSet.of()
Map = ImmutableMap.of()
SortedMap = ImmutableSortedMap.of()
EnumSet = ImmutableSet.of()
NavigableSet = new TreeSet<>()
NavigableMap = new TreeMap<>()
BiMap = ImmutableBiMap.of()
Multimap = ImmutableMultimap.of()
ListMultimap = ImmutableListMultimap.of()
SetMultimap = ImmutableSetMultimap.of()
Multiset = ImmutableMultiset.of()
SortedMultiset = ImmutableSortedMultiset.of()
Table = ImmutableTable.of()
Grid = ImmutableGrid.of()
ImmutableCollection = ImmutableList.of()
ImmutableList = ImmutableList.of()
ImmutableSet = ImmutableSet.of()
ImmutableSortedSet = ImmutableSortedSet.of()
ImmutableMap = ImmutableMap.of()
ImmutableSortedMap = ImmutableSortedMap.of()
ImmutableBiMap = ImmutableBiMap.of()
ImmutableMultimap = ImmutableMultimap.of()
ImmutableListMultimap = ImmutableListMultimap.of()
ImmutableSetMultimap = ImmutableSetMultimap.of()
ImmutableMultiset = ImmutableMultiset.of()
ImmutableSortedMultiset = ImmutableSortedMultiset.of()
ImmutableTable = ImmutableTable.of()
ImmutableGrid = ImmutableGrid.of()
# the code used to copy varargs
[immutable.builder.varargs]
Collection = ImmutableList.copyOf($value)
List = ImmutableList.copyOf($value)
Set = ImmutableSet.copyOf($value)
SortedSet = ImmutableSortedSet.copyOf($value)
EnumSet = EnumSet.copyOf(Arrays.asList($value))
ImmutableCollection = ImmutableList.copyOf($value)
ImmutableList = ImmutableList.copyOf($value)
ImmutableSet = ImmutableSet.copyOf($value)
ImmutableSortedSet = ImmutableSortedSet.copyOf($value)
# provide the ability to handle clone-on-get or immutable classes
[immutable.get.clone]
Date = cloneCast
Object[] = clone
String[] = clone
byte[] = clone
char[] = clone
short[] = clone
int[] = clone
long[] = clone
float[] = clone
double[] = clone
# types that invalid in immutable beans
[immutable.invalid.type]
StringBuilder =
StringBuffer =
ConcurrentMap =
ConcurrentNavigableMap =
ArrayList =
LinkedList =
HashSet =
TreeSet =
HashMap =
TreeMap =
ConcurrentHashMap =
ConcurrentSkipListMap =
EnumBiMap =
EnumHashBiMap =
HashBiMap =
EnumMultiset =
HashMultiset =
LinkedHashMultiset =
TreeMultiset =
ArrayListMultimap =
LinkedListMultimap =
HashMultimap =
LinkedHashMultimap =
TreeMultimap =
# no immutable version of SortedSetMultimap
# can be simulated via ImmutableSetMultimap.Builder, but complex
SortedSetMultimap =
ArrayTable =
HashBasedTable =
TreeBasedTable =
SparseGrid =
DenseGrid =
Bean =
FlexiBean =
StrBuilder =