com.stvconsultants.easygloss.footnotes
Class Footnote

java.lang.Object
  extended by com.stvconsultants.easygloss.footnotes.Footnote

public class Footnote
extends java.lang.Object

A loose Annotation for matching against other annotations.

Author:
Stephen Connolly

Constructor Summary
Footnote(java.lang.annotation.Annotation annotation)
          Creates a new instance of Footnote.
Footnote(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Creates a new instance of Footnote.
 
Method Summary
 java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
          Required by Annotation interface.
 boolean equals(java.lang.Object value)
          Returns true if the specified object represents an annotation that is logically equivalent to this one.
 Footnote excluding(java.lang.String name, java.lang.Object value)
          Add a criterion to the footnote.
 int hashCode()
          Returns the hash code of this footnote.
 Footnote including(java.lang.String name, java.lang.Object value)
          Add a criterion to the footnote.
 boolean matches(java.lang.annotation.Annotation that)
          Returns true if the specified object represents an annotation that is logically equivalent to this one.
 Footnote matching(java.lang.String name, java.lang.String regex)
          Add a criterion to the footnote.
 java.lang.String toString()
          Generate a string representation of the Footnote.
 Footnote with(java.lang.String name, java.lang.Object value)
          Add a criterion to the footnote.
 Footnote without(java.lang.String name, java.lang.Object value)
          Add a criterion to the footnote.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Footnote

public Footnote(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Creates a new instance of Footnote.

Parameters:
annotationType - the type of Annotation that this footnote will match

Footnote

public Footnote(java.lang.annotation.Annotation annotation)
Creates a new instance of Footnote.

Parameters:
annotation - the Annotation that this footnote will match
Method Detail

annotationType

public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
Required by Annotation interface.

Returns:
The annotation class

equals

public boolean equals(java.lang.Object value)
Returns true if the specified object represents an annotation that is logically equivalent to this one. In other words, returns true if the specified object is an instance of the same annotation type as this instance, all of whose members are equal to the corresponding member of this annotation, as defined below:

Overrides:
equals in class java.lang.Object
Parameters:
value - The object to check for equality
Returns:
If the object is logically equivalent to this one.

matches

public boolean matches(java.lang.annotation.Annotation that)
Returns true if the specified object represents an annotation that is logically equivalent to this one. In other words, returns true if the specified object is an instance of the same annotation type as this instance, all of whose members are equal to the corresponding member of this annotation, as defined below:

Parameters:
that - The annotation to check for matching
Returns:
If the annotation matches this one.
Since:
1.1

hashCode

public int hashCode()
Returns the hash code of this footnote.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.

toString

public java.lang.String toString()
Generate a string representation of the Footnote.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this instance.

with

public Footnote with(java.lang.String name,
                     java.lang.Object value)
Add a criterion to the footnote.

Parameters:
name - The element name.
value - The value that the element value must be equal to.
Returns:
This instance for method chaining.

without

public Footnote without(java.lang.String name,
                        java.lang.Object value)
Add a criterion to the footnote.

Parameters:
name - The element name.
value - A value that the element value must not equal.
Returns:
This instance for method chaining.

including

public Footnote including(java.lang.String name,
                          java.lang.Object value)
Add a criterion to the footnote.

Parameters:
name - The element name.
value - A value that the element array value must contain.
Returns:
This instance for method chaining.

excluding

public Footnote excluding(java.lang.String name,
                          java.lang.Object value)
Add a criterion to the footnote.

Parameters:
name - The element name.
value - A value that the element array value must not contain.
Returns:
This instance for method chaining.

matching

public Footnote matching(java.lang.String name,
                         java.lang.String regex)
Add a criterion to the footnote.

Parameters:
name - The element name.
regex - The regex that the element value must match.
Returns:
This instance for method chaining.


Copyright © 2006 null. All Rights Reserved.