Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.configuration.MemorySection Class Reference

A type of ConfigurationSection that is stored in memory. More...

+ Inheritance diagram for org.bukkit.configuration.MemorySection:
+ Collaboration diagram for org.bukkit.configuration.MemorySection:

Public Member Functions

Set< String > getKeys (boolean deep)
 
Map< String, Object > getValues (boolean deep)
 
boolean contains (String path)
 
boolean isSet (String path)
 
String getCurrentPath ()
 
String getName ()
 
Configuration getRoot ()
 
ConfigurationSection getParent ()
 
void addDefault (String path, Object value)
 
ConfigurationSection getDefaultSection ()
 
void set (String path, Object value)
 
Object get (String path)
 
Object get (String path, Object def)
 
ConfigurationSection createSection (String path)
 
ConfigurationSection createSection (String path, Map<?,?> map)
 
String getString (String path)
 
String getString (String path, String def)
 
boolean isString (String path)
 
int getInt (String path)
 
int getInt (String path, int def)
 
boolean isInt (String path)
 
boolean getBoolean (String path)
 
boolean getBoolean (String path, boolean def)
 
boolean isBoolean (String path)
 
double getDouble (String path)
 
double getDouble (String path, double def)
 
boolean isDouble (String path)
 
long getLong (String path)
 
long getLong (String path, long def)
 
boolean isLong (String path)
 
List<?> getList (String path)
 
List<?> getList (String path, List<?> def)
 
boolean isList (String path)
 
List< String > getStringList (String path)
 
List< Integer > getIntegerList (String path)
 
List< Boolean > getBooleanList (String path)
 
List< Double > getDoubleList (String path)
 
List< Float > getFloatList (String path)
 
List< Long > getLongList (String path)
 
List< Byte > getByteList (String path)
 
List< Character > getCharacterList (String path)
 
List< Short > getShortList (String path)
 
List< Map<?,?> > getMapList (String path)
 
Vector getVector (String path)
 
Vector getVector (String path, Vector def)
 
boolean isVector (String path)
 
OfflinePlayer getOfflinePlayer (String path)
 
OfflinePlayer getOfflinePlayer (String path, OfflinePlayer def)
 
boolean isOfflinePlayer (String path)
 
ItemStack getItemStack (String path)
 
ItemStack getItemStack (String path, ItemStack def)
 
boolean isItemStack (String path)
 
Color getColor (String path)
 
Color getColor (String path, Color def)
 
boolean isColor (String path)
 
ConfigurationSection getConfigurationSection (String path)
 
boolean isConfigurationSection (String path)
 
String toString ()
 
- Public Member Functions inherited from org.bukkit.configuration.ConfigurationSection
Set< String > getKeys (boolean deep)
 Gets a set containing all keys in this section.
 
Map< String, Object > getValues (boolean deep)
 Gets a Map containing all keys and their values for this section.
 
boolean contains (String path)
 Checks if this ConfigurationSection contains the given path.
 
boolean isSet (String path)
 Checks if this ConfigurationSection has a value set for the given path.
 
String getCurrentPath ()
 Gets the path of this ConfigurationSection from its root Configuration.
 
String getName ()
 Gets the name of this individual ConfigurationSection, in the path.
 
Configuration getRoot ()
 Gets the root Configuration that contains this ConfigurationSection.
 
ConfigurationSection getParent ()
 Gets the parent ConfigurationSection that directly contains this ConfigurationSection.
 
Object get (String path)
 Gets the requested Object by path.
 
Object get (String path, Object def)
 Gets the requested Object by path, returning a default value if not found.
 
void set (String path, Object value)
 Sets the specified path to the given value.
 
ConfigurationSection createSection (String path)
 Creates an empty ConfigurationSection at the specified path.
 
ConfigurationSection createSection (String path, Map<?,?> map)
 Creates a ConfigurationSection at the specified path, with specified values.
 
String getString (String path)
 Gets the requested String by path.
 
String getString (String path, String def)
 Gets the requested String by path, returning a default value if not found.
 
boolean isString (String path)
 Checks if the specified path is a String.
 
int getInt (String path)
 Gets the requested int by path.
 
int getInt (String path, int def)
 Gets the requested int by path, returning a default value if not found.
 
boolean isInt (String path)
 Checks if the specified path is an int.
 
boolean getBoolean (String path)
 Gets the requested boolean by path.
 
boolean getBoolean (String path, boolean def)
 Gets the requested boolean by path, returning a default value if not found.
 
boolean isBoolean (String path)
 Checks if the specified path is a boolean.
 
double getDouble (String path)
 Gets the requested double by path.
 
double getDouble (String path, double def)
 Gets the requested double by path, returning a default value if not found.
 
boolean isDouble (String path)
 Checks if the specified path is a double.
 
long getLong (String path)
 Gets the requested long by path.
 
long getLong (String path, long def)
 Gets the requested long by path, returning a default value if not found.
 
boolean isLong (String path)
 Checks if the specified path is a long.
 
List<?> getList (String path)
 Gets the requested List by path.
 
List<?> getList (String path, List<?> def)
 Gets the requested List by path, returning a default value if not found.
 
boolean isList (String path)
 Checks if the specified path is a List.
 
List< String > getStringList (String path)
 Gets the requested List of String by path.
 
List< Integer > getIntegerList (String path)
 Gets the requested List of Integer by path.
 
List< Boolean > getBooleanList (String path)
 Gets the requested List of Boolean by path.
 
List< Double > getDoubleList (String path)
 Gets the requested List of Double by path.
 
List< Float > getFloatList (String path)
 Gets the requested List of Float by path.
 
List< Long > getLongList (String path)
 Gets the requested List of Long by path.
 
List< Byte > getByteList (String path)
 Gets the requested List of Byte by path.
 
List< Character > getCharacterList (String path)
 Gets the requested List of Character by path.
 
List< Short > getShortList (String path)
 Gets the requested List of Short by path.
 
List< Map<?,?> > getMapList (String path)
 Gets the requested List of Maps by path.
 
Vector getVector (String path)
 Gets the requested Vector by path.
 
Vector getVector (String path, Vector def)
 Gets the requested Vector by path, returning a default value if not found.
 
boolean isVector (String path)
 Checks if the specified path is a Vector.
 
OfflinePlayer getOfflinePlayer (String path)
 Gets the requested OfflinePlayer by path.
 
OfflinePlayer getOfflinePlayer (String path, OfflinePlayer def)
 Gets the requested OfflinePlayer by path, returning a default value if not found.
 
boolean isOfflinePlayer (String path)
 Checks if the specified path is an OfflinePlayer.
 
ItemStack getItemStack (String path)
 Gets the requested ItemStack by path.
 
ItemStack getItemStack (String path, ItemStack def)
 Gets the requested ItemStack by path, returning a default value if not found.
 
boolean isItemStack (String path)
 Checks if the specified path is an ItemStack.
 
Color getColor (String path)
 Gets the requested Color by path.
 
Color getColor (String path, Color def)
 Gets the requested Color by path, returning a default value if not found.
 
boolean isColor (String path)
 Checks if the specified path is a Color.
 
ConfigurationSection getConfigurationSection (String path)
 Gets the requested ConfigurationSection by path.
 
boolean isConfigurationSection (String path)
 Checks if the specified path is a ConfigurationSection.
 
ConfigurationSection getDefaultSection ()
 Gets the equivalent ConfigurationSection from the default Configuration defined in getRoot().
 
void addDefault (String path, Object value)
 Sets the default value in the root at the given path as provided.
 

Static Public Member Functions

static String createPath (ConfigurationSection section, String key)
 Creates a full path to the given ConfigurationSection from its root Configuration.
 
static String createPath (ConfigurationSection section, String key, ConfigurationSection relativeTo)
 Creates a relative path to the given ConfigurationSection from the given relative section.
 

Protected Member Functions

 MemorySection ()
 Creates an empty MemorySection for use as a root Configuration section.
 
 MemorySection (ConfigurationSection parent, String path)
 Creates an empty MemorySection with the specified parent and path.
 
boolean isPrimitiveWrapper (Object input)
 
Object getDefault (String path)
 
void mapChildrenKeys (Set< String > output, ConfigurationSection section, boolean deep)
 
void mapChildrenValues (Map< String, Object > output, ConfigurationSection section, boolean deep)
 

Protected Attributes

final Map< String, Object > map = new LinkedHashMap<String, Object>()
 

Detailed Description

A type of ConfigurationSection that is stored in memory.

Definition at line 21 of file MemorySection.java.

Constructor & Destructor Documentation

org.bukkit.configuration.MemorySection.MemorySection ( )
protected

Creates an empty MemorySection for use as a root Configuration section.

Note that calling this without being yourself a Configuration will throw an exception!

Exceptions
IllegalStateExceptionThrown if this is not a Configuration root.

Definition at line 36 of file MemorySection.java.

Referenced by org.bukkit.configuration.MemorySection.createSection(), org.bukkit.configuration.MemorySection.mapChildrenKeys(), and org.bukkit.configuration.MemorySection.mapChildrenValues().

org.bukkit.configuration.MemorySection.MemorySection ( ConfigurationSection  parent,
String  path 
)
protected

Creates an empty MemorySection with the specified parent and path.

Parameters
parentParent section that contains this own section.
pathPath that you may access this section from via the root Configuration.
Exceptions
IllegalArgumentExceptionThrown is parent or path is null, or if parent contains no root Configuration.

Definition at line 54 of file MemorySection.java.

References org.bukkit.configuration.MemorySection.createPath(), and org.bukkit.configuration.ConfigurationSection.getRoot().

Member Function Documentation

void org.bukkit.configuration.MemorySection.addDefault ( String  path,
Object  value 
)
boolean org.bukkit.configuration.MemorySection.contains ( String  path)

Definition at line 101 of file MemorySection.java.

Referenced by org.bukkit.configuration.MemorySection.isSet().

static String org.bukkit.configuration.MemorySection.createPath ( ConfigurationSection  section,
String  key 
)
static

Creates a full path to the given ConfigurationSection from its root Configuration.

You may use this method for any given ConfigurationSection, not only MemorySection.

Parameters
sectionSection to create a path for.
keyName of the specified section.
Returns
Full path of the section from its root.

Definition at line 756 of file MemorySection.java.

References org.bukkit.configuration.ConfigurationSection.getRoot().

Referenced by org.bukkit.configuration.MemorySection.addDefault(), org.bukkit.configuration.MemorySection.getDefault(), org.bukkit.configuration.MemorySection.mapChildrenKeys(), org.bukkit.configuration.MemorySection.mapChildrenValues(), and org.bukkit.configuration.MemorySection.MemorySection().

static String org.bukkit.configuration.MemorySection.createPath ( ConfigurationSection  section,
String  key,
ConfigurationSection  relativeTo 
)
static

Creates a relative path to the given ConfigurationSection from the given relative section.

You may use this method for any given ConfigurationSection, not only MemorySection.

Parameters
sectionSection to create a path for.
keyName of the specified section.
relativeToSection to create the path relative to.
Returns
Full path of the section from its root.

Definition at line 770 of file MemorySection.java.

References org.bukkit.configuration.ConfigurationSection.getName(), org.bukkit.configuration.ConfigurationSection.getParent(), org.bukkit.configuration.ConfigurationSection.getRoot(), and org.bukkit.configuration.Configuration.options().

ConfigurationSection org.bukkit.configuration.MemorySection.createSection ( String  path,
Map<?,?>  map 
)
Object org.bukkit.configuration.MemorySection.get ( String  path)
boolean org.bukkit.configuration.MemorySection.getBoolean ( String  path)
boolean org.bukkit.configuration.MemorySection.getBoolean ( String  path,
boolean  def 
)

Definition at line 310 of file MemorySection.java.

List<Boolean> org.bukkit.configuration.MemorySection.getBooleanList ( String  path)
List<Byte> org.bukkit.configuration.MemorySection.getByteList ( String  path)
List<Character> org.bukkit.configuration.MemorySection.getCharacterList ( String  path)
Color org.bukkit.configuration.MemorySection.getColor ( String  path)
Color org.bukkit.configuration.MemorySection.getColor ( String  path,
Color  def 
)

Definition at line 664 of file MemorySection.java.

ConfigurationSection org.bukkit.configuration.MemorySection.getConfigurationSection ( String  path)
String org.bukkit.configuration.MemorySection.getCurrentPath ( )
double org.bukkit.configuration.MemorySection.getDouble ( String  path)
double org.bukkit.configuration.MemorySection.getDouble ( String  path,
double  def 
)

Definition at line 325 of file MemorySection.java.

List<Double> org.bukkit.configuration.MemorySection.getDoubleList ( String  path)
List<Float> org.bukkit.configuration.MemorySection.getFloatList ( String  path)
int org.bukkit.configuration.MemorySection.getInt ( String  path)
int org.bukkit.configuration.MemorySection.getInt ( String  path,
int  def 
)

Definition at line 295 of file MemorySection.java.

List<Integer> org.bukkit.configuration.MemorySection.getIntegerList ( String  path)
ItemStack org.bukkit.configuration.MemorySection.getItemStack ( String  path)
ItemStack org.bukkit.configuration.MemorySection.getItemStack ( String  path,
ItemStack  def 
)

Definition at line 649 of file MemorySection.java.

List<?> org.bukkit.configuration.MemorySection.getList ( String  path,
List<?>  def 
)

Definition at line 356 of file MemorySection.java.

long org.bukkit.configuration.MemorySection.getLong ( String  path)
long org.bukkit.configuration.MemorySection.getLong ( String  path,
long  def 
)

Definition at line 340 of file MemorySection.java.

List<Long> org.bukkit.configuration.MemorySection.getLongList ( String  path)
List<Map<?, ?> > org.bukkit.configuration.MemorySection.getMapList ( String  path)
String org.bukkit.configuration.MemorySection.getName ( )

Definition at line 120 of file MemorySection.java.

OfflinePlayer org.bukkit.configuration.MemorySection.getOfflinePlayer ( String  path)
OfflinePlayer org.bukkit.configuration.MemorySection.getOfflinePlayer ( String  path,
OfflinePlayer  def 
)

Definition at line 634 of file MemorySection.java.

ConfigurationSection org.bukkit.configuration.MemorySection.getParent ( )

Definition at line 128 of file MemorySection.java.

List<Short> org.bukkit.configuration.MemorySection.getShortList ( String  path)
String org.bukkit.configuration.MemorySection.getString ( String  path)
String org.bukkit.configuration.MemorySection.getString ( String  path,
String  def 
)

Definition at line 280 of file MemorySection.java.

List<String> org.bukkit.configuration.MemorySection.getStringList ( String  path)
Vector org.bukkit.configuration.MemorySection.getVector ( String  path)
Vector org.bukkit.configuration.MemorySection.getVector ( String  path,
Vector  def 
)

Definition at line 619 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isBoolean ( String  path)

Definition at line 315 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isColor ( String  path)

Definition at line 669 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isConfigurationSection ( String  path)

Definition at line 684 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isDouble ( String  path)

Definition at line 330 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isInt ( String  path)

Definition at line 300 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isItemStack ( String  path)

Definition at line 654 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isList ( String  path)

Definition at line 361 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isLong ( String  path)

Definition at line 345 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isOfflinePlayer ( String  path)

Definition at line 639 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isPrimitiveWrapper ( Object  input)
protected
boolean org.bukkit.configuration.MemorySection.isSet ( String  path)
boolean org.bukkit.configuration.MemorySection.isString ( String  path)

Definition at line 285 of file MemorySection.java.

boolean org.bukkit.configuration.MemorySection.isVector ( String  path)

Definition at line 624 of file MemorySection.java.

void org.bukkit.configuration.MemorySection.mapChildrenKeys ( Set< String >  output,
ConfigurationSection  section,
boolean  deep 
)
protected
void org.bukkit.configuration.MemorySection.mapChildrenValues ( Map< String, Object >  output,
ConfigurationSection  section,
boolean  deep 
)
protected
String org.bukkit.configuration.MemorySection.toString ( )

Member Data Documentation


The documentation for this class was generated from the following file: