public final class NameEngine extends IrpObject implements AggregateLister, Iterable<Map.Entry<String,Expression>>
| Modifier and Type | Field and Description |
|---|---|
static NameEngine |
EMPTY |
| Constructor and Description |
|---|
NameEngine() |
NameEngine(int initialCapacity) |
NameEngine(Map<String,Long> numericalParameters) |
NameEngine(NameEngine orig) |
NameEngine(String str) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
add(NameEngine definitions) |
(package private) void |
addBarfByConflicts(NameEngine nameEngine) |
boolean |
containsKey(String name) |
void |
define(String name,
Expression expression) |
void |
define(String name,
Number value) |
boolean |
equals(Object obj) |
Expression |
get(Name name) |
Expression |
get(String name)
Returns the expression associated to the name given as parameter.
|
(package private) Map<String,Long> |
getNumericLiterals() |
Expression |
getPossiblyNull(String name) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<Map.Entry<String,Expression>> |
iterator() |
boolean |
numericallyEquals(Decoder.Decode other) |
boolean |
numericallyEquals(Map<String,Long> other) |
boolean |
numericallyEquals(NameEngine other) |
boolean |
numericallyEquals(Object object) |
static NameEngine |
parse(String[] definitions) |
void |
parseDefinitions(IrpParser.DefinitionsContext ctx) |
void |
parseDefinitions(String str)
Invoke the parser on the supplied argument, and stuff the result into the name engine.
|
static NameEngine |
parseLoose(String str) |
Map<String,Object> |
propertiesMap(GeneralSpec generalSpec,
NameEngine nameEngine) |
(package private) NameEngine |
remove(Iterable<String> names) |
int |
size() |
Element |
toElement(Document document) |
String |
toIrpString(int radix) |
(package private) String |
toIrpString(int radix,
String separator) |
long |
toLong(String name) |
Map<String,Long> |
toMap() |
int |
weight()
Returns a (somewhat arbitrary) measure of the complexity of the object.
|
getParseTree, numberOfBits, numberOfBitSpecs, numberOfInfiniteRepeats, prerender, propertiesMap, stateWhenEntering, stateWhenExiting, toDocument, toIrpString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewerclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final NameEngine EMPTY
public NameEngine()
public NameEngine(int initialCapacity)
public NameEngine(String str) throws InvalidNameException
InvalidNameExceptionpublic NameEngine(NameEngine orig)
public static NameEngine parseLoose(String str)
public static NameEngine parse(String[] definitions)
public int size()
public boolean numericallyEquals(Object object)
public boolean numericallyEquals(NameEngine other)
public boolean numericallyEquals(Decoder.Decode other)
public Iterator<Map.Entry<String,Expression>> iterator()
iterator in interface Iterable<Map.Entry<String,Expression>>public void define(String name, Expression expression) throws InvalidNameException
InvalidNameExceptionpublic void define(String name, Number value) throws InvalidNameException
InvalidNameExceptionpublic void parseDefinitions(String str)
str - String to be parsed, like "{C = F*4 + D + 3}".public void parseDefinitions(IrpParser.DefinitionsContext ctx)
public Expression get(String name) throws NameUnassignedException
name - NameUnassignedExceptionpublic Expression get(Name name) throws NameUnassignedException
NameUnassignedExceptionpublic Expression getPossiblyNull(String name)
public long toLong(String name) throws NameUnassignedException
NameUnassignedExceptionpublic boolean containsKey(String name)
void add(NameEngine definitions)
public String toIrpString(int radix)
toIrpString in class IrpObjectpublic boolean isEmpty()
void addBarfByConflicts(NameEngine nameEngine) throws ParameterInconsistencyException
ParameterInconsistencyExceptionpublic int weight()
IrpObjectpublic Map<String,Object> propertiesMap(GeneralSpec generalSpec, NameEngine nameEngine)
propertiesMap in interface AggregateListerNameEngine remove(Iterable<String> names)
Copyright © 2019. All rights reserved.