link定义

class LinkList{
private int numLinks; //uint16 16位
private ArrayList link; //有问题 //集合
public LinkList() {}
public int getNumLinks() {
return numLinks;
}
public void setNumLinks(int numLinks) {
this.numLinks = numLinks;
}
public ArrayList getLink() {
return link;
}
public void setLink(ArrayList link) {
this.link = link;
}
}

class Link{
private FeatureLength length;
private AttributeSource attrSource;
private RoutingAttributeInfo attrInfo;
private AverageSpeed averageSpeed;
private LinkSector startAngle;
private LinkSector endAngle;
public Link() {}
public FeatureLength getLength() {
return length;
}
public void setLength(FeatureLength length) {
this.length = length;
}
public AttributeSource getAttrSource() {
return attrSource;
}
public void setAttrSource(AttributeSource attrSource) {
this.attrSource = attrSource;
}
public RoutingAttributeInfo getAttrInfo() {
return attrInfo;
}
public void setAttrInfo(RoutingAttributeInfo attrInfo) {
this.attrInfo = attrInfo;
}
public AverageSpeed getAverageSpeed() {
return averageSpeed;
}
public void setAverageSpeed(AverageSpeed averageSpeed) {
this.averageSpeed = averageSpeed;
}
public LinkSector getStartAngle() {
return startAngle;
}
public void setStartAngle(LinkSector startAngle) {
this.startAngle = startAngle;
}
public LinkSector getEndAngle() {
return endAngle;
}
public void setEndAngle(LinkSector endAngle) {
this.endAngle = endAngle;
}
}
class FeatureLength{
private int length; //varuint32 24位可变
public FeatureLength() {}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
}
class AttributeSource{
private byte INDEXED; //1bit INDEXED = 0
private byte EXPLICIT; //1bit EXPLICIT = 1
public AttributeSource() {}
public byte getINDEXED() {
return INDEXED;
}
public void setINDEXED(byte INDEXED) {
this.INDEXED = INDEXED;
}
public byte getEXPLICIT() {
return EXPLICIT;
}
public void setEXPLICIT(byte EXPLICIT) {
this.EXPLICIT = EXPLICIT;
}
}
class RoutingAttributeInfo{
private FixedRoadAttributeSetListIndex fixedRoadAttributeSetListIndex;
private FixedRoadAttributeSet fixedAttributes;
public RoutingAttributeInfo() {}
public FixedRoadAttributeSetListIndex getFixedRoadAttributeSetListIndex() {
return fixedRoadAttributeSetListIndex;
}
public void setFixedRoadAttributeSetListIndex(FixedRoadAttributeSetListIndex fixedRoadAttributeSetListIndex) {
this.fixedRoadAttributeSetListIndex = fixedRoadAttributeSetListIndex;
}
public FixedRoadAttributeSet getFixedAttributes() {
return fixedAttributes;
}
public void setFixedAttributes(FixedRoadAttributeSet fixedAttributes) {
this.fixedAttributes = fixedAttributes;
}
}
class FixedRoadAttributeSetListIndex{ //1bit INDEXED = 0时
private int fixedRoadAttributeSetListIndex; //varuint16 8位
public FixedRoadAttributeSetListIndex() {}
public int getFixedRoadAttributeSetListIndex() {
return fixedRoadAttributeSetListIndex;
}
public void setFixedRoadAttributeSetListIndex(int fixedRoadAttributeSetListIndex) {
this.fixedRoadAttributeSetListIndex = fixedRoadAttributeSetListIndex;
}
}
class FixedRoadAttributeSet{ //1bit EXPLICIT = 1时
private SharedRoadAttributes sharedAttr;
private RoutingRoadAttributes routingAttr;
public FixedRoadAttributeSet() {}
public SharedRoadAttributes getSharedAttr() {
return sharedAttr;
}
public void setSharedAttr(SharedRoadAttributes sharedAttr) {
this.sharedAttr = sharedAttr;
}
public RoutingRoadAttributes getRoutingAttr() {
return routingAttr;
}
public void setRoutingAttr(RoutingRoadAttributes routingAttr) {
this.routingAttr = routingAttr;
}
}
class SharedRoadAttributes{
private PriorityRoadClass priorityRoadClass;
private LinkType linkType;
private Direction travelDirection;
private boolean ferry; //所有布尔:1bit
private boolean tunnel;
private boolean bridge;
private Direction toll;
private boolean controlledAccess;
private boolean serviceArea;
public SharedRoadAttributes() {}
public PriorityRoadClass getPriorityRoadClass() {
return priorityRoadClass;
}
public void setPriorityRoadClass(PriorityRoadClass priorityRoadClass) {
this.priorityRoadClass = priorityRoadClass;
}
public LinkType getLinkType() {
return linkType;
}
public void setLinkType(LinkType linkType) {
this.linkType = linkType;
}
public Direction getTravelDirection() {
return travelDirection;
}
public void setTravelDirection(Direction travelDirection) {
this.travelDirection = travelDirection;
}
public boolean isFerry() {
return ferry;
}
public void setFerry(boolean ferry) {
this.ferry = ferry;
}
public boolean isTunnel() {
return tunnel;
}
public void setTunnel(boolean tunnel) {
this.tunnel = tunnel;
}
public boolean isBridge() {
return bridge;
}
public void setBridge(boolean bridge) {
this.bridge = bridge;
}
public Direction getToll() {
return toll;
}
public void setToll(Direction toll) {
this.toll = toll;
}
public boolean isControlledAccess() {
return controlledAccess;
}
public void setControlledAccess(boolean controlledAccess) {
this.controlledAccess = controlledAccess;
}
public boolean isServiceArea() {
return serviceArea;
}
public void setServiceArea(boolean serviceArea) {
this.serviceArea = serviceArea;
}
}
class PriorityRoadClass{
private byte priorityRoadClass; //4bit
public PriorityRoadClass() {}
public byte getPriorityRoadClass() {
return priorityRoadClass;
}
public void setPriorityRoadClass(byte priorityRoadClass) {
this.priorityRoadClass = priorityRoadClass;
}
}
class LinkType{
private byte linkType; //特殊:14中情况,0~D 4bit
public LinkType() {}
public byte getLinkType() {
return linkType;
}
public void setLinkType(byte linkType) {
this.linkType = linkType;
}
}
class Direction{ //特殊:四种情况:0~3 ,下面的两个不是都顺序输出的,两个东西
private byte travelDirection; //2bit
private byte toll; //2bit
public Direction() {}
public byte getTravelDirection() {
return travelDirection;
}
public void setTravelDirection(byte travelDirection) {
this.travelDirection = travelDirection;
}
public byte getToll() {
return toll;
}
public void setToll(byte toll) {
this.toll = toll;
}
}
class RoutingRoadAttributes {
private FunctionalRoadClass functionalRoadClass;
private boolean urban;
private boolean complexIntersection;
private boolean pluralJunction;
private boolean motorway;
public RoutingRoadAttributes() {}
public FunctionalRoadClass getFunctionalRoadClass() {
return functionalRoadClass;
}
public void setFunctionalRoadClass(FunctionalRoadClass functionalRoadClass) {
this.functionalRoadClass = functionalRoadClass;
}
public boolean isUrban() {
return urban;
}
public void setUrban(boolean urban) {
this.urban = urban;
}
public boolean isComplexIntersection() {
return complexIntersection;
}
public void setComplexIntersection(boolean complexIntersection) {
this.complexIntersection = complexIntersection;
}
public boolean isPluralJunction() {
return pluralJunction;
}
public void setPluralJunction(boolean pluralJunction) {
this.pluralJunction = pluralJunction;
}
public boolean isMotorway() {
return motorway;
}
public void setMotorway(boolean motorway) {
this.motorway = motorway;
}
}
class FunctionalRoadClass {
private byte functionalRoadClass; //3bit
public FunctionalRoadClass() {}
public byte getFunctionalRoadClass() {
return functionalRoadClass;
}
public void setFunctionalRoadClass(byte functionalRoadClass) {
this.functionalRoadClass = functionalRoadClass;
}
}
class AverageSpeed{
private int averageSpeed; //uint8 8位
public AverageSpeed() {}
public int getAverageSpeed() {
return averageSpeed;
}
public void setAverageSpeed(int averageSpeed) {
this.averageSpeed = averageSpeed;
}
}
class LinkSector{ //下面的两个不是都顺序输出的,两个东西
private byte startAngle; //6bit
private byte endAngle; //6bit
public LinkSector() {}
public byte getStartAngle() {
return startAngle;
}
public void setStartAngle(byte startAngle) {
this.startAngle = startAngle;
}
public byte getEndAngle() {
return endAngle;
}
public void setEndAngle(byte endAngle) {
this.endAngle = endAngle;
}
}

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值