|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.tables.EMap | +--org.erights.e.elib.tables.ConstMap
Safe:
Field Summary | |
private static StaticMaker |
ConstMapMaker
|
static ConstMap |
EmptyMap
Enabled: The canonical empty ConstMap |
private static long |
serialVersionUID
|
Fields inherited from class org.erights.e.elib.tables.EMap |
|
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction |
HONORARY, HONORED_NAMES |
Fields inherited from interface org.erights.e.elib.tables.Selfless |
HONORARY, HONORED_NAMES |
Fields inherited from interface org.erights.e.elib.serial.Persistent |
HONORARY, HONORED_NAMES |
Constructor Summary | |
(package private) |
ConstMap()
Only subclasses within the package |
Method Summary | |
void |
__printOn(TextWriter out)
Enabled: Prints using E language notation |
double |
compareTo(ConstMap other)
Enabled: This method enables E's magnitude comparison operators (<, <=, <=>, >=, >) to express subset-ness of the domains of ConstMaps. |
ESet |
domain()
Enabled: The domain of a ConstMap is always a ConstSet , but is declared
as an ESet because Java's type system doesn't allow covariant return
types. |
static ConstMap |
fromColumns(ConstList keys,
ConstList vals)
Enabled: Used by my getSpreadUncall |
static ConstMap |
fromPairs(Object[][] pairs)
Enabled: Used in the expansion of E's map syntax |
static ConstMap |
fromProperties(Properties props)
Enabled: |
static ConstMap |
fromPropertiesString(String propsString)
Enabled: |
static StaticMaker |
GetMaker()
Enabled: The static variable cache is initialized lazily to avoid circular static initialization dependency with StaticMaker. |
Object[] |
getSpreadUncall()
Enabled: Uses 'ConstMapMaker.fromColumns(key, values)' |
EMap |
readOnly()
Enabled: Returns itself |
ConstMap |
snapshot()
Enabled: Returns itself |
static boolean |
testProp(ConstMap props,
String propName)
Enabled: Test the setting of a boolean property. |
Methods inherited from class org.erights.e.elib.tables.EMap |
and, butNot, contains, diverge, diverge, extract, get, get, getKeys, getKeys, getPair, getPair, getValues, getValues, intersects, iterate, keyType, maps, optExtract, or, or, printOn, size, sortKeys, sortKeys, sortValues, sortValues, toString, valueType, with, without |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
private static StaticMaker ConstMapMaker
public static final ConstMap EmptyMap
Constructor Detail |
ConstMap()
Method Detail |
public static StaticMaker GetMaker()
public Object[] getSpreadUncall()
getSpreadUncall
in interface Selfless
public ConstMap snapshot()
snapshot
in class EMap
public EMap readOnly()
readOnly
in class EMap
public ESet domain()
ConstSet
, but is declared
as an ESet because Java's type system doesn't allow covariant return
types.
domain
in class EMap
public double compareTo(ConstMap other)
If this ConstMap's domain is a strict subset of other's, return -1.0. If this ConstMap has the same domain as other, return 0.0. If this ConstMap's domain is a strict superset of other's, return 1.0. Otherwise return NaN. The canonical implementation of ConstMap (ConstMapImpl) recursively turns the question around of this ConstMap's size() is smaller that other's. Therefore, the base case is one in which this ConstMap's size() is >= other's. Therefore, alternate implementations of ConstMaps must also treat this as the base case. XXX security implications?
public void __printOn(TextWriter out) throws IOException
__printOn
in interface EPrintable
IOException
public static ConstMap fromPairs(Object[][] pairs)
public static ConstMap fromColumns(ConstList keys, ConstList vals) throws ArityMismatchException
ArityMismatchException
public static ConstMap fromProperties(Properties props)
public static ConstMap fromPropertiesString(String propsString) throws UnsupportedEncodingException, IOException
UnsupportedEncodingException
IOException
public static boolean testProp(ConstMap props, String propName)
A boolean property is true if its (String) value is "true", and false if it's absent, or if its string value is "false" or "allow".
XXX ConstMap is a silly place for this method, but where should it go? XXX Should the comparison be case insensitive?
props
- A ConstMap representing the PropertiespropName
- The name of the property to test
IllegalArgumentException
- if propValue is neither "true",
nor "false", nor "allow"
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |