public class S3Path
extends org.jimmutable.core.objects.Stringable
| Modifier and Type | Class and Description |
|---|---|
static class |
S3Path.MyConverter |
| Modifier and Type | Field and Description |
|---|---|
static S3Path.MyConverter |
CONVERTER |
static S3Path |
PATH_BUCKET_ROOT |
| Modifier and Type | Method and Description |
|---|---|
String |
getOptionalExtension(String default_value)
Get the "extension" of the last part of the path.
|
String |
getOptionalLastPart(String default_value)
Get the last part of a path.
|
S3Path |
getOptionalParent(S3Path default_value)
Get the parent of this path
|
String |
getOptionalPart(int idx,
String default_value)
Get the part at a given index
|
int |
getSimpleNumberOfParts()
Get the number of parts of a path.
|
List<String> |
getSimpleParts()
Get the parts of a path.
|
boolean |
hasExtension()
Does this path have an extension?
foo/bar/baz.txt returns true foo returns false
|
boolean |
hasLastPart()
Does this path have a "last" part?
|
boolean |
hasParent()
Does this path have a parent?
|
void |
normalize() |
void |
validate() |
compareTo, equals, freeze, getSimpleValue, getTypeName, hashCode, normalizeLowerCase, normalizeTrim, normalizeUpperCase, setValue, toString, writeassertNotComplete, complete, deepClone, isCompletepublic static S3Path PATH_BUCKET_ROOT
public static final S3Path.MyConverter CONVERTER
public S3Path(String code)
public void normalize()
normalize in class org.jimmutable.core.objects.StandardObject<org.jimmutable.core.objects.Stringable>public void validate()
validate in class org.jimmutable.core.objects.StandardObject<org.jimmutable.core.objects.Stringable>public List<String> getSimpleParts()
public int getSimpleNumberOfParts()
public String getOptionalPart(int idx, String default_value)
idx - The index of the part to getdefault_value - The value to return if no part exists at the specified indexpublic boolean hasLastPart()
public String getOptionalLastPart(String default_value)
default_value - The value to return if the path does not have a last partpublic boolean hasExtension()
public String getOptionalExtension(String default_value)
default_value - The value to return if the path does not have an extensionpublic boolean hasParent()
Copyright © 2017. All rights reserved.