All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.joda.beans.gen.jdk.ini Maven / Gradle / Ivy

#copies using JDK 6 classes only

# how to copy $value to make it immutable
[immutable.builder.to.immutable]
Collection = Collections.unmodifiableCollection(new ArrayList<>($value))
List = Collections.unmodifiableList(new ArrayList<>($value))
Set = Collections.unmodifiableSet(new HashSet<>($value))
Map = Collections.unmodifiableMap(new HashMap<>($value))
SortedMap = Collections.unmodifiableSortedMap(new TreeMap<>($value))
EnumSet = EnumSet.copyOf($value)
ImmutableBean = $value

# how to copy $value to make it mutable
[immutable.builder.to.mutable]
Collection = new ArrayList<>($value)
List = new ArrayList<>($value)
Set = new HashSet<>($value)
Map = new HashMap<>($value)
SortedMap = new TreeMap<>($value)
EnumSet = new HashSet<>($value)
ImmutableBean = $value

# the type to use for in the builder
[immutable.builder.type]
EnumSet = Set<>

# the initializer to use for collections in the builder
[immutable.builder.init]
Collection = Collections.emptyList()
List = Collections.emptyList()
Set = Collections.emptySet()
Map = Collections.emptyMap()
SortedMap = new TreeMap<>()
EnumSet = Collections.emptySet()

# the code used to copy varargs
[immutable.builder.varargs]
Collection = Arrays.asList($value)
List = Arrays.asList($value)
Set = new LinkedHashSet<>(Arrays.asList($value))
SortedSet = new TreeSet<>(Arrays.asList($value))
EnumSet = EnumSet.copyOf(Arrays.asList($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 =
SortedSet =
NavigableSet =
NavigableMap =
TreeSet =
HashMap =
TreeMap =
ConcurrentHashMap =
ConcurrentSkipListMap =
Multimap =
ListMultimap =
SetMultimap =
Multiset =
SortedMultiset =
ImmutableCollection =
ImmutableList =
ImmutableSet =
ImmutableSortedSet =
ImmutableMap =
ImmutableSortedMap =
ImmutableBiMap =
ImmutableMultimap =
ImmutableListMultimap =
ImmutableSetMultimap =
ImmutableMultiset =
ImmutableSortedMultiset =
Bean =
FlexiBean =
StrBuilder =




© 2015 - 2024 Weber Informatics LLC | Privacy Policy