Spring Hateoas

org.springframework.hateoas
Class VndErrors

java.lang.Object
  extended by org.springframework.hateoas.VndErrors
All Implemented Interfaces:
Iterable<VndErrors.VndError>

public class VndErrors
extends Object
implements Iterable<VndErrors.VndError>

A representation model class to be rendered as specified for the media type application/vnd.error.

Author:
Oliver Gierke
See Also:
https://github.com/blongden/vnd.error

Nested Class Summary
static class VndErrors.VndError
          A single VndErrors.VndError.
 
Constructor Summary
protected VndErrors()
          Protected default constructor to allow JAXB marshalling.
  VndErrors(List<VndErrors.VndError> errors)
          Creates a new VndErrors wrapper for the given VndErrors.
  VndErrors(String logref, String message, Link... links)
          Creates a new VndErrors instance containing a single VndErrors.VndError with the given logref, message and optional Links.
  VndErrors(VndErrors.VndError error, VndErrors.VndError... errors)
          Creates a new VndErrors wrapper for at least one VndErrors.VndError.
 
Method Summary
 VndErrors add(VndErrors.VndError error)
          Adds an additional VndErrors.VndError to the wrapper.
 boolean equals(Object obj)
           
 int hashCode()
           
 Iterator<VndErrors.VndError> iterator()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VndErrors

public VndErrors(String logref,
                 String message,
                 Link... links)
Creates a new VndErrors instance containing a single VndErrors.VndError with the given logref, message and optional Links.

Parameters:
logref - must not be null or empty.
message - must not be null or empty.
links -

VndErrors

public VndErrors(VndErrors.VndError error,
                 VndErrors.VndError... errors)
Creates a new VndErrors wrapper for at least one VndErrors.VndError.

Parameters:
errors - must not be null.
errors -

VndErrors

public VndErrors(List<VndErrors.VndError> errors)
Creates a new VndErrors wrapper for the given VndErrors.

Parameters:
errors - must not be null or empty.

VndErrors

protected VndErrors()
Protected default constructor to allow JAXB marshalling.

Method Detail

add

public VndErrors add(VndErrors.VndError error)
Adds an additional VndErrors.VndError to the wrapper.

Parameters:
errors -

iterator

public Iterator<VndErrors.VndError> iterator()
Specified by:
iterator in interface Iterable<VndErrors.VndError>

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

Spring Hateoas

Copyright © 2012-2014-2014 Pivotal, Inc.. All Rights Reserved.