| Modifier and Type | Class and Description |
|---|---|
static class |
Bucket.BucketPropertyPath
Value object representing a path within a
Bucket. |
| Constructor and Description |
|---|
Bucket()
Creates new empty bucket
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,byte[]> |
asMap()
Key/value pairs contained in the
Bucket. |
Set<Map.Entry<String,byte[]>> |
entrySet()
A set view of the mappings contained in this bucket.
|
Bucket |
extract(String prefix)
Extracts a bucket containing key/value pairs with the
prefix. |
Set<String> |
extractAllKeysFor(String path)
Get all the keys matching a given path.
|
byte[] |
get(String path)
Get value assigned with path.
|
Bucket.BucketPropertyPath |
getPath()
Get the
Bucket.BucketPropertyPath leading to the current Bucket. |
Bucket.BucketPropertyPath |
getPropertyPath(String property)
Get the
Bucket.BucketPropertyPath for a given property within the current Bucket. |
boolean |
isEmpty() |
Set<String> |
keySet() |
static Bucket |
newBucketFromRawMap(Map<byte[],byte[]> source)
Creates a new Bucket from a given raw map.
|
static Bucket |
newBucketFromStringMap(Map<String,String> source)
Creates a new Bucket from a given
String map. |
void |
put(String path,
byte[] value)
Add
String representation of property dot path with given value. |
Map<byte[],byte[]> |
rawMap()
Get keys and values in binary format.
|
void |
remove(String path)
Remove the property at property dot
path. |
int |
size() |
String |
toString() |
Collection<byte[]> |
values() |
public static final Charset CHARSET
public void put(String path, byte[] value)
String representation of property dot path with given value.path - must not be null or String.isEmpty().value - can be null.public void remove(String path)
path.path - must not be null or String.isEmpty().@Nullable public byte[] get(String path)
path - path must not be null or String.isEmpty().public Set<Map.Entry<String,byte[]>> entrySet()
public boolean isEmpty()
Bucket.public int size()
Bucket.public Collection<byte[]> values()
public Map<String,byte[]> asMap()
Bucket.public Bucket extract(String prefix)
prefix.prefix - public Set<String> extractAllKeysFor(String path)
path - the path to look for. Can be null.public Map<byte[],byte[]> rawMap()
public Bucket.BucketPropertyPath getPath()
Bucket.BucketPropertyPath leading to the current Bucket.Bucket.BucketPropertyPath.public Bucket.BucketPropertyPath getPropertyPath(String property)
Bucket.BucketPropertyPath for a given property within the current Bucket.property - the property to look up.Bucket.BucketPropertyPath.public static Bucket newBucketFromRawMap(Map<byte[],byte[]> source)
source - can be null.public static Bucket newBucketFromStringMap(Map<String,String> source)
String map.source - can be null.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.