Package types.collections.base
Class Set<T>
java.lang.Object
types.collections.base.Set<T>
- All Implemented Interfaces:
Base,Collection,TemporalObject
Abstract class that represents a set of temporal object
- Author:
- ARIJIT SAMAL
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the union of ``self`` and ``other``.Returns the WKB representation in hex-encoded ASCII.jnr.ffi.Pointeras_wkb()Returns the WKB representationbooleanReturns whether "this" contains "other".jnr.ffi.Pointercopy()Returns the copy of a spanabstract jnr.ffi.PointercreateInner(jnr.ffi.Pointer inner) abstract jnr.ffi.PointercreateStringInner(String str) private voidReturns the distance between "this" and "other".element_n(int n) Returns the n-th element in "this".Returns the elements.abstract TReturns the last element in "this".booleanReturns whether "this" and "other" are equal.<T> Tfrom_hexwkb(String hexwkb, Class<T> spansetType) Returns a `TsTzSpan` from its WKB representation in hex-encoded ASCII.<T> TReturns a `TsTzSpan` from its WKB representation.abstract jnr.ffi.PointerbooleangreaterThan(Base other) Return whether "this" is greater than "other".booleangreaterThanOrEqual(Base other) Return whether "this" is greater than or equal to "other".longhash()Return the hash representation of "this".private Baseintersection(Base other) Returns the intersection of ``self`` and ``other``.booleanis_adjacent(Base other) Returns whether ``this`` is adjacent to ``other``.booleanis_contained_in(Base other) Returns whether "this" is contained in "other".booleanReturns whether "this" is strictly to the left of "other".booleanis_over_or_left(Base other) Returns whether "this" is to the left of "other" allowing overlap.booleanis_over_or_right(Base other) Returns whether "this" is to the right of "other" allowing overlap.booleanReturns whether "this" is strictly to the right of "other".intlength()Returns the number of elements in "this".booleanReturn whether "this" is less than "other".booleanlessThanOrEqual(Base other) Return whether "this" is less than or equal to "other".private BaseReturns the difference of ``self`` and ``other``.Returns the intersection of ``self`` and ``other``.booleanReturns whether "this" and "other" are not equal.intReturns the number of elements in "this".booleanReturns whether "this" overlaps "other".Returns the difference of ``other`` and ``self``.abstract TReturns the first element in "this".Returns the difference of ``self`` and ``other``.subtract_from(Base other) Returns the difference of ``other`` and ``self``.<T> TReturns a span that encompasses "this".<T> Tto_spanset(Class<T> spansetType) Returns a SpanSet that contains a Span for each element in "this".private BaseReturns the union of ``self`` and ``other``.
-
Field Details
-
_inner
private jnr.ffi.Pointer _inner
-
-
Constructor Details
-
Set
public Set()------------------------- Constructors ---------------------------------- -
Set
public Set(jnr.ffi.Pointer inner) -
Set
-
-
Method Details
-
get_inner
public abstract jnr.ffi.Pointer get_inner() -
createInner
public abstract jnr.ffi.Pointer createInner(jnr.ffi.Pointer inner) -
createStringInner
-
copy
public jnr.ffi.Pointer copy()Returns the copy of a span- Returns:
- Pointer type
-
from_wkb
public <T> T from_wkb(jnr.ffi.Pointer wkb, long size, Class<T> spansetType) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException Returns a `TsTzSpan` from its WKB representation.- Returns:
- Pointer type
- Throws:
NoSuchMethodExceptionInvocationTargetExceptionInstantiationExceptionIllegalAccessException
-
from_hexwkb
public <T> T from_hexwkb(String hexwkb, Class<T> spansetType) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException Returns a `TsTzSpan` from its WKB representation in hex-encoded ASCII.- Returns:
- T type
- Throws:
NoSuchMethodExceptionInvocationTargetExceptionInstantiationExceptionIllegalAccessException
-
as_wkb
public jnr.ffi.Pointer as_wkb()Returns the WKB representation- Returns:
- Pointer type
-
as_hexwkb
Returns the WKB representation in hex-encoded ASCII.- Returns:
- String type
-
to_span
public <T> T to_span(Class<T> spanType) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException Returns a span that encompasses "this".MEOS Functions:
- set_to_span
- Returns:
- A new
Spaninstance - Throws:
NoSuchMethodExceptionInvocationTargetExceptionInstantiationExceptionIllegalAccessException
-
to_spanset
public <T> T to_spanset(Class<T> spansetType) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException Returns a SpanSet that contains a Span for each element in "this".MEOS Functions:
- set_to_spanset
- Returns:
- A new
SpanSetinstance - Throws:
NoSuchMethodExceptionInvocationTargetExceptionInstantiationExceptionIllegalAccessException
-
num_elements
public int num_elements()Returns the number of elements in "this".MEOS Functions:
- set_num_values
- Returns:
- An
Integer
-
length
public int length()Returns the number of elements in "this".MEOS Functions:
- set_num_values
- Returns:
- An
Integer
-
start_element
Returns the first element in "this".- Returns:
- A
Setinstance - Throws:
org.locationtech.jts.io.ParseException
-
end_element
Returns the last element in "this".- Returns:
- A
Setinstance - Throws:
org.locationtech.jts.io.ParseException
-
element_n
Returns the n-th element in "this". -
elements
Returns the elements. -
hash
public long hash()Return the hash representation of "this".MEOS Functions:
- set_hash
- Returns:
- A new
Integerinstance
-
is_contained_in
Returns whether "this" is contained in "other".MEOS Functions:
- contained_span_span
- contained_span_spanset
- contained_set_set
- contained_spanset_spanset
- Specified by:
is_contained_inin interfaceCollection<T>- Parameters:
other- object to compare with- Returns:
- True if contained, False otherwise
- Throws:
Exception
-
contains
Returns whether "this" contains "other".MEOS Functions:
- contains_set_set
- Specified by:
containsin interfaceCollection<T>- Parameters:
other- object to compare with- Returns:
- True if contains, False otherwise
- Throws:
Exception
-
overlaps
Returns whether "this" overlaps "other". That is, both share at least an instantMEOS Functions:
- overlaps_set_set
- overlaps_span_span
- overlaps_spanset_spanset
- Specified by:
overlapsin interfaceCollection<T>- Parameters:
other- object to compare with- Returns:
- True if overlaps, False otherwise
- Throws:
Exception
-
is_left
Returns whether "this" is strictly to the left of "other". That is, "this" ends before "other" starts.MEOS Functions:
- left_span_span
- left_span_spanset
- Specified by:
is_leftin interfaceCollection<T>- Parameters:
other- object to compare with- Returns:
- True if before, False otherwise
- Throws:
Exception
-
is_over_or_left
Returns whether "this" is to the left of "other" allowing overlap. That is, "this" ends before "other" ends (or at the same value).MEOS Functions:
- overleft_span_span
- overleft_span_spanset
- Specified by:
is_over_or_leftin interfaceCollection<T>- Parameters:
other- object to compare with- Returns:
- True if before, False otherwise
- Throws:
Exception
-
is_over_or_right
Returns whether "this" is to the right of "other" allowing overlap. That is, "this" starts after "other" starts (or at the same value).MEOS Functions:
- overright_span_span
- overright_span_spanset
- Specified by:
is_over_or_rightin interfaceCollection<T>- Parameters:
other- object to compare with- Returns:
- True if overlapping or to the right, False otherwise
- Throws:
Exception
-
is_right
Returns whether "this" is strictly to the right of "other". That is, the first element in "this" is to the right "other".MEOS Functions:
- right_set_set
- right_span_span
- right_span_spanset
- Specified by:
is_rightin interfaceCollection<T>- Parameters:
other- object to compare with- Returns:
- True if right, False otherwise
- Throws:
Exception
-
distance
Returns the distance between "this" and "other".MEOS Functions:
- distance_set_set
- distance_span_span
- distance_spanset_span
- Parameters:
other- object to compare with- Throws:
Exception
-
is_adjacent
Returns whether ``this`` is adjacent to ``other``. That is, they share a bound but only one of them contains it. Args: other: object to compare with Returns: True if adjacent, False otherwise MEOS Functions: adjacent_span_span, adjacent_span_spanset- Throws:
Exception
-
intersection
Returns the intersection of ``self`` and ``other``. Args: other: object to intersect with Returns: A :class:`Collection` instance. The actual class depends on ``other``. MEOS Functions: intersection_set_set, intersection_spanset_span, intersection_spanset_spanset- Throws:
Exception
-
mul
Returns the intersection of ``self`` and ``other``. Args: other: object to intersect with Returns: A :class:`Collection` instance. The actual class depends on ``other``.- Throws:
Exception
-
minus
Returns the difference of ``self`` and ``other``. Args: other: object to diff with Returns: A :class:`Collection` instance. The actual class depends on ``other``.- Throws:
Exception
-
sub
Returns the difference of ``self`` and ``other``. Args: other: object to diff with Returns: A :class:`Collection` instance. The actual class depends on ``other``.- Throws:
Exception
-
subtract_from
Returns the difference of ``other`` and ``self``. Args: other: object to subtract ``self`` from Returns: A :class:`Collection` instance or an element instance. The actual class depends on ``other``. See Also: :meth:`minus`- Throws:
Exception
-
rsub
Returns the difference of ``other`` and ``self``. Args: other: object to subtract ``self`` from Returns: A :class:`Collection` instance or an element instance. The actual class depends on ``other``.- Throws:
Exception
-
union
Returns the union of ``self`` and ``other``. Args: other: object to merge with Returns: A :class:`Collection` instance. The actual class depends on ``other``.- Throws:
Exception
-
add
Returns the union of ``self`` and ``other``. Args: other: object to merge with Returns: A :class:`Collection` instance. The actual class depends on ``other``.- Throws:
Exception
-
eq
Returns whether "this" and "other" are equal.MEOS Functions:
- set_eq
- Parameters:
other- object to compare with- Returns:
- True if equal, False otherwise
-
notEquals
Returns whether "this" and "other" are not equal.MEOS Functions:
- set_ne
- Parameters:
other- object to compare with- Returns:
- True if not equal, False otherwise
-
lessThan
Return whether "this" is less than "other".MEOS Functions:
- set_lt
- Parameters:
other- object to compare with- Returns:
- True if less than, False otherwise
- Throws:
Exception
-
lessThanOrEqual
Return whether "this" is less than or equal to "other".MEOS Functions:
- set_le
- Parameters:
other- object to compare with- Returns:
- True if less than or equal, False otherwise
- Throws:
Exception
-
greaterThan
Return whether "this" is greater than "other".MEOS Functions:
- set_gt
- Parameters:
other- object to compare with- Returns:
- True if greater than, False otherwise
- Throws:
Exception
-
greaterThanOrEqual
Return whether "this" is greater than or equal to "other".MEOS Functions:
- set_ge
- Parameters:
other- object to compare with- Returns:
- True if greater than or equal, False otherwise
- Throws:
Exception
-