Struct blackboxmc_java::util::JavaSet
source · #[repr(C)]pub struct JavaSet<'mc>(_, _);Expand description
A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1 and e2 such that e1.equals(e2), and at most one null element. As implied by its name, this interface models the mathematical set abstraction.
The Set interface places additional stipulations, beyond those inherited from the Collection interface, on the contracts of all constructors and on the contracts of the add, equals and hashCode methods. Declarations for other inherited methods are also included here for convenience. (The specifications accompanying these declarations have been tailored to the Set interface, but they do not contain any additional stipulations.)
The additional stipulation on constructors is, not surprisingly, that all constructors must create a set that contains no duplicate elements (as defined above).
Note: Great care must be exercised if mutable objects are used as set elements. The behavior of a set is not specified if the value of an object is changed in a manner that affects equals comparisons while the object is an element in the set. A special case of this prohibition is that it is not permissible for a set to contain itself as an element.
Some set implementations have restrictions on the elements that they may contain. For example, some implementations prohibit null elements, and some have restrictions on the types of their elements. Attempting to add an ineligible element throws an unchecked exception, typically NullPointerException or ClassCastException. Attempting to query the presence of an ineligible element may throw an exception, or it may simply return false; some implementations will exhibit the former behavior and some will exhibit the latter. More generally, attempting an operation on an ineligible element whose completion would not result in the insertion of an ineligible element into the set may throw an exception or it may succeed, at the option of the implementation. Such exceptions are marked as "optional" in the specification for this interface.
This interface is a member of the Java Collections Framework.
This is a representation of an abstract class.
Implementations§
source§impl<'mc> JavaSet<'mc>
impl<'mc> JavaSet<'mc>
pub fn add(&self, arg0: JObject<'mc>) -> Result<bool, Box<dyn Error>>
pub fn remove(&self, arg0: JObject<'mc>) -> Result<bool, Box<dyn Error>>
pub fn equals(&self, arg0: JObject<'mc>) -> Result<bool, Box<dyn Error>>
pub fn hash_code(&self) -> Result<i32, Box<dyn Error>>
pub fn copy_of( jni: &SharedJNIEnv<'mc>, arg0: impl Into<JavaCollection<'mc>> ) -> Result<JavaSet<'mc>, Box<dyn Error>>
pub fn clear(&self) -> Result<(), Box<dyn Error>>
pub fn is_empty(&self) -> Result<bool, Box<dyn Error>>
pub fn size(&self) -> Result<i32, Box<dyn Error>>
pub fn to_array_with_objects( &self, arg0: Option<Vec<JObject<'mc>>> ) -> Result<Vec<JObject<'mc>>, Box<dyn Error>>
pub fn iterator(&self) -> Result<JavaIterator<'mc>, Box<dyn Error>>
pub fn of_with_objects( jni: &SharedJNIEnv<'mc>, arg0: Option<Vec<JObject<'mc>>> ) -> Result<JavaSet<'mc>, Box<dyn Error>>
pub fn of_with_object( jni: &SharedJNIEnv<'mc>, arg0: Option<JObject<'mc>>, arg1: Option<JObject<'mc>>, arg2: Option<JObject<'mc>>, arg3: Option<JObject<'mc>>, arg4: Option<JObject<'mc>>, arg5: Option<JObject<'mc>>, arg6: Option<JObject<'mc>>, arg7: Option<JObject<'mc>>, arg8: Option<JObject<'mc>>, arg9: Option<JObject<'mc>> ) -> Result<JavaSet<'mc>, Box<dyn Error>>
pub fn contains(&self, arg0: JObject<'mc>) -> Result<bool, Box<dyn Error>>
pub fn add_all( &self, arg0: impl Into<JavaCollection<'mc>> ) -> Result<bool, Box<dyn Error>>
pub fn remove_all( &self, arg0: impl Into<JavaCollection<'mc>> ) -> Result<bool, Box<dyn Error>>
pub fn retain_all( &self, arg0: impl Into<JavaCollection<'mc>> ) -> Result<bool, Box<dyn Error>>
pub fn contains_all( &self, arg0: impl Into<JavaCollection<'mc>> ) -> Result<bool, Box<dyn Error>>
pub fn remove_if( &self, arg0: impl Into<JavaPredicate<'mc>> ) -> Result<bool, Box<dyn Error>>
pub fn instance_of(&self, other: impl Into<String>) -> Result<bool, Error>
Trait Implementations§
source§impl<'mc> Into<JavaCollection<'mc>> for JavaSet<'mc>
impl<'mc> Into<JavaCollection<'mc>> for JavaSet<'mc>
source§fn into(self) -> JavaCollection<'mc>
fn into(self) -> JavaCollection<'mc>
source§impl<'mc> Into<JavaSet<'mc>> for JavaAbstractSet<'mc>
impl<'mc> Into<JavaSet<'mc>> for JavaAbstractSet<'mc>
source§impl<'mc> Into<JavaSet<'mc>> for JavaHashSet<'mc>
impl<'mc> Into<JavaSet<'mc>> for JavaHashSet<'mc>
source§impl<'mc> Into<JavaSet<'mc>> for JavaLinkedHashSet<'mc>
impl<'mc> Into<JavaSet<'mc>> for JavaLinkedHashSet<'mc>
source§impl<'mc> Into<JavaSet<'mc>> for JavaSortedSet<'mc>
impl<'mc> Into<JavaSet<'mc>> for JavaSortedSet<'mc>
source§impl<'mc> JNIInstantiatable<'mc> for JavaSet<'mc>
impl<'mc> JNIInstantiatable<'mc> for JavaSet<'mc>
Auto Trait Implementations§
impl<'mc> !RefUnwindSafe for JavaSet<'mc>
impl<'mc> !Send for JavaSet<'mc>
impl<'mc> !Sync for JavaSet<'mc>
impl<'mc> Unpin for JavaSet<'mc>
impl<'mc> UnwindSafe for JavaSet<'mc>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more