Class Links

java.lang.Object
com.genologics.ri.Links
All Implemented Interfaces:
Batch<Link>, Serializable, Iterable<Link>

public class Links extends Object implements Batch<Link>, Serializable
The representation of a list of resource links.
See Also:
  • Field Details

  • Constructor Details

    • Links

      public Links()
      Default constructor.
    • Links

      public Links(int capacity)
      Constructor with initial capacity.
      Parameters:
      capacity - The initial capacity of the link list.
    • Links

      public Links(Collection<Link> links)
      Constructor from a collection of links.
      Parameters:
      links - The collection of links.
    • Links

      public Links(Links links)
      Copy constructor.
      Parameters:
      links - The Links object to copy.
  • Method Details

    • getLinks

      public List<Link> getLinks()
      Gets the list of links.
      Returns:
      The list of links.
    • add

      public Link add(Link link)
      Adds a link to this collection.
      Parameters:
      link - The link to add.
      Returns:
      The link that was added.
    • add

      public Link add(Linkable<?> link)
      Adds a linkable object as a link to this collection.
      Parameters:
      link - The linkable object to add.
      Returns:
      The link that was created and added.
    • addAll

      public void addAll(Links links)
      Adds all links from another Links object.
      Parameters:
      links - The Links object containing links to add.
    • addAll

      public void addAll(Collection<Link> links)
      Adds all links from a collection.
      Parameters:
      links - The collection of links to add.
    • getList

      public List<Link> getList()
      Gets the list of links for the Batch interface.
      Specified by:
      getList in interface Batch<Link>
      Returns:
      The list of links.
    • getSize

      public int getSize()
      Gets the number of links in this collection.
      Specified by:
      getSize in interface Batch<Link>
      Returns:
      The number of links.