public class TechPool extends java.util.AbstractMap<TechId,Technology>
Constructor and Description |
---|
TechPool(IdManager idManager)
Constructs empty TechPool
|
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
check()
Checks invariants in this TechPool.
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
void |
correctSizesToDisk(java.util.List<CellRevision> cells,
Version version,
java.util.Map<Setting,java.lang.Object> projectSettings,
boolean isJelib,
boolean keepExtendOverMin) |
TechPool |
deepClone() |
java.util.Set<java.util.Map.Entry<TechId,Technology>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
boolean |
equals(TechPool that)
Tests that two TechPools contains the same set of Tehnologies
|
Technology |
findTechnology(java.lang.String techName)
Find Technology by its name
|
Technology |
get(java.lang.Object key) |
ArcProto |
getArcProto(ArcProtoId arcProtoId)
Get ArcProto by ArcProtoId
ArcProtoId must belong to same IdManager as TechPool
|
Artwork |
getArtwork()
Returns Artwork technology in this database
|
Generic |
getGeneric()
Returns Generic technology in this database
|
Layer |
getLayer(LayerId layerId)
Get Layer by LayerId
LayerId must belong to same IdManager as TechPool
|
PrimitiveNode |
getPrimitiveNode(PrimitiveNodeId primitiveNodeId)
Get PrimitiveNode by PrimitiveNodeId
PrimitiveNodeId must belong to same IdManager as TechPool
|
PrimitivePort |
getPrimitivePort(PrimitivePortId primitivePortId)
Get PrimitivePort by PrimitivePortId
PrimitivePortId must belong to same IdManager as TechPool
|
Schematics |
getSchematics()
Returns Schematic technology in this database
|
Technology.State |
getState(TechId techId)
Get Technology.State by TechId
TechId must belong to same IdManager as TechPool
|
Technology |
getTech(TechId techId)
Get Technology by TechId
TechId must belong to same IdManager as TechPool
|
java.util.Map<TechFactory.Param,java.lang.Object> |
getTechParams() |
static TechPool |
getThreadTechPool()
Returns thread-local TechPool
|
boolean |
isActive() |
static TechPool |
read(IdReader reader,
TechPool old)
Reads TechPool from IdReader
|
TechPool |
restrict(java.util.BitSet techUsed)
Returns restriction of this TechPool to specified subset of TechIds
|
TechPool |
restrict(java.util.BitSet techUsed,
TechPool candidatePool)
Returns restriction of this TechPool to specified subset of TechIds.
|
TechPool |
withTech(Technology tech)
Returns new TechPool which differs from this TechPool by adding
new technology
|
TechPool |
withTechParams(java.util.Map<TechFactory.Param,java.lang.Object> paramValues) |
void |
writeDiff(IdWriter writer,
TechPool old)
Writes this TechPool to IdWriter
|
public final IdManager idManager
public TechPool(IdManager idManager)
idManager
- pool's IdManagerpublic java.util.Map<TechFactory.Param,java.lang.Object> getTechParams()
public TechPool withTechParams(java.util.Map<TechFactory.Param,java.lang.Object> paramValues)
public void activate()
public boolean isActive()
public TechPool deepClone()
public TechPool restrict(java.util.BitSet techUsed, TechPool candidatePool)
techUsed
- contains techIndex of those TechIds which are in subsetcandidatePool
- a candidate TechPool to save allocationpublic TechPool restrict(java.util.BitSet techUsed)
techUsed
- contains techIndex of those TechIds which are in subsetpublic TechPool withTech(Technology tech)
tech
- Technology to addpublic Technology getTech(TechId techId)
techId
- TechId to findjava.lang.IllegalArgumentException
- if TechId is not from this IdManagerpublic Technology findTechnology(java.lang.String techName)
techName
- name of technologypublic Technology.State getState(TechId techId)
techId
- TechId to findjava.lang.IllegalArgumentException
- if TechId is not from this IdManagerpublic Layer getLayer(LayerId layerId)
layerId
- LayerId to findjava.lang.IllegalArgumentException
- if TechId is not from this IdManagerpublic ArcProto getArcProto(ArcProtoId arcProtoId)
arcProtoId
- ArcProtoId to findjava.lang.IllegalArgumentException
- if TechId is not from this IdManagerpublic PrimitiveNode getPrimitiveNode(PrimitiveNodeId primitiveNodeId)
primitiveNodeId
- PrimitiveNodeId to findjava.lang.IllegalArgumentException
- if TechId is not from this IdManagerpublic PrimitivePort getPrimitivePort(PrimitivePortId primitivePortId)
primitivePortId
- PrimitivePortId to findjava.lang.IllegalArgumentException
- if TechId is not from this IdManagerpublic void correctSizesToDisk(java.util.List<CellRevision> cells, Version version, java.util.Map<Setting,java.lang.Object> projectSettings, boolean isJelib, boolean keepExtendOverMin)
public Artwork getArtwork()
public Generic getGeneric()
public Schematics getSchematics()
public boolean equals(TechPool that)
that
- second TechPoolpublic boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<TechId,Technology>
containsKey
in class java.util.AbstractMap<TechId,Technology>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<TechId,Technology>
containsValue
in class java.util.AbstractMap<TechId,Technology>
public Technology get(java.lang.Object key)
get
in interface java.util.Map<TechId,Technology>
get
in class java.util.AbstractMap<TechId,Technology>
public java.util.Set<java.util.Map.Entry<TechId,Technology>> entrySet()
entrySet
in interface java.util.Map<TechId,Technology>
entrySet
in class java.util.AbstractMap<TechId,Technology>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Map<TechId,Technology>
equals
in class java.util.AbstractMap<TechId,Technology>
public void writeDiff(IdWriter writer, TechPool old) throws java.io.IOException
writer
- IdWriterjava.io.IOException
public static TechPool read(IdReader reader, TechPool old) throws java.io.IOException
reader
- IdReaderjava.io.IOException
public void check()
java.lang.AssertionError
- if invariants are not validpublic static TechPool getThreadTechPool()