Package org.jcsp.net

Class Profile

java.lang.Object
org.jcsp.net.Profile

public class Profile extends Object

This class is used to hold profiles of Nodes and Links.

Node profiles are not currently used.

Profile functionality is still being implemented.
  • Field Details

    • alwaysMatchProfile

      private static Profile alwaysMatchProfile
    • linkProfiles

      private static Hashtable linkProfiles
    • nodeProfiles

      private static Hashtable nodeProfiles
    • name

      private String name
    • exact

      private boolean exact
    • system

      private boolean system
    • requirements

      private Requirement[] requirements
  • Constructor Details

    • Profile

      private Profile(String name, Requirement[] requirements, boolean exact, boolean system)
  • Method Details

    • createNewLinkProfile

      static void createNewLinkProfile(String name, Requirement[] requirements, boolean exact)
    • createNewNodeProfile

      static void createNewNodeProfile(String name, Requirement[] requirements, boolean exact)
    • getLinkProfile

      public static Profile getLinkProfile(String name)
      Returns a link profile of a certain name from a static collection of link profiles.
      Parameters:
      name - the name of the Profile to obtain.
      Returns:
      a matching link profile or null if no match is found.
    • getNodeProfile

      public static Profile getNodeProfile(String name)
      Returns a Node profile of a certain name from a static collection of Node profiles.
      Parameters:
      name - the name of the Profile to obtain.
      Returns:
      a matching Node profile or null if no match is found.
    • getAlwaysMatchProfile

      static Profile getAlwaysMatchProfile()
    • getProtocolProfile

      static Profile getProtocolProfile(ProtocolID protocolID)
    • matches

      int matches(Specification[] specs)
      This tests whether a an array of Specification objects meet the requirements of this profile. This method will sort the array of specs in order of name. This sort will change the original array.
    • requiresExactMatch

      boolean requiresExactMatch()
    • equals

      public boolean equals(Object o)
      Compares this Profile with another object.
      Overrides:
      equals in class Object
      Parameters:
      o - another object to compare with this object.
      Returns:
      true iff the supplied object is a Profile object that is exactly equal.
    • hashCode

      public int hashCode()
      Returns a hash code for this object that follows the standard rule for hash codes stated in the Object class.
      Overrides:
      hashCode in class Object
      Returns:
      an int hash code for this object.