Skip navigation links
A B C D E F G H I J K L M N O P R S T U W X 

A

AbstractDynamic<T> - Class in alexh.weak
 
AbstractDynamic(T) - Constructor for class alexh.weak.AbstractDynamic
 
alexh - package alexh
 
alexh.weak - package alexh.weak
 
ALL_PARSER - Static variable in class alexh.weak.ConverterTimeFormats
Tries all permissive parsers, taking the first success or throwing the first exception if all fail ISO_PERMISSIVE -> DAY_MONTH_YEAR_PERMISSIVE_DASH -> UTIL_DATE_TO_STRING -> EPOCH_MILLIS_PARSER
ALL_PARSER_WITH_DEFAULTS - Static variable in class alexh.weak.ConverterTimeFormats
Tries all permissive parsers (with defaults where applicable), taking the first success or throwing the first exception if all fail ISO_PERMISSIVE -> DAY_MONTH_YEAR_PERMISSIVE_DASH -> UTIL_DATE_TO_STRING -> EPOCH_MILLIS_PARSER
allChildren() - Method in interface alexh.weak.Dynamic
 
allChildrenBreadthFirst() - Method in interface alexh.weak.Dynamic
Returns a stream of all children in a breadth first order, for example a structure
allChildrenDepthFirst() - Method in interface alexh.weak.Dynamic
Returns a stream of all children in a depth first order, for example a structure
as(Class<T>) - Method in interface alexh.weak.Dynamic
As Weak.asObject() casting to input type, and providing a better message in the exceptional case
as(Class<T>) - Method in class alexh.weak.OptionalWeak
Returns inner value as optional of input type, if the inner value is absent or not an instance of the input type an empty optional is returned
as(Class<T>) - Method in interface alexh.weak.Weak
As Weak.asObject() casting to input type
asList() - Method in class alexh.weak.OptionalWeak
Shortcut for as(List.class), with malleable generic type
asList() - Method in interface alexh.weak.Weak
Shortcut for as(List.class), with malleable generic type
asMap() - Method in class alexh.weak.OptionalWeak
Shortcut for as(Map.class), with malleable generic type
asMap() - Method in interface alexh.weak.Weak
Shortcut for as(Map.class), with malleable generic type
asObject() - Method in class alexh.weak.AbstractDynamic
 
asObject() - Method in class alexh.weak.ChildAbsence
 
asObject() - Method in class alexh.weak.OptionalWeak
 
asObject() - Method in class alexh.weak.ParentAbsence
 
asObject() - Method in interface alexh.weak.Weak
Returns inner value implicitly asserting that the value is not absent, ie Weak.isPresent() is true
asObject() - Method in class alexh.weak.XmlDynamic
 
asOptional() - Method in interface alexh.weak.Weak
Converts this value/absence wrapper into a standard optional
asString() - Method in class alexh.weak.OptionalWeak
Shortcut for as(String.class)
asString() - Method in interface alexh.weak.Weak
Shortcut for as(String.class)
attributes() - Method in class alexh.weak.XmlDynamic
 
attributesWith(Predicate<Node>) - Method in class alexh.weak.XmlDynamic
 

B

Barren(P, Object) - Constructor for class alexh.weak.ParentAbsence.Barren
 

C

ChildAbsence<Parent extends Dynamic> - Class in alexh.weak
 
ChildAbsence(Parent, Object) - Constructor for class alexh.weak.ChildAbsence
 
ChildAbsence.Missing<P extends Dynamic & alexh.weak.Describer> - Class in alexh.weak
 
ChildAbsence.Null - Class in alexh.weak
 
children() - Method in interface alexh.weak.Dynamic
 
children() - Method in class alexh.weak.XmlDynamic
 
convert(Object) - Static method in class alexh.weak.Converter
 
convert() - Method in class alexh.weak.OptionalWeak
 
convert() - Method in interface alexh.weak.Weak
Shortcut for wrapping Weak.asObject() in a Converter instance
Converter - Class in alexh.weak
Logic container for converting weakly typed objects into core types, ie convert(1234.5678d).intoDecimal() returns a BigDecimal of 1234.5678 convert(1234.5678d).intoInteger() returns a rounded int of 1235 convert("2015-03").intoLocalDateTime() returns a LocalDateTime of 2015-03-01T00:00:00.000 convert(Optional.of("8484")).intoDouble() returns a double of 8484.0 Supports conversions from most basic types, in addition to java.util.Date & java.time instances, object arrays, Iterables, Maps & Optionals + more from #toString conversions
ConverterMaybe - Class in alexh.weak
Logic container for converting weakly typed objects into core types wrapped in optionals,
ConverterTimeFormats - Class in alexh.weak
Permissive DateTimeFormatters used by Converter

D

DAY_MONTH_YEAR_PERMISSIVE_DASH - Static variable in class alexh.weak.ConverterTimeFormats
Parses date-strings like "12-Mar-2015 12:34:54.654+03:00"
DAY_MONTH_YEAR_PERMISSIVE_DASH_WITH_DEFAULTS - Static variable in class alexh.weak.ConverterTimeFormats
Parses date-strings like "12-Mar-2015 12:34:54.654+03:00" defaults day->1, month->1, hour->0, minute->0, second->0, nanoseconds->0
DAY_MONTH_YEAR_PERMISSIVE_SLASH - Static variable in class alexh.weak.ConverterTimeFormats
Parses date-strings like "12/Mar/2015 12:34:54.654+03:00"
DAY_MONTH_YEAR_PERMISSIVE_SLASH_WITH_DEFAULTS - Static variable in class alexh.weak.ConverterTimeFormats
Parses date-strings like "12/Mar/2015 12:34:54.654+03:00" defaults day->1, month->1, hour->0, minute->0, second->0, nanoseconds->0
describe() - Method in class alexh.weak.XmlDynamic
 
describeIssue(LinkedList<Object>, LinkedList<Object>) - Method in class alexh.weak.ChildAbsence
 
describeIssue(List<Object>) - Method in class alexh.weak.ChildAbsence
 
describeIssue(LinkedList<Object>, LinkedList<Object>) - Method in class alexh.weak.ChildAbsence.Missing
 
describeIssue(LinkedList<Object>, LinkedList<Object>) - Method in class alexh.weak.ChildAbsence.Null
 
describeIssue(LinkedList<Object>, Object) - Method in class alexh.weak.ParentAbsence.Barren
 
describeIssue(LinkedList<Object>, Object) - Method in class alexh.weak.ParentAbsence
 
describeIssue(List<Object>) - Method in class alexh.weak.ParentAbsence
 
describeIssue(LinkedList<Object>, Object) - Method in class alexh.weak.ParentAbsence.Empty
 
dget(String) - Method in interface alexh.weak.Dynamic
Shortcut for dynamic.get("some.path.to.somewhere", ".") avoiding the need for the second argument ie dynamic.dget("some.path.to.somewhere")
Dynamic - Interface in alexh.weak
Wrapper allowing weakly-typed nested structure selection that's null-safe As an example consider a Map with the following structure called 'message'

E

elements() - Method in class alexh.weak.XmlDynamic
 
elementsWith(Predicate<Node>) - Method in class alexh.weak.XmlDynamic
 
empty() - Static method in class alexh.weak.OptionalWeak
 
Empty(P, Object) - Constructor for class alexh.weak.ParentAbsence.Empty
 
equals(Object) - Method in class alexh.weak.AbstractDynamic
 
equals(Object) - Method in class alexh.weak.OptionalWeak
 
equals(Object) - Method in class alexh.weak.XmlDynamic
 

F

filter(Predicate<? super W>) - Method in class alexh.weak.OptionalWeak
 
flatMap(Function<? super W, Optional<U>>) - Method in class alexh.weak.OptionalWeak
 
from(Object) - Static method in interface alexh.weak.Dynamic
Wraps a value in a dynamic representation, properly handled nested types are Maps & Collections all other types become dynamic end-points.
fullXml() - Method in class alexh.weak.XmlDynamic
 

G

get(Object) - Method in class alexh.weak.ChildAbsence
 
get(Object) - Method in interface alexh.weak.Dynamic
Returns a dynamic wrapping the immediate child of this instance with the input key, or a dynamic representing the lack of such a child.
get(String, String) - Method in interface alexh.weak.Dynamic
Performs multiple String gets as described by an input key path so dynamic.get("one.two.three", ".") is equivalent to dynamic.get("one").get("two").get("three")
get() - Method in class alexh.weak.OptionalWeak
 
get(Object) - Method in class alexh.weak.ParentAbsence
 
get(Object) - Method in class alexh.weak.XmlDynamic
Returns a dynamic wrapping the immediate child of this instance with the input key, or a dynamic representing the lack of such a child.
getWithNamespace(String, String) - Method in class alexh.weak.XmlDynamic
 

H

hasElementName(String) - Static method in class alexh.weak.XmlDynamic
Predicate for an xml element's name as it appears in the xml itself (case insensitive) Inside the xml dynamic multiple elements with the same names have unique suffices ie 1 2 the 'child' elements have internal names 'child' and 'child[1]' a predicate dynamic -> dynamic.key().asString().equals("child") would only match the first hasElementName("child") matches both
hashCode() - Method in class alexh.weak.AbstractDynamic
 
hashCode() - Method in class alexh.weak.OptionalWeak
 
hashCode() - Method in class alexh.weak.XmlDynamic
 

I

ifPresent(Consumer<? super W>) - Method in class alexh.weak.OptionalWeak
 
inner - Variable in class alexh.weak.AbstractDynamic
 
intoDecimal() - Method in class alexh.weak.Converter
 
intoDecimal() - Method in class alexh.weak.ConverterMaybe
 
intoDecimalWorks() - Method in class alexh.weak.Converter
 
intoDouble() - Method in class alexh.weak.Converter
 
intoDouble() - Method in class alexh.weak.ConverterMaybe
 
intoDoubleWorks() - Method in class alexh.weak.Converter
 
intoInteger() - Method in class alexh.weak.Converter
 
intoInteger() - Method in class alexh.weak.ConverterMaybe
 
intoIntegerWorks() - Method in class alexh.weak.Converter
 
intoList() - Method in class alexh.weak.Converter
Converts the inner value into a List will convert a Map into a value list will convert simple types into a size 1 list [?] as such this should always work
intoList() - Method in class alexh.weak.ConverterMaybe
 
intoListWorks() - Method in class alexh.weak.Converter
 
intoLocalDateTime() - Method in class alexh.weak.Converter
Converts to string & permissively parses as a date, ignoring time zone defaults day->1, month->1, hour->0, minute->0, second->0, nanoseconds->0
intoLocalDateTime() - Method in class alexh.weak.ConverterMaybe
 
intoLocalDateTimeWorks() - Method in class alexh.weak.Converter
 
intoLong() - Method in class alexh.weak.Converter
 
intoLong() - Method in class alexh.weak.ConverterMaybe
 
intoLongWorks() - Method in class alexh.weak.Converter
 
intoMap() - Method in class alexh.weak.Converter
Converts the inner value into a Map will convert an Iterable into an index -> value map will convert simple types into a size 1 map of {"value": ?} as such this should always work
intoMap() - Method in class alexh.weak.ConverterMaybe
 
intoMapWorks() - Method in class alexh.weak.Converter
 
intoString() - Method in class alexh.weak.Converter
Converts the inner value into a String, should always work
intoString() - Method in class alexh.weak.ConverterMaybe
 
intoStringWorks() - Method in class alexh.weak.Converter
 
intoZonedDateTime() - Method in class alexh.weak.Converter
Converts to string & permissively parses as a date, requiring a time zone to be parsed defaults day->1, month->1, hour->0, minute->0, second->0, nanoseconds->0
intoZonedDateTime() - Method in class alexh.weak.ConverterMaybe
 
intoZonedDateTimeOrUse(ZoneId) - Method in class alexh.weak.Converter
Converts to string & permissively parses as a date, uses parsed time zone or falls back on input defaults day->1, month->1, hour->0, minute->0, second->0, nanoseconds->0, time-zone->input
intoZonedDateTimeOrUse(ZoneId) - Method in class alexh.weak.ConverterMaybe
 
intoZonedDateTimeWorks() - Method in class alexh.weak.Converter
 
is(Class<?>) - Method in interface alexh.weak.Weak
 
is(Class<?>) - Method in class alexh.weak.XmlDynamic
Dynamic Xml values are always Strings
isList() - Method in interface alexh.weak.Weak
Shortcut for is(List.class)
isMap() - Method in interface alexh.weak.Weak
Shortcut for is(Map.class)
ISO_LONESOME_YEAR - Static variable in class alexh.weak.ConverterTimeFormats
Parses up to 4 digit years declared on their own
ISO_LONESOME_YEAR_WITH_DEFAULTS - Static variable in class alexh.weak.ConverterTimeFormats
Parses up to 4 digit years declared on their own defaults day->1, month->1, hour->0, minute->0, second->0, nanoseconds->0
ISO_PERMISSIVE - Static variable in class alexh.weak.ConverterTimeFormats
Parses ISO date-strings as permissively as possible
ISO_PERMISSIVE_WITH_DEFAULTS - Static variable in class alexh.weak.ConverterTimeFormats
Parses ISO date-strings as permissively as possible, defaults day->1, hour->0, minute->0, second->0, nanoseconds->0
isPresent() - Method in class alexh.weak.AbstractDynamic
 
isPresent() - Method in class alexh.weak.OptionalWeak
 
isPresent() - Method in interface alexh.weak.Weak
Returns if this instance wraps a non-null value.
isString() - Method in interface alexh.weak.Weak
Shortcut for is(String.class)

J

join(Iterable<?>) - Method in class alexh.LiteJoiner
 

K

key() - Method in class alexh.weak.AbstractDynamic
 
key() - Method in interface alexh.weak.Dynamic
Returns Weak instance wrapping the key for this node.
keyLiteral() - Method in class alexh.weak.AbstractDynamic
 
keyLiteral() - Method in class alexh.weak.XmlDynamic
 

L

LiteJoiner - Class in alexh
Poor mans com.google.common.base.Joiner, a simple non-null handling replacement to eliminate Guava dependency

M

map(Function<? super W, ? extends U>) - Method in class alexh.weak.OptionalWeak
 
maybe() - Method in class alexh.weak.Converter
 
maybe() - Method in interface alexh.weak.Weak
Returns an optional wrapping of this instance, with resultant Optional.isPresent() return consistent with Weak.isPresent()
Missing(P, Object) - Constructor for class alexh.weak.ChildAbsence.Missing
 

N

Null(Dynamic, Object) - Constructor for class alexh.weak.ChildAbsence.Null
 

O

o - Variable in class alexh.weak.Converter
wrapped inner value, the conversion target
o - Variable in class alexh.weak.ConverterMaybe
wrapped inner value, the conversion target
of(T) - Static method in class alexh.weak.OptionalWeak
 
on(String) - Static method in class alexh.LiteJoiner
 
OptionalWeak<W extends Weak<W>> - Class in alexh.weak
Enhanced version of an Optional, similar methods to Weak that return Optionals and don't throw
orderedParseAttempter(Function<CharSequence, TemporalAccessor>...) - Static method in class alexh.weak.ConverterTimeFormats
Returns an ordered functional blend of all input parsers.
orElse(W) - Method in class alexh.weak.OptionalWeak
 
orElseGet(Supplier<? extends W>) - Method in class alexh.weak.OptionalWeak
 
orElseThrow(Supplier<? extends X>) - Method in class alexh.weak.OptionalWeak
 

P

ParentAbsence<Parent extends Dynamic> - Class in alexh.weak
 
ParentAbsence(Parent, Object) - Constructor for class alexh.weak.ParentAbsence
 
ParentAbsence.Barren<P extends Dynamic & alexh.weak.Describer> - Class in alexh.weak
 
ParentAbsence.Empty<P extends Dynamic & alexh.weak.Describer> - Class in alexh.weak
 
parse(CharSequence) - Static method in class alexh.weak.ConverterTimeFormats
Convenience method for permissive parsing using the ConverterTimeFormats.ALL_PARSER
parseWithDefaults(CharSequence) - Static method in class alexh.weak.ConverterTimeFormats
Convenience method for permissive parsing using the ConverterTimeFormats.ALL_PARSER_WITH_DEFAULTS

R

ROOT_KEY - Static variable in interface alexh.weak.Dynamic
Default key value for top-level Dynamic instances

S

serializer() - Method in class alexh.weak.XmlDynamic
 

T

toString() - Method in class alexh.weak.OptionalWeak
 
toString() - Method in class alexh.weak.XmlDynamic
 

U

UTIL_DATE_TO_STRING - Static variable in class alexh.weak.ConverterTimeFormats
UTIL_DATE_WITHOUT_ZONE_TO_STRING - Static variable in class alexh.weak.ConverterTimeFormats
 

W

Weak<Self extends Weak<Self>> - Interface in alexh.weak
Wrapper for a weakly typed object or absence, providing casting, presence gathering & conversion methods

X

XmlDynamic - Class in alexh.weak
Dynamic implementation for XML documents All keys & values in an XmlDynamic unwrap to Strings, try Weak.convert() to implement basic string->type conversions
XmlDynamic(Node) - Constructor for class alexh.weak.XmlDynamic
 
XmlDynamic(InputSource) - Constructor for class alexh.weak.XmlDynamic
 
XmlDynamic(Reader) - Constructor for class alexh.weak.XmlDynamic
 
XmlDynamic(String) - Constructor for class alexh.weak.XmlDynamic
 
A B C D E F G H I J K L M N O P R S T U W X 
Skip navigation links

Copyright © 2017. All rights reserved.