Struct blackboxmc_java::JavaAbstractMap
source · pub struct JavaAbstractMap<'mc>(_, _);Expand description
This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
To implement an unmodifiable map, the programmer needs only to extend this class and provide an implementation for the entrySet method, which returns a set-view of the map's mappings. Typically, the returned set will, in turn, be implemented atop AbstractSet. This set should not support the add or remove methods, and its iterator should not support the remove method.
To implement a modifiable map, the programmer must additionally override this class's put method (which otherwise throws an UnsupportedOperationException), and the iterator returned by entrySet().iterator() must additionally implement its remove method.
The programmer should generally provide a void (no argument) and map constructor, as per the recommendation in the Map interface specification.
The documentation for each non-abstract method in this class describes its implementation in detail. Each of these methods may be overridden if the map being implemented admits a more efficient implementation.
This class is a member of the Java Collections Framework.
Implementations§
source§impl<'mc> JavaAbstractMap<'mc>
impl<'mc> JavaAbstractMap<'mc>
pub fn from_raw( env: &SharedJNIEnv<'mc>, obj: JObject<'mc> ) -> Result<Self, Box<dyn Error>>
pub fn remove_with_object( &mut self, arg0: Option<JObject<'mc>>, arg1: Option<JObject<'mc>> ) -> Result<bool, Box<dyn Error>>
pub fn get( &mut self, arg0: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn put( &mut self, arg0: JObject<'mc>, arg1: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn equals(&mut self, arg0: JObject<'mc>) -> Result<bool, Box<dyn Error>>
pub fn to_string(&mut self) -> Result<String, Box<dyn Error>>
pub fn values(&mut self) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn hash_code(&mut self) -> Result<i32, Box<dyn Error>>
pub fn clear(&mut self) -> Result<(), Box<dyn Error>>
pub fn is_empty(&mut self) -> Result<bool, Box<dyn Error>>
pub fn size(&mut self) -> Result<i32, Box<dyn Error>>
pub fn entry_set(&mut self) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn put_all(&mut self, arg0: JObject<'mc>) -> Result<(), Box<dyn Error>>
pub fn contains_key( &mut self, arg0: JObject<'mc> ) -> Result<bool, Box<dyn Error>>
pub fn key_set(&mut self) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn contains_value( &mut self, arg0: JObject<'mc> ) -> Result<bool, Box<dyn Error>>
pub fn wait( &mut self, arg0: Option<i64>, arg1: Option<i32> ) -> Result<(), Box<dyn Error>>
pub fn class(&mut self) -> Result<JClass<'mc>, Box<dyn Error>>
pub fn notify(&mut self) -> Result<(), Box<dyn Error>>
pub fn notify_all(&mut self) -> Result<(), Box<dyn Error>>
pub fn replace_with_object( &mut self, arg0: JObject<'mc>, arg1: Option<JObject<'mc>>, arg2: Option<JObject<'mc>> ) -> Result<bool, Box<dyn Error>>
pub fn replace_all(&mut self, arg0: JObject<'mc>) -> Result<(), Box<dyn Error>>
pub fn merge( &mut self, arg0: JObject<'mc>, arg1: JObject<'mc>, arg2: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn put_if_absent( &mut self, arg0: JObject<'mc>, arg1: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn compute( &mut self, arg0: JObject<'mc>, arg1: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn for_each(&mut self, arg0: JObject<'mc>) -> Result<(), Box<dyn Error>>
pub fn compute_if_absent( &mut self, arg0: JObject<'mc>, arg1: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn get_or_default( &mut self, arg0: JObject<'mc>, arg1: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
pub fn compute_if_present( &mut self, arg0: JObject<'mc>, arg1: JObject<'mc> ) -> Result<JObject<'mc>, Box<dyn Error>>
Trait Implementations§
source§impl<'mc> Into<JObject<'mc>> for JavaAbstractMap<'mc>
impl<'mc> Into<JObject<'mc>> for JavaAbstractMap<'mc>
source§impl<'mc> JNIRaw<'mc> for JavaAbstractMap<'mc>
impl<'mc> JNIRaw<'mc> for JavaAbstractMap<'mc>
fn jni_ref(&self) -> SharedJNIEnv<'mc>
fn jni_object(&self) -> JObject<'mc>
Auto Trait Implementations§
impl<'mc> !RefUnwindSafe for JavaAbstractMap<'mc>
impl<'mc> !Send for JavaAbstractMap<'mc>
impl<'mc> !Sync for JavaAbstractMap<'mc>
impl<'mc> Unpin for JavaAbstractMap<'mc>
impl<'mc> UnwindSafe for JavaAbstractMap<'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