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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the union of ``self`` and ``other``.Returns the WKB representation in hex-encoded ASCII.jnr.ffi.Pointer
as_wkb()
Returns the WKB representationboolean
Returns whether "this" contains "other".jnr.ffi.Pointer
copy()
Returns the copy of a spanabstract jnr.ffi.Pointer
createInner
(jnr.ffi.Pointer inner) abstract jnr.ffi.Pointer
createStringInner
(String str) private void
Returns the distance between "this" and "other".element_n
(int n) Returns the n-th element in "this".Returns the elements.abstract T
Returns the last element in "this".boolean
Returns whether "this" and "other" are equal.<T> T
from_hexwkb
(String hexwkb, Class<T> spansetType) Returns a `TsTzSpan` from its WKB representation in hex-encoded ASCII.<T> T
Returns a `TsTzSpan` from its WKB representation.abstract jnr.ffi.Pointer
boolean
greaterThan
(Base other) Return whether "this" is greater than "other".boolean
greaterThanOrEqual
(Base other) Return whether "this" is greater than or equal to "other".long
hash()
Return the hash representation of "this".private Base
intersection
(Base other) Returns the intersection of ``self`` and ``other``.boolean
is_adjacent
(Base other) Returns whether ``this`` is adjacent to ``other``.boolean
is_contained_in
(Base other) Returns whether "this" is contained in "other".boolean
Returns whether "this" is strictly to the left of "other".boolean
is_over_or_left
(Base other) Returns whether "this" is to the left of "other" allowing overlap.boolean
is_over_or_right
(Base other) Returns whether "this" is to the right of "other" allowing overlap.boolean
Returns whether "this" is strictly to the right of "other".int
length()
Returns the number of elements in "this".boolean
Return whether "this" is less than "other".boolean
lessThanOrEqual
(Base other) Return whether "this" is less than or equal to "other".private Base
Returns the difference of ``self`` and ``other``.Returns the intersection of ``self`` and ``other``.boolean
Returns whether "this" and "other" are not equal.int
Returns the number of elements in "this".boolean
Returns whether "this" overlaps "other".Returns the difference of ``other`` and ``self``.abstract T
Returns the first element in "this".Returns the difference of ``self`` and ``other``.subtract_from
(Base other) Returns the difference of ``other`` and ``self``.<T> T
Returns a span that encompasses "this".<T> T
to_spanset
(Class<T> spansetType) Returns a SpanSet that contains a Span for each element in "this".private Base
Returns 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:
NoSuchMethodException
InvocationTargetException
InstantiationException
IllegalAccessException
-
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:
NoSuchMethodException
InvocationTargetException
InstantiationException
IllegalAccessException
-
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
Span
instance - Throws:
NoSuchMethodException
InvocationTargetException
InstantiationException
IllegalAccessException
-
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
SpanSet
instance - Throws:
NoSuchMethodException
InvocationTargetException
InstantiationException
IllegalAccessException
-
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
Set
instance - Throws:
org.locationtech.jts.io.ParseException
-
end_element
Returns the last element in "this".- Returns:
- A
Set
instance - 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
Integer
instance
-
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_in
in 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:
contains
in 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:
overlaps
in 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_left
in 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_left
in 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_right
in 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_right
in 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
-