public abstract class FeatureMap extends Object implements Serializable, Iterable<VariableInfo>
VariableInfo
objects storing
information about a feature.Modifier and Type | Field and Description |
---|---|
protected Map<String,VariableInfo> |
m
Map from the feature names to their info.
|
Modifier | Constructor and Description |
---|---|
protected |
FeatureMap()
Constructs an empty feature map.
|
protected |
FeatureMap(FeatureMap map)
Constructs a deep copy of the supplied feature map.
|
protected |
FeatureMap(Map<String,? extends VariableInfo> m)
Constructs a feature map wrapping the supplied map.
|
Modifier and Type | Method and Description |
---|---|
VariableInfo |
get(String name)
Gets the variable info associated with that feature name, or null if it's unknown.
|
Iterator<VariableInfo> |
iterator() |
Set<String> |
keySet()
Returns all the feature names in the domain.
|
int |
size()
Returns the number of features in the domain.
|
String |
toReadableString()
Same as the toString, but ordered by name, and with newlines.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected final Map<String,VariableInfo> m
protected FeatureMap()
protected FeatureMap(FeatureMap map)
map
- The map to copy.protected FeatureMap(Map<String,? extends VariableInfo> m)
Note the map is not defensively copied.
m
- The map to wrap.public VariableInfo get(String name)
name
- The feature name.public int size()
public Set<String> keySet()
public Iterator<VariableInfo> iterator()
iterator
in interface Iterable<VariableInfo>
public String toReadableString()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.