< Back
 

# Packages

-  package root
  Definition Classes
    root
-  package uk
  Definition Classes
    root
-  package gov
  Definition Classes
    uk
-  package hmrc
  Definition Classes
    gov
-  package ct
  Definition Classes
    hmrc
-  package computations
  Definition Classes
    ct
-  package Validators
  Definition Classes
    computations
-  package calculations
  Definition Classes
    computations
-  package capitalAllowanceAndSBA
  Definition Classes
    computations
-  package covidSupport
  Definition Classes
    computations
-  package formats
  Definition Classes
    computations
-  package lowEmissionCars
  Definition Classes
    computations
-  package machineryAndPlant
  Definition Classes
    computations
-  package nir
  Definition Classes
    computations
-  package retriever
  Definition Classes
    computations
- AP1
- AP2
- AP3
- Building
- CP1
- CP100
- CP101
- CP102
- CP103
- CP104
- CP106
- CP107
- CP108
- CP111
- CP113
- CP114
- CP115
- CP116
- CP117
- CP118
- CP120
- CP127
- CP128
- CP129
- CP130
- CP14
- CP15
- CP16
- CP17
- CP18
- CP186
- CP19
- CP2
- CP20
- CP21
- CP22
- CP23
- CP234
- CP235
- CP237
- CP238
- CP238a
- CP239
- CP24
- CP240
- CP245
- CP246
- CP247
- CP248
- CP249
- CP25
- CP251
- CP252
- CP253
- CP256
- CP257
- CP258
- CP259
- CP26
- CP263
- CP264
- CP265
- CP266
- CP27
- CP273
- CP274
- CP278
- CP279
- CP28
- CP281
- CP281a
- CP281b
- CP281c
- CP281d
- CP282
- CP283
- CP283a
- CP283b
- CP283c
- CP283d
- CP284
- CP285
- CP286
- CP286a
- CP286b
- CP287
- CP288
- CP288a
- CP288b
- CP289
- CP29
- CP290
- CP290a
- CP290b
- CP290c
- CP290d
- CP291
- CP292
- CP293
- CP294
- CP295
- CP296
- CP297
- CP298
- CP30
- CP301
- CP3010
- CP302
- CP3020
- CP303
- CP3030
- CP305
- CP31
- CP32
- CP33
- CP34
- CP35
- CP36
- CP37
- CP38
- CP39
- CP40
- CP43
- CP44
- CP45
- CP46
- CP47
- CP48
- CP49
- CP50
- CP500
- CP501
- CP502
- CP503
- CP504
- CP505
- CP506
- CP507
- CP508
- CP509
- CP51
- CP510
- CP511
- CP512
- CP513
- CP514
- CP515
- CP52
- CP53
- CP54
- CP55
- CP56
- CP57
- CP58
- CP59
- CP6
- CP665
- CP666
- CP667
- CP668
- CP669
- CP670
- CP671
- CP672
- CP672a
- CP673
- CP674
- CP7
- CP78
- CP79
- CP8
- CP80
- CP81
- CP81Input
- CP82
- CP83
- CP84
- CP85
- CP86
- CP87
- CP87Input
- CP87a
- CP88
- CP89
- CP90
- CP91
- CP91Input
- CP92
- CP93
- CP95
- CP96
- CP98
- CP980
- CP981
- CP982
- CP983
- CP984
- CP986
- CP99
- CP997
- CP997Abstract
- CP997NI
- CP997c
- CP997d
- CP997e
- CP998
- CP999
- CPAux1
- CPAux2
- CPAux3
- CPQ10
- CPQ1000
- CPQ11
- CPQ117
- CPQ17
- CPQ18
- CPQ19
- CPQ20
- CPQ21
- CPQ321
- CPQ7
- CPQ8
- HmrcAccountingPeriod
- SBA01
- SBAHelper

c

uk.gov.hmrc.ct.computations

# AP2 

###
Companion object AP2

#### case class AP2(inputValue: Option[Int], defaultValue: Option[Int]) extends CtBoxIdentifier with CtOptionalInteger with InputWithDefault[Int] with ValidatableBox[AccountsBoxRetriever with ComputationsBoxRetriever] with CtTypeConverters with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, CtTypeConverters, ValidatableBox[AccountsBoxRetriever with ComputationsBoxRetriever], ExtraValidation, Validators, InputWithDefault[Int], CtOptionalInteger, OptionalCtValue[Int], CtValue[Option[Int]], CtBoxIdentifier, AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. AP2
2. Serializable
3. Serializable
4. Product
5. Equals
6. CtTypeConverters
7. ValidatableBox
8. ExtraValidation
9. Validators
10. InputWithDefault
11. CtOptionalInteger
12. OptionalCtValue
13. CtValue
14. CtBoxIdentifier
15. AnyRef
16. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new AP2(inputValue: Option[Int], defaultValue: Option[Int])

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def And(predicates: () ⇒ Boolean*)(): Boolean
   Attributes
     protected
   Definition Classes
     Validators
5.  def Or(predicates: () ⇒ Boolean*)(): Boolean
   Attributes
     protected
   Definition Classes
     Validators
6.  def asBoxString: Option[String]
   Definition Classes
     CtValue
7.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
8.  def asInt: Option[Int]
   Definition Classes
     CtOptionalInteger
9.  def atLeastOneBoxHasValue(boxId: String, boxes: OptionalCtValue[_]*)(): Set[CtValidation]
   Attributes
     protected
   Definition Classes
     ValidatableBox
10.  def belowMin(value: Option[Int], min: Int = MIN_MONEY_AMOUNT_ALLOWED)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
11.  def belowMinWithMax(value: Option[Int], max: Int, min: Int = MIN_MONEY_AMOUNT_ALLOWED)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
12.  val boxId: String
    Attributes
      protected
    Definition Classes
      Validators
13.  def cannotExistErrorIf(predicate: ⇒ Boolean)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
14.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... ) @native()
15.  def collectErrors(predicates: () ⇒ Set[CtValidation]*): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
16.  def collectWithBoxId(newBoxId: String)(errors: Set[CtValidation]): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
17.  implicit def convert(catoOptionalBigDecimal: CtOptionalBigDecimal): Option[BigDecimal]
    Definition Classes
      CtTypeConverters
18.  implicit def convert(catoInt: CtOptionalInteger): Int
    Definition Classes
      CtTypeConverters
19.  implicit def convert(catoInt: CtInteger): Int
    Definition Classes
      CtTypeConverters
20.  implicit def convert(catoBoolean: CtOptionalBoolean): Boolean
    Definition Classes
      CtTypeConverters
21.  implicit def convert(catoBoolean: CtBoolean): Boolean
    Definition Classes
      CtTypeConverters
22.  val defaultValue: Option[Int]
    Definition Classes
      AP2 → InputWithDefault
23.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
24.  def errorMessage[A](messageKey: String, errorArguments: Seq[A] = Seq.empty): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
25.  def exceedsMax(value: Option[Int], max: Int = MAX_MONEY_AMOUNT_ALLOWED, errorMsg: String = "exceeds.max")(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
26.  def failIf(condition: ⇒ Boolean)(validationErrors: ⇒ Set[CtValidation])(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
27.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
28.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
29.  def hasValue: Boolean
    Definition Classes
      OptionalCtValue
30.  def id: String
    Definition Classes
      CtBoxIdentifier
31.  def inputProvided: Boolean
    Definition Classes
      InputWithDefault
32.  val inputValue: Option[Int]
    Definition Classes
      AP2 → InputWithDefault
33.  def isEmpty(value: Option[_]): Boolean
    Attributes
      protected
    Definition Classes
      Validators
34.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
35.  def isPositive: Boolean
    Definition Classes
      CtOptionalInteger
36.  def minus(other: Int): Int
    Definition Classes
      CtOptionalInteger
37.  def minus(other: CtInteger): Int
    Definition Classes
      CtOptionalInteger
38.  def minus(other: CtOptionalInteger): Int
    Definition Classes
      CtOptionalInteger
39.  val name: String
    Definition Classes
      CtBoxIdentifier
40.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
41.  def noValue: Boolean
    Definition Classes
      OptionalCtValue
42.  def nonEmpty(value: Option[_]): Boolean
    Attributes
      protected
    Definition Classes
      Validators
43.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
44.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
45.  def orZero: Int
    Definition Classes
      CtOptionalInteger
46.  def passIf(condition: ⇒ Boolean)(validationErrors: ⇒ Set[CtValidation])(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
47.  def plus(other: Int): Int
    Definition Classes
      CtOptionalInteger
48.  def plus(other: CtInteger): Int
    Definition Classes
      CtOptionalInteger
49.  def plus(other: CtOptionalInteger): Int
    Definition Classes
      CtOptionalInteger
50.  val postCodeRegex: String
    Attributes
      protected
    Definition Classes
      ExtraValidation
51.  def replaceBoxId(newBoxId: String, errors: () ⇒ Set[CtValidation])(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
52.  def requiredErrorIf(predicate: ⇒ Boolean)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
53.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
54.  def validate(boxRetriever: AccountsBoxRetriever with ComputationsBoxRetriever): Set[CtValidation]
    Definition Classes
      AP2 → ValidatableBox
55.  def validateAllFilledOrEmptyStrings(boxId: String, allBoxes: Set[CtValue[String]])(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
56.  def validateAllFilledOrEmptyStringsForBankDetails(boxRetriever: RepaymentsBoxRetriever, boxId: String)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
57.  def validateAsMandatory[U](box: CtValue[U] with CtBoxIdentifier)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
58.  def validateAsMandatory[A](boxId: String, value: Option[A])(): Set[CtValidation]
    Definition Classes
      ExtraValidation
59.  def validateBooleanAsMandatory(boxId: String, box: OptionalBooleanIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
60.  def validateBooleanAsTrue(boxId: String, box: OptionalBooleanIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
61.  def validateCoHoStringReturnIllegalChars(boxId: String, value: String, errorCodeBoxId: Option[String] = None)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
62.  def validateCoHoStringReturnIllegalChars(boxId: String, box: OptionalStringIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
63.  def validateCohoNameField(boxId: String, box: StringIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
64.  def validateCohoOptionalNameField(boxId: String, box: OptionalStringIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
65.  def validateDateAsAfter(boxId: String, box: OptionalDateIdBox, dateToCompare: LocalDate)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
66.  def validateDateAsBefore(boxId: String, box: OptionalDateIdBox, dateToCompare: LocalDate)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
67.  def validateDateAsBetweenInclusive(boxId: String, date: Option[LocalDate], minDate: LocalDate, maxDate: LocalDate, messageId: String)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
68.  def validateDateAsBetweenInclusive(boxId: String, box: OptionalDateIdBox, minDate: LocalDate, maxDate: LocalDate)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
69.  def validateDateAsBlank(boxId: String, box: OptionalDateIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
70.  def validateDateAsMandatory(boxId: String, date: Option[LocalDate], messageId: String)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
71.  def validateDateAsMandatory(boxId: String, box: OptionalDateIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
72.  def validateDateIsInclusive(boxId: String, minDate: LocalDate, dateToCompare: Option[LocalDate], maxDate: LocalDate): Set[CtValidation]
    Definition Classes
      ExtraValidation
73.  def validateIntegerAsBlank(boxId: String, box: OptionalIntIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
74.  def validateIntegerAsMandatory(boxId: String, box: OptionalIntIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
75.  def validateIntegerRange(boxId: String, box: OptionalIntIdBox, min: Int, max: Int)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
76.  def validateMoney(value: Option[Int], min: Int = -99999999, max: Int = 99999999)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      Validators
77.  def validateNotEmptyStringByLength(boxId: String, value: String, min: Int, max: Int)(): Set[CtValidation]
    Definition Classes
      ValidatableBox
78.  def validateNotEmptyStringByLengthMin(boxId: String, value: String, min: Int)(): Set[CtValidation]
    Definition Classes
      ValidatableBox
79.  def validateOptionalIntegerAsEqualTo(box: CtBoxIdentifier with CtOptionalInteger, equalToBox: CtBoxIdentifier with CtOptionalInteger): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
80.  def validateOptionalStringByLength(boxId: String, box: OptionalStringIdBox, min: Int, max: Int)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
81.  def validateOptionalStringByLength(value: Option[String], min: Int, max: Int, boxId: String, boxIdPrefix: Option[String])(): Set[CtValidation]
    Definition Classes
      ExtraValidation
82.  def validateOptionalStringByLengthMax(boxId: String, box: OptionalStringIdBox, max: Int)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
83.  def validateOptionalStringByLengthMin(boxId: String, box: OptionalStringIdBox, min: Int)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
84.  def validateOptionalStringByRegex(boxId: String, box: OptionalStringIdBox, regex: String)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
85.  def validatePositiveBigDecimal(box: OptionalBigDecimalIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
86.  def validatePositiveInteger(box: OptionalIntIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
87.  def validatePostcode(boxId: String, box: OptionalStringIdBox)(): Set[CtValidation]
    Definition Classes
      ValidatableBox
88.  def validatePostcode(boxId: String, postcode: Option[String]): Set[CtValidation]
    Definition Classes
      ExtraValidation
89.  def validatePostcodeLength(boxId: String, postcode: String): Set[CtValidation]
    Definition Classes
      ExtraValidation
90.  def validatePostcodeRegex(boxId: String, postcode: String): Set[CtValidation]
    Definition Classes
      ExtraValidation
91.  def validateRawStringByRegex(boxId: String, value: String, errorCodeBoxId: String, regex: String)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
92.  def validateStringAsBlank(boxId: String, box: OptionalStringIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
93.  def validateStringAsMandatory(boxId: String, box: OptionalStringIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
94.  def validateStringAsMandatoryIfPAYEEQ1False(boxRetriever: RepaymentsBoxRetriever, boxId: String, box: OptionalStringIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
95.  def validateStringAsMandatoryWithNoTrailingWhitespace(boxId: String, box: OptionalStringIdBox)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
96.  def validateStringByLength(boxId: String, value: String, errorCodeId: String, min: Int, max: Int)(): Set[CtValidation]
    Definition Classes
      ValidatableBox
97.  def validateStringByLength(boxId: String, box: StringIdBox, min: Int, max: Int)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
98.  def validateStringByRegex(boxId: String, box: StringIdBox, regex: String)(): Set[CtValidation]
    Attributes
      protected
    Definition Classes
      ValidatableBox
99.  def validateStringByRegex(boxId: String, str: String, regex: String): Set[CtValidation]
    Definition Classes
      ExtraValidation
100.  def validateStringMaxLength(boxId: String, value: String, max: Int)(): Set[CtValidation]
     Definition Classes
       ValidatableBox
101.  def validateZeroOrNegativeInteger(box: OptionalIntIdBox)(): Set[CtValidation]
     Attributes
       protected
     Definition Classes
       ValidatableBox
102.  def validateZeroOrPositiveBigDecimal(box: OptionalBigDecimalIdBox)(): Set[CtValidation]
     Attributes
       protected
     Definition Classes
       ValidatableBox
103.  def validateZeroOrPositiveInteger(box: OptionalIntIdBox)(): Set[CtValidation]
     Attributes
       protected
     Definition Classes
       ValidatableBox
104.  def validateZeroOrPositiveInteger(boxId: String, value: Option[Int]): Set[CtValidation]
     Definition Classes
       ExtraValidation
105.  val validationSuccess: Set[CtValidation]
     Definition Classes
       ValidatableBox
106.  def value: Option[Int]
     Definition Classes
       InputWithDefault
107.  final def wait(): Unit
     Definition Classes
       AnyRef
     Annotations
       @throws( ... )
108.  final def wait(arg0: Long, arg1: Int): Unit
     Definition Classes
       AnyRef
     Annotations
       @throws( ... )
109.  final def wait(arg0: Long): Unit
     Definition Classes
       AnyRef
     Annotations
       @throws( ... ) @native()

### Inherited from Serializable

### Inherited from Product

### Inherited from Equals

### Inherited from CtTypeConverters

### Inherited from ValidatableBox[AccountsBoxRetriever with ComputationsBoxRetriever]

### Inherited from ExtraValidation

### Inherited from Validators

### Inherited from InputWithDefault[Int]

### Inherited from CtOptionalInteger

### Inherited from OptionalCtValue[Int]

### Inherited from CtValue[Option[Int]]

### Inherited from CtBoxIdentifier

### Inherited from AnyRef

### Inherited from Any

### Ungrouped