Rev 356 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/*
* Copyright (C) 2014 Steve Ratcliffe
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 or
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
package test.files;
/**
* The information from NOD 2 about a road.
* Contains a link to the actual RouteNode.
*
* @author Steve Ratcliffe
*/
public class Nod2Record {
private final int offset;
private byte flags;
private RouteNode node;
private byte[] bitStream;
private int bitStreamLen;
private RoadData roadData;
private long next;
public Nod2Record(int offset) {
this.offset = offset;
}
public void setFlags(byte flags) {
this.flags = flags;
}
public byte getFlags() {
return flags;
}
public int getRoadClass() {
return (flags & 0x70) >> 4;
}
public int getSpeed() {
return (flags & 0xe) >> 1;
}
public void setNode(RouteNode node) {
this.node = node;
}
public RouteNode getNode() {
return node;
}
public void setBitStream(byte[] bitStream) {
this.bitStream = bitStream;
}
public byte[] getBitStream() {
return bitStream;
}
public int getBitStreamLen() {
return bitStreamLen;
}
public void setBitStreamLen(int bitStreamLen) {
this.bitStreamLen = bitStreamLen;
}
public void setRoadData(RoadData roadData) {
this.roadData = roadData;
}
public RoadData getRoadData() {
return roadData;
}
public void setNext(long next) {
this.next = next;
}
public long getNext() {
return next;
}
public int getOffset() {
return offset;
}
}