-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathType.java
More file actions
30 lines (25 loc) · 915 Bytes
/
Type.java
File metadata and controls
30 lines (25 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.softlayer.api;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public abstract class Type {
protected Map<String, Object> unknownProperties;
/**
* Get all unknown properties (or an empty map). The result of mutating the resulting
* map is undefined and may result in an error.
*/
public Map<String, Object> getUnknownProperties() {
if (unknownProperties == null) {
return Collections.emptyMap();
}
return unknownProperties;
}
/**
* Set the unknown properties for this type. The values are copied to an immutable map.
* Note, these values are NOT serialized into the type.
*/
public void setUnknownProperties(Map<String, Object> unknownProperties) {
this.unknownProperties = Collections.unmodifiableMap(
new HashMap<>(unknownProperties));
}
}