public interface StructureProperties
structures
Modifier and Type  Method and Description 

boolean 
isConfigurable()

boolean 
isCountable()
Answer
true if this structure contains a countable number of
elements. 
boolean 
isElastic()
Answer
true if this structure, in principle, can be
reduced via element removal or expanded via element addition. 
boolean 
isEmpty()
Answer
true if this structure contains no elements. 
boolean 
isExpandable() 
boolean 
isOrdered()
Answer
true if the elements of this structure necessarily
share a partial or total order between each other within the context of
this structure. 
boolean 
isReducible()
Answer
true if this structure, in principle, can be
reduced via element removal. 
boolean 
isUnique() 
boolean isConfigurable()
true
if the implementation of this object can be changed.expanded
, or reduced
, or has replaceable
components. Configurable structures are necessarily
mutable
; in fact, "configurability" can be
used as a strict definition of mutability. This predicate however
overrides #isMutable
in the respect that, for some types of
objects such as Variants
, mutability can be changed by
switching from a nonmutable implementation to a mutable one (e.g., via
assertPrecision
).true
if the implementation of this object can be changedboolean isCountable()
true
if this structure contains a countable number of
elements. A countable set is a set with the same cardinality as some
subset of the set of natural numbers. A set that is not countable
contains an infinite number of elements.true
if this structure contains a countable number
of elements, otherwise false
if it contains an infinite
number of elementsboolean isElastic()
true
if this structure, in principle, can be
reduced via element removal or expanded via element addition. Empty
collections are, in principle, reducible, but readonly
collections are neither reducible or expandable.boolean isEmpty()
true
if this structure contains no elements. For
strings
this would indicate an empty string (no characters
in an empty array). For scalars this would indicate an empty set, or a
zero bit count, which would be the case of null
values. Note
that, although the null
constant technically contains zero
elements, its string
value evaluates to "null", which from
a String perspective is not empty.true
if this structure contains no elementsboolean isExpandable()
true
if this structure can be expanded via element
insertionboolean isOrdered()
true
if the elements of this structure necessarily
share a partial or total order between each other within the context of
this structure. Ordering does not necessarily imply a simple sequencing
between randomly selected elements, but rather a necessary sorting order
between elements independent of the sets they are related by. A
SortedSet
is ordered, not merely because its elements are de
facto sorted, but because the SortedSet
defines a universe in
which only sortable elements can exist and it defines a sorting function
which places those elements in their sorted order at the time of
iteration. An ordered
set has elements with values that are reflexive, antisymmetric, and
transitive relative to each other. Necessarily empty sets are not
considered ordered.true
if the structure has either a partial or total order
over its elementsboolean isReducible()
true
if this structure, in principle, can be
reduced via element removal. Empty collections are, in principle,
reducible, but readonly collections are not.true
if this structure, in principle, can be
reduced via element removalCopyright © 20062012 WareSquared Software Development. All Rights Reserved.