엄범

 

 

자바의 immutable?

```java

private static final Thing[] PRIVATE_VALUES = { ... };

public static final List<Thing> VALUES = 

    Collections.unmodifiableList(Arrays.asList(PRIVATE_VALUES));

```

 

```java

return ImmutableMap.of(

  key1, value1,

  key2, value2);

 

ImmutableMap.<String, String>builder()
.put(key1, value1)
.put(key2, value2)
.build();

```