Package ghidra.trace.model
Enum Class Lifespan.Domain
- All Implemented Interfaces:
Span.Domain<Long,,Lifespan> Serializable,Comparable<Lifespan.Domain>,Constable
- Enclosing interface:
Lifespan
public static enum Lifespan.Domain
extends Enum<Lifespan.Domain>
implements Span.Domain<Long,Lifespan>
The domain of snapshot keys
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionall()Get the span containing all values in the domainatLeast(long min) Construct a new span with the given lower endpoint, inclusive.atMost(long max) Construct a new span with the given upper endpoint, inclusive.Compute the smallest span which contains two spansclosed(long min, long max) Create a new span with the given endpoints, inclusive.intcompare(long n1, long n2) intCompare two valueslongdec(long n) Get a given value, decremented by 1empty()Get the span that contains no value, nor has any endpointsbooleanCheck if one span encloses anotherlonginc(long n) Get a given value, incremented by 1Compute the intersection of two spansbooleanintersects(Lifespan s1, Lifespan s2) Check if two spans intersectlonglmax()longlmin()max()Get the maximum value in the domainlongmax(long n1, long n2) min()Get the minimum value in the domainlongmin(long n1, long n2) Factory method for a new span after arguments are validatedvalue(long n) static Lifespan.DomainReturns the enum constant of this class with the specified name.static Lifespan.Domain[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface generic.Span.Domain
max, min, subtract, toMaxString, toMinString, toString, toString, toString, value
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
closed
Description copied from interface:Span.DomainCreate a new span with the given endpoints, inclusive.- Specified by:
closedin interfaceSpan.Domain<Long,Lifespan> - Parameters:
min- the lower endpointmax- the upper endpoint- Returns:
- the span
-
closed
-
newSpan
Description copied from interface:Span.DomainFactory method for a new span after arguments are validated- Specified by:
newSpanin interfaceSpan.Domain<Long,Lifespan> - Parameters:
min- the lower endpointmax- the upper endpoint- Returns:
- the span
-
value
-
atMost
Description copied from interface:Span.DomainConstruct a new span with the given upper endpoint, inclusive.The lower endpoint becomes the minimum value in the domain
- Specified by:
atMostin interfaceSpan.Domain<Long,Lifespan> - Parameters:
max- the upper endpoint- Returns:
- the span
-
atMost
-
atLeast
Description copied from interface:Span.DomainConstruct a new span with the given lower endpoint, inclusive.The upper endpoint becomes the maximum value in the domain
- Specified by:
atLeastin interfaceSpan.Domain<Long,Lifespan> - Parameters:
min- the lower endpoint- Returns:
- the span
-
atLeast
-
all
Description copied from interface:Span.DomainGet the span containing all values in the domain- Specified by:
allin interfaceSpan.Domain<Long,Lifespan> - Returns:
- the span
-
empty
Description copied from interface:Span.DomainGet the span that contains no value, nor has any endpointsThis span is returned when the result doesn't exist, e.g., when finding the intersection of spans which do not intersect.
- Specified by:
emptyin interfaceSpan.Domain<Long,Lifespan> - Returns:
- the empty span
-
compare
Description copied from interface:Span.DomainCompare two values- Specified by:
comparein interfaceSpan.Domain<Long,Lifespan> - Parameters:
n1- a valuen2- another value- Returns:
- the result, as in
Comparator.compare(Object, Object)
-
compare
public int compare(long n1, long n2) -
min
Description copied from interface:Span.DomainGet the minimum value in the domainThis value can also represent negative infinity.
- Specified by:
minin interfaceSpan.Domain<Long,Lifespan> - Returns:
- the minimum value
-
lmin
public long lmin() -
max
Description copied from interface:Span.DomainGet the maximum value in the domainThis value can also represent positive infinity.
- Specified by:
maxin interfaceSpan.Domain<Long,Lifespan> - Returns:
- the maximum value
-
lmax
public long lmax() -
inc
Description copied from interface:Span.DomainGet a given value, incremented by 1If the resulting value would exceed
Span.Domain.max(), this should wrap toSpan.Domain.min().- Specified by:
incin interfaceSpan.Domain<Long,Lifespan> - Parameters:
n- the value- Returns:
- the value incremented
-
inc
public long inc(long n) -
dec
Description copied from interface:Span.DomainGet a given value, decremented by 1If the resulting value would exceed
Span.Domain.min(), this should wrap toSpan.Domain.max().- Specified by:
decin interfaceSpan.Domain<Long,Lifespan> - Parameters:
n- the value- Returns:
- the value decremented
-
dec
public long dec(long n) -
min
public long min(long n1, long n2) -
max
public long max(long n1, long n2) -
intersect
Description copied from interface:Span.DomainCompute the intersection of two spans- Specified by:
intersectin interfaceSpan.Domain<Long,Lifespan> - Parameters:
s1- a spans2- another span- Returns:
- the intersection, possibly empty
-
intersects
Description copied from interface:Span.DomainCheck if two spans intersect- Specified by:
intersectsin interfaceSpan.Domain<Long,Lifespan> - Parameters:
s1- a spans2- another span- Returns:
- true if they intersect
-
encloses
Description copied from interface:Span.DomainCheck if one span encloses another- Specified by:
enclosesin interfaceSpan.Domain<Long,Lifespan> - Parameters:
s1- a spans2- another span- Returns:
- true if s1 encloses s2
-
bound
Description copied from interface:Span.DomainCompute the smallest span which contains two spans- Specified by:
boundin interfaceSpan.Domain<Long,Lifespan> - Parameters:
s1- a spans2- another span- Returns:
- the bounding span
-