[skycastle-commits] SF.net SVN: skycastle: [495] trunk/skycastle/modules/utils/src/main/java/ org/skycastle/util

  • From: zzorn@xxxxxxxxxxxxxxxxxxxxx
  • To: skycastle-commits@xxxxxxxxxxxxx
  • Date: Mon, 28 Apr 2008 12:58:03 -0700

Revision: 495
          http://skycastle.svn.sourceforge.net/skycastle/?rev=495&view=rev
Author:   zzorn
Date:     2008-04-28 12:58:02 -0700 (Mon, 28 Apr 2008)

Log Message:
-----------
Removed unfinished utilities, and noted that JodaTime can be used instead of 
Time in many cases.

Modified Paths:
--------------
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/time/Time.java

Removed Paths:
-------------
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/AbstractAct.java
    trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/Act.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/EdgeVisitor.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Face.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/FaceVisitor.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Geometry.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryImpl.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryObject.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryTransformation.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryVisitor.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/HalfEdge.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Vertex.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexImpl.java
    
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexVisitor.java

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/AbstractAct.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/AbstractAct.java
 2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/AbstractAct.java
 2008-04-28 19:58:02 UTC (rev 495)
@@ -1,50 +0,0 @@
-package org.skycastle.util.act;
-
-/**
- * @author Hans Haggstrom
- */
-public abstract class AbstractAct
-        implements Act
-{
-
-    //======================================================================
-    // Private Fields
-
-    private boolean myUndoSupported = false;
-
-    //======================================================================
-    // Public Methods
-
-    //----------------------------------------------------------------------
-    // Constructors
-
-    public AbstractAct()
-    {
-    }
-
-
-    public AbstractAct( final boolean undoSupported )
-    {
-        myUndoSupported = undoSupported;
-    }
-
-    //----------------------------------------------------------------------
-    // Act Implementation
-
-
-    /**
-     * Default implementation that does not implement undo.  Override to 
implement undo, and also remember to call the
-     * constructor with true as an argument, to make isUndoSupported return 
true.
-     */
-    public void undoAct( Object controller, Object model )
-    {
-        throw new UnsupportedOperationException( "Undo is not supported by 
this act." );
-    }
-
-
-    public boolean isUndoSupported()
-    {
-        return myUndoSupported;
-    }
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/Act.java
===================================================================
--- trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/Act.java 
2008-04-28 19:56:40 UTC (rev 494)
+++ trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/act/Act.java 
2008-04-28 19:58:02 UTC (rev 495)
@@ -1,37 +0,0 @@
-package org.skycastle.util.act;
-
-import java.io.Serializable;
-
-/**
- * An application action.  Has a do action method and an undo action method.
- *
- * Implementations should keep track of any data necessary for doing the 
actions, but with no direct references
- * to the model (this allows using for example prevayler as a datastore).  
Long or string identifiers are ok.
- *
- * @author Hans Haggstrom
- */
-public interface Act
-    extends Serializable
-{
-    /**
-     * Executes this act.
-     *
-     * @param model      the model of the application.
-     * @param controller the controller of the application.
-     */
-    void doAct( Object controller, Object model );
-
-    /**
-     * Undoes this act.
-     *
-     * @param model      the model of the application.
-     * @param controller the controller of the application.
-     */
-    void undoAct( Object controller, Object model );
-
-    /**
-     * @return true if this act can be undoed, false if not.
-     */
-    boolean isUndoSupported();
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/EdgeVisitor.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/EdgeVisitor.java
    2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/EdgeVisitor.java
    2008-04-28 19:58:02 UTC (rev 495)
@@ -1,15 +0,0 @@
-package org.skycastle.util.geometry;
-
-/**
- * @author Hans Haggstrom
- */
-public interface EdgeVisitor
-{
-    /**
-     * @param halfEdge the half edge to visit.
-     *
-     * @return true to continue visiting, false to stop visiting.
-     */
-    boolean visitHalfEdge( HalfEdge halfEdge );
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Face.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Face.java
   2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Face.java
   2008-04-28 19:58:02 UTC (rev 495)
@@ -1,27 +0,0 @@
-package org.skycastle.util.geometry;
-
-import java.util.Collection;
-
-/**
- * A polygon on the plane, surrounded by edges.
- *
- * @author Hans Haggstrom
- */
-public interface Face
-        extends GeometryObject
-{
-
-    /**
-     * @return a HalfEdge that starts the edge that goes around this Face, or 
null if this face has no outer edge
-     *         (it stretches to infinity).
-     */
-    HalfEdge getOutsideEdgeStart();
-
-    /**
-     * @return the HalfEdges that start the edges that go around any 'holes' 
in this face, or en empty collection
-     *         if this face has no holes.
-     */
-    Collection<HalfEdge> getInsideEdgeStarts();
-
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/FaceVisitor.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/FaceVisitor.java
    2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/FaceVisitor.java
    2008-04-28 19:58:02 UTC (rev 495)
@@ -1,14 +0,0 @@
-package org.skycastle.util.geometry;
-
-/**
- * @author Hans Haggstrom
- */
-public interface FaceVisitor
-{
-    /**
-     * @param face the face to visit.
-     *
-     * @return true to continue visiting, false to stop visiting.
-     */
-    boolean visitFace( Face face );
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Geometry.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Geometry.java
       2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Geometry.java
       2008-04-28 19:58:02 UTC (rev 495)
@@ -1,35 +0,0 @@
-package org.skycastle.util.geometry;
-
-import java.util.Collection;
-
-/**
- * A double linked edge list structure, that subdivides a plane in a number of 
faces, separated by edges, terminated by
- * vertexes.
- * <p/>
- * TODO: Support queries by area, and allow dynamic generation of content??
- *
- * @author Hans Haggstrom
- */
-public interface Geometry
-{
-    /**
-     * @return a read only collection with the faces in this graph.
-     */
-    Collection<Face> getFaces();
-
-    /**
-     * @return a read only collection with the half-edges in this graph.
-     */
-    Collection<HalfEdge> getHalfEdges();
-
-    /**
-     * @return a read only collection with the vertexes in this graph.
-     */
-    Collection<Vertex> getVertexes();
-
-    /**
-     * @param faceVisitor called once for each face in the geometry.
-     */
-    void visitFaces( FaceVisitor faceVisitor );
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryImpl.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryImpl.java
   2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryImpl.java
   2008-04-28 19:58:02 UTC (rev 495)
@@ -1,30 +0,0 @@
-package org.skycastle.util.geometry;
-
-import java.util.Collection;
-
-/**
- * @author Hans Haggstrom
- */
-public class GeometryImpl
-        implements Geometry
-{
-    public Collection<Face> getFaces()
-    {
-        throw new UnsupportedOperationException( "This method has not yet been 
implemented." ); // IMPLEMENT
-    }
-
-    public Collection<HalfEdge> getHalfEdges()
-    {
-        throw new UnsupportedOperationException( "This method has not yet been 
implemented." ); // IMPLEMENT
-    }
-
-    public Collection<Vertex> getVertexes()
-    {
-        throw new UnsupportedOperationException( "This method has not yet been 
implemented." ); // IMPLEMENT
-    }
-
-    public void visitFaces( FaceVisitor faceVisitor )
-    {
-        throw new UnsupportedOperationException( "This method has not yet been 
implemented." ); // IMPLEMENT
-    }
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryObject.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryObject.java
 2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryObject.java
 2008-04-28 19:58:02 UTC (rev 495)
@@ -1,15 +0,0 @@
-package org.skycastle.util.geometry;
-
-/**
- * Some geometrical object.
- *
- * @author Hans Haggstrom
- */
-public interface GeometryObject
-{
-    /**
-     * @return custom object associated with the geometry object.
-     */
-    Object getObject();
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryTransformation.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryTransformation.java
 2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryTransformation.java
 2008-04-28 19:58:02 UTC (rev 495)
@@ -1,25 +0,0 @@
-package org.skycastle.util.geometry;
-
-import org.skycastle.util.region.RegionOfInterest;
-
-/**
- * An operation that can transform a geometry in some way, returning the 
transformed geometry for a given area.
- *
- * @author Hans Haggstrom
- */
-public interface GeometryTransformation
-{
-    /**
-     * Creates a new geometry based on the input geometry.
-     * <p/>
-     * CHECK: Alternatively we could directly modify the input geometry in 
some way?
-     * Maybe easier, then we could just (lazily?) copy the input geometry if 
we do not want to modify the original?
-     *
-     * @param inputGeometry    geometry used as input for the transformation.
-     * @param regionOfInterest the region to calculate the output geometry for.
-     *
-     * @return a new Geometry, calculated from the specified input geometry 
for the specified region of interest.
-     */
-    Geometry transformGeometry( Geometry inputGeometry, RegionOfInterest 
regionOfInterest );
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryVisitor.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryVisitor.java
        2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/GeometryVisitor.java
        2008-04-28 19:58:02 UTC (rev 495)
@@ -1,11 +0,0 @@
-package org.skycastle.util.geometry;
-
-/**
- * A visitor for any geometrical objects.
- *
- * @author Hans Haggstrom
- */
-public interface GeometryVisitor
-        extends VertexVisitor, EdgeVisitor, FaceVisitor
-{
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/HalfEdge.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/HalfEdge.java
       2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/HalfEdge.java
       2008-04-28 19:58:02 UTC (rev 495)
@@ -1,47 +0,0 @@
-package org.skycastle.util.geometry;
-
-/**
- * A half edge is associated with a specific face.  It always has an opposing 
half edge with inversed start and end
- * vertexes, and another associated face.
- *
- * @author Hans Haggstrom
- */
-public interface HalfEdge
-        extends GeometryObject
-{
-    /**
-     * @return start vertex for this half edge.
-     */
-    Vertex getStart();
-
-    /**
-     * @return end vertex for this edge.
-     */
-    Vertex getEnd();
-
-    /**
-     * @return next half edge along the face boundary that this half edge 
follows.
-     */
-    HalfEdge getNext();
-
-    /**
-     * @return previous half edge along the face boundary that this half edge 
follows.
-     */
-    HalfEdge getPrevious();
-
-    /**
-     * @return the face that this half edge outlines.
-     */
-    Face getFace();
-
-    /**
-     * @return the face on the opposite side from the face associated with 
this half edge.
-     */
-    Face getOpposingFace();
-
-    /**
-     * @return the half edge going in the opposite direction, from the end 
vertex to the start vertex.
-     */
-    HalfEdge getOpposingHalfEdge();
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Vertex.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Vertex.java
 2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/Vertex.java
 2008-04-28 19:58:02 UTC (rev 495)
@@ -1,27 +0,0 @@
-package org.skycastle.util.geometry;
-
-import org.skycastle.util.vectormath.vector.SpatialVector;
-
-/**
- * @author Hans Haggstrom
- */
-public interface Vertex
-        extends GeometryObject
-{
-
-    /**
-     * @return the coordinate of this vertex.
-     */
-    SpatialVector getCoordinate();
-
-    /**
-     * @return a pointer to an arbitrary half edge that has this vertex as its 
source.
-     */
-    HalfEdge getOutgoingEdge();
-
-    /**
-     * @param visitor a visitor to visit all half edges outgoing from this 
vertex.
-     */
-    void visitOutgoingEdges( EdgeVisitor visitor );
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexImpl.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexImpl.java
     2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexImpl.java
     2008-04-28 19:58:02 UTC (rev 495)
@@ -1,9 +0,0 @@
-package org.skycastle.util.geometry;
-
-/**
- * @author Hans Haggstrom
- */
-public class VertexImpl
-{
-
-}

Deleted: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexVisitor.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexVisitor.java
  2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/geometry/VertexVisitor.java
  2008-04-28 19:58:02 UTC (rev 495)
@@ -1,14 +0,0 @@
-package org.skycastle.util.geometry;
-
-/**
- * @author Hans Haggstrom
- */
-public interface VertexVisitor
-{
-    /**
-     * @param vertex the vertex to visit.
-     *
-     * @return true to continue visiting, false to stop visiting.
-     */
-    boolean visitVertex( Vertex vertex );
-}

Modified: 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/time/Time.java
===================================================================
--- 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/time/Time.java   
    2008-04-28 19:56:40 UTC (rev 494)
+++ 
trunk/skycastle/modules/utils/src/main/java/org/skycastle/util/time/Time.java   
    2008-04-28 19:58:02 UTC (rev 495)
@@ -10,40 +10,44 @@
 
 /**
  * Represents a point in time, possibly in a virtual simulated world.
- *
+ * <p/>
  * Immutable.
- *
+ * <p/>
  * TODO: Create a MutableTime, and TimeImpl.
- *
+ * <p/>
  * IDEA: For transfering Time into some textual representation of a date, a 
FictiousCalendar might be created,
- * that this time acts like a real calendar, and not like a point in time.  So 
it'd take time objects, and return string representations of them,
- * or allow setting / getting their value based on calendar properties such as 
day, month, year, etc.
- * Perhaps the calendar could include concepts such as day, weekday, weeks, 
months, years, epochs..
- * So there could be a "century of the fruitbat", etc.  It could also count 
down (days to the coming of the prophet)
- * (or would that just be a custom place for the epoch?), etc.
- * The calendar configurations could be loaded from xml / csv, with general 
bean serialization mechanisms.
+ * that this time acts like a real calendar, and not like a point in time.  So 
it'd take time objects, and
+ * return string representations of them, or allow setting / getting their 
value based on calendar properties
+ * such as day, month, year, etc. Perhaps the calendar could include concepts 
such as day, weekday, weeks,
+ * months, years, epochs.. So there could be a "century of the fruitbat", etc. 
 It could also count down (days
+ * to the coming of the prophet) (or would that just be a custom place for the 
epoch?), etc. The calendar
+ * configurations could be loaded from xml / csv, with general bean 
serialization mechanisms.
+ * <p/>
+ * NOTE: You can use YodaTime instead also, it has very good calendar support 
for traditional calendars.
  *
  * @author Hans Haggstrom
  */
 public interface Time
-    extends Comparable, Serializable, Cloneable
+        extends Comparable, Serializable, Cloneable
 {
     /**
-     * @return seconds since the 0 point on the timeline.  Negative if the 
time is before the start of the epoch.
+     * @return seconds since the 0 point on the timeline.  Negative if the 
time is before the start of the
+     *         epoch.
      */
     double getSecondsSinceEpoch();
 
     /**
      * @return a new Time object, representing the same point in time as this 
Time object.
+     *
      * @throws CloneNotSupportedException should not be thrown, but needed to 
override the clone() method.
      */
     Time clone() throws CloneNotSupportedException;
 
     /**
-     * Adds some duration to this time, and returns the new added time.
-     * This time is not modified.
+     * Adds some duration to this time, and returns the new added time. This 
time is not modified.
      *
      * @param duration the duration in seconds to add to the returned time.
+     *
      * @return the new time, with the specified duration added to the time.
      */
     Time createAddedTime( double duration );


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

Other related posts:

  • » [skycastle-commits] SF.net SVN: skycastle: [495] trunk/skycastle/modules/utils/src/main/java/ org/skycastle/util