@Test public void testGetPoints() throws Exception { int id1 = addRandomPoint(); int id2 = addRandomPoint(); assert data.getPoints().length == 2; addRandomPoint(); assert data.getPoints().length == 3; data.connect(id1, id2); assert data.getPoints().length == 3; data.undoA(); assert data.getPoints().length == 3; data.undoA(); assert data.getPoints().length == 2; data.undoA(); assert data.getPoints().length == 1; data.undoA(); assert data.getPoints().length == 0; }
@Override public final ExtendedVector[] getPoints() { synchronized (VitcoSettings.SYNC) { if (!pointBufferValid) { if (pointBuffer.length != dataContainer.points.size()) { pointBuffer = new ExtendedVector[dataContainer.points.size()]; } int i = 0; for (int pointId : dataContainer.points.keySet()) { pointBuffer[i++] = getPoint(pointId); } pointBufferValid = true; } return pointBuffer.clone(); } }
AnimationData extends GeneralData implements AnimationDataInterface { @Override public final ExtendedVector[] getPoints() { synchronized (VitcoSettings.SYNC) { if (!pointBufferValid) { if (pointBuffer.length != dataContainer.points.size()) { pointBuffer = new ExtendedVector[dataContainer.points.size()]; } int i = 0; for (int pointId : dataContainer.points.keySet()) { pointBuffer[i++] = getPoint(pointId); } pointBufferValid = true; } return pointBuffer.clone(); } } }
AnimationData extends GeneralData implements AnimationDataInterface { @Override public final ExtendedVector[] getPoints() { synchronized (VitcoSettings.SYNC) { if (!pointBufferValid) { if (pointBuffer.length != dataContainer.points.size()) { pointBuffer = new ExtendedVector[dataContainer.points.size()]; } int i = 0; for (int pointId : dataContainer.points.keySet()) { pointBuffer[i++] = getPoint(pointId); } pointBufferValid = true; } return pointBuffer.clone(); } } protected  AnimationData(); }
AnimationData extends GeneralData implements AnimationDataInterface { @Override public final ExtendedVector[] getPoints() { synchronized (VitcoSettings.SYNC) { if (!pointBufferValid) { if (pointBuffer.length != dataContainer.points.size()) { pointBuffer = new ExtendedVector[dataContainer.points.size()]; } int i = 0; for (int pointId : dataContainer.points.keySet()) { pointBuffer[i++] = getPoint(pointId); } pointBufferValid = true; } return pointBuffer.clone(); } } protected  AnimationData(); @Override final boolean isValid(int pointId); @Override final int addPoint(SimpleVector position); @Override final boolean removePoint(int pointId); @Override final boolean movePoint(int pointId, SimpleVector pos); @Override final boolean areConnected(int id1, int id2); @Override final boolean connect(int id1, int id2); @Override final boolean clearA(); @Override final boolean disconnect(int id1, int id2); @Override final ExtendedVector getPoint(int pointId); @Override final ExtendedVector[] getPoints(); @Override final ExtendedVector[][] getLines(); @Override final void undoA(); @Override final void redoA(); @Override final boolean canUndoA(); @Override final boolean canRedoA(); @Override final boolean selectFrame(int frameId); @Override final int getSelectedFrame(); @Override final int createFrame(String frameName); @Override final boolean deleteFrame(int frameId); @Override final boolean renameFrame(int frameId, String newName); @Override final Integer[] getFrames(); @Override final boolean resetFrame(int frameId); @Override final String getFrameName(int frameId); }
AnimationData extends GeneralData implements AnimationDataInterface { @Override public final ExtendedVector[] getPoints() { synchronized (VitcoSettings.SYNC) { if (!pointBufferValid) { if (pointBuffer.length != dataContainer.points.size()) { pointBuffer = new ExtendedVector[dataContainer.points.size()]; } int i = 0; for (int pointId : dataContainer.points.keySet()) { pointBuffer[i++] = getPoint(pointId); } pointBufferValid = true; } return pointBuffer.clone(); } } protected  AnimationData(); @Override final boolean isValid(int pointId); @Override final int addPoint(SimpleVector position); @Override final boolean removePoint(int pointId); @Override final boolean movePoint(int pointId, SimpleVector pos); @Override final boolean areConnected(int id1, int id2); @Override final boolean connect(int id1, int id2); @Override final boolean clearA(); @Override final boolean disconnect(int id1, int id2); @Override final ExtendedVector getPoint(int pointId); @Override final ExtendedVector[] getPoints(); @Override final ExtendedVector[][] getLines(); @Override final void undoA(); @Override final void redoA(); @Override final boolean canUndoA(); @Override final boolean canRedoA(); @Override final boolean selectFrame(int frameId); @Override final int getSelectedFrame(); @Override final int createFrame(String frameName); @Override final boolean deleteFrame(int frameId); @Override final boolean renameFrame(int frameId, String newName); @Override final Integer[] getFrames(); @Override final boolean resetFrame(int frameId); @Override final String getFrameName(int frameId);  }