choco.cp.solver.constraints.global.geost.frames
Class Frame

java.lang.Object
  extended by choco.cp.solver.constraints.global.geost.frames.Frame
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
DistLinearFrame, ForbiddenRegionFrame, NonOverlappingFrame

public class Frame
extends Object
implements Externalizable

A class that all Frames should extend. It contains info and functionality common to all frames.

See Also:
Serialized Form

Constructor Summary
Frame()
           
 
Method Summary
 void addForbidRegions(int oid, List<Region> regions)
          Adds a given shape id and a Vector of regions to the Frame.
 HashMap<Integer,List<Region>> getRelForbidRegions()
          Gets the Relative forbidden regions of this frame.
 List<Region> getRelForbidRegions(int oid)
          Gets the Relative forbidden regions of a certain shape id.
 void readExternal(ObjectInput in)
           
 int size()
          Returns the size of the frame.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Frame

public Frame()
Method Detail

getRelForbidRegions

public final HashMap<Integer,List<Region>> getRelForbidRegions()
Gets the Relative forbidden regions of this frame. It return a hash table where the key is an Integer object representing the shape id and the value a vector of Region object.


addForbidRegions

public final void addForbidRegions(int oid,
                                   List<Region> regions)
Adds a given shape id and a Vector of regions to the Frame.


getRelForbidRegions

public final List<Region> getRelForbidRegions(int oid)
Gets the Relative forbidden regions of a certain shape id. It returns Vector of Region object.


size

public final int size()
Returns the size of the frame.


writeExternal

public final void writeExternal(ObjectOutput out)
                         throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public final void readExternal(ObjectInput in)
                        throws IOException,
                               ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 2012. All Rights Reserved.