Class DBTraceObjectValPath
- All Implemented Interfaces:
TraceObjectValPath,Comparable<TraceObjectValPath>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionappend(TraceObjectValue entry) Append the entry to this path, generating a new pathintcompareTo(TraceObjectValPath that) protected KeyPathbooleancontains(TraceObjectValue entry) Check if a given value appears on this pathgetDestination(TraceObject ifEmpty) Get the destination objectgetDestinationValue(Object ifEmpty) Get the destination valueGet the values in the path, ordered from source to destinationGet the first entry, i.e., the one adjacent to the source objectGet the last entry, i.e., the one adjacent to the destination objectgetPath()Get the keys in the path, ordered from source to destinationgetSource(TraceObject ifEmpty) Get the source objectstatic DBTraceObjectValPathof()static DBTraceObjectValPathof(DBTraceObjectValue... entries) static DBTraceObjectValPathof(Collection<DBTraceObjectValue> entryList) prepend(TraceObjectValue entry) Prepend the entry to this path, generating a new path
-
Field Details
-
EMPTY
-
-
Method Details
-
of
-
of
-
of
-
compareTo
- Specified by:
compareToin interfaceComparable<TraceObjectValPath>
-
getEntryList
Description copied from interface:TraceObjectValPathGet the values in the path, ordered from source to destination- Specified by:
getEntryListin interfaceTraceObjectValPath- Returns:
- the list of value entries
-
computePath
-
getPath
Description copied from interface:TraceObjectValPathGet the keys in the path, ordered from source to destinationThe returned list is suited for testing with
PathFilteror other path-manipulation methods.- Specified by:
getPathin interfaceTraceObjectValPath- Returns:
- the list of keys
-
contains
Description copied from interface:TraceObjectValPathCheck if a given value appears on this path- Specified by:
containsin interfaceTraceObjectValPath- Parameters:
entry- the value entry to check- Returns:
- true if it appears on the path, false otherwise
-
prepend
Description copied from interface:TraceObjectValPathPrepend the entry to this path, generating a new pathThis performs no validation. The child of the given entry should be the parent of the first entry in this path.
- Specified by:
prependin interfaceTraceObjectValPath- Parameters:
entry- the entry to prepend- Returns:
- the new path
-
append
Description copied from interface:TraceObjectValPathAppend the entry to this path, generating a new pathThis performs no validation. The parent of the given entry should be the child of the last entry in this path.
- Specified by:
appendin interfaceTraceObjectValPath- Parameters:
entry- the entry to append- Returns:
- the new path
-
getFirstEntry
Description copied from interface:TraceObjectValPathGet the first entry, i.e., the one adjacent to the source object- Specified by:
getFirstEntryin interfaceTraceObjectValPath- Returns:
- the entry, or null if the path is empty
-
getSource
Description copied from interface:TraceObjectValPathGet the source objectThis returns the parent object of the first entry of the path, unless the path is empty. If the path is empty, then this returns the value passed in
ifEmpty, which is presumably the destination object.- Specified by:
getSourcein interfaceTraceObjectValPath- Parameters:
ifEmpty- the object to return when this path is empty- Returns:
- the source object
-
getLastEntry
Description copied from interface:TraceObjectValPathGet the last entry, i.e., the one adjacent to the destination object- Specified by:
getLastEntryin interfaceTraceObjectValPath- Returns:
- the entry, or null if the path is empty
-
getDestinationValue
Description copied from interface:TraceObjectValPathGet the destination valueThis returns the value of the last entry of the path, unless the path is empty. If the path is empty, then this returns the object passed in
ifEmpty, which is presumably the source object. Note that values may be a primitive, so the destination is not always an object, i.e.,TraceObject. UseTraceObjectValPath.getDestination(TraceObject)to assume the destination is an object.- Specified by:
getDestinationValuein interfaceTraceObjectValPath- Parameters:
ifEmpty- the value to return when the path is empty- Returns:
- the destination value
-
getDestination
Description copied from interface:TraceObjectValPathGet the destination objectThis returns the child object of the last entry of the path, unless the path is empty. If the path is empty, then this returns the object passed in
ifEmpty, which is presumably the source object. Note that values may be primitive, so the destination is not always an object, i.e.,TraceObject. UseTraceObjectValPath.getDestinationValue(Object)when it is not safe to assume the destination is an object.- Specified by:
getDestinationin interfaceTraceObjectValPath- Parameters:
ifEmpty- the object to return when the path is empty- Returns:
- the destination object
-