Package ch.poole.openinghoursparser
Class Nth
- java.lang.Object
-
- ch.poole.openinghoursparser.Nth
-
- All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>
public class Nth extends java.lang.ObjectContainer for objects from the opening_hours specification
-
-
Field Summary
Fields Modifier and Type Field Description static intINVALID_NTH
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Nthcopy()Create a copy of the objeczbooleanequals(java.lang.Object other)intgetEndNth()intgetStartNth()inthashCode()voidsetEndNth(int endNth)voidsetStartNth(int startNth)java.lang.StringtoDebugString()Create a string that identifies which class created it for debugging and testingjava.lang.StringtoString()
-
-
-
Field Detail
-
INVALID_NTH
public static final int INVALID_NTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Nth
public Nth()
Default constructor
-
Nth
public Nth(Nth n)
Construct a new Nth with the same content- Parameters:
n- original Nth
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
-
hashCode
public int hashCode()
-
getStartNth
public int getStartNth()
- Returns:
- the startNth
-
getEndNth
public int getEndNth()
- Returns:
- the endNth of Nth.INVALID_NTH if not set/not a range
-
setStartNth
public void setStartNth(int startNth)
- Parameters:
startNth- the startNth to set
-
setEndNth
public void setEndNth(int endNth)
- Parameters:
endNth- the endNth to set
-
copy
public Nth copy()
Description copied from interface:CopyCreate a copy of the objecz- Returns:
- a copy of the object
-
toDebugString
public java.lang.String toDebugString()
Create a string that identifies which class created it for debugging and testing- Returns:
- the output of toString with the class name prepended
-
-